OpenWSN Firmware
schedule.c File Reference
#include "openwsn.h"
#include "schedule.h"
#include "openserial.h"
#include "openrandom.h"
#include "packetfunctions.h"
#include "sixtop.h"

Functions

void schedule_resetEntry (scheduleEntry_t *pScheduleEntry)
 
void schedule_init ()
 Initialize this module. More...
 
bool debugPrint_schedule ()
 Trigger this module to print status information, over serial. More...
 
bool debugPrint_backoff ()
 Trigger this module to print status information, over serial. More...
 
void schedule_setFrameLength (frameLength_t newFrameLength)
 Set frame length. More...
 
void schedule_getSlotInfo (slotOffset_t slotOffset, open_addr_t *neighbor, slotinfo_element_t *info)
 Get the information of a specific slot. More...
 
owerror_t schedule_addActiveSlot (slotOffset_t slotOffset, cellType_t type, bool shared, channelOffset_t channelOffset, open_addr_t *neighbor)
 Add a new active slot into the schedule. More...
 
owerror_t schedule_removeActiveSlot (slotOffset_t slotOffset, open_addr_t *neighbor)
 Remove an active slot from the schedule. More...
 
bool schedule_isSlotOffsetAvailable (uint16_t slotOffset)
 
void schedule_syncSlotOffset (slotOffset_t targetSlotOffset)
 
void schedule_advanceSlot ()
 advance to next active slot More...
 
slotOffset_t schedule_getNextActiveSlotOffset ()
 return slotOffset of next active slot More...
 
frameLength_t schedule_getFrameLength ()
 Get the frame length. More...
 
cellType_t schedule_getType ()
 Get the type of the current schedule entry. More...
 
void schedule_getNeighbor (open_addr_t *addrToWrite)
 Get the neighbor associated wit the current schedule entry. More...
 
channelOffset_t schedule_getChannelOffset ()
 Get the channel offset of the current schedule entry. More...
 
bool schedule_getOkToSend ()
 Check whether I can send on this slot. More...
 
void schedule_resetBackoff ()
 Reset the backoff and backoffExponent. More...
 
void schedule_indicateRx (asn_t *asnTimestamp)
 Indicate the reception of a packet. More...
 
void schedule_indicateTx (asn_t *asnTimestamp, bool succesfullTx)
 Indicate the transmission of a packet. More...
 

Variables

schedule_vars_t schedule_vars
 

Function Documentation

void schedule_resetEntry ( scheduleEntry_t e)
Precondition
This function assumes interrupts are already disabled.

Variable Documentation

schedule_vars_t schedule_vars