Radio Configuration
This module includes the platform abstraction for radio configuration.
Summary
Functions |
|
---|---|
otPlatRadioGetBusSpeed(otInstance *aInstance)
|
uint32_t
Get the bus speed in bits/second between the host and the radio chip.
|
otPlatRadioGetCaps(otInstance *aInstance)
|
Get the radio capabilities.
|
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.
|
otPlatRadioGetFemLnaGain(otInstance *aInstance, int8_t *aGain)
|
Gets the external FEM's Rx LNA gain in dBm.
|
otPlatRadioGetIeeeEui64(otInstance *aInstance, uint8_t *aIeeeEui64)
|
void
Gets the factory-assigned IEEE EUI-64 for this interface.
|
otPlatRadioGetNow(otInstance *aInstance)
|
uint64_t
Get the current time in microseconds referenced to a continuous monotonic local radio clock (64 bits width).
|
otPlatRadioGetPromiscuous(otInstance *aInstance)
|
bool
Get the status of promiscuous mode.
|
otPlatRadioGetReceiveSensitivity(otInstance *aInstance)
|
int8_t
Get the radio receive sensitivity value.
|
otPlatRadioGetTransmitPower(otInstance *aInstance, int8_t *aPower)
|
Get the radio's transmit power in dBm.
|
otPlatRadioGetVersionString(otInstance *aInstance)
|
const char *
Get the radio version string.
|
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.
|
otPlatRadioSetExtendedAddress(otInstance *aInstance, const otExtAddress *aExtAddress)
|
void
Set the Extended Address for address filtering.
|
otPlatRadioSetFemLnaGain(otInstance *aInstance, int8_t aGain)
|
Sets the external FEM's Rx LNA gain in dBm.
|
otPlatRadioSetMacFrameCounter(otInstance *aInstance, uint32_t aMacFrameCounter)
|
void
Sets the current MAC frame counter value.
|
otPlatRadioSetMacFrameCounterIfLarger(otInstance *aInstance, uint32_t aMacFrameCounter)
|
void
Sets the current MAC frame counter value only if the new given value is larger than the current value.
|
otPlatRadioSetMacKey(otInstance *aInstance, uint8_t aKeyIdMode, uint8_t aKeyId, const otMacKeyMaterial *aPrevKey, const otMacKeyMaterial *aCurrKey, const otMacKeyMaterial *aNextKey, otRadioKeyType aKeyType)
|
void
Update MAC keys and key index.
|
otPlatRadioSetPanId(otInstance *aInstance, otPanId aPanId)
|
void
Set the PAN ID for address filtering.
|
otPlatRadioSetPromiscuous(otInstance *aInstance, bool aEnable)
|
void
Enable or disable promiscuous mode.
|
otPlatRadioSetShortAddress(otInstance *aInstance, otShortAddress aShortAddress)
|
void
Set the Short Address for address filtering.
|
otPlatRadioSetTransmitPower(otInstance *aInstance, int8_t aPower)
|
Set the radio's transmit power in dBm.
|
Functions
otPlatRadioGetBusSpeed
uint32_t otPlatRadioGetBusSpeed( otInstance *aInstance )
Get the bus speed in bits/second between the host and the radio chip.
Details | |||
---|---|---|---|
Parameters |
|
||
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.
Details | |||
---|---|---|---|
Parameters |
|
||
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.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|
otPlatRadioGetFemLnaGain
otError otPlatRadioGetFemLnaGain( otInstance *aInstance, int8_t *aGain )
Gets the external FEM's Rx LNA gain in dBm.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|
otPlatRadioGetIeeeEui64
void otPlatRadioGetIeeeEui64( otInstance *aInstance, uint8_t *aIeeeEui64 )
Gets the factory-assigned IEEE EUI-64 for this interface.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
otPlatRadioGetNow
uint64_t otPlatRadioGetNow( otInstance *aInstance )
Get the current time in microseconds referenced to a continuous monotonic local radio clock (64 bits width).
The radio clock SHALL NOT wrap during the device's uptime. Implementations SHALL therefore identify and compensate for internal counter overflows. The clock does not have a defined epoch and it SHALL NOT introduce any continuous or discontinuous adjustments (e.g. leap seconds). Implementations SHALL compensate for any sleep times of the device.
Implementations MAY choose to discipline the radio clock and compensate for sleep times by any means (e.g. by combining a high precision/low power RTC with a high resolution counter) as long as the exposed combined clock provides continuous monotonic microsecond resolution ticks within the accuracy limits announced by otPlatRadioGetCslAccuracy.
Details | |||
---|---|---|---|
Parameters |
|
||
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.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
otPlatRadioGetReceiveSensitivity
int8_t otPlatRadioGetReceiveSensitivity( otInstance *aInstance )
Get the radio receive sensitivity value.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
The radio receive sensitivity value in dBm.
|
otPlatRadioGetTransmitPower
otError otPlatRadioGetTransmitPower( otInstance *aInstance, int8_t *aPower )
Get the radio's transmit power in dBm.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|
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 (
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
A pointer to the OpenThread radio version.
|
otGetVersionString()).
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.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|
otPlatRadioSetExtendedAddress
void otPlatRadioSetExtendedAddress( otInstance *aInstance, const otExtAddress *aExtAddress )
Set the Extended Address for address filtering.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
otPlatRadioSetFemLnaGain
otError otPlatRadioSetFemLnaGain( otInstance *aInstance, int8_t aGain )
Sets the external FEM's Rx LNA gain in dBm.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
otPlatRadioSetMacFrameCounter
void otPlatRadioSetMacFrameCounter( otInstance *aInstance, uint32_t aMacFrameCounter )
Sets the current MAC frame counter value.
Is used when radio provides OT_RADIO_CAPS_TRANSMIT_SEC
capability.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
otPlatRadioSetMacFrameCounterIfLarger
void otPlatRadioSetMacFrameCounterIfLarger( otInstance *aInstance, uint32_t aMacFrameCounter )
Sets the current MAC frame counter value only if the new given value is larger than the current value.
Is used when radio provides OT_RADIO_CAPS_TRANSMIT_SEC
capability.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
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.
Is used when radio provides OT_RADIO_CAPS_TRANSMIT_SEC capability.
Details | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Parameters |
|
otPlatRadioSetPanId
void otPlatRadioSetPanId( otInstance *aInstance, otPanId aPanId )
Set the PAN ID for address filtering.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
otPlatRadioSetPromiscuous
void otPlatRadioSetPromiscuous( otInstance *aInstance, bool aEnable )
Enable or disable promiscuous mode.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
otPlatRadioSetShortAddress
void otPlatRadioSetShortAddress( otInstance *aInstance, otShortAddress aShortAddress )
Set the Short Address for address filtering.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
otPlatRadioSetTransmitPower
otError otPlatRadioSetTransmitPower( otInstance *aInstance, int8_t aPower )
Set the radio's transmit power in dBm.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
Resources
OpenThread API Reference topics originate from the source code, available on GitHub. For more information, or to contribute to our documentation, refer to Resources.