OpenWSN Firmware
adaptive_sync.c File Reference
#include "openwsn.h"
#include "adaptive_sync.h"
#include "IEEE802154E.h"
#include "radio.h"
#include "openserial.h"
#include "leds.h"
#include "neighbors.h"
#include "debugpins.h"
#include "packetfunctions.h"
#include "sixtop.h"
#include "scheduler.h"
#include "openqueue.h"
#include "openrandom.h"

Macros

#define BASIC_COMPENSATION_THRESHOLD   58
 this file is used for the time synchronizatino between different hardware platform More...
 

Functions

void adaptive_sync_init ()
 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 ()
 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 ()
 set driftChanged to true. More...
 

Variables

adaptive_sync_vars_t adaptive_sync_vars
 

Macro Definition Documentation

#define BASIC_COMPENSATION_THRESHOLD   58

this file is used for the time synchronizatino between different hardware platform

Author
Tengfei Chang tengf.nosp@m.ei.c.nosp@m.hang@.nosp@m.gmai.nosp@m.l.com, January ,2014.

Variable Documentation

adaptive_sync_vars_t adaptive_sync_vars