class Radio
Defined at line 92 of file ../../third_party/openthread/src/core/radio/radio.hpp
Represents an OpenThread radio abstraction.
Public Members
static const uint32_t kSymbolTime
static const uint8_t kSymbolsPerOctet
static const uint32_t kPhyUsPerByte
static const uint8_t kChannelPage0
static const uint8_t kChannelPage2
static const uint16_t kNumChannelPages
static const uint32_t kSupportedChannels
static const uint8_t kChannelMin
static const uint8_t kChannelMax
static const uint8_t kFrameMinSize
static const uint8_t kFrameMaxSize
static const uint8_t[1] kSupportedChannelPages
static const int8_t kInvalidRssi
static const int8_t kDefaultReceiveSensitivity
static const int8_t kInvalidPower
Public Methods
void Radio (Instance & aInstance)
Initializes the `Radio` object.
Parameters
Defined at line 296 of file ../../third_party/openthread/src/core/radio/radio.hpp
RadioTime32 GetNowAsRadioTime32 ()
Get the current radio time in microseconds as a 32-bit value (lower 32 bits of the full radio time).
Defined at line 577 of file ../../third_party/openthread/src/core/radio/radio.hpp
Error ConfigureEnhAckProbing (otLinkMetricsaLinkMetrics,const Mac::ShortAddress &aShortAddress,const Mac::ExtAddress &aExtAddress)
Enables/disables or updates Enhanced-ACK Based Probing in radio for a specific Initiator.
After Enhanced-ACK Based Probing is configured by a specific Probing Initiator, the Enhanced-ACK sent to that
node should include Vendor-Specific IE containing Link Metrics data. This method informs the radio to
starts/stops to collect Link Metrics data and include Vendor-Specific IE that containing the data
in Enhanced-ACK sent to that Probing Initiator.
Parameters
Defined at line 743 of file ../../third_party/openthread/src/core/radio/radio.hpp
bool IsCslChannelValid (uint8_t aCslChannel)
Checks if a given channel is valid as a CSL channel.
Defined at line 757 of file ../../third_party/openthread/src/core/radio/radio.hpp
Error SetRegion (uint16_t aRegionCode)
Sets the region code.
The radio region format is the 2-bytes ascii representation of the ISO 3166 alpha-2 code.
Parameters
Defined at line 775 of file ../../third_party/openthread/src/core/radio/radio.hpp
Error GetRegion (uint16_t & aRegionCode)
Get the region code.
The radio region format is the 2-bytes ascii representation of the ISO 3166 alpha-2 code.
Parameters
Defined at line 789 of file ../../third_party/openthread/src/core/radio/radio.hpp
bool SupportsChannelPage (uint8_t aChannelPage)
Indicates whether a given channel page is supported based on the current configurations.
Parameters
Defined at line 799 of file ../../third_party/openthread/src/core/radio/radio.hpp
uint32_t ChannelMaskForPage (uint8_t aChannelPage)
Returns the channel mask for a given channel page if supported by the radio.
Parameters
Defined at line 819 of file ../../third_party/openthread/src/core/radio/radio.hpp
const char * GetVersionString ()
Gets the radio version string.
Defined at line 892 of file ../../third_party/openthread/src/core/radio/radio.hpp
void GetIeeeEui64 (Mac::ExtAddress & aIeeeEui64)
Gets the factory-assigned IEEE EUI-64 for the device.
Parameters
Defined at line 894 of file ../../third_party/openthread/src/core/radio/radio.hpp
otRadioCaps GetCaps ()
Gets the radio capabilities.
Defined at line 909 of file ../../third_party/openthread/src/core/radio/radio.hpp
int8_t GetReceiveSensitivity ()
Gets the radio receive sensitivity value.
Defined at line 911 of file ../../third_party/openthread/src/core/radio/radio.hpp
void SetPanId (Mac::PanId aPanId)
Sets the PAN ID for address filtering.
Parameters
Defined at line 913 of file ../../third_party/openthread/src/core/radio/radio.hpp
void SetExtendedAddress (const Mac::ExtAddress & aExtAddress)
Sets the Extended Address for address filtering.
Parameters
void SetMacFrameCounter (uint32_t aMacFrameCounter)
Sets the current MAC Frame Counter value.
Parameters
Defined at line 385 of file ../../third_party/openthread/src/core/radio/radio.hpp
void SetMacFrameCounterIfLarger (uint32_t aMacFrameCounter)
Sets the current MAC Frame Counter value only if the new given value is larger than the current
value.
Parameters
Defined at line 396 of file ../../third_party/openthread/src/core/radio/radio.hpp
void SetShortAddress (Mac::ShortAddress aShortAddress)
Sets the Short Address for address filtering.
Parameters
void SetAlternateShortAddress (Mac::ShortAddress aShortAddress)
Set the altrnate short address.
Parameters
Defined at line 915 of file ../../third_party/openthread/src/core/radio/radio.hpp
void SetMacKey (uint8_taKeyIdMode,uint8_taKeyId,const Mac::KeyMaterial &aPrevKey,const Mac::KeyMaterial &aCurrKey,const Mac::KeyMaterial &aNextKey)
Sets MAC key and key ID.
Parameters
Defined at line 920 of file ../../third_party/openthread/src/core/radio/radio.hpp
Error GetTransmitPower (int8_t & aPower)
Gets the radio's transmit power in dBm.
Parameters
Defined at line 937 of file ../../third_party/openthread/src/core/radio/radio.hpp
Error SetTransmitPower (int8_t aPower)
Sets the radio's transmit power in dBm.
Parameters
Defined at line 939 of file ../../third_party/openthread/src/core/radio/radio.hpp
Error GetCcaEnergyDetectThreshold (int8_t & aThreshold)
Gets the radio's CCA ED threshold in dBm.
Parameters
Defined at line 941 of file ../../third_party/openthread/src/core/radio/radio.hpp
Error SetCcaEnergyDetectThreshold (int8_t aThreshold)
Sets the radio's CCA ED threshold in dBm.
Parameters
Defined at line 946 of file ../../third_party/openthread/src/core/radio/radio.hpp
bool GetPromiscuous ()
Gets the status of promiscuous mode.
Defined at line 951 of file ../../third_party/openthread/src/core/radio/radio.hpp
void SetPromiscuous (bool aEnable)
Enables or disables promiscuous mode.
Parameters
Defined at line 953 of file ../../third_party/openthread/src/core/radio/radio.hpp
void SetRxOnWhenIdle (bool aEnable)
Indicates whether radio should stay in Receive or Sleep during idle periods.
Parameters
Defined at line 955 of file ../../third_party/openthread/src/core/radio/radio.hpp
otRadioState GetState ()
Returns the current state of the radio.
Is not required by OpenThread. It may be used for debugging and/or application-specific purposes.
Returns
Current state of the radio.
Defined at line 957 of file ../../third_party/openthread/src/core/radio/radio.hpp
Error Enable ()
Enables the radio.
Defined at line 959 of file ../../third_party/openthread/src/core/radio/radio.hpp
Error Disable ()
Disables the radio.
Defined at line 967 of file ../../third_party/openthread/src/core/radio/radio.hpp
bool IsEnabled ()
Indicates whether radio is enabled or not.
Defined at line 975 of file ../../third_party/openthread/src/core/radio/radio.hpp
Error Sleep ()
Transitions the radio from Receive to Sleep (turn off the radio).
Defined at line 977 of file ../../third_party/openthread/src/core/radio/radio.hpp
Error Receive (uint8_t aChannel)
Transitions the radio from Sleep to Receive (turn on the radio).
Parameters
Defined at line 985 of file ../../third_party/openthread/src/core/radio/radio.hpp
RadioTime64 GetNow ()
Get the current radio time in microseconds referenced to a continuous monotonic local radio clock (64 bits
width).
Defined at line 1022 of file ../../third_party/openthread/src/core/radio/radio.hpp
uint8_t GetCslAccuracy ()
Get the current accuracy, in units of ± ppm, of the clock used for scheduling CSL operations.
Defined at line 1024 of file ../../third_party/openthread/src/core/radio/radio.hpp
uint8_t GetCslUncertainty ()
Get the fixed uncertainty of the Device for scheduling CSL operations in units of 10 microseconds.
Defined at line 1026 of file ../../third_party/openthread/src/core/radio/radio.hpp
Mac::TxFrame & GetTransmitBuffer ()
Gets the radio transmit frame buffer.
OpenThread forms the IEEE 802.15.4 frame in this buffer then calls `Transmit()` to request transmission.
Defined at line 1029 of file ../../third_party/openthread/src/core/radio/radio.hpp
Error Transmit (Mac::TxFrame & aFrame)
Starts the transmit sequence on the radio.
The caller must form the IEEE 802.15.4 frame in the buffer provided by `GetTransmitBuffer()` before
requesting transmission. The channel and transmit power are also included in the frame.
Parameters
int8_t GetRssi ()
Gets the most recent RSSI measurement.
Defined at line 1034 of file ../../third_party/openthread/src/core/radio/radio.hpp
Error EnergyScan (uint8_t aScanChannel, uint16_t aScanDuration)
Begins the energy scan sequence on the radio.
Is used when radio provides OT_RADIO_CAPS_ENERGY_SCAN capability.
Parameters
Defined at line 1036 of file ../../third_party/openthread/src/core/radio/radio.hpp
void EnableSrcMatch (bool aEnable)
Enables/disables source address match feature.
The source address match feature controls how the radio layer decides the "frame pending" bit for acks sent in
response to data request commands from children.
If disabled, the radio layer must set the "frame pending" on all acks to data request commands.
If enabled, the radio layer uses the source address match table to determine whether to set or clear the "frame
pending" bit in an ack to a data request command.
The source address match table provides the list of children for which there is a pending frame. Either a short
address or an extended/long address can be added to the source address match table.
Parameters
Defined at line 1041 of file ../../third_party/openthread/src/core/radio/radio.hpp
Error AddSrcMatchShortEntry (Mac::ShortAddress aShortAddress)
Adds a short address to the source address match table.
Parameters
Defined at line 1043 of file ../../third_party/openthread/src/core/radio/radio.hpp
Error AddSrcMatchExtEntry (const Mac::ExtAddress & aExtAddress)
Adds an extended address to the source address match table.
Parameters
Error ClearSrcMatchShortEntry (Mac::ShortAddress aShortAddress)
Removes a short address from the source address match table.
Parameters
Defined at line 1048 of file ../../third_party/openthread/src/core/radio/radio.hpp
Error ClearSrcMatchExtEntry (const Mac::ExtAddress & aExtAddress)
Removes an extended address from the source address match table.
Parameters
void ClearSrcMatchShortEntries ()
Clears all short addresses from the source address match table.
Defined at line 1053 of file ../../third_party/openthread/src/core/radio/radio.hpp
void ClearSrcMatchExtEntries ()
Clears all the extended/long addresses from source address match table.
Defined at line 1055 of file ../../third_party/openthread/src/core/radio/radio.hpp
uint32_t GetSupportedChannelMask ()
Gets the radio supported channel mask that the device is allowed to be on.
Defined at line 899 of file ../../third_party/openthread/src/core/radio/radio.hpp
uint32_t GetPreferredChannelMask ()
Gets the radio preferred channel mask that the device prefers to form on.
Defined at line 901 of file ../../third_party/openthread/src/core/radio/radio.hpp
uint32_t GetBusSpeed ()
Get the bus speed in bits/second between the host and the radio chip.
Defined at line 1057 of file ../../third_party/openthread/src/core/radio/radio.hpp
uint32_t GetBusLatency ()
Get the bus latency in microseconds between the host and the radio chip.
Parameters
Defined at line 1059 of file ../../third_party/openthread/src/core/radio/radio.hpp
void SetDiagMode (bool aMode)
Enables/disables the factory diagnostics mode.
Parameters
Defined at line 1062 of file ../../third_party/openthread/src/core/radio/radio.hpp
bool GetDiagMode ()
Gets the current diagnostic mode of the radio.
Defined at line 1063 of file ../../third_party/openthread/src/core/radio/radio.hpp
Records
Friends
class Instance