70 #ifdef TSCH_CONF_ARCH_HDR_PATH 71 #include TSCH_CONF_ARCH_HDR_PATH 79 #ifndef TSCH_CALLBACK_JOINING_NETWORK 80 #define TSCH_CALLBACK_JOINING_NETWORK tsch_rpl_callback_joining_network 83 #ifndef TSCH_CALLBACK_LEAVING_NETWORK 84 #define TSCH_CALLBACK_LEAVING_NETWORK tsch_rpl_callback_leaving_network 87 #ifndef TSCH_CALLBACK_KA_SENT 88 #define TSCH_CALLBACK_KA_SENT tsch_rpl_callback_ka_sent 93 #if BUILD_WITH_ORCHESTRA 95 #ifndef TSCH_CALLBACK_NEW_TIME_SOURCE 96 #define TSCH_CALLBACK_NEW_TIME_SOURCE orchestra_callback_new_time_source 99 #ifndef TSCH_CALLBACK_PACKET_READY 100 #define TSCH_CALLBACK_PACKET_READY orchestra_callback_packet_ready 106 #ifdef TSCH_CALLBACK_JOINING_NETWORK 107 void TSCH_CALLBACK_JOINING_NETWORK();
111 #ifdef TSCH_CALLBACK_LEAVING_NETWORK 112 void TSCH_CALLBACK_LEAVING_NETWORK();
116 #ifdef TSCH_CALLBACK_KA_SENT 117 void TSCH_CALLBACK_KA_SENT();
122 #ifdef TSCH_CALLBACK_DO_NACK 123 int TSCH_CALLBACK_DO_NACK(
struct tsch_link *link, linkaddr_t *src, linkaddr_t *dst);
127 #ifdef TSCH_CALLBACK_NEW_TIME_SOURCE 133 #ifdef TSCH_CALLBACK_PACKET_READY 134 void TSCH_CALLBACK_PACKET_READY(
void);
140 extern int tsch_is_coordinator;
142 extern int tsch_is_associated;
144 extern int tsch_is_pan_secured;
146 extern const struct mac_driver tschmac_driver;
148 extern const linkaddr_t tsch_broadcast_address;
150 extern const linkaddr_t tsch_eb_address;
153 extern uint8_t tsch_join_priority;
156 extern uint8_t tsch_current_channel;
158 extern uint8_t tsch_hopping_sequence[TSCH_HOPPING_SEQUENCE_MAX_LEN];
161 extern uint16_t tsch_timing_us[tsch_ts_elements_count];
163 extern rtimer_clock_t tsch_timing[tsch_ts_elements_count];
165 extern unsigned long tx_count;
166 extern unsigned long rx_count;
167 extern unsigned long sync_count;
168 extern int32_t min_drift_seen;
169 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...
void tsch_schedule_keepalive_immediately(void)
Schedule a keep-alive immediately.
TSCH runtime operation within timeslots.
void tsch_schedule_keepalive(void)
Schedule a keep-alive transmission within [timeout*0.9, timeout[.
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.
#define PROCESS_NAME(name)
Declare the name of a process.
TSCH adaptive time synchronization.
Header file for TSCH statistics
const uint16_t tsch_timeslot_timing_us_10000[tsch_ts_elements_count]
The default timeslot timing in the standard is a guard time of 2200 us, a Tx offset of 2120 us and a ...
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.
void tsch_set_coordinator(int enable)
Set the node as PAN coordinator.