79 #ifndef __RUNICAST_H__
80 #define __RUNICAST_H__
87 #define RUNICAST_PACKET_ID_BITS 2
89 #define RUNICAST_ATTRIBUTES { PACKETBUF_ATTR_PACKET_TYPE, PACKETBUF_ATTR_BIT }, \
90 { PACKETBUF_ATTR_PACKET_ID, PACKETBUF_ATTR_BIT * RUNICAST_PACKET_ID_BITS }, \
92 struct runicast_callbacks {
93 void (* recv)(
struct runicast_conn *c,
const rimeaddr_t *from, uint8_t seqno);
94 void (* sent)(
struct runicast_conn *c,
const rimeaddr_t *to, uint8_t retransmissions);
95 void (* timedout)(
struct runicast_conn *c,
const rimeaddr_t *to, uint8_t retransmissions);
98 struct runicast_conn {
99 struct stunicast_conn c;
100 const struct runicast_callbacks *u;
107 void runicast_open(
struct runicast_conn *c, uint16_t channel,
108 const struct runicast_callbacks *u);
109 void runicast_close(
struct runicast_conn *c);
111 int runicast_send(
struct runicast_conn *c,
const rimeaddr_t *receiver,
112 uint8_t max_retransmissions);
114 uint8_t runicast_is_transmitting(
struct runicast_conn *c);