Border Agent Tracker
This module includes APIs for the Border Agent Tracker.
Summary
The Border Agent Tracker discovers and tracks Border Agents on the infrastructure link by browsing for the _meshcop._udp
mDNS service.
Typedefs |
|
---|---|
otBorderAgentTrackerAgentInfo
|
typedef Represents information about a discovered Border Agent. |
otBorderAgentTrackerIterator
|
typedefstruct otBorderAgentTrackerIterator
Represents an iterator to iterate through the discovered Border Agents. |
Functions |
|
---|---|
otBorderAgentTrackerGetNextAgent(otInstance *aInstance, otBorderAgentTrackerIterator *aIterator, otBorderAgentTrackerAgentInfo *aAgentInfo)
|
Gets the information for the next discovered Border Agent.
|
otBorderAgentTrackerInitIterator(otInstance *aInstance, otBorderAgentTrackerIterator *aIterator)
|
void
Initializes a Border Agent Tracker iterator.
|
otBorderAgentTrackerIsRunning(otInstance *aInstance)
|
bool
Indicates whether the Border Agent Tracker is running.
|
otBorderAgentTrackerSetEnabled(otInstance *aInstance, bool aEnable)
|
void
Enables or disables the Border Agent Tracker.
|
Structs |
|
---|---|
otBorderAgentTrackerAgentInfo |
Represents information about a discovered Border Agent. |
otBorderAgentTrackerIterator |
Represents an iterator to iterate through the discovered Border Agents. |
Typedefs
otBorderAgentTrackerAgentInfo
struct otBorderAgentTrackerAgentInfo otBorderAgentTrackerAgentInfo
Represents information about a discovered Border Agent.
To ensure consistent mMsecSinceDiscovered
and mMsecSinceLastChange
time calculations, the iterator's initialization time is stored within the iterator when otBorderAgentTrackerInitIterator()
is called. The time values in this struct are calculated relative to the iterator's initialization time.
otBorderAgentTrackerIterator
struct otBorderAgentTrackerIterator otBorderAgentTrackerIterator
Represents an iterator to iterate through the discovered Border Agents.
The fields in this struct are for OpenThread internal use only and MUST NOT be accessed or modified by the caller.
An iterator MUST be initialized using otBorderAgentTrackerInitIterator()
before it is used.
Functions
otBorderAgentTrackerGetNextAgent
otError otBorderAgentTrackerGetNextAgent( otInstance *aInstance, otBorderAgentTrackerIterator *aIterator, otBorderAgentTrackerAgentInfo *aAgentInfo )
Gets the information for the next discovered Border Agent.
Requires OPENTHREAD_CONFIG_BORDER_AGENT_TRACKER_ENABLE
.
The iterator initialization time is used to determine the mMsecSinceDiscovered
and mMsecSinceLastChange
in the otBorderAgentTrackerAgentInfo
.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|
otBorderAgentTrackerInitIterator
void otBorderAgentTrackerInitIterator( otInstance *aInstance, otBorderAgentTrackerIterator *aIterator )
Initializes a Border Agent Tracker iterator.
Requires OPENTHREAD_CONFIG_BORDER_AGENT_TRACKER_ENABLE
.
An iterator MUST be initialized before being used.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
otBorderAgentTrackerIsRunning
bool otBorderAgentTrackerIsRunning( otInstance *aInstance )
Indicates whether the Border Agent Tracker is running.
Requires OPENTHREAD_CONFIG_BORDER_AGENT_TRACKER_ENABLE
.
The tracker can be enabled by the user (via otBorderAgentTrackerSetEnabled()
) or by the OpenThread stack itself. The tracker is considered running if it is enabled by either entity AND the underlying DNS-SD (mDNS) is ready. This means that otBorderAgentTrackerIsRunning()
may not return TRUE
immediately after a call to otBorderAgentTrackerSetEnabled(true)
.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
otBorderAgentTrackerSetEnabled
void otBorderAgentTrackerSetEnabled( otInstance *aInstance, bool aEnable )
Enables or disables the Border Agent Tracker.
Requires OPENTHREAD_CONFIG_BORDER_AGENT_TRACKER_ENABLE
.
When enabled, the tracker browses for the _meshcop._udp
mDNS service to discover and track Border Agents on the infra-if network.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
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.