Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Stubborn unicast

The stubborn single-hop unicast primitive (stunicast) repeatedly sends a packet to a single-hop neighbor using the unicast primitive.

The stunicast primitive sends and resends the packet until an upper layer primitive or protocol cancels the transmission. While it is possible for applications and protocols that use Rime to use the stubborn single-hop unicast primitive directly, the stunicast primitive is primarily used by the reliable single-hop unicast (runicast) primitive.

Before the stunicast primitive sends a packet, it allocates a queue buffer, to which the application data and packet attributes is copied, and sets a timer. When the timer expires, the stunicast primitive copies the queue buffer to the Rime buffer and sends the packet using the unicast primitive. The stunicast primitive sets the number of retransmissions for a packet as a packet attribute on outgoing packets.

Channels

The stunicast module uses 1 channel.

Data Structures

struct  stunicast_callbacks
 
struct  stunicast_conn
 

Files

file  stunicast.h
 
    Stubborn unicast header file

 

Macros

#define STUNICAST_ATTRIBUTES   UNICAST_ATTRIBUTES
 

Functions

void stunicast_cancel (struct stunicast_conn *c)
 
void stunicast_close (struct stunicast_conn *c)
 
void stunicast_open (struct stunicast_conn *c, uint16_t channel, const struct stunicast_callbacks *u)
 
linkaddr_tstunicast_receiver (struct stunicast_conn *c)
 
int stunicast_send (struct stunicast_conn *c, const linkaddr_t *receiver)
 
int stunicast_send_stubborn (struct stunicast_conn *c, const linkaddr_t *receiver, clock_time_t rxmittime)
 
void stunicast_set_timer (struct stunicast_conn *c, clock_time_t t)
 

#define STUNICAST_ATTRIBUTES   UNICAST_ATTRIBUTES

void stunicast_cancel ( struct stunicast_conn c)
void stunicast_close ( struct stunicast_conn c)
void stunicast_open ( struct stunicast_conn c,
uint16_t  channel,
const struct stunicast_callbacks u 
)
linkaddr_t* stunicast_receiver ( struct stunicast_conn c)
int stunicast_send ( struct stunicast_conn c,
const linkaddr_t receiver 
)
int stunicast_send_stubborn ( struct stunicast_conn c,
const linkaddr_t receiver,
clock_time_t  rxmittime 
)
void stunicast_set_timer ( struct stunicast_conn c,
clock_time_t  t 
)