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
116void TSCH_CALLBACK_JOINING_NETWORK(
void);
120#ifdef TSCH_CALLBACK_LEAVING_NETWORK
121void TSCH_CALLBACK_LEAVING_NETWORK(
void);
125#ifdef TSCH_CALLBACK_KA_SENT
126void TSCH_CALLBACK_KA_SENT(
int status,
int transmissions);
130#ifdef TSCH_RPL_CHECK_DODAG_JOINED
131int TSCH_RPL_CHECK_DODAG_JOINED(
void);
136#ifdef TSCH_CALLBACK_DO_NACK
137int 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
148int TSCH_CALLBACK_PACKET_READY(
void);
152#ifdef TSCH_CALLBACK_ROOT_NODE_UPDATED
153void TSCH_CALLBACK_ROOT_NODE_UPDATED(
const linkaddr_t *, uint8_t is_added);
160extern int tsch_is_coordinator;
162extern int tsch_is_associated;
164extern int tsch_is_pan_secured;
168extern const linkaddr_t tsch_broadcast_address;
170extern const linkaddr_t tsch_eb_address;
173extern uint8_t tsch_join_priority;
176extern uint8_t tsch_current_channel;
177extern uint8_t tsch_current_channel_offset;
179extern uint8_t tsch_hopping_sequence[TSCH_HOPPING_SEQUENCE_MAX_LEN];
186extern unsigned long tx_count;
187extern unsigned long rx_count;
188extern unsigned long sync_count;
189extern int32_t min_drift_seen;
190extern int32_t max_drift_seen;
#define PROCESS_NAME(name)
Declare the name of a process.
void tsch_schedule_keepalive(int immediate)
Schedule a keep-alive transmission within [timeout*0.9, timeout[ Can be called from an interrupt.
uint64_t tsch_get_network_uptime_ticks(void)
Get the time, in clock ticks, since the TSCH network was started.
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...
rtimer_clock_t tsch_timeslot_timing_ticks[tsch_ts_elements_count]
TSCH timeslot timing elements in rtimer ticks.
uint16_t tsch_timeslot_timing_usec[tsch_ts_elements_count]
TSCH timeslot timing elements in micro-seconds.
void tsch_set_eb_period(uint32_t period)
Set the period at wich TSCH enhanced beacons (EBs) are sent.
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.
void tsch_set_pan_secured(int enable)
Enable/disable security.
void tsch_set_join_priority(uint8_t jp)
Set the TSCH join priority (JP)
void tsch_disassociate(void)
Leave the TSCH network we are currently in.
Header file for the link-layer address representation.
The structure of a MAC protocol driver in Contiki.
For quick modulo operation on ASN.
The ASN is an absolute slot number over 5 bytes.
An IEEE 802.15.4-2015 TSCH link (also called cell or slot)
TSCH neighbor information.
TSCH adaptive time synchronization.
TSCH packet parsing and creation.
TSCH runtime operation within timeslots.
Header file for TSCH statistics.