Radio Control Layer (RCL)
|
#include <stdint.h>
#include <ti/drivers/rcl/RCL_Command.h>
#include <ti/drivers/rcl/RCL_Buffer.h>
#include <ti/drivers/rcl/LRF.h>
#include <ti/drivers/rcl/commands/ieee.h>
Go to the source code of this file.
Enumerations | |
enum | RCL_IEEE_UpdateResult { RCL_IEEE_UpdateOk, RCL_IEEE_UpdateIndexError } |
Result of IEEE command update API. More... | |
enum | RCL_IEEE_AckEntryResult { RCL_IEEE_AckOk, RCL_IEEE_AckNotExpected, RCL_IEEE_AckTooLate, RCL_IEEE_AckError } |
Result of entering ACK frame. More... | |
Functions | |
RCL_Events | RCL_Handler_Ieee_RxTx (RCL_Command *cmd, LRF_Events lrfEvents, RCL_Events rclEventsIn) |
RCL_Events | RCL_Handler_Ieee_TxTest (RCL_Command *cmd, LRF_Events lrfEvents, RCL_Events rclEventsIn) |
RCL_IEEE_UpdateResult | RCL_IEEE_updateSourceMatchingTableShort (RCL_CmdIeee_PanIdAddr *newAddr, uint8_t framePending, RCL_CmdIeee_SourceMatchingTableShort *table, uint32_t index) |
Update short source matching table. More... | |
RCL_IEEE_UpdateResult | RCL_IEEE_updateSourceMatchingTableExt (RCL_CmdIeeeRxTx *cmd, RCL_CmdIeee_PanConfig *newPanConfig, uint32_t panNumber) |
Update frame filtering settings extended source matching table. More... | |
RCL_IEEE_AckEntryResult | RCL_IEEE_enterAck (RCL_CmdIeeeRxTx *cmd, RCL_Buffer_DataEntry *ackEntry) |
Provide ACK frame to be transmitted in response to received packet. More... | |
RCL_CommandStatus | RCL_IEEE_Tx_submit (RCL_CmdIeeeRxTx *cmd, RCL_CmdIeee_TxAction *txAction) |
Update tx action. More... | |
RCL_CommandStatus | RCL_IEEE_Tx_stop (RCL_CmdIeeeRxTx *cmd, RCL_StopType stopType) |
Stop a Tx action in an IEEE command. More... | |
RCL_CommandStatus | RCL_IEEE_Tx_pend (RCL_CmdIeeeRxTx *cmd) |
Wait for a submitted TX operation to complete. More... | |
int8_t | RCL_IEEE_getRxRssi (const RCL_Buffer_DataEntry *rxEntry) |
Get received RSSI from packet. More... | |
uint32_t | RCL_IEEE_getRxTimestamp (const RCL_Buffer_DataEntry *rxEntry) |
Get received timestamp from packet. More... | |
RCL_Events RCL_Handler_Ieee_RxTx | ( | RCL_Command * | cmd, |
LRF_Events | lrfEvents, | ||
RCL_Events | rclEventsIn | ||
) |
References RCL_SchedulerState::actualStartTime, RCL_CmdIeee_PanConfig::autoAckMode, customEvent, customHardStop, RCL_CmdIeee_PanConfig::defaultPend, hal_setup_sync_found_cap(), IEEE_BACKOFF_PERIOD, IEEE_CCA_START_TIME_MARGIN, IEEE_MAC_FCF_LEN, IEEE_PHY_HDR_LEN, ieeeHandlerState, RCL_CmdIeee_PanConfig::localExtAddr, RCL_CmdIeee_PanConfig::localPanId, RCL_CmdIeee_PanConfig::localShortAddr, LRF_clearHwInterrupt(), LRF_disable(), LRF_disableHwInterrupt(), LRF_disableSynthRefsys(), LRF_enable(), LRF_enableHwInterrupt(), LRF_enableSynthRefsys(), LRF_EventOpDone, LRF_EventOpError, LRF_EventRfesoft0, LRF_EventRxBufFull, LRF_EventRxCtrlAck, LRF_EventRxEmpty, LRF_EventRxIgnored, LRF_EventRxNok, LRF_EventRxOk, LRF_EventTxDone, LRF_getTxFifoWritable(), LRF_peekRxFifo(), LRF_prepareRxFifo(), LRF_prepareTxFifo(), LRF_programFrequency(), LRF_programTxPower(), LRF_readRssi(), LRF_readRxFifoWords(), LRF_RSSI_INVALID, LRF_sendHardStop(), LRF_waitForTopsmReady(), LRF_writeTxFifoWords(), RCL_CmdIeee_PanConfig::maxFrameVersion, noEvent, RCL_CmdIeee_PanConfig::panCoord, RCL_Buffer_DataEntry_paddedLen, RCL_CMD_IEEE_MAX_NUM_PAN, RCL_CmdIeee_AutoAck_ImmAckAutoPendAll, RCL_CmdIeee_AutoAck_ImmAckAutoPendDataReq, RCL_CmdIeee_AutoAck_ImmAckNoAutoPend, RCL_CmdIeee_AutoAck_Off, RCL_CmdIeee_CcaMode1Energy, RCL_CmdIeee_NoCca, RCL_CommandStatus_Active, RCL_CommandStatus_ChannelBusy, RCL_CommandStatus_DescheduledApi, RCL_CommandStatus_Error, RCL_CommandStatus_Error_MissingTxBuffer, RCL_CommandStatus_Error_Param, RCL_CommandStatus_Error_RxBufferCorruption, RCL_CommandStatus_Error_StartTooLate, RCL_CommandStatus_Error_TxBufferCorruption, RCL_CommandStatus_Finished, RCL_CommandStatus_GracefulStopApi, RCL_CommandStatus_HardStopApi, RCL_CommandStatus_isAnyStop, RCL_CommandStatus_NoSync, RCL_CommandStatus_RxErr, RCL_CommandStatus_Scheduled, RCL_Handler_Ieee_findPbeErrorEndStatus(), RCL_Handler_Ieee_initStats(), RCL_Handler_Ieee_maskEventsByFifoConf(), RCL_Handler_Ieee_restoreStopTime(), RCL_Handler_Ieee_setCustomEventTime(), RCL_Handler_Ieee_updateRxCurBufferAndFifo(), RCL_Handler_Ieee_updateStats(), RCL_MultiBuffer_commitBytes(), RCL_MultiBuffer_getBuffer(), RCL_MultiBuffer_getNextWritableByte(), RCL_ProfilingEvent_PostprocStart, RCL_ProfilingEvent_PreprocStop, RCL_Schedule_AbsTime, RCL_Schedule_Now, RCL_Scheduler_delta(), RCL_Scheduler_findStopStatus(), RCL_Scheduler_getCurrentTime(), RCL_Scheduler_isLater(), RCL_Scheduler_setCustomStartStopTimeEarliestStart(), RCL_Scheduler_setNewStartAbsTime(), RCL_Scheduler_setNewStartNow(), RCL_Scheduler_setStartStopTimeEarliestStart(), RCL_StopType_Graceful, RCL_StopType_Hard, RCL_StopType_None, rclSchedulerState, rxStateNoRx, rxStateRunning, rxStateWaitForStart, TxPowerResult_Ok, txStateCheckAck, txStateFinished, txStateNewAction, txStateNoTx, txStateSetTxTime, txStateSetupCca, txStateTx, txStateTxRx, txStateTxRxAck, txStateWaitForCca, txStateWaitForCmdEnd, and txStateWaitForTx.
RCL_Events RCL_Handler_Ieee_TxTest | ( | RCL_Command * | cmd, |
LRF_Events | lrfEvents, | ||
RCL_Events | rclEventsIn | ||
) |
References ieeeHandlerState, LRF_disable(), LRF_disableSynthRefsys(), LRF_enable(), LRF_enableHwInterrupt(), LRF_enableSynthRefsys(), LRF_EventOpDone, LRF_EventOpError, LRF_programFrequency(), LRF_programTxPower(), LRF_waitForTopsmReady(), RCL_CMD_IEEE_WH_MODE_DEFAULT, RCL_CMD_IEEE_WH_MODE_PRBS15, RCL_CMD_IEEE_WH_MODE_PRBS32, RCL_CommandStatus_Active, RCL_CommandStatus_Error_Param, RCL_CommandStatus_Error_Synth, RCL_CommandStatus_Finished, RCL_Handler_Ieee_findPbeErrorEndStatus(), RCL_HANDLER_IEEE_PRBS15_POLY, RCL_HANDLER_IEEE_PRBS32_POLY, RCL_HANDLER_IEEE_PRBS9_POLY, RCL_HANDLER_IEEE_PRBS_INIT, RCL_HANDLER_IEEE_RESTORE_MODCTRL, RCL_HANDLER_IEEE_RESTORE_NONE, RCL_HANDLER_IEEE_RESTORE_SFD, RCL_HANDLER_IEEE_RESTORE_WHITEN_POLY, RCL_Scheduler_setStartStopTimeEarliestStart(), and TxPowerResult_Ok.
RCL_IEEE_UpdateResult RCL_IEEE_updateSourceMatchingTableShort | ( | RCL_CmdIeee_PanIdAddr * | newAddr, |
uint8_t | framePending, | ||
RCL_CmdIeee_SourceMatchingTableShort * | table, | ||
uint32_t | index | ||
) |
Update short source matching table.
Update the given source matching table filter list in a way that is safe even if a running command is using the filter table.
newAddr | New address and PAN ID to apply; NULL to leave unchanged |
framePending | Value of frame pending bit |
table | Source matching table to update |
index | Index into source matching table to update |
RCL_IEEE_UpdateResult RCL_IEEE_updateSourceMatchingTableExt | ( | RCL_CmdIeeeRxTx * | cmd, |
RCL_CmdIeee_PanConfig * | newPanConfig, | ||
uint32_t | panNumber | ||
) |
Update frame filtering settings extended source matching table.
Update the given frame filtering settings in a way that is safe even if a running command is receiving a frame
cmd | Existing IEEE command to update |
newPanConfig | New PAN configuration to apply |
panNumber | Index of PAN to update |
RCL_IEEE_AckEntryResult RCL_IEEE_enterAck | ( | RCL_CmdIeeeRxTx * | cmd, |
RCL_Buffer_DataEntry * | ackEntry | ||
) |
Provide ACK frame to be transmitted in response to received packet.
Provide an ACK frame, which will be transmitted if the frame was received successfully
cmd | Existing IEEE command for which to enter ACK |
ackEntry | ACK to be transmitted over the air |
RCL_CommandStatus RCL_IEEE_Tx_submit | ( | RCL_CmdIeeeRxTx * | cmd, |
RCL_CmdIeee_TxAction * | txAction | ||
) |
Update tx action.
cmd | Existing IEEE command to submit the TX on top of |
txAction | TX action to apply |
References RCL_SchedulerState::currCmd, ieeeHandlerState, RCL_CommandStatus_Error, RCL_CommandStatus_Error_AlreadySubmitted, RCL_CommandStatus_Finished, RCL_CommandStatus_Idle, RCL_EventHandlerCmdUpdate, RCL_Scheduler_postEvent(), rclSchedulerState, txStateNewAction, and txStateNoTx.
RCL_CommandStatus RCL_IEEE_Tx_stop | ( | RCL_CmdIeeeRxTx * | cmd, |
RCL_StopType | stopType | ||
) |
Stop a Tx action in an IEEE command.
Sends the message to try to stop a TX action. When the function returns, the command may still be running. Depending on the stop type, the operation may stop after some time.
cmd | [in] - IEEE command |
stopType | [in] - Stop type; telling which situations the operation will stop |
References ieeeHandlerState, RCL_CommandStatus_Active, RCL_CommandStatus_DescheduledApi, RCL_CommandStatus_Error_Param, RCL_CommandStatus_Finished, RCL_EventHandlerCmdUpdate, and RCL_Scheduler_postEvent().
RCL_CommandStatus RCL_IEEE_Tx_pend | ( | RCL_CmdIeeeRxTx * | cmd | ) |
Wait for a submitted TX operation to complete.
Uses SemaphoreP_pend to block in the callers context.
[in] | cmd | - IEEE command running |
int8_t RCL_IEEE_getRxRssi | ( | const RCL_Buffer_DataEntry * | rxEntry | ) |
Get received RSSI from packet.
Returns the RSSI field of a received packet, or LRF_RSSI_INVALID if RSSI is not enabled
rxEntry | Received data entry |
uint32_t RCL_IEEE_getRxTimestamp | ( | const RCL_Buffer_DataEntry * | rxEntry | ) |
Get received timestamp from packet.
Returns the timestamp a received packet, adjusted to point to the start of the preamble. If timestamp is not enabled, 0 is returned. Note that this is a valid value, so it can not be used for error checking.
rxEntry | Received data entry |