|
Contiki 3.x
|
The collect module implements a hop-by-hop reliable data collection mechanism. More...
Functions | |
| static void | send_queued_packet (struct collect_conn *c) |
| This function is called when a queued packet should be sent out. More... | |
| static void | retransmit_callback (void *ptr) |
| This function is called from a ctimer that is setup when a packet is sent. More... | |
| static void | retransmit_not_sent_callback (void *ptr) |
| This function is called from a ctimer that is setup when a packet is first transmitted. More... | |
| static uint16_t | rtmetric_compute (struct collect_conn *tc) |
| This function computes the current rtmetric by adding the last known rtmetric from our parent with the link estimate to the parent. | |
| static void | bump_advertisement (struct collect_conn *c) |
| This function is called when the route advertisements need to be transmitted more rapidly. | |
| static void | update_parent (struct collect_conn *tc) |
| This function is called to update the current parent node. More... | |
| static void | update_rtmetric (struct collect_conn *tc) |
| This function is called whenever there is a chance that the routing metric has changed. More... | |
| static void | retransmit_current_packet (struct collect_conn *c) |
| This function is called to retransmit the first packet on the send queue. | |
The collect module implements a hop-by-hop reliable data collection mechanism.
The collect module uses 2 channels; one for neighbor discovery and one for data packets.
|
static |
This function is called from a ctimer that is setup when a packet is sent.
The purpose of this function is to either retransmit the current packet, or timeout the packet. The descision is made depending on how many times the packet has been transmitted. The ctimer is set up in the function node_packet_sent().
Definition at line 1184 of file collect.c.
References retransmit_current_packet().
Referenced by retransmit_not_sent_callback().
|
static |
This function is called from a ctimer that is setup when a packet is first transmitted.
If the MAC layer signals that the packet is sent, the ctimer will be stopped before this function is called. If this function ends up being called, we add the maximum number of MAC layer transmissions to the transmission count, and call the retransmit function.
Definition at line 1167 of file collect.c.
References retransmit_callback().
|
static |
This function is called when a queued packet should be sent out.
The function takes the first packet on the output queue, adds the necessary packet attributes, and sends the packet to the next-hop neighbor.
Definition at line 569 of file collect.c.
References announcement_bump(), announcement_listen(), announcement_set_value(), ctimer_set(), linkaddr_copy(), linkaddr_node_addr, NULL, packetbuf_dataptr(), packetqueue_first(), and packetqueue_queuebuf().
Referenced by update_rtmetric().
|
static |
This function is called to update the current parent node.
The parent may change if new routing information has been found, for example if a new node with a lower rtmetric and link estimate has appeared.
Definition at line 285 of file collect.c.
References bump_advertisement(), linkaddr_cmp(), linkaddr_copy(), linkaddr_null, and NULL.
Referenced by update_rtmetric().
|
static |
This function is called whenever there is a chance that the routing metric has changed.
The function goes through the list of neighbors to compute the new routing metric. If the metric has changed, it notifies neighbors.
Definition at line 406 of file collect.c.
References announcement_set_value(), linkaddr_node_addr, rtmetric_compute(), send_queued_packet(), and update_parent().
Referenced by retransmit_current_packet().
1.8.6