Modules#
Border Agent#
This module includes functions for the Thread Border Agent role.
Enumerations#
Defines the Border Agent state.
Typedefs#
Defines the Border Agent state.
Variables#
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.
Sets the Border Agent ID.
Macros#
The length of Border Agent/Router ID in bytes.
Enumeration Documentation#
otBorderAgentState#
otBorderAgentState
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. |
Typedef Documentation#
otBorderAgentState#
typedef enum otBorderAgentState otBorderAgentState
Defines the Border Agent state.
Variable Documentation#
Function Documentation#
otBorderAgentGetState#
otBorderAgentState otBorderAgentGetState (otInstance * aInstance)
Gets the otBorderAgentState of the Thread Border Agent role.
Type | Direction | Argument Name | Description |
---|---|---|---|
otInstance * | [in] | aInstance | A pointer to an OpenThread instance. |
Returns
The current otBorderAgentState of the Border Agent.
otBorderAgentGetUdpPort#
uint16_t otBorderAgentGetUdpPort (otInstance * aInstance)
Gets the UDP port of the Thread Border Agent service.
Type | Direction | Argument Name | Description |
---|---|---|---|
otInstance * | [in] | aInstance | A pointer to an OpenThread instance. |
Returns
UDP port of the Border Agent.
otBorderAgentGetId#
otError otBorderAgentGetId (otInstance * aInstance, otBorderAgentId * aId)
Gets the randomly generated Border Agent ID.
Type | Direction | Argument Name | Description |
---|---|---|---|
otInstance * | [in] | aInstance | A pointer to an OpenThread instance. |
otBorderAgentId * | [out] | aId | A pointer to buffer to receive the ID. |
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.
See Also
otBorderAgentSetId#
otError otBorderAgentSetId (otInstance * aInstance, const otBorderAgentId * aId)
Sets the Border Agent ID.
Type | Direction | Argument Name | Description |
---|---|---|---|
otInstance * | [in] | aInstance | A pointer to an OpenThread instance. |
const otBorderAgentId * | [out] | aId | A pointer to the Border Agent ID. |
The Border Agent ID will be saved in persistent storage and survive reboots. It's required to set the ID only once after factory reset. If the ID has never been set by calling this function, a random ID will be generated and returned when otBorderAgentGetId
is called.
See Also