Radio Configuration
This module includes the platform abstraction for radio configuration.
Functions |
|
| otRadioCaps | otPlatRadioGetCaps ( otInstance *aInstance) |
|
Get the radio capabilities.
|
|
| const char * | otPlatRadioGetVersionString ( otInstance *aInstance) |
|
Get the radio version string.
|
|
| int8_t | otPlatRadioGetReceiveSensitivity ( otInstance *aInstance) |
|
Get the radio receive sensitivity value.
|
|
| void | otPlatRadioGetIeeeEui64 ( otInstance *aInstance, uint8_t *aIeeeEui64) |
|
Gets the factory-assigned IEEE EUI-64 for this interface.
|
|
| void | otPlatRadioSetPanId ( otInstance *aInstance, otPanId aPanId) |
|
Set the PAN ID for address filtering.
|
|
| void | otPlatRadioSetExtendedAddress ( otInstance *aInstance, const otExtAddress *aExtAddress) |
|
Set the Extended Address for address filtering.
|
|
| void | otPlatRadioSetShortAddress ( otInstance *aInstance, otShortAddress aShortAddress) |
|
Set the Short Address for address filtering.
|
|
| otError | otPlatRadioGetTransmitPower ( otInstance *aInstance, int8_t *aPower) |
|
Get the radio's transmit power in dBm.
|
|
| otError | otPlatRadioSetTransmitPower ( otInstance *aInstance, int8_t aPower) |
|
Set the radio's transmit power in dBm.
|
|
| otError | otPlatRadioGetCcaEnergyDetectThreshold ( otInstance *aInstance, int8_t *aThreshold) |
|
Get the radio's CCA ED threshold in dBm measured at antenna connector per IEEE 802.15.4 - 2015 section 10.1.4.
|
|
| otError | otPlatRadioSetCcaEnergyDetectThreshold ( otInstance *aInstance, int8_t aThreshold) |
|
Set the radio's CCA ED threshold in dBm measured at antenna connector per IEEE 802.15.4 - 2015 section 10.1.4.
|
|
| otError | otPlatRadioGetFemLnaGain ( otInstance *aInstance, int8_t *aGain) |
|
Get the external FEM's Rx LNA gain in dBm.
|
|
| otError | otPlatRadioSetFemLnaGain ( otInstance *aInstance, int8_t aGain) |
|
Set the external FEM's Rx LNA gain in dBm.
|
|
| bool | otPlatRadioGetPromiscuous ( otInstance *aInstance) |
|
Get the status of promiscuous mode.
|
|
| void | otPlatRadioSetPromiscuous ( otInstance *aInstance, bool aEnable) |
|
Enable or disable promiscuous mode.
|
|
| void | otPlatRadioSetMacKey ( otInstance *aInstance, uint8_t aKeyIdMode, uint8_t aKeyId, const otMacKeyMaterial *aPrevKey, const otMacKeyMaterial *aCurrKey, const otMacKeyMaterial *aNextKey, otRadioKeyType aKeyType) |
|
Update MAC keys and key index.
|
|
| void | otPlatRadioSetMacFrameCounter ( otInstance *aInstance, uint32_t aMacFrameCounter) |
|
This method sets the current MAC frame counter value.
|
|
| uint64_t | otPlatRadioGetNow ( otInstance *aInstance) |
|
Get the current estimated time (in microseconds) of the radio chip.
|
|
| uint32_t | otPlatRadioGetBusSpeed ( otInstance *aInstance) |
|
Get the bus speed in bits/second between the host and the radio chip.
|
|
Detailed Description
This module includes the platform abstraction for radio configuration.
Function Documentation
◆ otPlatRadioGetBusSpeed()
| uint32_t otPlatRadioGetBusSpeed | ( | otInstance * |
aInstance
|
) |
Get the bus speed in bits/second between the host and the radio chip.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance.
- Returns
- The bus speed in bits/second between the host and the radio chip. Return 0 when the MAC and above layer and Radio layer resides on the same chip.
◆ otPlatRadioGetCaps()
| otRadioCaps otPlatRadioGetCaps | ( | otInstance * |
aInstance
|
) |
Get the radio capabilities.
- Parameters
-
[in] aInstanceThe OpenThread instance structure.
- Returns
-
The radio capability bit vector (see
OT_RADIO_CAP_*definitions).
◆ otPlatRadioGetCcaEnergyDetectThreshold()
| otError otPlatRadioGetCcaEnergyDetectThreshold | ( | otInstance * |
aInstance,
|
| int8_t * |
aThreshold
|
||
| ) |
Get the radio's CCA ED threshold in dBm measured at antenna connector per IEEE 802.15.4 - 2015 section 10.1.4.
- Parameters
-
[in] aInstanceThe OpenThread instance structure. [out] aThresholdThe CCA ED threshold in dBm.
- Return values
-
OT_ERROR_NONESuccessfully retrieved the CCA ED threshold. OT_ERROR_INVALID_ARGSaThresholdwas NULL.OT_ERROR_NOT_IMPLEMENTEDCCA ED threshold configuration via dBm is not implemented.
◆ otPlatRadioGetFemLnaGain()
| otError otPlatRadioGetFemLnaGain | ( | otInstance * |
aInstance,
|
| int8_t * |
aGain
|
||
| ) |
Get the external FEM's Rx LNA gain in dBm.
- Parameters
-
[in] aInstanceThe OpenThread instance structure. [out] aGainThe external FEM's Rx LNA gain in dBm.
- Return values
-
OT_ERROR_NONESuccessfully retrieved the external FEM's LNA gain. OT_ERROR_INVALID_ARGSaGainwas NULL.OT_ERROR_NOT_IMPLEMENTEDExternal FEM's LNA setting is not implemented.
◆ otPlatRadioGetIeeeEui64()
| void otPlatRadioGetIeeeEui64 | ( | otInstance * |
aInstance,
|
| uint8_t * |
aIeeeEui64
|
||
| ) |
Gets the factory-assigned IEEE EUI-64 for this interface.
- Parameters
-
[in] aInstanceThe OpenThread instance structure. [out] aIeeeEui64A pointer to the factory-assigned IEEE EUI-64.
◆ otPlatRadioGetNow()
| uint64_t otPlatRadioGetNow | ( | otInstance * |
aInstance
|
) |
Get the current estimated time (in microseconds) of the radio chip.
This microsecond timer must be a free-running timer. The timer must continue to advance with microsecond precision even when the radio is in the sleep state.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance.
- Returns
- The current time in microseconds. UINT64_MAX when platform does not support or radio time is not ready.
◆ otPlatRadioGetPromiscuous()
| bool otPlatRadioGetPromiscuous | ( | otInstance * |
aInstance
|
) |
Get the status of promiscuous mode.
- Parameters
-
[in] aInstanceThe OpenThread instance structure.
- Return values
-
TRUEPromiscuous mode is enabled. FALSEPromiscuous mode is disabled.
◆ otPlatRadioGetReceiveSensitivity()
| int8_t otPlatRadioGetReceiveSensitivity | ( | otInstance * |
aInstance
|
) |
Get the radio receive sensitivity value.
- Parameters
-
[in] aInstanceThe OpenThread instance structure.
- Returns
- The radio receive sensitivity value in dBm.
◆ otPlatRadioGetTransmitPower()
| otError otPlatRadioGetTransmitPower | ( | otInstance * |
aInstance,
|
| int8_t * |
aPower
|
||
| ) |
Get the radio's transmit power in dBm.
- Note
- The transmit power returned will be no larger than the power specified in the max power table for the current channel.
- Parameters
-
[in] aInstanceThe OpenThread instance structure. [out] aPowerThe transmit power in dBm.
- Return values
-
OT_ERROR_NONESuccessfully retrieved the transmit power. OT_ERROR_INVALID_ARGSaPowerwas NULL.OT_ERROR_NOT_IMPLEMENTEDTransmit power configuration via dBm is not implemented.
◆ otPlatRadioGetVersionString()
| const char* otPlatRadioGetVersionString | ( | otInstance * |
aInstance
|
) |
Get the radio version string.
This is an optional radio driver platform function. If not provided by platform radio driver, OpenThread uses the OpenThread version instead (
- See also
- otGetVersionString() ).
- Parameters
-
[in] aInstanceThe OpenThread instance structure.
- Returns
- A pointer to the OpenThread radio version.
◆ otPlatRadioSetCcaEnergyDetectThreshold()
| otError otPlatRadioSetCcaEnergyDetectThreshold | ( | otInstance * |
aInstance,
|
| int8_t |
aThreshold
|
||
| ) |
Set the radio's CCA ED threshold in dBm measured at antenna connector per IEEE 802.15.4 - 2015 section 10.1.4.
- Parameters
-
[in] aInstanceThe OpenThread instance structure. [in] aThresholdThe CCA ED threshold in dBm.
- Return values
-
OT_ERROR_NONESuccessfully set the transmit power. OT_ERROR_INVALID_ARGSGiven threshold is out of range. OT_ERROR_NOT_IMPLEMENTEDCCA ED threshold configuration via dBm is not implemented.
◆ otPlatRadioSetExtendedAddress()
| void otPlatRadioSetExtendedAddress | ( | otInstance * |
aInstance,
|
| const otExtAddress * |
aExtAddress
|
||
| ) |
Set the Extended Address for address filtering.
- Parameters
-
[in] aInstanceThe OpenThread instance structure. [in] aExtAddressA pointer to the IEEE 802.15.4 Extended Address stored in little-endian byte order.
◆ otPlatRadioSetFemLnaGain()
| otError otPlatRadioSetFemLnaGain | ( | otInstance * |
aInstance,
|
| int8_t |
aGain
|
||
| ) |
Set the external FEM's Rx LNA gain in dBm.
- Parameters
-
[in] aInstanceThe OpenThread instance structure. [in] aGainThe external FEM's Rx LNA gain in dBm.
- Return values
-
OT_ERROR_NONESuccessfully set the external FEM's LNA gain. OT_ERROR_NOT_IMPLEMENTEDExternal FEM's LNA gain setting is not implemented.
◆ otPlatRadioSetMacFrameCounter()
| void otPlatRadioSetMacFrameCounter | ( | otInstance * |
aInstance,
|
| uint32_t |
aMacFrameCounter
|
||
| ) |
This method sets the current MAC frame counter value.
This function is used when radio provides
OT_RADIO_CAPS_TRANSMIT_SEC
capability.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance. [in] aMacFrameCounterThe MAC frame counter value.
◆ otPlatRadioSetMacKey()
| void otPlatRadioSetMacKey | ( | otInstance * |
aInstance,
|
| uint8_t |
aKeyIdMode,
|
||
| uint8_t |
aKeyId,
|
||
| const otMacKeyMaterial * |
aPrevKey,
|
||
| const otMacKeyMaterial * |
aCurrKey,
|
||
| const otMacKeyMaterial * |
aNextKey,
|
||
| otRadioKeyType |
aKeyType
|
||
| ) |
Update MAC keys and key index.
This function is used when radio provides OT_RADIO_CAPS_TRANSMIT_SEC capability.
- Parameters
-
[in] aInstanceA pointer to an OpenThread instance. [in] aKeyIdModeThe key ID mode. [in] aKeyIdCurrent MAC key index. [in] aPrevKeyA pointer to the previous MAC key. [in] aCurrKeyA pointer to the current MAC key. [in] aNextKeyA pointer to the next MAC key. [in] aKeyTypeKey Type used.
◆ otPlatRadioSetPanId()
| void otPlatRadioSetPanId | ( | otInstance * |
aInstance,
|
| otPanId |
aPanId
|
||
| ) |
Set the PAN ID for address filtering.
- Parameters
-
[in] aInstanceThe OpenThread instance structure. [in] aPanIdThe IEEE 802.15.4 PAN ID.
◆ otPlatRadioSetPromiscuous()
| void otPlatRadioSetPromiscuous | ( | otInstance * |
aInstance,
|
| bool |
aEnable
|
||
| ) |
Enable or disable promiscuous mode.
- Parameters
-
[in] aInstanceThe OpenThread instance structure. [in] aEnableTRUE to enable or FALSE to disable promiscuous mode.
◆ otPlatRadioSetShortAddress()
| void otPlatRadioSetShortAddress | ( | otInstance * |
aInstance,
|
| otShortAddress |
aShortAddress
|
||
| ) |
Set the Short Address for address filtering.
- Parameters
-
[in] aInstanceThe OpenThread instance structure. [in] aShortAddressThe IEEE 802.15.4 Short Address.
◆ otPlatRadioSetTransmitPower()
| otError otPlatRadioSetTransmitPower | ( | otInstance * |
aInstance,
|
| int8_t |
aPower
|
||
| ) |
Set the radio's transmit power in dBm.
- Note
- The real transmit power will be no larger than the power specified in the max power table for the current channel.
- Parameters
-
[in] aInstanceThe OpenThread instance structure. [in] aPowerThe transmit power in dBm.
- Return values
-
OT_ERROR_NONESuccessfully set the transmit power. OT_ERROR_NOT_IMPLEMENTEDTransmit power configuration via dBm is not implemented.