40 #ifndef __TSCH_QUEUE_H__ 41 #define __TSCH_QUEUE_H__ 88 mac_callback_t sent,
void *ptr);
int tsch_queue_global_packet_count(void)
Returns the number of packets currently in all TSCH queues.
struct tsch_neighbor * tsch_queue_get_nbr(const linkaddr_t *addr)
Get a TSCH neighbor.
Header file for the ringbufindex library
static uip_ds6_addr_t * addr
Pointer to a nbr cache entry.
Header file for the link-layer address representation
TSCH neighbor information.
void tsch_queue_init(void)
Initialize TSCH queue module.
void tsch_queue_update_all_backoff_windows(const linkaddr_t *dest_addr)
Decrement backoff window for the queue(s) able to Tx to a given address.
struct tsch_neighbor * tsch_queue_get_time_source(void)
Get the TSCH time source (we currently assume there is only one)
struct tsch_packet * tsch_queue_get_packet_for_dest_addr(const linkaddr_t *addr, struct tsch_link *link)
Returns the first packet that can be sent to a given address on a given link.
void tsch_queue_free_unused_neighbors(void)
Deallocate all neighbors with empty queue.
int tsch_queue_backoff_expired(const struct tsch_neighbor *n)
Is the neighbor backoff timer expired?
struct tsch_neighbor * tsch_queue_add_nbr(const linkaddr_t *addr)
Add a TSCH neighbor queue.
void tsch_queue_backoff_inc(struct tsch_neighbor *n)
Increment backoff exponent of a given neighbor queue, pick a new window.
int tsch_queue_update_time_source(const linkaddr_t *new_addr)
Update TSCH time source.
struct tsch_packet * tsch_queue_get_packet_for_nbr(const struct tsch_neighbor *n, struct tsch_link *link)
Returns the first packet that can be sent from a queue on a given link.
int tsch_queue_packet_sent(struct tsch_neighbor *n, struct tsch_packet *p, struct tsch_link *link, uint8_t mac_tx_status)
Updates neighbor queue state after a transmission.
struct tsch_packet * tsch_queue_remove_packet_from_queue(struct tsch_neighbor *n)
Remove first packet from a neighbor queue.
void tsch_queue_reset(void)
Reset neighbor queues module.
int tsch_queue_is_empty(const struct tsch_neighbor *n)
Is the neighbor queue empty?
int tsch_queue_packet_count(const linkaddr_t *addr)
Returns the number of packets currently a given neighbor queue.
An IEEE 802.15.4-2015 TSCH link (also called cell or slot)
struct tsch_packet * tsch_queue_get_unicast_packet_for_any(struct tsch_neighbor **n, struct tsch_link *link)
Gets the head packet of any neighbor queue with zero backoff counter.
void tsch_queue_free_packet(struct tsch_packet *p)
Free a packet.
struct tsch_packet * tsch_queue_add_packet(const linkaddr_t *addr, uint8_t max_transmissions, mac_callback_t sent, void *ptr)
Add packet to neighbor queue.
void tsch_queue_backoff_reset(struct tsch_neighbor *n)
Reset neighbor backoff.