OpenWSN Firmware
|
#include "openwsn.h"
#include "sixtop.h"
#include "openserial.h"
#include "openqueue.h"
#include "neighbors.h"
#include "IEEE802154E.h"
#include "iphc.h"
#include "otf.h"
#include "packetfunctions.h"
#include "openrandom.h"
#include "scheduler.h"
#include "opentimers.h"
#include "debugpins.h"
#include "leds.h"
#include "processIE.h"
#include "IEEE802154.h"
#include "idmanager.h"
#include "schedule.h"
Functions | |
owerror_t | sixtop_send_internal (OpenQueueEntry_t *msg, uint8_t iePresent, uint8_t frameVersion) |
Transfer packet to MAC. More... | |
void | sixtop_maintenance_timer_cb (void) |
void | sixtop_timeout_timer_cb (void) |
void | timer_sixtop_management_fired (void) |
Timer handlers which triggers MAC management task. More... | |
void | sixtop_sendEB () |
Send an advertisement. More... | |
void | sixtop_sendKA () |
Send an keep-alive message, if necessary. More... | |
void | timer_sixtop_six2six_timeout_fired (void) |
void | sixtop_six2six_sendDone (OpenQueueEntry_t *msg, owerror_t error) |
bool | sixtop_processIEs (OpenQueueEntry_t *pkt, uint16_t *lenIE) |
void | sixtop_notifyReceiveCommand (opcode_IE_ht *opcode_ie, bandwidth_IE_ht *bandwidth_ie, schedule_IE_ht *schedule_ie, open_addr_t *addr) |
void | sixtop_notifyReceiveLinkRequest (bandwidth_IE_ht *bandwidth_ie, schedule_IE_ht *schedule_ie, open_addr_t *addr) |
void | sixtop_linkResponse (bool success, open_addr_t *tempNeighbor, uint8_t bandwidth, schedule_IE_ht *schedule_ie) |
void | sixtop_notifyReceiveLinkResponse (bandwidth_IE_ht *bandwidth_ie, schedule_IE_ht *schedule_ie, open_addr_t *addr) |
void | sixtop_notifyReceiveRemoveLinkRequest (schedule_IE_ht *schedule_ie, open_addr_t *addr) |
bool | sixtop_candidateAddCellList (uint8_t *type, uint8_t *frameID, uint8_t *flag, cellInfo_ht *cellList) |
bool | sixtop_candidateRemoveCellList (uint8_t *type, uint8_t *frameID, uint8_t *flag, cellInfo_ht *cellList, open_addr_t *neighbor) |
void | sixtop_addCellsByState (uint8_t slotframeID, uint8_t numOfLinks, cellInfo_ht *cellList, open_addr_t *previousHop, uint8_t state) |
void | sixtop_removeCellsByState (uint8_t slotframeID, uint8_t numOfLink, cellInfo_ht *cellList, open_addr_t *previousHop) |
bool | sixtop_areAvailableCellsToBeScheduled (uint8_t frameID, uint8_t numOfCells, cellInfo_ht *cellList, uint8_t bandwidth) |
void | sixtop_init () |
void | sixtop_setKaPeriod (uint16_t kaPeriod) |
void | sixtop_addCells (open_addr_t *neighbor, uint16_t numCells) |
void | sixtop_removeCell (open_addr_t *neighbor) |
owerror_t | sixtop_send (OpenQueueEntry_t *msg) |
void | task_sixtopNotifSendDone () |
void | task_sixtopNotifReceive () |
bool | debugPrint_myDAGrank () |
Trigger this module to print status information, over serial. More... | |
bool | debugPrint_kaPeriod () |
Trigger this module to print status information, over serial. More... | |
Variables | |
sixtop_vars_t | sixtop_vars |
void sixtop_addCellsByState | ( | uint8_t | slotframeID, |
uint8_t | numOfLinks, | ||
cellInfo_ht * | cellList, | ||
open_addr_t * | previousHop, | ||
uint8_t | state | ||
) |
bool sixtop_areAvailableCellsToBeScheduled | ( | uint8_t | frameID, |
uint8_t | numOfCells, | ||
cellInfo_ht * | cellList, | ||
uint8_t | bandwidth | ||
) |
bool sixtop_candidateAddCellList | ( | uint8_t * | type, |
uint8_t * | frameID, | ||
uint8_t * | flag, | ||
cellInfo_ht * | cellList | ||
) |
bool sixtop_candidateRemoveCellList | ( | uint8_t * | type, |
uint8_t * | frameID, | ||
uint8_t * | flag, | ||
cellInfo_ht * | cellList, | ||
open_addr_t * | neighbor | ||
) |
void sixtop_linkResponse | ( | bool | success, |
open_addr_t * | tempNeighbor, | ||
uint8_t | bandwidth, | ||
schedule_IE_ht * | schedule_ie | ||
) |
void sixtop_maintenance_timer_cb | ( | void | ) |
void sixtop_notifyReceiveCommand | ( | opcode_IE_ht * | opcode_ie, |
bandwidth_IE_ht * | bandwidth_ie, | ||
schedule_IE_ht * | schedule_ie, | ||
open_addr_t * | addr | ||
) |
void sixtop_notifyReceiveLinkRequest | ( | bandwidth_IE_ht * | bandwidth_ie, |
schedule_IE_ht * | schedule_ie, | ||
open_addr_t * | addr | ||
) |
void sixtop_notifyReceiveLinkResponse | ( | bandwidth_IE_ht * | bandwidth_ie, |
schedule_IE_ht * | schedule_ie, | ||
open_addr_t * | addr | ||
) |
void sixtop_notifyReceiveRemoveLinkRequest | ( | schedule_IE_ht * | schedule_ie, |
open_addr_t * | addr | ||
) |
port_INLINE bool sixtop_processIEs | ( | OpenQueueEntry_t * | pkt, |
uint16_t * | lenIE | ||
) |
void sixtop_removeCellsByState | ( | uint8_t | slotframeID, |
uint8_t | numOfLink, | ||
cellInfo_ht * | cellList, | ||
open_addr_t * | previousHop | ||
) |
owerror_t sixtop_send_internal | ( | OpenQueueEntry_t * | msg, |
uint8_t | iePresent, | ||
uint8_t | frameVersion | ||
) |
Transfer packet to MAC.
This function adds a IEEE802.15.4 header to the packet and leaves it the OpenQueue buffer. The very last thing it does is assigning this packet to the virtual component COMPONENT_SIXTOP_TO_IEEE802154E. Whenever it gets a change, IEEE802154E will handle the packet.
[in] | msg | The packet to the transmitted |
[in] | iePresent | Indicates wheter an Information Element is present in the packet. |
[in] | frameVersion | The frame version to write in the packet. |
port_INLINE void sixtop_sendEB | ( | ) |
Send an advertisement.
This is one of the MAC management tasks. This function inlines in the timers_res_fired() function, but is declared as a separate function for better readability of the code.
port_INLINE void sixtop_sendKA | ( | ) |
Send an keep-alive message, if necessary.
This is one of the MAC management tasks. This function inlines in the timers_res_fired() function, but is declared as a separate function for better readability of the code.
void sixtop_six2six_sendDone | ( | OpenQueueEntry_t * | msg, |
owerror_t | error | ||
) |
void sixtop_timeout_timer_cb | ( | void | ) |
void timer_sixtop_management_fired | ( | void | ) |
Timer handlers which triggers MAC management task.
This function is called in task context by the scheduler after the RES timer has fired. This timer is set to fire every second, on average.
The body of this function executes one of the MAC management task.
void timer_sixtop_six2six_timeout_fired | ( | void | ) |
sixtop_vars_t sixtop_vars |