Mesh Diagnostics
This module includes definitions and functions for Mesh Diagnostics.
Summary
The Mesh Diagnostics APIs require OPENTHREAD_CONFIG_MESH_DIAG_ENABLE
and OPENTHREAD_FTD
.
Typedefs |
|
---|---|
otMeshDiagChildInfo
|
typedefstruct otMeshDiagChildInfo
This type represents information about a discovered child in Thread mesh. |
otMeshDiagChildIterator
|
typedefstruct otMeshDiagChildIterator
This type is an opaque iterator to iterate over list of children of a router. |
otMeshDiagDiscoverCallback)(otError aError, otMeshDiagRouterInfo *aRouterInfo, void *aContext)
|
typedefvoid(*
This function pointer type represents the callback used by otMeshDiagDiscoverTopology() to provide information about a discovered router. |
otMeshDiagDiscoverConfig
|
typedefstruct otMeshDiagDiscoverConfig
This structure represents the set of configurations used when discovering mesh topology indicating which items to discover. |
otMeshDiagIp6AddrIterator
|
typedefstruct otMeshDiagIp6AddrIterator
This type is an opaque iterator to iterate over list of IPv6 addresses of a router. |
otMeshDiagRouterInfo
|
typedefstruct otMeshDiagRouterInfo
This type represents information about a router in Thread mesh. |
Functions |
|
---|---|
otMeshDiagCancel(otInstance *aInstance)
|
void
This function cancels an ongoing topology discovery if there is one, otherwise no action.
|
otMeshDiagDiscoverTopology(otInstance *aInstance, const otMeshDiagDiscoverConfig *aConfig, otMeshDiagDiscoverCallback aCallback, void *aContext)
|
This function starts network topology discovery.
|
otMeshDiagGetNextChildInfo(otMeshDiagChildIterator *aIterator, otMeshDiagChildInfo *aChildInfo)
|
This function iterates through the discovered children of a router.
|
otMeshDiagGetNextIp6Address(otMeshDiagIp6AddrIterator *aIterator, otIp6Address *aIp6Address)
|
This function iterates through the discovered IPv6 address of a router.
|
Structs |
|
---|---|
otMeshDiagChildInfo |
This type represents information about a discovered child in Thread mesh. |
otMeshDiagDiscoverConfig |
This structure represents the set of configurations used when discovering mesh topology indicating which items to discover. |
otMeshDiagRouterInfo |
This type represents information about a router in Thread mesh. |
Typedefs
otMeshDiagChildInfo
struct otMeshDiagChildInfo otMeshDiagChildInfo
This type represents information about a discovered child in Thread mesh.
otMeshDiagChildIterator
struct otMeshDiagChildIterator otMeshDiagChildIterator
This type is an opaque iterator to iterate over list of children of a router.
Pointers to instance of this type are provided in otMeshDiagRouterInfo
.
otMeshDiagDiscoverCallback
void(* otMeshDiagDiscoverCallback)(otError aError, otMeshDiagRouterInfo *aRouterInfo, void *aContext)
This function pointer type represents the callback used by otMeshDiagDiscoverTopology()
to provide information about a discovered router.
When aError
is OT_ERROR_PENDING
, it indicates that the discovery is not yet finished and there will be more routers to discover and the callback will be invoked again.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
otMeshDiagDiscoverConfig
struct otMeshDiagDiscoverConfig otMeshDiagDiscoverConfig
This structure represents the set of configurations used when discovering mesh topology indicating which items to discover.
otMeshDiagIp6AddrIterator
struct otMeshDiagIp6AddrIterator otMeshDiagIp6AddrIterator
This type is an opaque iterator to iterate over list of IPv6 addresses of a router.
Pointers to instance of this type are provided in otMeshDiagRouterInfo
.
otMeshDiagRouterInfo
struct otMeshDiagRouterInfo otMeshDiagRouterInfo
This type represents information about a router in Thread mesh.
Functions
otMeshDiagCancel
void otMeshDiagCancel( otInstance *aInstance )
This function cancels an ongoing topology discovery if there is one, otherwise no action.
When ongoing discovery is cancelled, the callback from otMeshDiagDiscoverTopology()
will not be called anymore.
otMeshDiagDiscoverTopology
otError otMeshDiagDiscoverTopology( otInstance *aInstance, const otMeshDiagDiscoverConfig *aConfig, otMeshDiagDiscoverCallback aCallback, void *aContext )
This function starts network topology discovery.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Return Values |
|
otMeshDiagGetNextChildInfo
otError otMeshDiagGetNextChildInfo( otMeshDiagChildIterator *aIterator, otMeshDiagChildInfo *aChildInfo )
This function iterates through the discovered children of a router.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
otMeshDiagGetNextIp6Address
otError otMeshDiagGetNextIp6Address( otMeshDiagIp6AddrIterator *aIterator, otIp6Address *aIp6Address )
This function iterates through the discovered IPv6 address of a router.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
Macros
OT_MESH_DIAG_VERSION_UNKNOWN
OT_MESH_DIAG_VERSION_UNKNOWN 0xffff
This constant indicates that Thread Version is unknown.
This is used in otMeshDiagRouterInfo
for mVersion
property when device does not provide its version. This indicates that device is likely running 1.3.0 (version value 4) or earlier.
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.