51 static const struct packetbuf_attrlist attributes[] =
60 #define PRINTF(...) printf(__VA_ARGS__)
67 recv_from_broadcast(
struct broadcast_conn *broadcast,
const rimeaddr_t *from)
69 struct unicast_conn *c = (
struct unicast_conn *)broadcast;
71 PRINTF(
"%d.%d: uc: recv_from_broadcast, receiver %d.%d\n",
73 packetbuf_addr(PACKETBUF_ADDR_RECEIVER)->u8[0],
74 packetbuf_addr(PACKETBUF_ADDR_RECEIVER)->u8[1]);
81 sent_by_broadcast(
struct broadcast_conn *broadcast,
int status,
int num_tx)
83 struct unicast_conn *c = (
struct unicast_conn *)broadcast;
85 PRINTF(
"%d.%d: uc: recv_from_broadcast, receiver %d.%d\n",
87 packetbuf_addr(PACKETBUF_ADDR_RECEIVER)->u8[0],
88 packetbuf_addr(PACKETBUF_ADDR_RECEIVER)->u8[1]);
91 c->u->sent(c, status, num_tx);
99 unicast_open(
struct unicast_conn *c, uint16_t channel,
100 const struct unicast_callbacks *u)
104 channel_set_attributes(channel, attributes);
108 unicast_close(
struct unicast_conn *c)
114 unicast_send(
struct unicast_conn *c,
const rimeaddr_t *receiver)
116 printf(
"%d.%d: unicast_send to %d.%d\n",
118 receiver->u8[0], receiver->u8[1]);
119 packetbuf_set_addr(PACKETBUF_ADDR_RECEIVER, receiver);