Modules#

otMeshDiagDiscoverConfig

otMeshDiagRouterInfo

otMeshDiagChildInfo

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.

typedef struct otMeshDiagRouterInfo

This type represents information about a router in Thread mesh.

typedef struct otMeshDiagChildInfo

This type represents information about a discovered child in Thread mesh.

typedef 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.

Functions#

otMeshDiagDiscoverTopology(otInstance *aInstance, const otMeshDiagDiscoverConfig *aConfig, otMeshDiagDiscoverCallback aCallback, void *aContext)

This function starts network topology discovery.

void
otMeshDiagCancel(otInstance *aInstance)

This function cancels an ongoing topology discovery if there is one, otherwise no action.

otMeshDiagGetNextIp6Address(otMeshDiagIp6AddrIterator *aIterator, otIp6Address *aIp6Address)

This function iterates through the discovered IPv6 address of a router.

otMeshDiagGetNextChildInfo(otMeshDiagChildIterator *aIterator, otMeshDiagChildInfo *aChildInfo)

This function iterates through the discovered children of a router.

Macros#

#define

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.


Definition at line 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.


Definition at line 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.


Definition at line 82 of file include/openthread/mesh_diag.h

otMeshDiagRouterInfo#

typedef struct otMeshDiagRouterInfo otMeshDiagRouterInfo

This type represents information about a router in Thread mesh.


Definition at line 142 of file include/openthread/mesh_diag.h

otMeshDiagChildInfo#

typedef struct otMeshDiagChildInfo otMeshDiagChildInfo

This type represents information about a discovered child in Thread mesh.


Definition at line 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.

Parameters
[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 aError is OT_ERROR_RESPONSE_TIMEOUT).

[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.


Definition at line 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.

Parameters
[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 aCallback.


Definition at line 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.

Parameters
N/AaInstance

When ongoing discovery is cancelled, the callback from otMeshDiagDiscoverTopology() will not be called anymore.


Definition at line 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.

Parameters
[inout]aIterator

The address iterator to use.

[out]aIp6Address

A pointer to return the next IPv6 address (if any).


Definition at line 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.

Parameters
[inout]aIterator

The address iterator to use.

[out]aChildInfo

A pointer to return the child info (if any).


Definition at line 222 of file include/openthread/mesh_diag.h

Macro Definition Documentation#

OT_MESH_DIAG_VERSION_UNKNOWN#

#define OT_MESH_DIAG_VERSION_UNKNOWN
Value:
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.


Definition at line 91 of file include/openthread/mesh_diag.h