Modules#
Router/Leader#
This module includes functions for Thread Routers and Leaders.
Enumerations#
This enumeration defines the EID cache entry state.
This enumeration represents the power supply property on a device.
This enumeration defines the constants used in otNeighborTableCallback
to indicate changes in neighbor table.
Typedefs#
Used to iterate through IPv6 addresses of a Thread Child entry.
This enumeration defines the EID cache entry state.
This structure represents an EID cache entry.
This type represents an iterator used for iterating through the EID cache table entries.
This structure represents the device properties which are used for calculating the local leader weight on a device.
This function pointer is called to notify that there is a change in the neighbor table.
Functions#
Gets the maximum number of children currently allowed.
Sets the maximum number of children currently allowed.
This method indicates whether or not the device is router-eligible.
This function sets whether or not the device is router-eligible.
Set the preferred Router Id.
Get the current device properties.
Set the device properties which are then used to determine and set the Leader Weight.
Gets the Thread Leader Weight used when operating in the Leader role.
Sets the Thread Leader Weight used when operating in the Leader role.
Get the preferred Thread Leader Partition Id used when operating in the Leader role.
Set the preferred Thread Leader Partition Id used when operating in the Leader role.
Gets the Joiner UDP Port.
Sets the Joiner UDP Port.
Set Steering data out of band.
Get the CONTEXT_ID_REUSE_DELAY parameter used in the Leader role.
Set the CONTEXT_ID_REUSE_DELAY parameter used in the Leader role.
Get the NETWORK_ID_TIMEOUT parameter used in the Router role.
Set the NETWORK_ID_TIMEOUT parameter used in the Leader role.
Get the ROUTER_UPGRADE_THRESHOLD parameter used in the REED role.
Set the ROUTER_UPGRADE_THRESHOLD parameter used in the Leader role.
Get the MLE_CHILD_ROUTER_LINKS parameter used in the REED role.
Set the MLE_CHILD_ROUTER_LINKS parameter used in the REED role.
Release a Router ID that has been allocated by the device in the Leader role.
Attempt to become a router.
Become a leader and start a new partition.
Get the ROUTER_DOWNGRADE_THRESHOLD parameter used in the Router role.
Set the ROUTER_DOWNGRADE_THRESHOLD parameter used in the Leader role.
Get the ROUTER_SELECTION_JITTER parameter used in the REED/Router role.
Set the ROUTER_SELECTION_JITTER parameter used in the REED/Router role.
Gets diagnostic information for an attached Child by its Child ID or RLOC16.
The function retains diagnostic information for an attached Child by the internal table index.
This function gets the next IPv6 address (using an iterator) for a given child.
Get the current Router ID Sequence.
The function returns the maximum allowed router ID.
The function retains diagnostic information for a given Thread Router.
This function gets the next EID cache entry (using an iterator).
Get the Thread PSKc.
Get Key Reference to Thread PSKc stored.
Set the Thread PSKc.
Set the Thread PSKc.
Get the assigned parent priority.
Set the parent priority.
Gets the maximum number of IP addresses that each MTD child may register with this device as parent.
Sets or restores the maximum number of IP addresses that each MTD child may register with this device as parent.
This function registers a neighbor table callback function.
This function sets whether the device was commissioned using CCM.
This function sets whether the Security Policy TLV version-threshold for routing (VR field) is enabled.
This function gets the range of router IDs that are allowed to assign to nodes within the thread network.
This function sets the range of router IDs that are allowed to assign to nodes within the thread network.
This function indicates whether or not a Router ID is currently allocated.
This function gets the next hop and path cost towards a given RLOC16 destination.
Macros#
Initializer for otChildIP6AddressIterator.
Enumeration Documentation#
otCacheEntryState#
otCacheEntryState
This enumeration defines the EID cache entry state.
Enumerator | |
---|---|
OT_CACHE_ENTRY_STATE_CACHED | |
OT_CACHE_ENTRY_STATE_SNOOPED | |
OT_CACHE_ENTRY_STATE_QUERY | |
OT_CACHE_ENTRY_STATE_RETRY_QUERY |
89
of file include/openthread/thread_ftd.h
otPowerSupply#
otPowerSupply
This enumeration represents the power supply property on a device.
This is used as a property in otDeviceProperties
to calculate the leader weight.
Enumerator | |
---|---|
OT_POWER_SUPPLY_BATTERY | Battery powered. |
OT_POWER_SUPPLY_EXTERNAL | Externally powered (mains-powered). |
OT_POWER_SUPPLY_EXTERNAL_STABLE | Stable external power with a battery backup or UPS. |
OT_POWER_SUPPLY_EXTERNAL_UNSTABLE | Potentially unstable ext power (e.g. light bulb powered via a switch). |
206
of file include/openthread/thread_ftd.h
otNeighborTableEvent#
otNeighborTableEvent
This enumeration defines the constants used in otNeighborTableCallback
to indicate changes in neighbor table.
Enumerator | |
---|---|
OT_NEIGHBOR_TABLE_EVENT_CHILD_ADDED | A child is being added. |
OT_NEIGHBOR_TABLE_EVENT_CHILD_REMOVED | A child is being removed. |
OT_NEIGHBOR_TABLE_EVENT_CHILD_MODE_CHANGED | An existing child's mode is changed. |
OT_NEIGHBOR_TABLE_EVENT_ROUTER_ADDED | A router is being added. |
OT_NEIGHBOR_TABLE_EVENT_ROUTER_REMOVED | A router is being removed. |
774
of file include/openthread/thread_ftd.h
Typedef Documentation#
otChildIp6AddressIterator#
typedef uint16_t otChildIp6AddressIterator
Used to iterate through IPv6 addresses of a Thread Child entry.
83
of file include/openthread/thread_ftd.h
otCacheEntryState#
typedef enum otCacheEntryState otCacheEntryState
This enumeration defines the EID cache entry state.
95
of file include/openthread/thread_ftd.h
otCacheEntryInfo#
typedef struct otCacheEntryInfo otCacheEntryInfo
This structure represents an EID cache entry.
112
of file include/openthread/thread_ftd.h
otCacheEntryIterator#
typedef struct otCacheEntryIterator otCacheEntryIterator
This type represents an iterator used for iterating through the EID cache table entries.
To initialize the iterator and start from the first entry in the cache table, set all its fields in the structure to zero (e.g., memset
the iterator to zero).
124
of file include/openthread/thread_ftd.h
otDeviceProperties#
typedef struct otDeviceProperties otDeviceProperties
This structure represents the device properties which are used for calculating the local leader weight on a device.
The parameters are set based on device's capability, whether acting as border router, its power supply config, etc.
mIsUnstable
indicates operational stability of device and is determined via a vendor specific mechanism. It can include the following cases:
Device internally detects that it loses external power supply more often than usual. What is usual is determined by the vendor.
Device internally detects that it reboots more often than usual. What is usual is determined by the vendor.
234
of file include/openthread/thread_ftd.h
otNeighborTableCallback#
typedef void(* otNeighborTableCallback) (otNeighborTableEvent aEvent, const otNeighborTableEntryInfo *aEntryInfo) )(otNeighborTableEvent aEvent, const otNeighborTableEntryInfo *aEntryInfo)
This function pointer is called to notify that there is a change in the neighbor table.
[in] | aEvent | A event flag. |
[in] | aEntryInfo | A pointer to table entry info. |
805
of file include/openthread/thread_ftd.h
Function Documentation#
otThreadGetMaxAllowedChildren#
uint16_t otThreadGetMaxAllowedChildren (otInstance * aInstance)
Gets the maximum number of children currently allowed.
[in] | aInstance | A pointer to an OpenThread instance. |
Returns
The maximum number of children currently allowed.
See Also
136
of file include/openthread/thread_ftd.h
otThreadSetMaxAllowedChildren#
otError otThreadSetMaxAllowedChildren (otInstance * aInstance, uint16_t aMaxChildren)
Sets the maximum number of children currently allowed.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aMaxChildren | The maximum allowed children. |
This parameter can only be set when Thread protocol operation has been stopped.
See Also
153
of file include/openthread/thread_ftd.h
otThreadIsRouterEligible#
bool otThreadIsRouterEligible (otInstance * aInstance)
This method indicates whether or not the device is router-eligible.
[in] | aInstance | A pointer to an OpenThread instance. |
164
of file include/openthread/thread_ftd.h
otThreadSetRouterEligible#
otError otThreadSetRouterEligible (otInstance * aInstance, bool aEligible)
This function sets whether or not the device is router-eligible.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aEligible | TRUE to configure the device as router-eligible, FALSE otherwise. |
If aEligible
is false and the device is currently operating as a router, this call will cause the device to detach and attempt to reattach as a child.
179
of file include/openthread/thread_ftd.h
otThreadSetPreferredRouterId#
otError otThreadSetPreferredRouterId (otInstance * aInstance, uint8_t aRouterId)
Set the preferred Router Id.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aRouterId | The preferred Router Id. |
Upon becoming a router/leader the node attempts to use this Router Id. If the preferred Router Id is not set or if it can not be used, a randomly generated router id is picked. This property can be set only when the device role is either detached or disabled.
Note
This API is reserved for testing and demo purposes only. Changing settings with this API will render a production application non-compliant with the Thread Specification.
198
of file include/openthread/thread_ftd.h
otThreadGetDeviceProperties#
const otDeviceProperties * otThreadGetDeviceProperties (otInstance * aInstance)
Get the current device properties.
N/A | aInstance |
Returns
The device properties
otDeviceProperties
.
242
of file include/openthread/thread_ftd.h
otThreadSetDeviceProperties#
void otThreadSetDeviceProperties (otInstance * aInstance, const otDeviceProperties * aDeviceProperties)
Set the device properties which are then used to determine and set the Leader Weight.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aDeviceProperties | The device properties. |
251
of file include/openthread/thread_ftd.h
otThreadGetLocalLeaderWeight#
uint8_t otThreadGetLocalLeaderWeight (otInstance * aInstance)
Gets the Thread Leader Weight used when operating in the Leader role.
[in] | aInstance | A pointer to an OpenThread instance. |
Returns
The Thread Leader Weight value.
See Also
otThreadSetLeaderWeight
264
of file include/openthread/thread_ftd.h
otThreadSetLocalLeaderWeight#
void otThreadSetLocalLeaderWeight (otInstance * aInstance, uint8_t aWeight)
Sets the Thread Leader Weight used when operating in the Leader role.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aWeight | The Thread Leader Weight value. |
This function directly sets the Leader Weight to the new value, replacing its previous value (which may have been determined from the current otDeviceProperties
).
See Also
278
of file include/openthread/thread_ftd.h
otThreadGetPreferredLeaderPartitionId#
uint32_t otThreadGetPreferredLeaderPartitionId (otInstance * aInstance)
Get the preferred Thread Leader Partition Id used when operating in the Leader role.
[in] | aInstance | A pointer to an OpenThread instance. |
Returns
The Thread Leader Partition Id value.
288
of file include/openthread/thread_ftd.h
otThreadSetPreferredLeaderPartitionId#
void otThreadSetPreferredLeaderPartitionId (otInstance * aInstance, uint32_t aPartitionId)
Set the preferred Thread Leader Partition Id used when operating in the Leader role.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aPartitionId | The Thread Leader Partition Id value. |
297
of file include/openthread/thread_ftd.h
otThreadGetJoinerUdpPort#
uint16_t otThreadGetJoinerUdpPort (otInstance * aInstance)
Gets the Joiner UDP Port.
[in] | aInstance | A pointer to an OpenThread instance. |
Returns
The Joiner UDP Port number.
See Also
309
of file include/openthread/thread_ftd.h
otThreadSetJoinerUdpPort#
otError otThreadSetJoinerUdpPort (otInstance * aInstance, uint16_t aJoinerUdpPort)
Sets the Joiner UDP Port.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aJoinerUdpPort | The Joiner UDP Port number. |
See Also
322
of file include/openthread/thread_ftd.h
otThreadSetSteeringData#
void otThreadSetSteeringData (otInstance * aInstance, const otExtAddress * aExtAddress)
Set Steering data out of band.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aExtAddress | Address used to update the steering data. All zeros to clear the steering data (no steering data). All 0xFFs to set steering data/bloom filter to accept/allow all. A specific EUI64 which is then added to current steering data/bloom filter. |
Configuration option OPENTHREAD_CONFIG_MLE_STEERING_DATA_SET_OOB_ENABLE
should be set to enable setting of steering data out of band.
337
of file include/openthread/thread_ftd.h