Multipan

This module includes the platform abstraction for multipan support.

Summary

Functions

otPlatMultipanGetActiveInstance(otInstance **aInstance)
Get instance currently in control of the radio.
otPlatMultipanIidToInstance(uint8_t aIid)
Get the instance pointer corresponding to the given IID.
otPlatMultipanInstanceToIid(otInstance *aInstance)
uint8_t
Get the IID corresponding to the given OpenThread instance pointer.
otPlatMultipanSetActiveInstance(otInstance *aInstance, bool aCompletePending)
Set aInstance as the current active instance controlling radio.
otPlatMultipanSwitchoverDone(otInstance *aInstance, bool aSuccess)
void
The platform completed the interface switching procedure.

Functions

otPlatMultipanGetActiveInstance

otError otPlatMultipanGetActiveInstance(
  otInstance **aInstance
)

Get instance currently in control of the radio.

If radio does not operate in parallel on all interfaces, this function returns an instance object with granted radio access.

Details
Parameters
[out] aInstance
Pointer to the variable for storing the active instance pointer.
Return Values
OT_ERROR_NONE
Successfully retrieved the property.
OT_ERROR_NOT_IMPLEMENTED
Failed due to lack of the support in radio.
OT_ERROR_INVALID_COMMAND
Platform supports all interfaces simultaneously.

otPlatMultipanIidToInstance

otInstance * otPlatMultipanIidToInstance(
  uint8_t aIid
)

Get the instance pointer corresponding to the given IID.

Details
Parameters
[in] aIid
The IID of the interface.
Return Values
Instance
pointer if aIid is has an instance assigned, nullptr otherwise.

otPlatMultipanInstanceToIid

uint8_t otPlatMultipanInstanceToIid(
  otInstance *aInstance
)

Get the IID corresponding to the given OpenThread instance pointer.

Details
Parameters
[in] aInstance
The OpenThread instance structure.
Return Values
IID
of the given instance, broadcast IID otherwise.

otPlatMultipanSetActiveInstance

otError otPlatMultipanSetActiveInstance(
  otInstance *aInstance,
  bool aCompletePending
)

Set aInstance as the current active instance controlling radio.

This function allows selecting the currently active instance on platforms that do not support parallel communication on multiple interfaces. In other words, if more than one instance is in a receive state, calling otPlatMultipanSetActiveInstance guarantees that specified instance will be the one receiving. This function returns if the request was received properly. After interface switching is complete, the platform should call otPlatMultipanSwitchoverDone. Switching interfaces may take longer if aCompletePending is set true.

Details
Parameters
[in] aInstance
The OpenThread instance structure.
[in] aCompletePending
True if ongoing radio operation should complete before interface switch (Soft switch), false for force switch.
Return Values
OT_ERROR_NONE
Successfully set the property.
OT_ERROR_BUSY
Failed due to another operation ongoing.
OT_ERROR_NOT_IMPLEMENTED
Failed due to unknown instance or more instances than interfaces available.
OT_ERROR_INVALID_COMMAND
Platform supports all interfaces simultaneously.
OT_ERROR_ALREADY
Given interface is already active.

otPlatMultipanSwitchoverDone

void otPlatMultipanSwitchoverDone(
  otInstance *aInstance,
  bool aSuccess
)

The platform completed the interface switching procedure.

Should be invoked immediately after processing otPlatMultipanSetActiveInstance if no delay is needed, or if some longer radio operations need to complete first, after the switch in interfaces is fully complete.

Details
Parameters
[in] aInstance
The OpenThread instance structure.
[in] aSuccess
True if successfully switched the interfaces, false if switching failed.

Resources

OpenThread API Reference topics originate from the source code, available on GitHub. For more information, or to contribute to our documentation, refer to Resources.