47 #include "contiki-net.h"
54 #define PRINTF(...) printf(__VA_ARGS__)
59 static const struct packetbuf_attrlist attributes[] =
60 { ABC_ATTRIBUTES PACKETBUF_ATTR_LAST };
64 abc_open(
struct abc_conn *c, uint16_t channelno,
67 channel_open(&c->channel, channelno);
69 channel_set_attributes(channelno, attributes);
75 channel_close(&c->channel);
81 PRINTF(
"%d.%d: abc: abc_send on channel %d\n",
83 c->channel.channelno);
84 return rime_output(&c->channel);
90 struct abc_conn *c = (
struct abc_conn *)channel;
91 PRINTF(
"%d.%d: abc: abc_input_packet on channel %d\n",
101 abc_sent(
struct channel *channel,
int status,
int num_tx)
103 struct abc_conn *c = (
struct abc_conn *)channel;
104 PRINTF(
"%d.%d: abc: abc_sent on channel %d\n",
109 c->u->sent(c, status, num_tx);
linkaddr_t linkaddr_node_addr
The Rime address of the node.
int abc_send(struct abc_conn *c)
Send an anonymous best-effort broadcast packet.
void abc_input(struct channel *channel)
Internal Rime function: Pass a packet to the abc layer.
Header file for the Rime stack
void abc_close(struct abc_conn *c)
Close an abc connection.
void abc_open(struct abc_conn *c, uint16_t channelno, const struct abc_callbacks *callbacks)
Set up an anonymous best-effort broadcast connection.
Callback structure for abc.