Radio Control Layer (RCL)
ieee.h File Reference
#include <ti/drivers/rcl/RCL_Command.h>
#include <ti/drivers/rcl/RCL_Buffer.h>
#include <ti/drivers/utils/List.h>
#include <ti/drivers/rcl/handlers/ieee.h>
+ Include dependency graph for ieee.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

union  RCL_CmdIeee_RxPktStatus
 Appended packet status field from RX buffer. More...
 
struct  RCL_CmdIeeeRxTx
 IEEE 802.15.4 Receive and transmit command. More...
 
struct  RCL_CmdIeee_PanIdAddr
 
struct  RCL_CmdIeee_SourceMatchingTableShort
 
struct  RCL_CmdIeee_SourceMatchingTableExt
 
struct  RCL_CmdIeee_PanConfig
 
struct  RCL_CmdIeee_RxAction
 
struct  RCL_CmdIeee_TxAction
 
struct  RCL_CmdIeeeTxTest
 IEEE 802.15.4 transmitter test command. More...
 
struct  RCL_StatsIeee
 
struct  RCL_CmdIeee_RxPktStatus.__unnamed__
 
struct  RCL_CMD_IEEE_TX_TEST_t.config
 
struct  RCL_STATS_IEEE_t.config
 

Macros

#define RCL_CMDID_IEEE_RX_TX   0x2001U
 
#define RCL_CMDID_IEEE_TX_TEST   0x2002U
 
#define RCL_CMD_IEEE_CHANNEL_FREQUENCY(channel)   ((((channel) - 11UL) * 5000000UL) + 2405000000UL)
 
#define RCL_CmdIeeeRxTx_Default()
 
#define RCL_CmdIeeeRxTx_DefaultRuntime()   (RCL_CmdIeeeRxTx) RCL_CmdIeeeRxTx_Default()
 
#define RCL_CMD_IEEE_SOURCE_MATCH_TABLE_SHORT_MAX_LEN   64
 
#define RCL_CMD_IEEE_SOURCE_MATCH_TABLE_SHORT_WITH_EXT_MAX_LEN   32
 
#define RCL_CMD_IEEE_SOURCE_MATCH_TABLE_SHORT_NUM_WORDS   (((RCL_CMD_IEEE_SOURCE_MATCH_TABLE_SHORT_MAX_LEN) + ((8 * sizeof(uint16_t)) - 1)) / (8 * sizeof(uint16_t)))
 
#define RCL_CMD_IEEE_SOURCE_MATCH_TABLE_EXT_MAX_LEN   16
 
#define RCL_CMD_IEEE_SOURCE_MATCH_TABLE_EXT_NUM_WORDS   (((RCL_CMD_IEEE_SOURCE_MATCH_TABLE_EXT_MAX_LEN) + ((8 * sizeof(uint16_t)) - 1)) / (8 * sizeof(uint16_t)))
 
#define RCL_CmdIeee_PanConfig_Default()
 
#define RCL_CmdIeee_PanConfig_DefaultRuntime()   (RCL_CmdIeee_PanConfig) RCL_CmdIeee_PanConfig_Default()
 
#define RCL_CMD_IEEE_MAX_NUM_PAN   1 /* Dual PAN not supported in this version */
 
#define RCL_CmdIeee_RxAction_Default()
 
#define RCL_CmdIeee_RxAction_DefaultRuntime()   (RCL_CmdIeee_RxAction) RCL_CmdIeee_RxAction_Default()
 
#define RCL_CmdIeee_TxAction_Default()
 
#define RCL_CmdIeee_TxAction_DefaultRuntime()   (RCL_CmdIeee_TxAction) RCL_CmdIeee_TxAction_Default()
 
#define RCL_CmdIeeeTxTest_Default()
 
#define RCL_CmdIeeeTxTest_DefaultRuntime()   (RCL_CmdIeeeTxTest) RCL_CmdIeeeTxTest_Default()
 
#define RCL_CMD_IEEE_WH_MODE_DEFAULT   0
 
#define RCL_CMD_IEEE_WH_MODE_PRBS9   1
 
#define RCL_CMD_IEEE_WH_MODE_PRBS15   2
 
#define RCL_CMD_IEEE_WH_MODE_PRBS32   3
 
#define RCL_StatsIeee_Default()
 
#define RCL_StatsIeee_DefaultRuntime()   (RCL_StatsIeee) RCL_StatsIeee_Default()
 

Enumerations

enum  RCL_CmdIeee_AutoAckMode {
  RCL_CmdIeee_AutoAck_Off, RCL_CmdIeee_AutoAck_ImmAckNoAutoPend, RCL_CmdIeee_AutoAck_ImmAckAutoPendAll, RCL_CmdIeee_AutoAck_ImmAckAutoPendDataReq,
  RCL_CmdIeee_AutoAck_ProvidedFrame
}
 
enum  RCL_CmdIeee_CcaMode {
  RCL_CmdIeee_NoCca = 0, RCL_CmdIeee_CcaMode1Energy = 1, RCL_CmdIeee_CcaMode2Signal = 2, RCL_CmdIeee_CcaMode3EnergyOrSignal = 3,
  RCL_CmdIeee_CcaMode4Aloha = 4, RCL_CmdIeee_CcaMode3EnergyAndSignal = 7
}
 

Data Structure Documentation

§ RCL_CmdIeee_RxPktStatus

union RCL_CmdIeee_RxPktStatus

Appended packet status field from RX buffer.

Data Fields
struct RCL_CmdIeee_RxPktStatus __unnamed__
uint8_t value

§ RCL_CMD_IEEE_RX_TX_t

struct RCL_CMD_IEEE_RX_TX_t

IEEE 802.15.4 Receive and transmit command.

Command to receive or transmit a packet

+ Collaboration diagram for RCL_CmdIeeeRxTx:
Data Fields
RCL_Command common
uint32_t rfFrequency

RF frequency in Hz to program

RCL_Command_TxPower txPower

Transmit power

RCL_CmdIeee_RxAction * rxAction

Configuration of receive part of command. NULL: Transmit only

RCL_CmdIeee_TxAction * txAction

Configuration of transmit part of command. NULL: No transmission configured

RCL_StatsIeee * stats

Statistics

§ RCL_CmdIeee_PanIdAddr

struct RCL_CmdIeee_PanIdAddr
Data Fields
uint16_t panId

Pan ID of the entry

uint16_t shortAddr

Short address of the entry

§ RCL_CmdIeee_SourceMatchingTableShort

struct RCL_CmdIeee_SourceMatchingTableShort
+ Collaboration diagram for RCL_CmdIeee_SourceMatchingTableShort:
Data Fields
uint32_t numEntries

Number of entries in the list

uint16_t entryEnable[RCL_CMD_IEEE_SOURCE_MATCH_TABLE_SHORT_NUM_WORDS]

Bits indicating which entires are enabled for matching (1 means enabled)

uint16_t framePending[RCL_CMD_IEEE_SOURCE_MATCH_TABLE_SHORT_NUM_WORDS]

Frame pending bits for the entries

RCL_CmdIeee_PanIdAddr shortEntry[]

PAN ID and short address for the entry

§ RCL_CmdIeee_SourceMatchingTableExt

struct RCL_CmdIeee_SourceMatchingTableExt
Data Fields
uint32_t numEntries

Number of entries in the list

uint16_t entryEnable[RCL_CMD_IEEE_SOURCE_MATCH_TABLE_EXT_NUM_WORDS]

Bits indicating which entires are enabled for matching (1 means enabled)

uint16_t framePending[RCL_CMD_IEEE_SOURCE_MATCH_TABLE_EXT_NUM_WORDS]

Frame pending bits for the entries

uint64_t extEntry[]

Extended address for the entry

§ RCL_CmdIeee_PanConfig

struct RCL_CmdIeee_PanConfig
+ Collaboration diagram for RCL_CmdIeee_PanConfig:
Data Fields
uint64_t localExtAddr

Extended address of device

uint16_t localPanId

PAN ID of device

uint16_t localShortAddr

Short address of device

RCL_CmdIeee_AutoAckMode autoAckMode: 3

Auto-ACK mode

uint8_t defaultPend: 1

Default value of frame pending bit

uint8_t panCoord: 1

0: Device is not pan coordinator. 1: Device is PAN coordinator

uint8_t maxFrameVersion: 2

Maximum frame version to accept

RCL_CmdIeee_SourceMatchingTableShort * sourceMatchingTableShort

Source matching table for short addresses

RCL_CmdIeee_SourceMatchingTableExt * sourceMatchingTableExt

Source matching table for extended addresses

§ RCL_CmdIeee_RxAction_t

struct RCL_CmdIeee_RxAction_t
+ Collaboration diagram for RCL_CmdIeee_RxAction:
Data Fields
List_List rxBuffers

Linked list of buffers for storing received packets

uint8_t numPan

Number of PANs to support. 0: Frame filtering disabled (promiscuous mode). 0 and 1 supported in this version.

bool frameFiltStop

0: Receive frame to the end on frame filtering mismatch. 1: Go back to sync search on frame filtering mismatch. Not supported in this version.

bool disableSync

0: Receive packets normally. 1: Do not sync to received SFD. Not supported in this version.

bool alwaysStoreAck

0: Store ACKs received after transmission only. 1: Store all received ACKs. Not supported in this version.

RCL_CmdIeee_PanConfig panConfig[]

PAN configuration for the supplied PANs

§ RCL_CmdIeee_TxAction_t

struct RCL_CmdIeee_TxAction_t
Data Fields
RCL_CommandStatus txStatus

Returned status of TX operation. Not supported in this version.

int8_t rssiLimit

RSSI limit for energy based CCA. Not supported in this version.

RCL_ScheduleType ccaScheduling: 1

Schedule type for the CCA part

uint16_t allowDelay: 1

0: Give error if CCA time is in the past. 1: Start immediately if CCA time is in the past

RCL_CmdIeee_CcaMode ccaMode: 3

CCA mode. Not supported in this version.

uint16_t ccaCorrThresh: 2

Correlation threshold for signal based CCA. Not supported in this version.

uint16_t ccaContentionWindow: 2

Initial contention window value for CCA. Not supported in this version.

uint16_t expectImmAck: 1

0: Immediate ACK not expected. 1: Immediate ACK expected. Not supported in this version.

uint16_t expectEnhAck: 1

0: Enhanced ACK not expected. 1: Enhanced ACK expected. Not supported in this version.

uint16_t allowTxDelay: 1

0: Give error if TX time is in the past. 1: Send TX packet immediately if TX time is in the past

uint16_t endCmdWhenDone: 1

0: Keep command and RX action alive after TX action is done. 1: End command after TX action is done. . Not supported in this version.

uint32_t absCcaStartTime

Absolute start time of the CCA part

uint16_t relativeTxStartTime

Start time of TX packet relative to the CCA start time

uint16_t ackTimeout

Timeout for getting sync on ACK relative to end of transmitted packet. Not supported in this version.

RCL_Buffer_DataEntry * txEntry

Entry holding frame to be transmitted

uint32_t txTimeStamp

Returned time stamp of transmitted packet. Not supported in this version.

§ RCL_CMD_IEEE_TX_TEST_t

struct RCL_CMD_IEEE_TX_TEST_t

IEEE 802.15.4 transmitter test command.

Command to transmit continuously, either a modulated signal or continuous wave

+ Collaboration diagram for RCL_CmdIeeeTxTest:
Data Fields
RCL_Command common
uint32_t rfFrequency

RF frequency in Hz to program. 0: Do not program frequency

RCL_Command_TxPower txPower

Transmit power

uint16_t txWord

Repeated word to transmit

struct RCL_CMD_IEEE_TX_TEST_t config

§ RCL_STATS_IEEE_t

struct RCL_STATS_IEEE_t
Data Fields
struct RCL_STATS_IEEE_t config

Configuration provided to RCL

uint8_t timestampValid

Returns 1 if lastTimestamp is updated; 0 otherwise

int8_t lastRssi

RSSI of last received packet.

int8_t maxRssi

Highest RSSI observed during the operation (only updated after packets and at the end of operation). Not supported in this version.

uint32_t lastTimestamp

Timestamp of last successfully received packet

uint16_t nRxNok

Number of packets received with CRC error

uint16_t nRxFifoFull

Number of packets received that did not fit in RX FIFO

uint16_t nRxOk

Number of correctly received packets

uint16_t nRxIgnored

Number of ignored packets received. Not supported in this version.

uint16_t nTxAck

Number of auto-ACKs transmitted. Not supported in this version.

uint16_t nTx

Number of frames transmitted

§ RCL_CmdIeee_RxPktStatus.__unnamed__

struct RCL_CmdIeee_RxPktStatus.__unnamed__
Data Fields
uint8_t crcError:1

True if packet had CRC error

uint8_t ignored:1

True if packet was ignored

uint8_t reserved:6

§ RCL_CMD_IEEE_TX_TEST_t.config

struct RCL_CMD_IEEE_TX_TEST_t.config
Data Fields
uint8_t whitenMode: 2

0. No or default whitening. 1: PRBS-9. 2: PRBS-15. 3: PRBS-32

uint8_t sendCw: 1

0: Send modulated signal. 1: Send CW

uint8_t reserved: 5

Reserved, set to 0

§ RCL_STATS_IEEE_t.config

struct RCL_STATS_IEEE_t.config
Data Fields
uint8_t accumulate: 1

0: Reset counters to 0 at start of command. 1: Add to incoming value of counters.

uint8_t activeUpdate: 1

0: Update only at end of command. 1: Update after receiving or transmitting packets.

uint8_t reserved: 6

Reserved, set to 0

Macro Definition Documentation

§ RCL_CMDID_IEEE_RX_TX

#define RCL_CMDID_IEEE_RX_TX   0x2001U

§ RCL_CMDID_IEEE_TX_TEST

#define RCL_CMDID_IEEE_TX_TEST   0x2002U

§ RCL_CMD_IEEE_CHANNEL_FREQUENCY

#define RCL_CMD_IEEE_CHANNEL_FREQUENCY (   channel)    ((((channel) - 11UL) * 5000000UL) + 2405000000UL)

§ RCL_CmdIeeeRxTx_Default

#define RCL_CmdIeeeRxTx_Default ( )
Value:
{ \
.rfFrequency = 2440000000U, \
.rxAction = NULL, \
.txAction = NULL, \
.stats = NULL, \
}
#define RCL_CMDID_IEEE_RX_TX
Definition: ieee.h:48
#define RCL_Command_Default(_id, _handler)
Definition: RCL_Command.h:183
RCL_Events RCL_Handler_Ieee_RxTx(RCL_Command *cmd, LRF_Events lrfEvents, RCL_Events rclEventsIn)
Definition: ieee.c:162

§ RCL_CmdIeeeRxTx_DefaultRuntime

#define RCL_CmdIeeeRxTx_DefaultRuntime ( )    (RCL_CmdIeeeRxTx) RCL_CmdIeeeRxTx_Default()

§ RCL_CMD_IEEE_SOURCE_MATCH_TABLE_SHORT_MAX_LEN

#define RCL_CMD_IEEE_SOURCE_MATCH_TABLE_SHORT_MAX_LEN   64

Maximum number of entries in RCL_CmdIeee_SourceMatchingTableShort (assuming no extended entry)

§ RCL_CMD_IEEE_SOURCE_MATCH_TABLE_SHORT_WITH_EXT_MAX_LEN

#define RCL_CMD_IEEE_SOURCE_MATCH_TABLE_SHORT_WITH_EXT_MAX_LEN   32

Maximum number of entries in RCL_CmdIeee_SourceMatchingTableShort if an extended table is present

§ RCL_CMD_IEEE_SOURCE_MATCH_TABLE_SHORT_NUM_WORDS

#define RCL_CMD_IEEE_SOURCE_MATCH_TABLE_SHORT_NUM_WORDS   (((RCL_CMD_IEEE_SOURCE_MATCH_TABLE_SHORT_MAX_LEN) + ((8 * sizeof(uint16_t)) - 1)) / (8 * sizeof(uint16_t)))

§ RCL_CMD_IEEE_SOURCE_MATCH_TABLE_EXT_MAX_LEN

#define RCL_CMD_IEEE_SOURCE_MATCH_TABLE_EXT_MAX_LEN   16

Maximum number of entries in RCL_CmdIeee_SourceMatchingTableExt

§ RCL_CMD_IEEE_SOURCE_MATCH_TABLE_EXT_NUM_WORDS

#define RCL_CMD_IEEE_SOURCE_MATCH_TABLE_EXT_NUM_WORDS   (((RCL_CMD_IEEE_SOURCE_MATCH_TABLE_EXT_MAX_LEN) + ((8 * sizeof(uint16_t)) - 1)) / (8 * sizeof(uint16_t)))

§ RCL_CmdIeee_PanConfig_Default

#define RCL_CmdIeee_PanConfig_Default ( )
Value:
{ \
.localExtAddr = 0, \
.localPanId = 0, \
.localShortAddr = 0, \
.autoAckMode = RCL_CmdIeee_AutoAck_Off, \
.defaultPend = 0, \
.panCoord = 0, \
.maxFrameVersion = 1, \
.sourceMatchingTableShort = NULL, \
.sourceMatchingTableExt = NULL, \
}
Definition: ieee.h:94

§ RCL_CmdIeee_PanConfig_DefaultRuntime

#define RCL_CmdIeee_PanConfig_DefaultRuntime ( )    (RCL_CmdIeee_PanConfig) RCL_CmdIeee_PanConfig_Default()

§ RCL_CMD_IEEE_MAX_NUM_PAN

#define RCL_CMD_IEEE_MAX_NUM_PAN   1 /* Dual PAN not supported in this version */

Maximum number of simultaneously supported PANs

Referenced by RCL_Handler_Ieee_RxTx().

§ RCL_CmdIeee_RxAction_Default

#define RCL_CmdIeee_RxAction_Default ( )
Value:
{ \
.rxBuffers = { 0 }, \
.numPan = 0, \
.frameFiltStop = false, \
.disableSync = false, \
.alwaysStoreAck = false, \
}

§ RCL_CmdIeee_RxAction_DefaultRuntime

#define RCL_CmdIeee_RxAction_DefaultRuntime ( )    (RCL_CmdIeee_RxAction) RCL_CmdIeee_RxAction_Default()

§ RCL_CmdIeee_TxAction_Default

#define RCL_CmdIeee_TxAction_Default ( )
Value:
{ \
.txStatus = RCL_CommandStatus_Idle, \
.rssiLimit = -70, \
.ccaScheduling = RCL_Schedule_Now, \
.allowDelay = 1, \
.ccaMode = RCL_CmdIeee_NoCca, \
.ccaCorrThresh = 2, \
.ccaContentionWindow = 1, \
.expectImmAck = 0, \
.expectEnhAck = 0, \
.allowTxDelay = 1, \
.endCmdWhenDone = 0, \
.absCcaStartTime = 0, \
.relativeTxStartTime = 0, \
.ackTimeout = RCL_SCHEDULER_SYSTIM_US(300), \
.txEntry = NULL, \
.txTimeStamp = 0, \
}
Definition: RCL_Command.h:152
Definition: ieee.h:193
Definition: RCL_Command.h:84
#define RCL_SCHEDULER_SYSTIM_US(x)
Definition: RCL_Scheduler.h:45

§ RCL_CmdIeee_TxAction_DefaultRuntime

#define RCL_CmdIeee_TxAction_DefaultRuntime ( )    (RCL_CmdIeee_TxAction) RCL_CmdIeee_TxAction_Default()

§ RCL_CmdIeeeTxTest_Default

#define RCL_CmdIeeeTxTest_Default ( )
Value:
{ \
.rfFrequency = 2440000000U, \
.txPower = {.dBm = 0, .fraction = 0}, \
.txWord = 0, \
.config = { \
.whitenMode = 2, \
.sendCw = 0, \
.reserved = 0, \
}, \
}
#define RCL_CMDID_IEEE_TX_TEST
Definition: ieee.h:49
#define RCL_Command_Default(_id, _handler)
Definition: RCL_Command.h:183
RCL_Events RCL_Handler_Ieee_TxTest(RCL_Command *cmd, LRF_Events lrfEvents, RCL_Events rclEventsIn)
Definition: ieee.c:1134

§ RCL_CmdIeeeTxTest_DefaultRuntime

#define RCL_CmdIeeeTxTest_DefaultRuntime ( )    (RCL_CmdIeeeTxTest) RCL_CmdIeeeTxTest_Default()

§ RCL_CMD_IEEE_WH_MODE_DEFAULT

#define RCL_CMD_IEEE_WH_MODE_DEFAULT   0

config.whitenMode: No whitening

Referenced by RCL_Handler_Ieee_TxTest().

§ RCL_CMD_IEEE_WH_MODE_PRBS9

#define RCL_CMD_IEEE_WH_MODE_PRBS9   1

config.whitenMode: PRBS-9

§ RCL_CMD_IEEE_WH_MODE_PRBS15

#define RCL_CMD_IEEE_WH_MODE_PRBS15   2

config.whitenMode: PRBS-15

Referenced by RCL_Handler_Ieee_TxTest().

§ RCL_CMD_IEEE_WH_MODE_PRBS32

#define RCL_CMD_IEEE_WH_MODE_PRBS32   3

config.whitenMode: PRBS-32

Referenced by RCL_Handler_Ieee_TxTest().

§ RCL_StatsIeee_Default

#define RCL_StatsIeee_Default ( )
Value:
{ \
.config = { 0 }, \
.timestampValid = 0, \
.lastRssi = LRF_RSSI_INVALID, \
.maxRssi = LRF_RSSI_INVALID, \
}
#define LRF_RSSI_INVALID
Definition: LRF.h:85

§ RCL_StatsIeee_DefaultRuntime

#define RCL_StatsIeee_DefaultRuntime ( )    (RCL_StatsIeee) RCL_StatsIeee_Default()

Enumeration Type Documentation

§ RCL_CmdIeee_AutoAckMode

Enumerator
RCL_CmdIeee_AutoAck_Off 

No auto-ACK

RCL_CmdIeee_AutoAck_ImmAckNoAutoPend 

Send automatic Imm-Ack with frame pending from setting

RCL_CmdIeee_AutoAck_ImmAckAutoPendAll 

Send automatic Imm-Ack with frame pending from source matching table

RCL_CmdIeee_AutoAck_ImmAckAutoPendDataReq 

Send automatic Imm-Ack with frame pending from source matching table for data requests

RCL_CmdIeee_AutoAck_ProvidedFrame 

Send ACK frame provided externally

§ RCL_CmdIeee_CcaMode

Enumerator
RCL_CmdIeee_NoCca 

No CCA; transmit unconditionally

RCL_CmdIeee_CcaMode1Energy 

Report busy channel on energy above threshold

RCL_CmdIeee_CcaMode2Signal 

Report busy channel on DSSS signal observed

RCL_CmdIeee_CcaMode3EnergyOrSignal 

Report busy channel on energy above threshold OR DSSS signal observed

RCL_CmdIeee_CcaMode4Aloha 

Always report idle channel when not receiving a packet

RCL_CmdIeee_CcaMode3EnergyAndSignal 

Report busy channel on energy above threshold AND DSSS signal observed