class SpinelInterface

Defined at line 48 of file ../../third_party/openthread/src/lib/spinel/spinel_interface.hpp

Public Members

static const uint16_t kMaxFrameSize

Public Methods

otError Init (ReceiveFrameCallback aCallback, void * aCallbackContext, RxFrameBuffer & aFrameBuffer)

Initializes the interface to the Radio Co-processor (RCP)

Parameters

aCallback [in] Callback on frame received
aCallbackContext [in] Callback context
aFrameBuffer [in] A reference to a `RxFrameBuffer` object.
void Deinit ()

Deinitializes the interface to the RCP.

otError SendFrame (const uint8_t * aFrame, uint16_t aLength)

Encodes and sends a spinel frame to Radio Co-processor (RCP) over the socket.

Parameters

aFrame [in] A pointer to buffer containing the spinel frame to send.
aLength [in] The length (number of bytes) in the frame.
otError WaitForFrame (uint64_t aTimeoutUs)

Waits for receiving part or all of spinel frame within specified interval.

Parameters

aTimeout [in] The timeout value in microseconds.
void UpdateFdSet (void * aMainloopContext)

Updates the file descriptor sets with file descriptors used by the radio driver.

Parameters

aMainloopContext [in,out] A pointer to the mainloop context.
void Process (const void * aMainloopContext)

Performs radio driver processing.

Parameters

aMainloopContext [in] A pointer to the mainloop context.
uint32_t GetBusSpeed ()

Returns the bus speed between the host and the radio.

otError HardwareReset ()

Hardware resets the RCP.

const otRcpInterfaceMetrics * GetRcpInterfaceMetrics ()

Returns the RCP interface metrics.

void ~SpinelInterface ()

Marks destructor virtual method.

Defined at line 145 of file ../../third_party/openthread/src/lib/spinel/spinel_interface.hpp

Protected Methods

bool IsSpinelResetCommand (const uint8_t * aFrame, uint16_t aLength)

Indicates whether or not the frame is the Spinel SPINEL_CMD_RESET frame.

Parameters

aFrame [in] A pointer to buffer containing the spinel frame.
aLength [in] The length (number of bytes) in the frame.

Defined at line 164 of file ../../third_party/openthread/src/lib/spinel/spinel_interface.hpp

Enumerations

enum 
Name Value
kSpinelInterfaceTypeHdlc 1
kSpinelInterfaceTypeSpi 2
kSpinelInterfaceTypeVendor 3

Defined at line 148 of file ../../third_party/openthread/src/lib/spinel/spinel_interface.hpp