Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Anonymous best-effort local area broadcast

The abc module sends packets to all local area neighbors.

The abc module adds no headers to outgoing packets.

Channels

The abc module uses 1 channel.

Data Structures

struct  abc_callbacks
 Callback structure for abc. More...
 
struct  abc_conn
 

Files

file  abc.h
 
    Header file for the Rime module Anonymous BroadCast (abc)

 

Macros

#define ABC_ATTRIBUTES
 

Functions

void abc_close (struct abc_conn *c)
 Close an abc connection. More...
 
void abc_input (struct channel *channel)
 Internal Rime function: Pass a packet to the abc layer. More...
 
void abc_open (struct abc_conn *c, uint16_t channel, const struct abc_callbacks *u)
 Set up an anonymous best-effort broadcast connection. More...
 
int abc_send (struct abc_conn *c)
 Send an anonymous best-effort broadcast packet. More...
 
void abc_sent (struct channel *channel, int status, int num_tx)
 

#define ABC_ATTRIBUTES

void abc_close ( struct abc_conn c)

Close an abc connection.

Parameters
cA pointer to a struct abc_conn
        This function closes an abc connection that has
        previously been opened with abc_open().

        This function typically is called as an exit handler.
void abc_input ( struct channel channel)

Internal Rime function: Pass a packet to the abc layer.

This function is used internally by Rime to pass packets to the abc layer. Should never be called directly.

void abc_open ( struct abc_conn c,
uint16_t  channel,
const struct abc_callbacks u 
)

Set up an anonymous best-effort broadcast connection.

Parameters
cA pointer to a struct abc_conn
channelThe channel on which the connection will operate
uA struct abc_callbacks with function pointers to functions that will be called when a packet has been received
        This function sets up an abc connection on the
        specified channel. The caller must have allocated the
        memory for the struct abc_conn, usually by declaring it
        as a static variable.

        The struct abc_callbacks pointer must point to a structure
        containing a pointer to a function that will be called
        when a packet arrives on the channel.
int abc_send ( struct abc_conn c)

Send an anonymous best-effort broadcast packet.

Parameters
cThe abc connection on which the packet should be sent
Return values
Non-zeroif the packet could be sent, zero otherwise
        This function sends an anonymous best-effort broadcast
        packet. The packet must be present in the packetbuf
        before this function is called.

        The parameter c must point to an abc connection that
        must have previously been set up with abc_open().
void abc_sent ( struct channel channel,
int  status,
int  num_tx 
)