64 #include "net/mac/tsch/tsch-roots.h" 71 #ifdef TSCH_CONF_ARCH_HDR_PATH 72 #include TSCH_CONF_ARCH_HDR_PATH 80 #ifndef TSCH_CALLBACK_JOINING_NETWORK 81 #define TSCH_CALLBACK_JOINING_NETWORK tsch_rpl_callback_joining_network 84 #ifndef TSCH_CALLBACK_LEAVING_NETWORK 85 #define TSCH_CALLBACK_LEAVING_NETWORK tsch_rpl_callback_leaving_network 88 #ifndef TSCH_CALLBACK_KA_SENT 89 #define TSCH_CALLBACK_KA_SENT tsch_rpl_callback_ka_sent 92 #ifndef TSCH_RPL_CHECK_DODAG_JOINED 93 #define TSCH_RPL_CHECK_DODAG_JOINED tsch_rpl_check_dodag_joined 98 #if BUILD_WITH_ORCHESTRA 100 #ifndef TSCH_CALLBACK_NEW_TIME_SOURCE 101 #define TSCH_CALLBACK_NEW_TIME_SOURCE orchestra_callback_new_time_source 104 #ifndef TSCH_CALLBACK_PACKET_READY 105 #define TSCH_CALLBACK_PACKET_READY orchestra_callback_packet_ready 108 #ifndef TSCH_CALLBACK_ROOT_NODE_UPDATED 109 #define TSCH_CALLBACK_ROOT_NODE_UPDATED orchestra_callback_root_node_updated 115 #ifdef TSCH_CALLBACK_JOINING_NETWORK 116 void TSCH_CALLBACK_JOINING_NETWORK();
120 #ifdef TSCH_CALLBACK_LEAVING_NETWORK 121 void TSCH_CALLBACK_LEAVING_NETWORK();
125 #ifdef TSCH_CALLBACK_KA_SENT 126 void TSCH_CALLBACK_KA_SENT();
130 #ifdef TSCH_RPL_CHECK_DODAG_JOINED 131 int TSCH_RPL_CHECK_DODAG_JOINED();
136 #ifdef TSCH_CALLBACK_DO_NACK 137 int TSCH_CALLBACK_DO_NACK(
struct tsch_link *link, linkaddr_t *src, linkaddr_t *dst);
141 #ifdef TSCH_CALLBACK_NEW_TIME_SOURCE 147 #ifdef TSCH_CALLBACK_PACKET_READY 148 int TSCH_CALLBACK_PACKET_READY(
void);
152 #ifdef TSCH_CALLBACK_ROOT_NODE_UPDATED 153 void TSCH_CALLBACK_ROOT_NODE_UPDATED(
const linkaddr_t *, uint8_t is_added);
160 extern int tsch_is_coordinator;
162 extern int tsch_is_associated;
164 extern int tsch_is_pan_secured;
166 extern const struct mac_driver tschmac_driver;
168 extern const linkaddr_t tsch_broadcast_address;
170 extern const linkaddr_t tsch_eb_address;
173 extern uint8_t tsch_join_priority;
176 extern uint8_t tsch_current_channel;
177 extern uint8_t tsch_current_channel_offset;
179 extern uint8_t tsch_hopping_sequence[TSCH_HOPPING_SEQUENCE_MAX_LEN];
186 extern unsigned long tx_count;
187 extern unsigned long rx_count;
188 extern unsigned long sync_count;
189 extern int32_t min_drift_seen;
190 extern int32_t max_drift_seen;
The structure of a MAC protocol driver in Contiki.
void tsch_set_join_priority(uint8_t jp)
Set the TSCH join priority (JP)
Header file for the link-layer address representation
TSCH neighbor information.
void tsch_set_ka_timeout(uint32_t timeout)
Set the desynchronization timeout after which a node sends a unicasst keep-alive (KA) to its time sou...
TSCH runtime operation within timeslots.
rtimer_clock_t tsch_timeslot_timing_ticks[tsch_ts_elements_count]
TSCH timeslot timing elements in rtimer ticks.
For quick modulo operation on ASN.
void tsch_set_eb_period(uint32_t period)
Set the period at wich TSCH enhanced beacons (EBs) are sent.
void tsch_schedule_keepalive(int immediate)
Schedule a keep-alive transmission within [timeout*0.9, timeout[ Can be called from an interrupt...
#define PROCESS_NAME(name)
Declare the name of a process.
TSCH adaptive time synchronization.
uint64_t tsch_get_network_uptime_ticks(void)
Get the time, in clock ticks, since the TSCH network was started.
Header file for TSCH statistics
uint16_t tsch_timeslot_timing_usec[tsch_ts_elements_count]
TSCH timeslot timing elements in micro-seconds.
void tsch_disassociate(void)
Leave the TSCH network we are currently in.
void tsch_set_pan_secured(int enable)
Enable/disable security.
An IEEE 802.15.4-2015 TSCH link (also called cell or slot)
TSCH packet parsing and creation.
The ASN is an absolute slot number over 5 bytes.
const tsch_timeslot_timing_usec tsch_timeslot_timing_us_10000
TSCH timing attributes and description.
void tsch_set_coordinator(int enable)
Set the node as PAN coordinator.