Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Single-hop reliable unicast

The reliable single-hop unicast primitive (runicast) reliably sends a packet to a single-hop neighbor.

The runicast primitive uses acknowledgements and retransmissions to ensure that the neighbor successfully receives the packet. When the receiver has acknowledged the packet, the ruc module notifies the sending application via a callback. The ruc primitive uses the stubborn single-hop unicast primitive to do retransmissions. Thus, the ruc primitive does not have to manage the details of setting up timers and doing retransmissions, but can concentrate on dealing with acknowledgements.

The runicast primitive adds two packet attributes: the single-hop packet type and the single-hop packet ID. The runicast primitive uses the packet ID attribute as a sequence number for matching acknowledgement packets to the corresponding data packets.

The application or protocol that uses the runicast primitive can specify the maximum number of transmissions that the ruc module should attempt before the packet times out. If a packet times out, the application or protocol that sent the packet is notified with a callback.

Channels

The runicast module uses 1 channel.

Data Structures

struct  runicast_callbacks
 
struct  runicast_conn
 

Files

file  runicast.h
 
    Reliable unicast header file

 

Macros

#define RUNICAST_ATTRIBUTES
 
#define RUNICAST_PACKET_ID_BITS   2
 

Functions

void runicast_close (struct runicast_conn *c)
 
uint8_t runicast_is_transmitting (struct runicast_conn *c)
 
void runicast_open (struct runicast_conn *c, uint16_t channel, const struct runicast_callbacks *u)
 
int runicast_send (struct runicast_conn *c, const linkaddr_t *receiver, uint8_t max_retransmissions)
 

#define RUNICAST_ATTRIBUTES
Value:
#define PACKETBUF_ATTR_BIT
Definition: packetbuf.h:444
Definition: packetbuf.h:363
Definition: packetbuf.h:362
#define RUNICAST_PACKET_ID_BITS
Definition: runicast.h:86
#define STUNICAST_ATTRIBUTES
Definition: stunicast.h:81
#define RUNICAST_PACKET_ID_BITS   2

void runicast_close ( struct runicast_conn c)
uint8_t runicast_is_transmitting ( struct runicast_conn c)
void runicast_open ( struct runicast_conn c,
uint16_t  channel,
const struct runicast_callbacks u 
)
int runicast_send ( struct runicast_conn c,
const linkaddr_t receiver,
uint8_t  max_retransmissions 
)