OpenWSN Firmware
adaptive_sync.h File Reference
#include "board.h"
#include "openwsn.h"
#include "opentimers.h"

Go to the source code of this file.

Data Structures

struct  compensationInfo_t
 
struct  adaptive_sync_vars_t
 

Enumerations

enum  adaptive_sync_state_t { S_NONE = 0x00, S_FASTER = 0x01, S_SLOWER = 0x02 }
 

Functions

void adaptive_sync_init (void)
 initial this module More...
 
void adaptive_sync_preprocess (int16_t timeCorrection, open_addr_t timesource)
 Calculated how many slots have elapsed since last synchronized. More...
 
void adaptive_sync_calculateCompensatedSlots (int16_t timeCorrection)
 Calculate the compensation interval, in number of slots. More...
 
void adaptive_sync_countCompensationTimeout (void)
 update compensationTimeout at the beginning of each slot and adjust current slot length when the elapsed slots rearch to compensation interval. More...
 
void adaptive_sync_countCompensationTimeout_compoundSlots (uint16_t compoundSlots)
 update compensationTimeout when compound slots are scheduled and adjust the slot when the elapsed slots rearch to compensation interval(e.g. SERIALRX slots) More...
 
void adaptive_sync_driftChanged (void)
 set driftChanged to true. More...