This module includes the platform abstraction for radio configuration.
More...
|
otRadioCaps | otPlatRadioGetCaps (otInstance *aInstance) |
|
const char * | otPlatRadioGetVersionString (otInstance *aInstance) |
|
int8_t | otPlatRadioGetReceiveSensitivity (otInstance *aInstance) |
|
void | otPlatRadioGetIeeeEui64 (otInstance *aInstance, uint8_t *aIeeeEui64) |
|
void | otPlatRadioSetPanId (otInstance *aInstance, otPanId aPanId) |
|
void | otPlatRadioSetExtendedAddress (otInstance *aInstance, const otExtAddress *aExtAddress) |
|
void | otPlatRadioSetShortAddress (otInstance *aInstance, otShortAddress aShortAddress) |
|
otError | otPlatRadioGetTransmitPower (otInstance *aInstance, int8_t *aPower) |
|
otError | otPlatRadioSetTransmitPower (otInstance *aInstance, int8_t aPower) |
|
otError | otPlatRadioGetCcaEnergyDetectThreshold (otInstance *aInstance, int8_t *aThreshold) |
|
otError | otPlatRadioSetCcaEnergyDetectThreshold (otInstance *aInstance, int8_t aThreshold) |
|
bool | otPlatRadioGetPromiscuous (otInstance *aInstance) |
|
void | otPlatRadioSetPromiscuous (otInstance *aInstance, bool aEnable) |
|
void | otPlatRadioSetMacKey (otInstance *aInstance, uint8_t aKeyIdMode, uint8_t aKeyId, const otMacKey *aPrevKey, const otMacKey *aCurrKey, const otMacKey *aNextKey) |
|
This module includes the platform abstraction for radio configuration.
Get the radio capabilities.
- Parameters
-
[in] | aInstance | The OpenThread instance structure. |
- Returns
- The radio capability bit vector (see
OT_RADIO_CAP_*
definitions).
otError otPlatRadioGetCcaEnergyDetectThreshold |
( |
otInstance * |
aInstance, |
|
|
int8_t * |
aThreshold |
|
) |
| |
Get the radio's CCA ED threshold in dBm.
- Parameters
-
[in] | aInstance | The OpenThread instance structure. |
[out] | aThreshold | The CCA ED threshold in dBm. |
- Return values
-
OT_ERROR_NONE | Successfully retrieved the CCA ED threshold. |
OT_ERROR_INVALID_ARGS | aThreshold was NULL. |
OT_ERROR_NOT_IMPLEMENTED | CCA ED threshold configuration via dBm is not implemented. |
void otPlatRadioGetIeeeEui64 |
( |
otInstance * |
aInstance, |
|
|
uint8_t * |
aIeeeEui64 |
|
) |
| |
Get the factory-assigned IEEE EUI-64 for this interface.
- Parameters
-
[in] | aInstance | The OpenThread instance structure. |
[out] | aIeeeEui64 | A pointer to the factory-assigned IEEE EUI-64. |
bool otPlatRadioGetPromiscuous |
( |
otInstance * |
aInstance | ) |
|
Get the status of promiscuous mode.
- Parameters
-
[in] | aInstance | The OpenThread instance structure. |
- Return values
-
TRUE | Promiscuous mode is enabled. |
FALSE | Promiscuous mode is disabled. |
int8_t otPlatRadioGetReceiveSensitivity |
( |
otInstance * |
aInstance | ) |
|
Get the radio receive sensitivity value.
- Parameters
-
[in] | aInstance | The OpenThread instance structure. |
- Returns
- The radio receive sensitivity value in dBm.
Get the radio's transmit power in dBm.
- Parameters
-
[in] | aInstance | The OpenThread instance structure. |
[out] | aPower | The transmit power in dBm. |
- Return values
-
OT_ERROR_NONE | Successfully retrieved the transmit power. |
OT_ERROR_INVALID_ARGS | aPower was NULL. |
OT_ERROR_NOT_IMPLEMENTED | Transmit power configuration via dBm is not implemented. |
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] | aInstance | The OpenThread instance structure. |
- Returns
- A pointer to the OpenThread radio version.
otError otPlatRadioSetCcaEnergyDetectThreshold |
( |
otInstance * |
aInstance, |
|
|
int8_t |
aThreshold |
|
) |
| |
Set the radio's CCA ED threshold in dBm.
- Parameters
-
[in] | aInstance | The OpenThread instance structure. |
[in] | aThreshold | The CCA ED threshold in dBm. |
- Return values
-
OT_ERROR_NONE | Successfully set the transmit power. |
OT_ERROR_INVALID_ARGS | Given threshold is out of range. |
OT_ERROR_NOT_IMPLEMENTED | CCA ED threshold configuration via dBm is not implemented. |
Set the Extended Address for address filtering.
- Parameters
-
[in] | aInstance | The OpenThread instance structure. |
[in] | aExtAddress | A pointer to the IEEE 802.15.4 Extended Address stored in little-endian byte order. |
Update MAC keys and key index
This function is used when radio provides OT_RADIO_CAPS_TRANSMIT_SEC capability.
- Parameters
-
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aKeyIdMode | The key ID mode. |
[in] | aKeyId | Current MAC key index. |
[in] | aPrevKey | A pointer to the previous MAC key. |
[in] | aCurrKey | A pointer to the current MAC key. |
[in] | aNextKey | A pointer to the next MAC key. |
Set the PAN ID for address filtering.
- Parameters
-
[in] | aInstance | The OpenThread instance structure. |
[in] | aPanId | The IEEE 802.15.4 PAN ID. |
void otPlatRadioSetPromiscuous |
( |
otInstance * |
aInstance, |
|
|
bool |
aEnable |
|
) |
| |
Enable or disable promiscuous mode.
- Parameters
-
[in] | aInstance | The OpenThread instance structure. |
[in] | aEnable | TRUE to enable or FALSE to disable promiscuous mode. |
Set the Short Address for address filtering.
- Parameters
-
[in] | aInstance | The OpenThread instance structure. |
[in] | aShortAddress | The IEEE 802.15.4 Short Address. |
Set the radio's transmit power in dBm.
- Parameters
-
[in] | aInstance | The OpenThread instance structure. |
[in] | aPower | The transmit power in dBm. |
- Return values
-
OT_ERROR_NONE | Successfully set the transmit power. |
OT_ERROR_NOT_IMPLEMENTED | Transmit power configuration via dBm is not implemented. |