Border Agent#
This module includes functions for the Thread Border Agent role.
Enumerations#
This enumeration defines the Border Agent state.
Typedefs#
This enumeration defines the Border Agent state.
Functions#
Gets the otBorderAgentState of the Thread Border Agent role.
Gets the UDP port of the Thread Border Agent service.
Gets the randomly generated Border Agent ID.
Macros#
The length of Border Agent/Router ID in bytes.
Enumeration Documentation#
otBorderAgentState#
otBorderAgentState
This enumeration defines the Border Agent state.
Enumerator | |
---|---|
OT_BORDER_AGENT_STATE_STOPPED | Border agent role is disabled. |
OT_BORDER_AGENT_STATE_STARTED | Border agent is started. |
OT_BORDER_AGENT_STATE_ACTIVE | Border agent is connected with external commissioner. |
64
of file include/openthread/border_agent.h
Typedef Documentation#
otBorderAgentState#
typedef enum otBorderAgentState otBorderAgentState
This enumeration defines the Border Agent state.
69
of file include/openthread/border_agent.h
Function Documentation#
otBorderAgentGetState#
otBorderAgentState otBorderAgentGetState (otInstance * aInstance)
Gets the otBorderAgentState of the Thread Border Agent role.
[in] | aInstance | A pointer to an OpenThread instance. |
Returns
The current otBorderAgentState of the Border Agent.
79
of file include/openthread/border_agent.h
otBorderAgentGetUdpPort#
uint16_t otBorderAgentGetUdpPort (otInstance * aInstance)
Gets the UDP port of the Thread Border Agent service.
[in] | aInstance | A pointer to an OpenThread instance. |
Returns
UDP port of the Border Agent.
89
of file include/openthread/border_agent.h
otBorderAgentGetId#
otError otBorderAgentGetId (otInstance * aInstance, uint8_t * aId, uint16_t * aLength)
Gets the randomly generated Border Agent ID.
[in] | aInstance | A pointer to an OpenThread instance. |
[out] | aId | A pointer to buffer to receive the ID. |
[inout] | aLength | Specifies the length of |
The ID is saved in persistent storage and survives reboots. The typical use case of the ID is to be published in the MeshCoP mDNS service as the id
TXT value for the client to identify this Border Router/Agent device.
107
of file include/openthread/border_agent.h