43 static uint16_t slotframe_handle = 0;
44 static uint16_t channel_offset = 0;
49 get_node_timeslot(
const linkaddr_t *
addr)
51 #if ORCHESTRA_EBSF_PERIOD > 0 52 return ORCHESTRA_LINKADDR_HASH(addr) % ORCHESTRA_EBSF_PERIOD;
59 select_packet(uint16_t *slotframe, uint16_t *timeslot)
62 if(packetbuf_attr(PACKETBUF_ATTR_FRAME_TYPE) == FRAME802154_BEACONFRAME) {
63 if(slotframe != NULL) {
64 *slotframe = slotframe_handle;
66 if(timeslot != NULL) {
77 uint16_t old_ts = old != NULL ? get_node_timeslot(&old->addr) : 0xffff;
78 uint16_t new_ts =
new != NULL ? get_node_timeslot(&new->addr) : 0xffff;
80 if(new_ts == old_ts) {
84 if(old_ts != 0xffff) {
89 &tsch_broadcast_address, old_ts, 0);
95 if(new_ts != 0xffff) {
96 uint8_t link_options = LINK_OPTION_RX;
99 link_options |= LINK_OPTION_TX;
103 &tsch_broadcast_address, new_ts, 0);
108 init(uint16_t sf_handle)
110 slotframe_handle = sf_handle;
111 channel_offset = sf_handle;
116 LINK_TYPE_ADVERTISING_ONLY, &tsch_broadcast_address,
120 struct orchestra_rule eb_per_time_source = {
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.
linkaddr_t linkaddr_node_addr
The link-layer address of the node.
int tsch_schedule_remove_link_by_timeslot(struct tsch_slotframe *slotframe, uint16_t timeslot)
Removes a link from a slotframe and timeslot.
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.
Header file for the Packet buffer (packetbuf) management