class Radio

Defined at line 91 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

aInstance [in] A reference to the OpenThread instance.

Defined at line 295 of file ../../third_party/openthread/src/core/radio/radio.hpp

void SetMacFrameCounter (uint32_t aMacFrameCounter)

Sets the current MAC Frame Counter value.

Parameters

aMacFrameCounter [in] The MAC Frame Counter value.

Defined at line 384 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

aMacFrameCounter [in] The MAC Frame Counter value.

Defined at line 395 of file ../../third_party/openthread/src/core/radio/radio.hpp

Error ConfigureEnhAckProbing (otLinkMetrics aLinkMetrics, 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

aLinkMetrics [in] This parameter specifies what metrics to query. Per spec 4.11.3.4.4.6, at most 2 metrics can be specified. The probing would be disabled if is bitwise 0.
aShortAddress [in] The short address of the the probing Initiator.
aExtAddress [in] The extended source address of the probing Initiator.

Defined at line 736 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 750 of file ../../third_party/openthread/src/core/radio/radio.hpp

const char * GetVersionString ()

Gets the radio version string.

Defined at line 885 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

aIeeeEui64 [out] A reference to `Mac::ExtAddress` to place the factory-assigned IEEE EUI-64.

Defined at line 887 of file ../../third_party/openthread/src/core/radio/radio.hpp

otRadioCaps GetCaps ()

Gets the radio capabilities.

Defined at line 902 of file ../../third_party/openthread/src/core/radio/radio.hpp

int8_t GetReceiveSensitivity ()

Gets the radio receive sensitivity value.

Defined at line 904 of file ../../third_party/openthread/src/core/radio/radio.hpp

void SetExtendedAddress (const Mac::ExtAddress & aExtAddress)

Sets the Extended Address for address filtering.

Parameters

aExtAddress [in] The IEEE 802.15.4 Extended Address stored in big-endian byte order.
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

aRegionCode [in] The radio region code. The `aRegionCode >> 8` is first ascii char and the `aRegionCode & 0xff` is the second ascii char.

Defined at line 768 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

aRegionCode [out] The radio region code. The `aRegionCode >> 8` is first ascii char and the `aRegionCode & 0xff` is the second ascii char.

Defined at line 782 of file ../../third_party/openthread/src/core/radio/radio.hpp

void SetPanId (Mac::PanId aPanId)

Sets the PAN ID for address filtering.

Parameters

aPanId [in] The IEEE 802.15.4 PAN ID.

Defined at line 906 of file ../../third_party/openthread/src/core/radio/radio.hpp

void SetShortAddress (Mac::ShortAddress aShortAddress)

Sets the Short Address for address filtering.

Parameters

aShortAddress [in] The IEEE 802.15.4 Short Address.
bool SupportsChannelPage (uint8_t aChannelPage)

Indicates whether a given channel page is supported based on the current configurations.

Parameters

aChannelPage [in] The channel page to check.

Defined at line 792 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

aChannelPage [in] The channel page.

Defined at line 812 of file ../../third_party/openthread/src/core/radio/radio.hpp

void SetAlternateShortAddress (Mac::ShortAddress aShortAddress)

Set the altrnate short address.

Parameters

aShortAddress [in] The alternate short address.

Defined at line 908 of file ../../third_party/openthread/src/core/radio/radio.hpp

void SetMacKey (uint8_t aKeyIdMode, uint8_t aKeyId, const Mac::KeyMaterial & aPrevKey, const Mac::KeyMaterial & aCurrKey, const Mac::KeyMaterial & aNextKey)

Sets MAC key and key ID.

Parameters

aKeyIdMode [in] MAC key ID mode.
aKeyId [in] Current MAC key index.
aPrevKey [in] The previous MAC key.
aCurrKey [in] The current MAC key.
aNextKey [in] The next MAC key.

Defined at line 913 of file ../../third_party/openthread/src/core/radio/radio.hpp

Error GetTransmitPower (int8_t & aPower)

Gets the radio's transmit power in dBm.

Parameters

aPower [out] A reference to output the transmit power in dBm.

Defined at line 930 of file ../../third_party/openthread/src/core/radio/radio.hpp

Error SetTransmitPower (int8_t aPower)

Sets the radio's transmit power in dBm.

Parameters

aPower [in] The transmit power in dBm.

Defined at line 932 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

aThreshold [in] The CCA ED threshold in dBm.

Defined at line 934 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

aThreshold [in] The CCA ED threshold in dBm.

Defined at line 939 of file ../../third_party/openthread/src/core/radio/radio.hpp

bool GetPromiscuous ()

Gets the status of promiscuous mode.

Defined at line 944 of file ../../third_party/openthread/src/core/radio/radio.hpp

void SetPromiscuous (bool aEnable)

Enables or disables promiscuous mode.

Parameters

aEnable [in] TRUE to enable or FALSE to disable promiscuous mode.

Defined at line 946 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

aEnable [in] TRUE to keep radio in Receive, FALSE to put to Sleep during idle periods.

Defined at line 948 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 950 of file ../../third_party/openthread/src/core/radio/radio.hpp

Error Enable ()

Enables the radio.

Defined at line 952 of file ../../third_party/openthread/src/core/radio/radio.hpp

Error Disable ()

Disables the radio.

Defined at line 960 of file ../../third_party/openthread/src/core/radio/radio.hpp

bool IsEnabled ()

Indicates whether radio is enabled or not.

Defined at line 968 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 970 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

aChannel [in] The channel to use for receiving.

Defined at line 978 of file ../../third_party/openthread/src/core/radio/radio.hpp

uint64_t GetNow ()

Get the current radio time in microseconds referenced to a continuous monotonic local radio clock (64 bits

width).

Defined at line 1016 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 1018 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 1020 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 1023 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

aFrame [in] A reference to the frame to be transmitted.
int8_t GetRssi ()

Gets the most recent RSSI measurement.

Defined at line 1028 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

aScanChannel [in] The channel to perform the energy scan on.
aScanDuration [in] The duration, in milliseconds, for the channel to be scanned.

Defined at line 1030 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

aEnable [in] Enable/disable source address match feature.

Defined at line 1035 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

aShortAddress [in] The short address to be added.

Defined at line 1037 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

aExtAddress [in] The extended address to be added stored in big-endian byte order.
Error ClearSrcMatchShortEntry (Mac::ShortAddress aShortAddress)

Removes a short address from the source address match table.

Parameters

aShortAddress [in] The short address to be removed.

Defined at line 1042 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

aExtAddress [in] The extended address to be removed stored in big-endian byte order.
void ClearSrcMatchShortEntries ()

Clears all short addresses from the source address match table.

Defined at line 1047 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 1049 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 892 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 894 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 1051 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

aInstance [in] A pointer to an OpenThread instance.

Defined at line 1053 of file ../../third_party/openthread/src/core/radio/radio.hpp

void SetDiagMode (bool aMode)

Enables/disables the factory diagnostics mode.

Parameters

aMode [in] TRUE to enable diagnostics mode, FALSE otherwise.

Defined at line 1056 of file ../../third_party/openthread/src/core/radio/radio.hpp

bool GetDiagMode ()

Gets the current diagnostic mode of the radio.

Defined at line 1057 of file ../../third_party/openthread/src/core/radio/radio.hpp

Records

Friends

class Instance