OpenWSN Firmware
|
IEEE802.15.4e TSCH. More...
Data Structures | |
struct | IEEE802154E_ACK_ht |
struct | ieee154e_vars_t |
struct | ieee154e_stats_t |
struct | ieee154e_dbg_t |
Functions | |
void | ieee154e_init (void) |
This function initializes this module. More... | |
PORT_RADIOTIMER_WIDTH | ieee154e_asnDiff (asn_t *someASN) |
bool | ieee154e_isSynch (void) |
void | ieee154e_getAsn (uint8_t *array) |
void | ieee154e_startOfFrame (PORT_RADIOTIMER_WIDTH capturedTime) |
Indicates the radio just received the first byte of a packet. More... | |
void | ieee154e_endOfFrame (PORT_RADIOTIMER_WIDTH capturedTime) |
Indicates the radio just received the last byte of a packet. More... | |
bool | debugPrint_asn (void) |
Trigger this module to print status information, over serial. More... | |
bool | debugPrint_isSync (void) |
Trigger this module to print status information, over serial. More... | |
bool | debugPrint_macStats (void) |
Trigger this module to print status information, over serial. More... | |
IEEE802.15.4e TSCH.
#define ADV_PAYLOAD_LENGTH |
#define ADVTIMEOUT 30 |
#define DESYNCTIMEOUT 2333 |
#define DURATION_rt1 ieee154e_vars.lastCapturedTime+TsTxOffset-TsLongGT-delayRx-maxRxDataPrepare |
#define DURATION_rt2 ieee154e_vars.lastCapturedTime+TsTxOffset-TsLongGT-delayRx |
#define DURATION_rt3 ieee154e_vars.lastCapturedTime+TsTxOffset+TsLongGT |
#define DURATION_rt4 ieee154e_vars.lastCapturedTime+wdDataDuration |
#define DURATION_rt5 ieee154e_vars.lastCapturedTime+TsTxAckDelay-delayTx-maxTxAckPrepare |
#define DURATION_rt6 ieee154e_vars.lastCapturedTime+TsTxAckDelay-delayTx |
#define DURATION_rt7 ieee154e_vars.lastCapturedTime+TsTxAckDelay-delayTx+wdRadioTx |
#define DURATION_rt8 ieee154e_vars.lastCapturedTime+wdAckDuration |
#define DURATION_tt1 ieee154e_vars.lastCapturedTime+TsTxOffset-delayTx-maxTxDataPrepare |
#define DURATION_tt2 ieee154e_vars.lastCapturedTime+TsTxOffset-delayTx |
#define DURATION_tt3 ieee154e_vars.lastCapturedTime+TsTxOffset-delayTx+wdRadioTx |
#define DURATION_tt4 ieee154e_vars.lastCapturedTime+wdDataDuration |
#define DURATION_tt5 ieee154e_vars.lastCapturedTime+TsTxAckDelay-TsShortGT-delayRx-maxRxAckPrepare |
#define DURATION_tt6 ieee154e_vars.lastCapturedTime+TsTxAckDelay-TsShortGT-delayRx |
#define DURATION_tt7 ieee154e_vars.lastCapturedTime+TsTxAckDelay+TsShortGT |
#define DURATION_tt8 ieee154e_vars.lastCapturedTime+wdAckDuration |
#define DUTY_CYCLE_WINDOW_LIMIT (0xFFFFFFFF>>1) |
#define FIRST_FRAME_BYTE 1 |
When a packet is received, it is written inside the OpenQueueEntry_t->packet buffer, starting at the byte defined below. When a packet is relayed, it traverses the stack in which the MAC and IPHC headers are parsed and stripped off, then put on again. During that process, the IPv6 hop limit field is decremented. Depending on the new value of the hop limit, the IPHC header compression algorithm might not be able to compress it, and hence has to carry it inline, adding a byte to the header. To avoid having to move bytes around inside OpenQueueEntry_t->packet buffer, we start writing the received packet a bit after the start of the packet.
#define IEEE802154E_ACK_NACK_TIMECORRECTION_ELEMENTID 0x1E |
#define IEEE802154E_DESC_ELEMENTID_HEADER_IE_MASK 0x01FE |
#define IEEE802154E_DESC_ELEMENTID_HEADER_IE_SHIFT 1 |
#define IEEE802154E_DESC_GROUPID_PAYLOAD_IE_MASK 0x001E |
#define IEEE802154E_DESC_GROUPID_PAYLOAD_IE_SHIFT 1 |
#define IEEE802154E_DESC_LEN_HEADER_IE_MASK 0xFE00 |
#define IEEE802154E_DESC_LEN_HEADER_IE_SHIFT 9 |
#define IEEE802154E_DESC_LEN_LONG_MLME_IE_MASK 0xFFE0 |
#define IEEE802154E_DESC_LEN_LONG_MLME_IE_SHIFT 5 |
#define IEEE802154E_DESC_LEN_PAYLOAD_IE_MASK 0xFFE0 |
#define IEEE802154E_DESC_LEN_PAYLOAD_IE_SHIFT 5 |
#define IEEE802154E_DESC_LEN_SHORT_MLME_IE_MASK 0xFF00 |
#define IEEE802154E_DESC_LEN_SHORT_MLME_IE_SHIFT 8 |
#define IEEE802154E_DESC_SUBID_LONG_MLME_IE_MASK 0x001E |
#define IEEE802154E_DESC_SUBID_LONG_MLME_IE_SHIFT 1 |
#define IEEE802154E_DESC_SUBID_SHORT_MLME_IE_MASK 0x00FE |
#define IEEE802154E_DESC_SUBID_SHORT_MLME_IE_SHIFT 1 |
#define IEEE802154E_DESC_TYPE_HEADER_IE 0x00 |
#define IEEE802154E_DESC_TYPE_LONG 0x01 |
#define IEEE802154E_DESC_TYPE_PAYLOAD_IE 0x01 |
#define IEEE802154E_DESC_TYPE_SHORT 0x00 |
#define IEEE802154E_MLME_IE_GROUPID 0x01 |
#define IEEE802154E_MLME_SLOTFRAME_LINK_IE_SUBID 0x1B |
#define IEEE802154E_MLME_SLOTFRAME_LINK_IE_SUBID_SHIFT 1 |
#define IEEE802154E_MLME_SYNC_IE_SUBID 0x1A |
#define IEEE802154E_MLME_SYNC_IE_SUBID_SHIFT 1 |
#define IEEE802154E_MLME_TIMESLOT_IE_SUBID 0x1c |
#define IEEE802154E_MLME_TIMESLOT_IE_SUBID_SHIFT 1 |
#define IEEE802154E_PAYLOAD_DESC_GROUP_ID_MLME (1<<1) |
#define IEEE802154E_PAYLOAD_DESC_LEN_SHIFT 0x04 |
#define LENGTH_IEEE154_MAX 128 |
#define LIMITLARGETIMECORRECTION 5 |
#define MAXKAPERIOD 2000 |
#define RESYNCHRONIZATIONGUARD 5 |
#define SYNCHRONIZING_CHANNEL 20 |
#define TX_POWER 31 |
#define TXRETRIES 3 |
#define US_PER_TICK 30 |
enum ieee154e_state_t |
bool debugPrint_asn | ( | void | ) |
Trigger this module to print status information, over serial.
debugPrint_* functions are used by the openserial module to continuously print status information about several modules in the OpenWSN stack.
bool debugPrint_isSync | ( | void | ) |
Trigger this module to print status information, over serial.
debugPrint_* functions are used by the openserial module to continuously print status information about several modules in the OpenWSN stack.
bool debugPrint_macStats | ( | void | ) |
Trigger this module to print status information, over serial.
debugPrint_* functions are used by the openserial module to continuously print status information about several modules in the OpenWSN stack.
PORT_RADIOTIMER_WIDTH ieee154e_asnDiff | ( | asn_t * | someASN | ) |
/brief Difference between some older ASN and the current ASN.
[in] | someASN | some ASN to compare to the current |
void ieee154e_endOfFrame | ( | PORT_RADIOTIMER_WIDTH | capturedTime | ) |
Indicates the radio just received the last byte of a packet.
This function executes in ISR mode.
void ieee154e_getAsn | ( | uint8_t * | array | ) |
void ieee154e_init | ( | void | ) |
This function initializes this module.
Call this function once before any other function in this module, possibly during boot-up.
bool ieee154e_isSynch | ( | void | ) |
void ieee154e_startOfFrame | ( | PORT_RADIOTIMER_WIDTH | capturedTime | ) |
Indicates the radio just received the first byte of a packet.
This function executes in ISR mode.