General
This module includes functions for all Thread roles.
Summary
Typedefs |
|
---|---|
otBorderRouterConfig
|
typedefstruct otBorderRouterConfig
This structure represents a Border Router configuration. |
otChannelMask
|
typedefuint32_t
This type represents Channel Mask. |
otExtendedPanId
|
typedefstruct otExtendedPanId
This structure represents an Extended PAN ID. |
otExternalRouteConfig
|
typedefstruct otExternalRouteConfig
This structure represents an External Route configuration. |
otIpCounters
|
typedefstruct otIpCounters
This structure represents the IP level counters. |
otLeaderData
|
typedefstruct otLeaderData
This structure represents the Thread Leader Data. |
otLinkModeConfig
|
typedefstruct otLinkModeConfig
This structure represents an MLE Link Mode configuration. |
otMasterKey
|
typedefstruct otMasterKey
This structure represents a Thread Master Key. |
otMeshLocalPrefix
|
typedefstruct otMeshLocalPrefix
This structure represents a Mesh Local Prefix. |
otMeshcopTlvType
|
typedefenum otMeshcopTlvType
This enumeration represents meshcop TLV types. |
otMleCounters
|
typedefstruct otMleCounters
This structure represents the Thread MLE counters. |
otNeighborInfoIterator
|
typedefint16_t
Used to iterate through neighbor table. |
otNetworkDataIterator
|
typedefuint32_t
Used to iterate through Network Data information. |
otNetworkName
|
typedefstruct otNetworkName
This structure represents a Network Name. |
otOperationalDataset
|
typedefstruct otOperationalDataset
This structure represents an Active or Pending Operational Dataset. |
otOperationalDatasetComponents
|
typedef This structure represents presence of different components in Active or Pending Operational Dataset. |
otPskc
|
typedefstruct otPskc
This structure represents a PSKc. |
otReceiveDiagnosticGetCallback)(otMessage *aMessage, const otMessageInfo *aMessageInfo, void *aContext)
|
typedefvoid(*
This function pointer is called when Network Diagnostic Get response is received. |
otRoutePreference
|
typedefenum otRoutePreference
Defines valid values for member mPreference in otExternalRouteConfig and otBorderRouterConfig. |
otSecurityPolicy
|
typedefstruct otSecurityPolicy
This structure represent Security Policy. |
otServerConfig
|
typedefstruct otServerConfig
This structure represents a Server configuration. |
otServiceConfig
|
typedefstruct otServiceConfig
This structure represents a Service configuration. |
otThreadParentResponseCallback)(otThreadParentResponseInfo *aInfo, void *aContext)
|
typedefvoid(*
This function pointer is called every time an MLE Parent Response message is received. |
otThreadParentResponseInfo
|
typedefstruct otThreadParentResponseInfo
This structure represents the MLE Parent Response data. |
Variables |
|
---|---|
OT_TOOL_PACKED_END
|
OT_TOOL_PACKED_BEGIN struct otMasterKey
|
Functions |
|
---|---|
otDatasetCreateNewNetwork(otInstance *aInstance, otOperationalDataset *aDataset)
|
This method creates a new Operational Dataset to use when forming a new network.
|
otDatasetGetActive(otInstance *aInstance, otOperationalDataset *aDataset)
|
This function gets the Active Operational Dataset.
|
otDatasetGetDelayTimerMinimal(otInstance *aInstance)
|
uint32_t
Get minimal delay timer.
|
otDatasetGetPending(otInstance *aInstance, otOperationalDataset *aDataset)
|
This function gets the Pending Operational Dataset.
|
otDatasetIsCommissioned(otInstance *aInstance)
|
bool
This function indicates whether a valid network is present in the Active Operational Dataset or not.
|
otDatasetSendMgmtActiveGet(otInstance *aInstance, const otOperationalDatasetComponents *aDatasetComponents, const uint8_t *aTlvTypes, uint8_t aLength, const otIp6Address *aAddress)
|
This function sends MGMT_ACTIVE_GET.
|
otDatasetSendMgmtActiveSet(otInstance *aInstance, const otOperationalDataset *aDataset, const uint8_t *aTlvs, uint8_t aLength)
|
This function sends MGMT_ACTIVE_SET.
|
otDatasetSendMgmtPendingGet(otInstance *aInstance, const otOperationalDatasetComponents *aDatasetComponents, const uint8_t *aTlvTypes, uint8_t aLength, const otIp6Address *aAddress)
|
This function sends MGMT_PENDING_GET.
|
otDatasetSendMgmtPendingSet(otInstance *aInstance, const otOperationalDataset *aDataset, const uint8_t *aTlvs, uint8_t aLength)
|
This function sends MGMT_PENDING_SET.
|
otDatasetSetActive(otInstance *aInstance, const otOperationalDataset *aDataset)
|
This function sets the Active Operational Dataset.
|
otDatasetSetDelayTimerMinimal(otInstance *aInstance, uint32_t aDelayTimerMinimal)
|
Set minimal delay timer.
|
otDatasetSetPending(otInstance *aInstance, const otOperationalDataset *aDataset)
|
This function sets the Pending Operational Dataset.
|
otNetDataGet(otInstance *aInstance, bool aStable, uint8_t *aData, uint8_t *aDataLength)
|
This method provides a full or stable copy of the Parition's Thread Network Data.
|
otNetDataGetNextOnMeshPrefix(otInstance *aInstance, otNetworkDataIterator *aIterator, otBorderRouterConfig *aConfig)
|
This function gets the next On Mesh Prefix in the partition's Network Data.
|
otNetDataGetNextRoute(otInstance *aInstance, otNetworkDataIterator *aIterator, otExternalRouteConfig *aConfig)
|
This function gets the next external route in the partition's Network Data.
|
otNetDataGetNextService(otInstance *aInstance, otNetworkDataIterator *aIterator, otServiceConfig *aConfig)
|
This function gets the next service in the partition's Network Data.
|
otNetDataGetStableVersion(otInstance *aInstance)
|
uint8_t
Get the Stable Network Data Version.
|
otNetDataGetVersion(otInstance *aInstance)
|
uint8_t
Get the Network Data Version.
|
otThreadBecomeChild(otInstance *aInstance)
|
Attempt to reattach as a child.
|
otThreadBecomeDetached(otInstance *aInstance)
|
Detach from the Thread network.
|
otThreadDiscover(otInstance *aInstance, uint32_t aScanChannels, uint16_t aPanId, bool aJoiner, bool aEnableEui64Filtering, otHandleActiveScanResult aCallback, void *aCallbackContext)
|
This function starts a Thread Discovery scan.
|
otThreadGetChildTimeout(otInstance *aInstance)
|
uint32_t
Get the Thread Child Timeout used when operating in the Child role.
|
otThreadGetDeviceRole(otInstance *aInstance)
|
Get the device role.
|
otThreadGetExtendedPanId(otInstance *aInstance)
|
const otExtendedPanId *
Get the IEEE 802.15.4 Extended PAN ID.
|
otThreadGetIp6Counters(otInstance *aInstance)
|
const otIpCounters *
Get the IPv6 counters.
|
otThreadGetKeySequenceCounter(otInstance *aInstance)
|
uint32_t
Get the thrKeySequenceCounter.
|
otThreadGetKeySwitchGuardTime(otInstance *aInstance)
|
uint32_t
Get the thrKeySwitchGuardTime.
|
otThreadGetLeaderData(otInstance *aInstance, otLeaderData *aLeaderData)
|
This function get the Thread Leader Data.
|
otThreadGetLeaderRloc(otInstance *aInstance, otIp6Address *aLeaderRloc)
|
This function returns a pointer to the Leader's RLOC.
|
otThreadGetLeaderRouterId(otInstance *aInstance)
|
uint8_t
Get the Leader's Router ID.
|
otThreadGetLeaderWeight(otInstance *aInstance)
|
uint8_t
Get the Leader's Weight.
|
otThreadGetLinkLocalIp6Address(otInstance *aInstance)
|
const otIp6Address *
This function returns the Thread link-local IPv6 address.
|
otThreadGetLinkMode(otInstance *aInstance)
|
Get the MLE Link Mode configuration.
|
otThreadGetMasterKey(otInstance *aInstance)
|
const otMasterKey *
Get the thrMasterKey.
|
otThreadGetMeshLocalEid(otInstance *aInstance)
|
const otIp6Address *
This function returns a pointer to the Mesh Local EID address.
|
otThreadGetMeshLocalPrefix(otInstance *aInstance)
|
const otMeshLocalPrefix *
This function returns a pointer to the Mesh Local Prefix.
|
otThreadGetMleCounters(otInstance *aInstance)
|
const otMleCounters *
Get the Thread MLE counters.
|
otThreadGetNetworkName(otInstance *aInstance)
|
const char *
Get the Thread Network Name.
|
otThreadGetNextNeighborInfo(otInstance *aInstance, otNeighborInfoIterator *aIterator, otNeighborInfo *aInfo)
|
This function gets the next neighbor information.
|
otThreadGetParentAverageRssi(otInstance *aInstance, int8_t *aParentRssi)
|
The function retrieves the average RSSI for the Thread Parent.
|
otThreadGetParentInfo(otInstance *aInstance, otRouterInfo *aParentInfo)
|
The function retrieves diagnostic information for a Thread Router as parent.
|
otThreadGetParentLastRssi(otInstance *aInstance, int8_t *aLastRssi)
|
The function retrieves the RSSI of the last packet from the Thread Parent.
|
otThreadGetPartitionId(otInstance *aInstance)
|
uint32_t
Get the Partition ID.
|
otThreadGetRloc(otInstance *aInstance)
|
const otIp6Address *
This function returns a pointer to the Thread Routing Locator (RLOC) address.
|
otThreadGetRloc16(otInstance *aInstance)
|
uint16_t
Get the RLOC16.
|
otThreadGetVersion(void)
|
uint16_t
This function gets the Thread protocol version.
|
otThreadIsDiscoverInProgress(otInstance *aInstance)
|
bool
This function determines if an MLE Thread Discovery is currently in progress.
|
otThreadIsSingleton(otInstance *aInstance)
|
bool
This function indicates whether a node is the only router on the network.
|
otThreadRegisterParentResponseCallback(otInstance *aInstance, otThreadParentResponseCallback aCallback, void *aContext)
|
void
This function registers a callback to receive MLE Parent Response data.
|
otThreadResetIp6Counters(otInstance *aInstance)
|
void
Reset the IPv6 counters.
|
otThreadResetMleCounters(otInstance *aInstance)
|
void
Reset the Thread MLE counters.
|
otThreadSendDiagnosticGet(otInstance *aInstance, const otIp6Address *aDestination, const uint8_t aTlvTypes[], uint8_t aCount)
|
Send a Network Diagnostic Get request.
|
otThreadSendDiagnosticReset(otInstance *aInstance, const otIp6Address *aDestination, const uint8_t aTlvTypes[], uint8_t aCount)
|
Send a Network Diagnostic Reset request.
|
otThreadSetChildTimeout(otInstance *aInstance, uint32_t aTimeout)
|
void
Set the Thread Child Timeout used when operating in the Child role.
|
otThreadSetEnabled(otInstance *aInstance, bool aEnabled)
|
This function starts Thread protocol operation.
|
otThreadSetExtendedPanId(otInstance *aInstance, const otExtendedPanId *aExtendedPanId)
|
Set the IEEE 802.15.4 Extended PAN ID.
|
otThreadSetKeySequenceCounter(otInstance *aInstance, uint32_t aKeySequenceCounter)
|
void
Set the thrKeySequenceCounter.
|
otThreadSetKeySwitchGuardTime(otInstance *aInstance, uint32_t aKeySwitchGuardTime)
|
void
Set the thrKeySwitchGuardTime.
|
otThreadSetLinkMode(otInstance *aInstance, otLinkModeConfig aConfig)
|
Set the MLE Link Mode configuration.
|
otThreadSetMasterKey(otInstance *aInstance, const otMasterKey *aKey)
|
Set the thrMasterKey.
|
otThreadSetMeshLocalPrefix(otInstance *aInstance, const otMeshLocalPrefix *aMeshLocalPrefix)
|
This function sets the Mesh Local Prefix.
|
otThreadSetNetworkName(otInstance *aInstance, const char *aNetworkName)
|
Set the Thread Network Name.
|
otThreadSetReceiveDiagnosticGetCallback(otInstance *aInstance, otReceiveDiagnosticGetCallback aCallback, void *aCallbackContext)
|
void
This function registers a callback to provide received raw Network Diagnostic Get response payload.
|
Structs |
|
---|---|
otBorderRouterConfig |
This structure represents a Border Router configuration. |
otExtendedPanId |
This structure represents an Extended PAN ID. |
otExternalRouteConfig |
This structure represents an External Route configuration. |
otIpCounters |
This structure represents the IP level counters. |
otLeaderData |
This structure represents the Thread Leader Data. |
otLinkModeConfig |
This structure represents an MLE Link Mode configuration. |
otMasterKey |
This structure represents a Thread Master Key. |
otMeshLocalPrefix |
This structure represents a Mesh Local Prefix. |
otMleCounters |
This structure represents the Thread MLE counters. |
otNeighborInfo |
This structure holds diagnostic information for a neighboring Thread node. |
otNetworkName |
This structure represents a Network Name. |
otOperationalDataset |
This structure represents an Active or Pending Operational Dataset. |
otOperationalDatasetComponents |
This structure represents presence of different components in Active or Pending Operational Dataset. |
otPskc |
This structure represents PSKc. |
otRouterInfo |
This structure holds diagnostic information for a Thread Router. |
otSecurityPolicy |
This structure represent Security Policy. |
otServerConfig |
This structure represents a Server configuration. |
otServiceConfig |
This structure represents a Service configuration. |
otThreadParentResponseInfo |
This structure represents the MLE Parent Response data. |
Enumerations
anonymous enum
anonymous enum
This enumeration defines the Security Policy TLV flags.
otDeviceRole
otDeviceRole
Represents a Thread device role.
otMeshcopTlvType
otMeshcopTlvType
This enumeration represents meshcop TLV types.
otRoutePreference
otRoutePreference
Defines valid values for member mPreference in otExternalRouteConfig and otBorderRouterConfig.
Properties | |
---|---|
OT_ROUTE_PREFERENCE_HIGH
|
High route preference. |
OT_ROUTE_PREFERENCE_LOW
|
Low route preference. |
OT_ROUTE_PREFERENCE_MED
|
Medium route preference. |
Typedefs
otBorderRouterConfig
struct otBorderRouterConfig otBorderRouterConfig
This structure represents a Border Router configuration.
otChannelMask
uint32_t otChannelMask
This type represents Channel Mask.
otExtendedPanId
struct otExtendedPanId otExtendedPanId
This structure represents an Extended PAN ID.
otExternalRouteConfig
struct otExternalRouteConfig otExternalRouteConfig
This structure represents an External Route configuration.
otLinkModeConfig
struct otLinkModeConfig otLinkModeConfig
This structure represents an MLE Link Mode configuration.
otMeshLocalPrefix
struct otMeshLocalPrefix otMeshLocalPrefix
This structure represents a Mesh Local Prefix.
otMeshcopTlvType
enum otMeshcopTlvType otMeshcopTlvType
This enumeration represents meshcop TLV types.
otNeighborInfoIterator
int16_t otNeighborInfoIterator
Used to iterate through neighbor table.
otNetworkDataIterator
uint32_t otNetworkDataIterator
Used to iterate through Network Data information.
otOperationalDataset
struct otOperationalDataset otOperationalDataset
This structure represents an Active or Pending Operational Dataset.
Components in Dataset are optional. mComponets
structure specifies which components are present in the Dataset.
otOperationalDatasetComponents
struct otOperationalDatasetComponents otOperationalDatasetComponents
This structure represents presence of different components in Active or Pending Operational Dataset.
otReceiveDiagnosticGetCallback
void(* otReceiveDiagnosticGetCallback)(otMessage *aMessage, const otMessageInfo *aMessageInfo, void *aContext)
This function pointer is called when Network Diagnostic Get response is received.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
otRoutePreference
enum otRoutePreference otRoutePreference
Defines valid values for member mPreference in otExternalRouteConfig and otBorderRouterConfig.
otServerConfig
struct otServerConfig otServerConfig
This structure represents a Server configuration.
otServiceConfig
struct otServiceConfig otServiceConfig
This structure represents a Service configuration.
otThreadParentResponseCallback
void(* otThreadParentResponseCallback)(otThreadParentResponseInfo *aInfo, void *aContext)
This function pointer is called every time an MLE Parent Response message is received.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
otThreadParentResponseInfo
struct otThreadParentResponseInfo otThreadParentResponseInfo
This structure represents the MLE Parent Response data.
Variables
OT_TOOL_PACKED_END
OT_TOOL_PACKED_BEGIN struct otMasterKey OT_TOOL_PACKED_END
Functions
otDatasetCreateNewNetwork
otError otDatasetCreateNewNetwork( otInstance *aInstance, otOperationalDataset *aDataset )
This method creates a new Operational Dataset to use when forming a new network.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
otDatasetGetActive
otError otDatasetGetActive( otInstance *aInstance, otOperationalDataset *aDataset )
This function gets the Active Operational Dataset.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
otDatasetGetDelayTimerMinimal
uint32_t otDatasetGetDelayTimerMinimal( otInstance *aInstance )
Get minimal delay timer.
Details | |||
---|---|---|---|
Parameters |
|
||
Return Values |
|
otDatasetGetPending
otError otDatasetGetPending( otInstance *aInstance, otOperationalDataset *aDataset )
This function gets the Pending Operational Dataset.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
otDatasetIsCommissioned
bool otDatasetIsCommissioned( otInstance *aInstance )
This function indicates whether a valid network is present in the Active Operational Dataset or not.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
TRUE if a valid network is present in the Active Operational Dataset, FALSE otherwise.
|
otDatasetSendMgmtActiveGet
otError otDatasetSendMgmtActiveGet( otInstance *aInstance, const otOperationalDatasetComponents *aDatasetComponents, const uint8_t *aTlvTypes, uint8_t aLength, const otIp6Address *aAddress )
This function sends MGMT_ACTIVE_GET.
Details | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||||
Return Values |
|
otDatasetSendMgmtActiveSet
otError otDatasetSendMgmtActiveSet( otInstance *aInstance, const otOperationalDataset *aDataset, const uint8_t *aTlvs, uint8_t aLength )
This function sends MGMT_ACTIVE_SET.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Return Values |
|
otDatasetSendMgmtPendingGet
otError otDatasetSendMgmtPendingGet( otInstance *aInstance, const otOperationalDatasetComponents *aDatasetComponents, const uint8_t *aTlvTypes, uint8_t aLength, const otIp6Address *aAddress )
This function sends MGMT_PENDING_GET.
Details | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||||
Return Values |
|
otDatasetSendMgmtPendingSet
otError otDatasetSendMgmtPendingSet( otInstance *aInstance, const otOperationalDataset *aDataset, const uint8_t *aTlvs, uint8_t aLength )
This function sends MGMT_PENDING_SET.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Return Values |
|
otDatasetSetActive
otError otDatasetSetActive( otInstance *aInstance, const otOperationalDataset *aDataset )
This function sets the Active Operational Dataset.
If the dataset does not include an Active Timestamp, the dataset is only partially complete.
If Thread is enabled on a device that has a partially complete Active Dataset, the device will attempt to attach to an existing Thread network using any existing information in the dataset. Only the Thread Master Key is needed to attach to a network.
If channel is not included in the dataset, the device will send MLE Announce messages across different channels to find neighbors on other channels.
If the device successfully attaches to a Thread network, the device will then retrieve the full Active Dataset from its Parent. Note that a router-capable device will not transition to the Router or Leader roles until it has a complete Active Dataset.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|
otDatasetSetDelayTimerMinimal
otError otDatasetSetDelayTimerMinimal( otInstance *aInstance, uint32_t aDelayTimerMinimal )
Set minimal delay timer.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
otDatasetSetPending
otError otDatasetSetPending( otInstance *aInstance, const otOperationalDataset *aDataset )
This function sets the Pending Operational Dataset.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|
otNetDataGet
otError otNetDataGet( otInstance *aInstance, bool aStable, uint8_t *aData, uint8_t *aDataLength )
This method provides a full or stable copy of the Parition's Thread Network Data.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
otNetDataGetNextOnMeshPrefix
otError otNetDataGetNextOnMeshPrefix( otInstance *aInstance, otNetworkDataIterator *aIterator, otBorderRouterConfig *aConfig )
This function gets the next On Mesh Prefix in the partition's Network Data.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|
otNetDataGetNextRoute
otError otNetDataGetNextRoute( otInstance *aInstance, otNetworkDataIterator *aIterator, otExternalRouteConfig *aConfig )
This function gets the next external route in the partition's Network Data.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|
otNetDataGetNextService
otError otNetDataGetNextService( otInstance *aInstance, otNetworkDataIterator *aIterator, otServiceConfig *aConfig )
This function gets the next service in the partition's Network Data.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|
otNetDataGetStableVersion
uint8_t otNetDataGetStableVersion( otInstance *aInstance )
Get the Stable Network Data Version.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
The Stable Network Data Version.
|
otNetDataGetVersion
uint8_t otNetDataGetVersion( otInstance *aInstance )
Get the Network Data Version.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
The Network Data Version.
|
otThreadBecomeChild
otError otThreadBecomeChild( otInstance *aInstance )
Attempt to reattach as a child.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
otThreadBecomeDetached
otError otThreadBecomeDetached( otInstance *aInstance )
Detach from the Thread network.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
otThreadDiscover
otError otThreadDiscover( otInstance *aInstance, uint32_t aScanChannels, uint16_t aPanId, bool aJoiner, bool aEnableEui64Filtering, otHandleActiveScanResult aCallback, void *aCallbackContext )
This function starts a Thread Discovery scan.
Details | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||||||||
Return Values |
|
otThreadGetChildTimeout
uint32_t otThreadGetChildTimeout( otInstance *aInstance )
Get the Thread Child Timeout used when operating in the Child role.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
The Thread Child Timeout value in seconds.
|
otThreadSetChildTimeout
otThreadGetDeviceRole
otDeviceRole otThreadGetDeviceRole( otInstance *aInstance )
Get the device role.
Details | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||||
Return Values |
|
otThreadGetExtendedPanId
const otExtendedPanId * otThreadGetExtendedPanId( otInstance *aInstance )
Get the IEEE 802.15.4 Extended PAN ID.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
A pointer to the IEEE 802.15.4 Extended PAN ID.
|
otThreadSetExtendedPanId
otThreadGetIp6Counters
const otIpCounters * otThreadGetIp6Counters( otInstance *aInstance )
Get the IPv6 counters.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
A pointer to the IPv6 counters.
|
otThreadGetKeySequenceCounter
uint32_t otThreadGetKeySequenceCounter( otInstance *aInstance )
Get the thrKeySequenceCounter.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
The thrKeySequenceCounter value.
|
otThreadSetKeySequenceCounter
otThreadGetKeySwitchGuardTime
uint32_t otThreadGetKeySwitchGuardTime( otInstance *aInstance )
Get the thrKeySwitchGuardTime.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
The thrKeySwitchGuardTime value (in hours).
|
otThreadSetKeySwitchGuardTime
otThreadGetLeaderData
otError otThreadGetLeaderData( otInstance *aInstance, otLeaderData *aLeaderData )
This function get the Thread Leader Data.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|
otThreadGetLeaderRloc
otError otThreadGetLeaderRloc( otInstance *aInstance, otIp6Address *aLeaderRloc )
This function returns a pointer to the Leader's RLOC.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|
otThreadGetLeaderRouterId
uint8_t otThreadGetLeaderRouterId( otInstance *aInstance )
Get the Leader's Router ID.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
The Leader's Router ID.
|
otThreadGetLeaderWeight
uint8_t otThreadGetLeaderWeight( otInstance *aInstance )
Get the Leader's Weight.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
The Leader's Weight.
|
otThreadGetLinkLocalIp6Address
const otIp6Address * otThreadGetLinkLocalIp6Address( otInstance *aInstance )
This function returns the Thread link-local IPv6 address.
The Thread link local address is derived using IEEE802.15.4 Extended Address as Interface Identifier.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
A pointer to Thread link-local IPv6 address.
|
otThreadGetLinkMode
otLinkModeConfig otThreadGetLinkMode( otInstance *aInstance )
Get the MLE Link Mode configuration.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
The MLE Link Mode configuration.
|
otThreadSetLinkMode
otThreadGetMasterKey
const otMasterKey * otThreadGetMasterKey( otInstance *aInstance )
Get the thrMasterKey.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
A pointer to a buffer containing the thrMasterKey.
|
otThreadSetMasterKey
otThreadGetMeshLocalEid
const otIp6Address * otThreadGetMeshLocalEid( otInstance *aInstance )
This function returns a pointer to the Mesh Local EID address.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
A pointer to the Mesh Local EID address.
|
otThreadGetMeshLocalPrefix
const otMeshLocalPrefix * otThreadGetMeshLocalPrefix( otInstance *aInstance )
This function returns a pointer to the Mesh Local Prefix.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
A pointer to the Mesh Local Prefix.
|
otThreadGetMleCounters
const otMleCounters * otThreadGetMleCounters( otInstance *aInstance )
Get the Thread MLE counters.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
A pointer to the Thread MLE counters.
|
otThreadGetNetworkName
const char * otThreadGetNetworkName( otInstance *aInstance )
Get the Thread Network Name.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
A pointer to the Thread Network Name.
|
otThreadSetNetworkName
otThreadGetNextNeighborInfo
otError otThreadGetNextNeighborInfo( otInstance *aInstance, otNeighborInfoIterator *aIterator, otNeighborInfo *aInfo )
This function gets the next neighbor information.
It is used to go through the entries of the neighbor table.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|
otThreadGetParentAverageRssi
otError otThreadGetParentAverageRssi( otInstance *aInstance, int8_t *aParentRssi )
The function retrieves the average RSSI for the Thread Parent.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
otThreadGetParentInfo
otError otThreadGetParentInfo( otInstance *aInstance, otRouterInfo *aParentInfo )
The function retrieves diagnostic information for a Thread Router as parent.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
otThreadGetParentLastRssi
otError otThreadGetParentLastRssi( otInstance *aInstance, int8_t *aLastRssi )
The function retrieves the RSSI of the last packet from the Thread Parent.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|
otThreadGetPartitionId
uint32_t otThreadGetPartitionId( otInstance *aInstance )
Get the Partition ID.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
The Partition ID.
|
otThreadGetRloc
const otIp6Address * otThreadGetRloc( otInstance *aInstance )
This function returns a pointer to the Thread Routing Locator (RLOC) address.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
A pointer to the Thread Routing Locator (RLOC) address.
|
otThreadGetRloc16
uint16_t otThreadGetRloc16( otInstance *aInstance )
Get the RLOC16.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
The RLOC16.
|
otThreadGetVersion
uint16_t otThreadGetVersion( void )
This function gets the Thread protocol version.
Details | |
---|---|
Returns |
the Thread protocol version.
|
otThreadIsDiscoverInProgress
bool otThreadIsDiscoverInProgress( otInstance *aInstance )
This function determines if an MLE Thread Discovery is currently in progress.
Details | |||
---|---|---|---|
Parameters |
|
otThreadIsSingleton
bool otThreadIsSingleton( otInstance *aInstance )
This function indicates whether a node is the only router on the network.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
otThreadRegisterParentResponseCallback
void otThreadRegisterParentResponseCallback( otInstance *aInstance, otThreadParentResponseCallback aCallback, void *aContext )
This function registers a callback to receive MLE Parent Response data.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
otThreadResetIp6Counters
void otThreadResetIp6Counters( otInstance *aInstance )
Reset the IPv6 counters.
Details | |||
---|---|---|---|
Parameters |
|
otThreadResetMleCounters
void otThreadResetMleCounters( otInstance *aInstance )
Reset the Thread MLE counters.
Details | |||
---|---|---|---|
Parameters |
|
otThreadSendDiagnosticGet
otError otThreadSendDiagnosticGet( otInstance *aInstance, const otIp6Address *aDestination, const uint8_t aTlvTypes[], uint8_t aCount )
Send a Network Diagnostic Get request.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
otThreadSendDiagnosticReset
otError otThreadSendDiagnosticReset( otInstance *aInstance, const otIp6Address *aDestination, const uint8_t aTlvTypes[], uint8_t aCount )
Send a Network Diagnostic Reset request.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
otThreadSetChildTimeout
void otThreadSetChildTimeout( otInstance *aInstance, uint32_t aTimeout )
Set the Thread Child Timeout used when operating in the Child role.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
otThreadGetChildTimeout
otThreadSetEnabled
otError otThreadSetEnabled( otInstance *aInstance, bool aEnabled )
This function starts Thread protocol operation.
The interface must be up when calling this function.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
otThreadSetExtendedPanId
otError otThreadSetExtendedPanId( otInstance *aInstance, const otExtendedPanId *aExtendedPanId )
Set the IEEE 802.15.4 Extended PAN ID.
This function can only be called while Thread protocols are disabled. A successful call to this function invalidates the Active and Pending Operational Datasets in non-volatile memory.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
otThreadGetExtendedPanId
otThreadSetKeySequenceCounter
void otThreadSetKeySequenceCounter( otInstance *aInstance, uint32_t aKeySequenceCounter )
Set the thrKeySequenceCounter.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
otThreadGetKeySequenceCounter
otThreadSetKeySwitchGuardTime
void otThreadSetKeySwitchGuardTime( otInstance *aInstance, uint32_t aKeySwitchGuardTime )
Set the thrKeySwitchGuardTime.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
otThreadGetKeySwitchGuardTime
otThreadSetLinkMode
otError otThreadSetLinkMode( otInstance *aInstance, otLinkModeConfig aConfig )
Set the MLE Link Mode configuration.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
otThreadGetLinkMode
otThreadSetMasterKey
otError otThreadSetMasterKey( otInstance *aInstance, const otMasterKey *aKey )
Set the thrMasterKey.
This function succeeds only when Thread protocols are disabled. A successful call to this function invalidates the Active and Pending Operational Datasets in non-volatile memory.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|
otThreadGetMasterKey
otThreadSetMeshLocalPrefix
otError otThreadSetMeshLocalPrefix( otInstance *aInstance, const otMeshLocalPrefix *aMeshLocalPrefix )
This function sets the Mesh Local Prefix.
This function succeeds only when Thread protocols are disabled. A successful call to this function invalidates the Active and Pending Operational Datasets in non-volatile memory.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
otThreadSetNetworkName
otError otThreadSetNetworkName( otInstance *aInstance, const char *aNetworkName )
Set the Thread Network Name.
This function succeeds only when Thread protocols are disabled. A successful call to this function invalidates the Active and Pending Operational Datasets in non-volatile memory.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
otThreadGetNetworkName
otThreadSetReceiveDiagnosticGetCallback
void otThreadSetReceiveDiagnosticGetCallback( otInstance *aInstance, otReceiveDiagnosticGetCallback aCallback, void *aCallbackContext )
This function registers a callback to provide received raw Network Diagnostic Get response payload.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
Macros
OT_CHANNEL_10_MASK
OT_CHANNEL_10_MASK (1 << 10)
Channel 10.
OT_CHANNEL_11_MASK
OT_CHANNEL_11_MASK (1 << 11)
Channel 11.
OT_CHANNEL_12_MASK
OT_CHANNEL_12_MASK (1 << 12)
Channel 12.
OT_CHANNEL_13_MASK
OT_CHANNEL_13_MASK (1 << 13)
Channel 13.
OT_CHANNEL_14_MASK
OT_CHANNEL_14_MASK (1 << 14)
Channel 14.
OT_CHANNEL_15_MASK
OT_CHANNEL_15_MASK (1 << 15)
Channel 15.
OT_CHANNEL_16_MASK
OT_CHANNEL_16_MASK (1 << 16)
Channel 16.
OT_CHANNEL_17_MASK
OT_CHANNEL_17_MASK (1 << 17)
Channel 17.
OT_CHANNEL_18_MASK
OT_CHANNEL_18_MASK (1 << 18)
Channel 18.
OT_CHANNEL_19_MASK
OT_CHANNEL_19_MASK (1 << 19)
Channel 19.
OT_CHANNEL_1_MASK
OT_CHANNEL_1_MASK (1 << 1)
Channel 1.
OT_CHANNEL_20_MASK
OT_CHANNEL_20_MASK (1 << 20)
Channel 20.
OT_CHANNEL_21_MASK
OT_CHANNEL_21_MASK (1 << 21)
Channel 21.
OT_CHANNEL_22_MASK
OT_CHANNEL_22_MASK (1 << 22)
Channel 22.
OT_CHANNEL_23_MASK
OT_CHANNEL_23_MASK (1 << 23)
Channel 23.
OT_CHANNEL_24_MASK
OT_CHANNEL_24_MASK (1 << 24)
Channel 24.
OT_CHANNEL_25_MASK
OT_CHANNEL_25_MASK (1 << 25)
Channel 25.
OT_CHANNEL_26_MASK
OT_CHANNEL_26_MASK (1 << 26)
Channel 26.
OT_CHANNEL_2_MASK
OT_CHANNEL_2_MASK (1 << 2)
Channel 2.
OT_CHANNEL_3_MASK
OT_CHANNEL_3_MASK (1 << 3)
Channel 3.
OT_CHANNEL_4_MASK
OT_CHANNEL_4_MASK (1 << 4)
Channel 4.
OT_CHANNEL_5_MASK
OT_CHANNEL_5_MASK (1 << 5)
Channel 5.
OT_CHANNEL_6_MASK
OT_CHANNEL_6_MASK (1 << 6)
Channel 6.
OT_CHANNEL_7_MASK
OT_CHANNEL_7_MASK (1 << 7)
Channel 7.
OT_CHANNEL_8_MASK
OT_CHANNEL_8_MASK (1 << 8)
Channel 8.
OT_CHANNEL_9_MASK
OT_CHANNEL_9_MASK (1 << 9)
Channel 9.
OT_EXT_PAN_ID_SIZE
OT_EXT_PAN_ID_SIZE 8
Size of a Thread PAN ID (bytes)
OT_MASTER_KEY_SIZE
OT_MASTER_KEY_SIZE 16
Size of the Thread Master Key (bytes)
OT_MESH_LOCAL_PREFIX_SIZE
OT_MESH_LOCAL_PREFIX_SIZE 8
Size of the Mesh Local Prefix (bytes)
OT_NEIGHBOR_INFO_ITERATOR_INIT
OT_NEIGHBOR_INFO_ITERATOR_INIT 0
Initializer for otNeighborInfoIterator.
OT_NETWORK_DATA_ITERATOR_INIT
OT_NETWORK_DATA_ITERATOR_INIT 0
Initializer for otNetworkDataIterator.
OT_NETWORK_DIAGNOSTIC_TYPELIST_MAX_ENTRIES
OT_NETWORK_DIAGNOSTIC_TYPELIST_MAX_ENTRIES 19
Maximum Number of Network Diagnostic TLV Types to Request or Reset.
OT_NETWORK_NAME_MAX_SIZE
OT_NETWORK_NAME_MAX_SIZE 16
Maximum size of the Thread Network Name field (bytes)
OT_PSKC_MAX_SIZE
OT_PSKC_MAX_SIZE 16
Maximum size of the PSKc (bytes)
OT_SERVER_DATA_MAX_SIZE
OT_SERVER_DATA_MAX_SIZE 248
Maximum size of Server Data in bytes. This is theoretical limit, practical one is much lower.
OT_SERVICE_DATA_MAX_SIZE
OT_SERVICE_DATA_MAX_SIZE 252
Maximum size of Service Data in bytes.