Multiprotocol
Multiprotocol scheduler APIs to support multiple time-sliced PHYs.
Modules |
|
EFR32 | |
EFR32-specific multiprotocol support defines.
|
Data Structures |
|
struct | RAIL_SchedulerInfo_t |
A structure to hold information used by the scheduler.
|
Enumerations |
|
enum |
RAIL_SchedulerStatus_t
{
RAIL_SCHEDULER_STATUS_NO_ERROR , RAIL_SCHEDULER_STATUS_UNSUPPORTED , RAIL_SCHEDULER_STATUS_EVENT_INTERRUPTED , RAIL_SCHEDULER_STATUS_SCHEDULE_FAIL , RAIL_SCHEDULER_STATUS_SCHEDULED_TX_FAIL , RAIL_SCHEDULER_STATUS_SINGLE_TX_FAIL , RAIL_SCHEDULER_STATUS_CCA_CSMA_TX_FAIL , RAIL_SCHEDULER_STATUS_CCA_LBT_TX_FAIL , RAIL_SCHEDULER_STATUS_SCHEDULED_RX_FAIL , RAIL_SCHEDULER_STATUS_TX_STREAM_FAIL , RAIL_SCHEDULER_STATUS_AVERAGE_RSSI_FAIL , RAIL_SCHEDULER_STATUS_INTERNAL_ERROR } |
Multiprotocol scheduler status returned by
RAIL_GetSchedulerStatus()
.
|
|
enum |
RAIL_TaskType_t
{
RAIL_TASK_TYPE_START_RX , RAIL_TASK_TYPE_OTHER } |
Multiprotocol radio operation task types, used with RAIL_SetTaskPriority.
|
Functions |
|
void | RAIL_YieldRadio ( RAIL_Handle_t railHandle) |
Yields the radio to other configurations.
|
|
RAIL_SchedulerStatus_t | RAIL_GetSchedulerStatus ( RAIL_Handle_t railHandle) |
Gets the status of the RAIL scheduler.
|
|
RAIL_Status_t | RAIL_SetTaskPriority ( RAIL_Handle_t railHandle, uint8_t priority, RAIL_TaskType_t taskType) |
Change the priority of a specified task type in multiprotocol.
|
|
RAIL_Time_t | RAIL_GetTransitionTime (void) |
Get time needed to switch between protocols.
|
|
void | RAIL_SetTransitionTime ( RAIL_Time_t transitionTime) |
Set time needed to switch between protocols.
|
Detailed Description
Multiprotocol scheduler APIs to support multiple time-sliced PHYs.
Enumeration Type Documentation
Multiprotocol scheduler status returned by RAIL_GetSchedulerStatus() .
Enumerator | |
---|---|
RAIL_SCHEDULER_STATUS_NO_ERROR |
Multiprotocol scheduler reports no error. |
RAIL_SCHEDULER_STATUS_UNSUPPORTED |
The scheduler is disabled or the requested scheduler operation is unsupported. |
RAIL_SCHEDULER_STATUS_EVENT_INTERRUPTED |
The scheduled event was started but was interrupted by a higher-priority event before it could be completed. |
RAIL_SCHEDULER_STATUS_SCHEDULE_FAIL |
This task could not be scheduled given its priority and the other tasks running on the system. |
RAIL_SCHEDULER_STATUS_SCHEDULED_TX_FAIL |
Calling the scheduled transmit function returned an error code. See RAIL_StartScheduledTx() for more information about possible errors. |
RAIL_SCHEDULER_STATUS_SINGLE_TX_FAIL |
Calling the start transmit function returned an error code. See RAIL_StartTx() for more information about possible errors. |
RAIL_SCHEDULER_STATUS_CCA_CSMA_TX_FAIL |
Calling the CSMA transmit function returned an error code. See RAIL_StartCcaCsmaTx() for more information about possible errors. |
RAIL_SCHEDULER_STATUS_CCA_LBT_TX_FAIL |
Calling the LBT transmit function returned an error code. See RAIL_StartCcaLbtTx() for more information about possible errors. |
RAIL_SCHEDULER_STATUS_SCHEDULED_RX_FAIL |
Calling the scheduled receive function returned an error code, which means that the hardware was not set up in time for this receive. |
RAIL_SCHEDULER_STATUS_TX_STREAM_FAIL |
Calling the stream transmit function returned an error code. See RAIL_StartTxStream() for more information about possible errors. |
RAIL_SCHEDULER_STATUS_AVERAGE_RSSI_FAIL |
RSSI averaging failed. If this scheduler status occurs, RAIL_GetAverageRssi() will return RAIL_RSSI_INVALID until a RAIL_StartAverageRssi() completes successfully. |
RAIL_SCHEDULER_STATUS_INTERNAL_ERROR |
An internal error occurred in scheduler data structures, which should not happen and indicates a problem. |
Definition at line
381
of file
rail_types.h
.
enum RAIL_TaskType_t |
Function Documentation
RAIL_SchedulerStatus_t RAIL_GetSchedulerStatus | ( | RAIL_Handle_t |
railHandle
|
) |
Gets the status of the RAIL scheduler.
- Parameters
-
[in] railHandle
A RAIL instance handle.
- Returns
- RAIL_SchedulerStatus_t status.
This function can only be called from a callback context after the RAIL_EVENT_SCHEDULER_STATUS event occurs.
RAIL_Time_t RAIL_GetTransitionTime | ( | void |
|
) |
Get time needed to switch between protocols.
- Returns
- RAIL_Time_t Time needed to switch between protocols.
RAIL_Status_t RAIL_SetTaskPriority | ( | RAIL_Handle_t |
railHandle,
|
uint8_t |
priority,
|
||
RAIL_TaskType_t |
taskType
|
||
) |
Change the priority of a specified task type in multiprotocol.
- Parameters
-
[in] railHandle
A RAIL instance handle. [in] priority
Desired new priority for the railHandle's active task [in] taskType
Type of task whose priority should be updated
- Returns
- RAIL_Status_t indicating success of the function call.
While the application can use this function however it likes, a major use case is being able to increase an infinite receive priority while receiving a packet. In other words, a given RAIL_Handle_t can maintain a very low priority background receive, but upon getting a RAIL_EVENT_RX_SYNC1_DETECT_SHIFT or RAIL_EVENT_RX_SYNC2_DETECT_SHIFT event, the app can call this function to increase the background RX priority to lower the risk another protocol might preempt during packet reception.
void RAIL_SetTransitionTime | ( | RAIL_Time_t |
transitionTime
|
) |
Set time needed to switch between protocols.
- Parameters
-
[in] transitionTime
Time needed to switch between protocols.
void RAIL_YieldRadio | ( | RAIL_Handle_t |
railHandle
|
) |
Yields the radio to other configurations.
- Parameters
-
[in] railHandle
A RAIL instance handle.
- Returns
- void.
This function is used to indicate that the previous transmit or scheduled receive operation has completed. It must be used in multiprotocol RAIL since the scheduler assumes that any transmit or receive operation that is started can go on indefinitely based on state transitions and your protocol. RAIL will not allow a lower priority tasks to run until this is called so it can negatively impact performance of those protocols if this is omitted or delayed. It is also possible to simply call the RAIL_Idle() API to both terminate the operation and idle the radio. In single-protocol RAIL this API does nothing.
See Yielding the radio for more details.