Modules#
Mesh Diagnostics#
This module includes definitions and functions for Mesh Diagnostics.
The Mesh Diagnostics APIs require OPENTHREAD_CONFIG_MESH_DIAG_ENABLE
and OPENTHREAD_FTD
.
Typedefs#
This structure represents the set of configurations used when discovering mesh topology indicating which items to discover.
This type is an opaque iterator to iterate over list of IPv6 addresses of a router.
This type is an opaque iterator to iterate over list of children of a router.
This type represents information about a router in Thread mesh.
This type represents information about a discovered child in Thread mesh.
This function pointer type represents the callback used by otMeshDiagDiscoverTopology()
to provide information about a discovered router.
Functions#
This function starts network topology discovery.
This function cancels an ongoing topology discovery if there is one, otherwise no action.
This function iterates through the discovered IPv6 address of a router.
This function iterates through the discovered children of a router.
Macros#
This constant indicates that Thread Version is unknown.
Typedef Documentation#
otMeshDiagDiscoverConfig#
typedef struct otMeshDiagDiscoverConfig otMeshDiagDiscoverConfig
This structure represents the set of configurations used when discovering mesh topology indicating which items to discover.
66
of file include/openthread/mesh_diag.h
otMeshDiagIp6AddrIterator#
typedef 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
.
74
of file include/openthread/mesh_diag.h
otMeshDiagChildIterator#
typedef 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
.
82
of file include/openthread/mesh_diag.h
otMeshDiagRouterInfo#
typedef struct otMeshDiagRouterInfo otMeshDiagRouterInfo
This type represents information about a router in Thread mesh.
142
of file include/openthread/mesh_diag.h
otMeshDiagChildInfo#
typedef struct otMeshDiagChildInfo otMeshDiagChildInfo
This type represents information about a discovered child in Thread mesh.
155
of file include/openthread/mesh_diag.h
otMeshDiagDiscoverCallback#
typedef void(* otMeshDiagDiscoverCallback) (otError aError, otMeshDiagRouterInfo *aRouterInfo, void *aContext) )(otError aError, otMeshDiagRouterInfo *aRouterInfo, void *aContext)
This function pointer type represents the callback used by otMeshDiagDiscoverTopology()
to provide information about a discovered router.
[in] | aError | OT_ERROR_PENDING Indicates there are more routers to be discovered. OT_ERROR_NONE Indicates this is the last router and mesh discovery is done. OT_ERROR_RESPONSE_TIMEOUT Timed out waiting for response from one or more routers. |
[in] | aRouterInfo | The discovered router info (can be null if |
[in] | aContext | Application-specific context. |
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.
171
of file include/openthread/mesh_diag.h
Function Documentation#
otMeshDiagDiscoverTopology#
otError otMeshDiagDiscoverTopology (otInstance * aInstance, const otMeshDiagDiscoverConfig * aConfig, otMeshDiagDiscoverCallback aCallback, void * aContext)
This function starts network topology discovery.
[in] | aInstance | The OpenThread instance. |
[in] | aConfig | The configuration to use for discovery (e.g., which items to discover). |
[in] | aCallback | The callback to report the discovered routers. |
[in] | aContext | A context to pass in |
187
of file include/openthread/mesh_diag.h
otMeshDiagCancel#
void otMeshDiagCancel (otInstance * aInstance)
This function cancels an ongoing topology discovery if there is one, otherwise no action.
N/A | aInstance |
When ongoing discovery is cancelled, the callback from otMeshDiagDiscoverTopology()
will not be called anymore.
198
of file include/openthread/mesh_diag.h
otMeshDiagGetNextIp6Address#
otError otMeshDiagGetNextIp6Address (otMeshDiagIp6AddrIterator * aIterator, otIp6Address * aIp6Address)
This function iterates through the discovered IPv6 address of a router.
[inout] | aIterator | The address iterator to use. |
[out] | aIp6Address | A pointer to return the next IPv6 address (if any). |
210
of file include/openthread/mesh_diag.h
otMeshDiagGetNextChildInfo#
otError otMeshDiagGetNextChildInfo (otMeshDiagChildIterator * aIterator, otMeshDiagChildInfo * aChildInfo)
This function iterates through the discovered children of a router.
[inout] | aIterator | The address iterator to use. |
[out] | aChildInfo | A pointer to return the child info (if any). |
222
of file include/openthread/mesh_diag.h
Macro Definition Documentation#
OT_MESH_DIAG_VERSION_UNKNOWN#
#define OT_MESH_DIAG_VERSION_UNKNOWNValue:
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.
91
of file include/openthread/mesh_diag.h