46 static uint16_t slotframe_handle = 0;
47 static uint16_t channel_offset = 0;
48 static struct tsch_slotframe *sf_unicast;
52 get_node_timeslot(
const linkaddr_t *
addr)
54 if(addr !=
NULL && ORCHESTRA_UNICAST_PERIOD > 0) {
55 return ORCHESTRA_LINKADDR_HASH(addr) % ORCHESTRA_UNICAST_PERIOD;
62 child_added(
const linkaddr_t *linkaddr)
67 child_removed(
const linkaddr_t *linkaddr)
72 select_packet(uint16_t *slotframe, uint16_t *timeslot)
75 const linkaddr_t *dest = packetbuf_addr(PACKETBUF_ADDR_RECEIVER);
76 if(packetbuf_attr(PACKETBUF_ATTR_FRAME_TYPE) == FRAME802154_DATAFRAME
78 if(slotframe !=
NULL) {
79 *slotframe = slotframe_handle;
81 if(timeslot !=
NULL) {
82 *timeslot = get_node_timeslot(dest);
90 new_time_source(
const struct tsch_neighbor *old,
const struct tsch_neighbor *
new)
95 init(uint16_t sf_handle)
99 slotframe_handle = sf_handle;
100 channel_offset = sf_handle;
102 sf_unicast = tsch_schedule_add_slotframe(slotframe_handle, ORCHESTRA_UNICAST_PERIOD);
105 for(i = 0; i < ORCHESTRA_UNICAST_PERIOD; i++) {
106 tsch_schedule_add_link(sf_unicast,
107 LINK_OPTION_SHARED | LINK_OPTION_TX | ( i == rx_timeslot ? LINK_OPTION_RX : 0 ),
108 LINK_TYPE_NORMAL, &tsch_broadcast_address,
113 struct orchestra_rule unicast_per_neighbor_rpl_ns = {
static uip_ds6_addr_t * addr
Pointer to a router list entry.
Header file for routing table manipulation.
const linkaddr_t linkaddr_null
The null Rime address.
Header file for the Rime buffer (packetbuf) management
#define NULL
The null pointer.
int linkaddr_cmp(const linkaddr_t *addr1, const linkaddr_t *addr2)
Compare two Rime addresses.
linkaddr_t linkaddr_node_addr
The Rime address of the node.