class SpinelDriver
Defined at line 58 of file ../../third_party/openthread/src/lib/spinel/spinel_driver.hpp
Public Methods
void ClearRxBuffer ()
Clear the rx frame buffer.
Defined at line 96 of file ../../third_party/openthread/src/lib/spinel/spinel_driver.hpp
void SpinelDriver ()
Constructor of the SpinelDriver.
CoprocessorType Init (SpinelInterface & aSpinelInterface, bool aSoftwareReset, const spinel_iid_t * aIidList, uint8_t aIidListLength)
Initialize this SpinelDriver Instance.
Parameters
void Deinit ()
Deinitialize this SpinelDriver Instance.
otError SendReset (uint8_t aResetType)
Send a reset command to the co-processor.
[in] aResetType The reset type, SPINEL_RESET_PLATFORM, SPINEL_RESET_STACK, or SPINEL_RESET_BOOTLOADER.
void ResetCoprocessor (bool aSoftwareReset)
Reset the co-processor.
This method will reset the co-processor and wait until the co-process is ready (receiving SPINEL_PROP_LAST_STATUS
from the it). The reset will be either a software or hardware reset. If `aSoftwareReset` is `true`, then the
method will first try a software reset. If the software reset succeeds, the method exits. Otherwise the method
will then try a hardware reset. If `aSoftwareReset` is `false`, then method will directly try a hardware reset.
Parameters
void Process (const void * aContext)
Processes any pending the I/O data.
The method should be called by the system loop to process received spinel frames.
Parameters
void SetCoprocessorReady ()
Set the internal state of co-processor as ready.
This method is used to skip a reset.
Defined at line 103 of file ../../third_party/openthread/src/lib/spinel/spinel_driver.hpp
bool HasPendingFrame ()
Checks whether there is pending frame in the buffer.
The method is required by the system loop to update timer fd.
Defined at line 143 of file ../../third_party/openthread/src/lib/spinel/spinel_driver.hpp
const char * GetVersion ()
Returns the co-processor sw version string.
Defined at line 150 of file ../../third_party/openthread/src/lib/spinel/spinel_driver.hpp
SpinelInterface * GetSpinelInterface ()
Returns the spinel interface.
Defined at line 200 of file ../../third_party/openthread/src/lib/spinel/spinel_driver.hpp
bool CoprocessorHasCap (unsigned int aCapability)
Returns if the co-processor has some capability
Parameters
Defined at line 209 of file ../../third_party/openthread/src/lib/spinel/spinel_driver.hpp
spinel_iid_t GetIid ()
Returns the spinel interface id.
Defined at line 216 of file ../../third_party/openthread/src/lib/spinel/spinel_driver.hpp
otError SendCommand (uint32_t aCommand, spinel_prop_key_t aKey, spinel_tid_t aTid, const char * aFormat, va_list aArgs)
Sends a spinel command to the co-processor.
Parameters
otError SendCommand (uint32_t aCommand, spinel_prop_key_t aKey, spinel_tid_t aTid)
Sends a spinel command without arguments to the co-processor.
Parameters
void SetFrameHandler (ReceivedFrameHandler aReceivedFrameHandler, SavedFrameHandler aSavedFrameHandler, void * aContext)
Sets the handler to process the received spinel frame.