TSCH: reduce keep-alive traffic as we get more accurate drift estimates
This commit is contained in:
parent
ab706a6f33
commit
15dc86aeb1
3 changed files with 31 additions and 7 deletions
|
@ -49,11 +49,19 @@
|
|||
#define TSCH_KEEPALIVE_TIMEOUT (12 * CLOCK_SECOND)
|
||||
#endif
|
||||
|
||||
/* With TSCH_ADAPTIVE_TIMESYNC enabled: keep-alive timeout used after reaching
|
||||
* accurate drift compensation. */
|
||||
#ifdef TSCH_CONF_MAX_KEEPALIVE_TIMEOUT
|
||||
#define TSCH_MAX_KEEPALIVE_TIMEOUT TSCH_CONF_MAX_KEEPALIVE_TIMEOUT
|
||||
#else
|
||||
#define TSCH_MAX_KEEPALIVE_TIMEOUT (60 * CLOCK_SECOND)
|
||||
#endif
|
||||
|
||||
/* Max time without synchronization before leaving the PAN */
|
||||
#ifdef TSCH_CONF_DESYNC_THRESHOLD
|
||||
#define TSCH_DESYNC_THRESHOLD TSCH_CONF_DESYNC_THRESHOLD
|
||||
#else
|
||||
#define TSCH_DESYNC_THRESHOLD (4 * TSCH_KEEPALIVE_TIMEOUT)
|
||||
#define TSCH_DESYNC_THRESHOLD (2 * TSCH_MAX_KEEPALIVE_TIMEOUT)
|
||||
#endif
|
||||
|
||||
/* Period between two consecutive EBs */
|
||||
|
@ -166,6 +174,8 @@ extern const struct mac_driver tschmac_driver;
|
|||
void tsch_set_join_priority(uint8_t jp);
|
||||
/* The period at which EBs are sent */
|
||||
void tsch_set_eb_period(uint32_t period);
|
||||
/* The keep-alive timeout */
|
||||
void tsch_set_ka_timeout(uint32_t timeout);
|
||||
/* Set the node as PAN coordinator */
|
||||
void tsch_set_coordinator(int enable);
|
||||
/* Set the pan as secured or not */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue