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 91 #ifndef TSCH_RPL_CHECK_DODAG_JOINED 92 #define TSCH_RPL_CHECK_DODAG_JOINED tsch_rpl_check_dodag_joined 97 #if BUILD_WITH_ORCHESTRA 99 #ifndef TSCH_CALLBACK_NEW_TIME_SOURCE 100 #define TSCH_CALLBACK_NEW_TIME_SOURCE orchestra_callback_new_time_source 103 #ifndef TSCH_CALLBACK_PACKET_READY 104 #define TSCH_CALLBACK_PACKET_READY orchestra_callback_packet_ready 110 #ifdef TSCH_CALLBACK_JOINING_NETWORK 111 void TSCH_CALLBACK_JOINING_NETWORK();
115 #ifdef TSCH_CALLBACK_LEAVING_NETWORK 116 void TSCH_CALLBACK_LEAVING_NETWORK();
120 #ifdef TSCH_CALLBACK_KA_SENT 121 void TSCH_CALLBACK_KA_SENT();
125 #ifdef TSCH_RPL_CHECK_DODAG_JOINED 126 int TSCH_RPL_CHECK_DODAG_JOINED();
131 #ifdef TSCH_CALLBACK_DO_NACK 132 int TSCH_CALLBACK_DO_NACK(
struct tsch_link *link, linkaddr_t *src, linkaddr_t *dst);
136 #ifdef TSCH_CALLBACK_NEW_TIME_SOURCE 142 #ifdef TSCH_CALLBACK_PACKET_READY 143 int TSCH_CALLBACK_PACKET_READY(
void);
149 extern int tsch_is_coordinator;
151 extern int tsch_is_associated;
153 extern int tsch_is_pan_secured;
155 extern const struct mac_driver tschmac_driver;
157 extern const linkaddr_t tsch_broadcast_address;
159 extern const linkaddr_t tsch_eb_address;
162 extern uint8_t tsch_join_priority;
165 extern uint8_t tsch_current_channel;
166 extern uint8_t tsch_current_channel_offset;
168 extern uint8_t tsch_hopping_sequence[TSCH_HOPPING_SEQUENCE_MAX_LEN];
175 extern unsigned long tx_count;
176 extern unsigned long rx_count;
177 extern unsigned long sync_count;
178 extern int32_t min_drift_seen;
179 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.