46 static uint16_t slotframe_handle = 0;
47 static uint16_t channel_offset = 0;
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);
95 init(uint16_t sf_handle)
99 slotframe_handle = sf_handle;
100 channel_offset = sf_handle;
105 for(i = 0; i < ORCHESTRA_UNICAST_PERIOD; i++) {
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 nbr cache entry.
TSCH neighbor information.
802.15.4e slotframe (contains links)
struct tsch_slotframe * tsch_schedule_add_slotframe(uint16_t handle, uint16_t size)
Creates and adds a new slotframe.
const linkaddr_t linkaddr_null
The null link-layer address.
linkaddr_t linkaddr_node_addr
The link-layer address of the node.
struct tsch_link * tsch_schedule_add_link(struct tsch_slotframe *slotframe, uint8_t link_options, enum link_type link_type, const linkaddr_t *address, uint16_t timeslot, uint16_t channel_offset)
Adds a link to a slotframe.
int linkaddr_cmp(const linkaddr_t *addr1, const linkaddr_t *addr2)
Compare two link-layer addresses.
Header file for routing table manipulation.
Header file for the Packet buffer (packetbuf) management