class RadioSpinel
Defined at line 138 of file ../../third_party/openthread/src/lib/spinel/radio_spinel.hpp
The class for providing a OpenThread radio interface by talking with a radio-only
co-processor(RCP).
Public Methods
uint8_t GetChannel ()
Gets the current receiving channel.
Defined at line 369 of file ../../third_party/openthread/src/lib/spinel/radio_spinel.hpp
void Init (bool aSkipRcpVersionCheck, bool aSoftwareReset, SpinelDriver * aSpinelDriver, otRadioCaps aRequiredRadioCaps, bool aEnableRcpTimeSync)
Initialize this radio transceiver.
Parameters
void Deinit ()
Deinitialize this radio transceiver.
otError GetIeeeEui64 (uint8_t * aIeeeEui64)
Gets the factory-assigned IEEE EUI-64 for this transceiver.
Parameters
otRadioCaps GetRadioCaps ()
Returns the radio capabilities.
Defined at line 337 of file ../../third_party/openthread/src/lib/spinel/radio_spinel.hpp
int8_t GetReceiveSensitivity ()
Returns the radio receive sensitivity value.
Defined at line 355 of file ../../third_party/openthread/src/lib/spinel/radio_spinel.hpp
otError GetTransmitPower (int8_t & aPower)
Gets the radio's transmit power in dBm.
Parameters
otError GetCcaEnergyDetectThreshold (int8_t & aThreshold)
Gets the radio's CCA ED threshold in dBm.
Parameters
otError GetFemLnaGain (int8_t & aGain)
Gets the FEM's Rx LNA gain in dBm.
Parameters
int8_t GetRssi ()
Gets the most recent RSSI measurement.
otRadioState GetState ()
Gets current state of the radio.
Returns
Current state of the radio.
otRadioFrame & GetTransmitFrame ()
Returns a reference to the transmit buffer.
The caller forms the IEEE 802.15.4 frame in this buffer then calls otPlatRadioTransmit() to request transmission.
Defined at line 446 of file ../../third_party/openthread/src/lib/spinel/radio_spinel.hpp
bool IsCoexEnabled ()
Check whether radio coex is enabled or not.
Parameters
otError GetCoexMetrics (otRadioCoexMetrics & aCoexMetrics)
Retrieves the radio coexistence metrics.
Parameters
otError GetMultipanActiveInterface (spinel_iid_t * aIid)
Get currently active interface.
Parameters
otError EnableSrcMatch (bool aEnable)
Enables or disables source address match feature.
Parameters
otError AddSrcMatchShortEntry (uint16_t aShortAddress)
Adds a short address to the source address match table.
Parameters
otError ClearSrcMatchShortEntry (uint16_t aShortAddress)
Removes a short address from the source address match table.
Parameters
otError ClearSrcMatchShortEntries ()
Clear all short addresses from the source address match table.
Parameters
otError AddSrcMatchExtEntry (const otExtAddress & aExtAddress)
Add an extended address to the source address match table.
Parameters
otError ClearSrcMatchExtEntry (const otExtAddress & aExtAddress)
Remove an extended address from the source address match table.
Parameters
otError ClearSrcMatchExtEntries ()
Clear all the extended/long addresses from source address match table.
Parameters
otError EnergyScan (uint8_t aScanChannel, uint16_t aScanDuration)
Begins the energy scan sequence on the radio.
Parameters
bool IsPromiscuous ()
Gets the status of promiscuous mode.
Defined at line 186 of file ../../third_party/openthread/src/lib/spinel/radio_spinel.hpp
bool IsEnabled ()
Checks whether radio is enabled or not.
Defined at line 616 of file ../../third_party/openthread/src/lib/spinel/radio_spinel.hpp
bool IsTransmitting ()
Indicates whether there is a pending transmission.
Defined at line 624 of file ../../third_party/openthread/src/lib/spinel/radio_spinel.hpp
bool IsTransmitDone ()
Indicates whether a transmit has just finished.
Defined at line 632 of file ../../third_party/openthread/src/lib/spinel/radio_spinel.hpp
uint64_t GetTxRadioEndUs ()
Returns the timeout timepoint for the pending transmission.
Defined at line 639 of file ../../third_party/openthread/src/lib/spinel/radio_spinel.hpp
bool IsDiagEnabled ()
Indicates whether or not factory diagnostics mode is enabled.
Defined at line 661 of file ../../third_party/openthread/src/lib/spinel/radio_spinel.hpp
bool HasPendingFrame ()
Checks whether there is pending frame in the buffer.
Defined at line 814 of file ../../third_party/openthread/src/lib/spinel/radio_spinel.hpp
uint64_t GetNextRadioTimeRecalcStart ()
Returns the next timepoint to recalculate RCP time offset.
Defined at line 821 of file ../../third_party/openthread/src/lib/spinel/radio_spinel.hpp
const char * GetVersion ()
Returns the co-processor sw version string.
Defined at line 856 of file ../../third_party/openthread/src/lib/spinel/radio_spinel.hpp
const otRadioSpinelMetrics & GetRadioSpinelMetrics ()
Returns the radio Spinel metrics.
Defined at line 956 of file ../../third_party/openthread/src/lib/spinel/radio_spinel.hpp
void RadioSpinel ()
Initializes the spinel based OpenThread transceiver.
void SetCallbacks (const struct RadioSpinelCallbacks & aCallbacks)
This method sets the notification callbacks.
Parameters
otError SetPromiscuous (bool aEnable)
Sets the status of promiscuous mode.
Parameters
otError SetRxOnWhenIdle (bool aEnable)
Sets the status of RxOnWhenIdle mode.
Parameters
otError SetShortAddress (uint16_t aAddress)
Sets the Short Address for address filtering.
Parameters
otError SetAlternateShortAddress (uint16_t aAddress)
Sets the alternate short address.
Parameters
otError SetExtendedAddress (const otExtAddress & aExtAddress)
Sets the Extended Address for address filtering.
Parameters
otError SetPanId (uint16_t aPanId)
Sets the PAN ID for address filtering.
Parameters
otError SetTransmitPower (int8_t aPower)
Sets the radio's transmit power in dBm.
Parameters
otError SetCcaEnergyDetectThreshold (int8_t aThreshold)
Sets the radio's CCA ED threshold in dBm.
Parameters
otError SetFemLnaGain (int8_t aGain)
Sets the FEM's Rx LNA gain in dBm.
Parameters
otError SetCoexEnabled (bool aEnabled)
Enable the radio coex.
Parameters
otError SetMultipanActiveInterface (spinel_iid_t aIid, bool aCompletePending)
Sets specified radio interface active
This function allows selecting currently active radio interface on platforms that do not support parallel
communication on multiple interfaces. I.e. if more than one interface is in receive state calling
SetMultipanActiveInterface guarantees that specified interface will not be losing frames. This function
returns if the request was received properly. After interface switching is complete SwitchoverDone callback is
Invoked. Switching interfaces may take longer if aCompletePending is set true.
Parameters
otError Transmit (otRadioFrame & aFrame)
Switches the radio state from Receive to Transmit.
Parameters
otError Receive (uint8_t aChannel)
Switches the radio state from Sleep to Receive.
Parameters
otError ReceiveAt (uint64_t aWhen, uint32_t aDuration, uint8_t aChannel)
Schedule a radio reception window at a specific time and duration.
Parameters
otError Sleep ()
Switches the radio state from Receive to Sleep.
otError Enable (otInstance * aInstance)
Enable the radio.
Parameters
otError Disable ()
Disable the radio.
void Process (const void * aContext)
Processes any pending the I/O data.
Parameters
otError RadioSpinelDiagProcess (char *[] aArgs, uint8_t aArgsLength)
Processes RadioSpinel - specific diagnostics commands.
Parameters
otError PlatDiagProcess (const char * aString)
Processes platform diagnostics commands.
Parameters
void SetDiagOutputCallback (otPlatDiagOutputCallback aCallback, void * aContext)
Sets the diag output callback.
Parameters
void GetDiagOutputCallback (otPlatDiagOutputCallback & aCallback, void *& aContext)
Gets the diag output callback.
Parameters
uint32_t GetRadioChannelMask (bool aPreferred)
Returns the radio channel mask.
Parameters
otError SetMacKey (uint8_t aKeyIdMode, uint8_t aKeyId, const otMacKeyMaterial * aPrevKey, const otMacKeyMaterial * aCurrKey, const otMacKeyMaterial * aNextKey)
Sets MAC key and key index to RCP.
Parameters
otError SetMacFrameCounter (uint32_t aMacFrameCounter, bool aSetIfLarger)
Sets the current MAC Frame Counter value.
Parameters
otError SetRadioRegion (uint16_t aRegionCode)
Sets the radio region code.
Parameters
otError GetRadioRegion (uint16_t * aRegionCode)
Gets the radio region code.
Parameters
otError ConfigureEnhAckProbing (otLinkMetrics aLinkMetrics, const otShortAddress & aShortAddress, const otExtAddress & aExtAddress)
Enable/disable or update 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 start/stop
to collect Link Metrics data and include Vendor-Specific IE that containing the data in Enhanced-ACK sent to that
Probing Initiator.
Parameters
uint8_t GetCslAccuracy ()
Get the current accuracy, in units of ± ppm, of the clock used for scheduling CSL operations.
uint8_t GetCslUncertainty ()
Get the current uncertainty, in units of 10 us, of the clock used for scheduling CSL operations.
uint64_t GetNow ()
Gets the current estimated time on RCP.
uint32_t GetBusSpeed ()
Returns the bus speed between the host and the radio.
uint32_t GetBusLatency ()
Returns the bus latency between the host and the radio.
void SetBusLatency (uint32_t aBusLatency)
Sets the bus latency between the host and the radio.
Parameters
otError SetChannelMaxTransmitPower (uint8_t aChannel, int8_t aMaxPower)
Sets the max transmit power.
Parameters
otError Get (spinel_prop_key_t aKey, const char * aFormat)
Tries to retrieve a spinel property from OpenThread transceiver.
Parameters
otError GetWithParam (spinel_prop_key_t aKey, const uint8_t * aParam, spinel_size_t aParamSize, const char * aFormat)
Tries to retrieve a spinel property from OpenThread transceiver with parameter appended.
Parameters
otError Set (spinel_prop_key_t aKey, const char * aFormat)
Tries to update a spinel property of OpenThread transceiver.
Parameters
otError Insert (spinel_prop_key_t aKey, const char * aFormat)
Tries to insert a item into a spinel list property of OpenThread transceiver.
Parameters
otError Remove (spinel_prop_key_t aKey, const char * aFormat)
Tries to remove a item from a spinel list property of OpenThread transceiver.
Parameters
otError SendReset (uint8_t aResetType)
Sends a reset command to the RCP.
Parameters
void ~RadioSpinel ()
Deinitializes the spinel based OpenThread transceiver.
Defined at line 149 of file ../../third_party/openthread/src/lib/spinel/radio_spinel.hpp
void SetDiagEnabled (bool aMode)
Enables/disables the factory diagnostics mode.
Parameters
Defined at line 654 of file ../../third_party/openthread/src/lib/spinel/radio_spinel.hpp
void SetTimeSyncState (bool aOn)
Enables or disables the time synchronization between the host and RCP.
Parameters
Defined at line 1074 of file ../../third_party/openthread/src/lib/spinel/radio_spinel.hpp