Router/Leader#
This module includes functions for Thread Routers and Leaders.
Modules#
Enumerations#
Defines the EID cache entry state.
Represents the power supply property on a device.
Defines the constants used in otNeighborTableCallback
to indicate changes in neighbor table.
Typedefs#
Used to iterate through IPv6 addresses of a Thread Child entry.
Defines the EID cache entry state.
Represents an EID cache entry.
Represents an iterator used for iterating through the EID cache table entries.
Represents the device properties which are used for calculating the local leader weight on a device.
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.
Indicates whether or not the device is router-eligible.
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.
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.
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.
Registers a neighbor table callback function.
Sets whether the device was commissioned using CCM.
Sets whether the Security Policy TLV version-threshold for routing (VR field) is enabled.
Gets the range of router IDs that are allowed to assign to nodes within the thread network.
Sets the range of router IDs that are allowed to assign to nodes within the thread network.
Indicates whether or not a Router ID is currently allocated.
Gets the next hop and path cost towards a given RLOC16 destination.
Macros#
Initializer for otChildIP6AddressIterator.
Enumeration Documentation#
otCacheEntryState#
otCacheEntryState
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
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). |
207
of file include/openthread/thread_ftd.h
otNeighborTableEvent#
otNeighborTableEvent
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. |
779
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
Defines the EID cache entry state.
95
of file include/openthread/thread_ftd.h
otCacheEntryInfo#
typedef struct otCacheEntryInfo otCacheEntryInfo
Represents an EID cache entry.
113
of file include/openthread/thread_ftd.h
otCacheEntryIterator#
typedef struct otCacheEntryIterator otCacheEntryIterator
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).
125
of file include/openthread/thread_ftd.h
otDeviceProperties#
typedef struct otDeviceProperties otDeviceProperties
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.
235
of file include/openthread/thread_ftd.h
otNeighborTableCallback#
typedef void(* otNeighborTableCallback) (otNeighborTableEvent aEvent, const otNeighborTableEntryInfo *aEntryInfo) )(otNeighborTableEvent aEvent, const otNeighborTableEntryInfo *aEntryInfo)
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. |
810
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
137
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
154
of file include/openthread/thread_ftd.h
otThreadIsRouterEligible#
bool otThreadIsRouterEligible (otInstance * aInstance)
Indicates whether or not the device is router-eligible.
[in] | aInstance | A pointer to an OpenThread instance. |
165
of file include/openthread/thread_ftd.h
otThreadSetRouterEligible#
otError otThreadSetRouterEligible (otInstance * aInstance, bool aEligible)
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.
180
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.
199
of file include/openthread/thread_ftd.h
otThreadGetDeviceProperties#
const otDeviceProperties * otThreadGetDeviceProperties (otInstance * aInstance)
Get the current device properties.
N/A | aInstance |
Requires OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_3_1
.
Returns
The device properties
otDeviceProperties
.
245
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. |
Requires OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_3_1
.
256
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
269
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. |
Directly sets the Leader Weight to the new value, replacing its previous value (which may have been determined from the current otDeviceProperties
).
See Also
283
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.
293
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. |
302
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
314
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
327
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.
342
of file include/openthread/thread_ftd.h
otThreadGetContextIdReuseDelay#
uint32_t otThreadGetContextIdReuseDelay (otInstance * aInstance)
Get the CONTEXT_ID_REUSE_DELAY parameter used in the Leader role.
[in] | aInstance | A pointer to an OpenThread instance. |
Returns
The CONTEXT_ID_REUSE_DELAY value.
See Also
354
of file include/openthread/thread_ftd.h
otThreadSetContextIdReuseDelay#
void otThreadSetContextIdReuseDelay (otInstance * aInstance, uint32_t aDelay)
Set the CONTEXT_ID_REUSE_DELAY parameter used in the Leader role.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aDelay | The CONTEXT_ID_REUSE_DELAY value. |
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.
See Also
368
of file include/openthread/thread_ftd.h
otThreadGetNetworkIdTimeout#
uint8_t otThreadGetNetworkIdTimeout (otInstance * aInstance)
Get the NETWORK_ID_TIMEOUT parameter used in the Router role.
[in] | aInstance | A pointer to an OpenThread instance. |
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.
Returns
The NETWORK_ID_TIMEOUT value.
See Also
383
of file include/openthread/thread_ftd.h
otThreadSetNetworkIdTimeout#
void otThreadSetNetworkIdTimeout (otInstance * aInstance, uint8_t aTimeout)
Set the NETWORK_ID_TIMEOUT parameter used in the Leader role.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aTimeout | The NETWORK_ID_TIMEOUT value. |
See Also
394
of file include/openthread/thread_ftd.h
otThreadGetRouterUpgradeThreshold#
uint8_t otThreadGetRouterUpgradeThreshold (otInstance * aInstance)
Get the ROUTER_UPGRADE_THRESHOLD parameter used in the REED role.
[in] | aInstance | A pointer to an OpenThread instance. |
Returns
The ROUTER_UPGRADE_THRESHOLD value.
See Also
406
of file include/openthread/thread_ftd.h
otThreadSetRouterUpgradeThreshold#
void otThreadSetRouterUpgradeThreshold (otInstance * aInstance, uint8_t aThreshold)
Set the ROUTER_UPGRADE_THRESHOLD parameter used in the Leader role.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aThreshold | The ROUTER_UPGRADE_THRESHOLD value. |
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.
See Also
420
of file include/openthread/thread_ftd.h
otThreadGetChildRouterLinks#
uint8_t otThreadGetChildRouterLinks (otInstance * aInstance)
Get the MLE_CHILD_ROUTER_LINKS parameter used in the REED role.
[in] | aInstance | A pointer to an OpenThread instance. |
This parameter specifies the max number of neighboring routers with which the device (as an FED) will try to establish link.
Returns
The MLE_CHILD_ROUTER_LINKS value.
See Also
435
of file include/openthread/thread_ftd.h
otThreadSetChildRouterLinks#
otError otThreadSetChildRouterLinks (otInstance * aInstance, uint8_t aChildRouterLinks)
Set the MLE_CHILD_ROUTER_LINKS parameter used in the REED role.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aChildRouterLinks | The MLE_CHILD_ROUTER_LINKS value. |
See Also
449
of file include/openthread/thread_ftd.h
otThreadReleaseRouterId#
otError otThreadReleaseRouterId (otInstance * aInstance, uint8_t aRouterId)
Release a Router ID that has been allocated by the device in the Leader role.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aRouterId | The Router ID to release. Valid range is [0, 62]. |
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.
466
of file include/openthread/thread_ftd.h
otThreadBecomeRouter#
otError otThreadBecomeRouter (otInstance * aInstance)
Attempt to become a router.
[in] | aInstance | A pointer to an OpenThread instance. |
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.
479
of file include/openthread/thread_ftd.h
otThreadBecomeLeader#
otError otThreadBecomeLeader (otInstance * aInstance)
Become a leader and start a new partition.
[in] | aInstance | A pointer to an OpenThread instance. |
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.
492
of file include/openthread/thread_ftd.h
otThreadGetRouterDowngradeThreshold#
uint8_t otThreadGetRouterDowngradeThreshold (otInstance * aInstance)
Get the ROUTER_DOWNGRADE_THRESHOLD parameter used in the Router role.
[in] | aInstance | A pointer to an OpenThread instance. |
Returns
The ROUTER_DOWNGRADE_THRESHOLD value.
See Also
504
of file include/openthread/thread_ftd.h
otThreadSetRouterDowngradeThreshold#
void otThreadSetRouterDowngradeThreshold (otInstance * aInstance, uint8_t aThreshold)
Set the ROUTER_DOWNGRADE_THRESHOLD parameter used in the Leader role.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aThreshold | The ROUTER_DOWNGRADE_THRESHOLD value. |
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.
See Also
518
of file include/openthread/thread_ftd.h
otThreadGetRouterSelectionJitter#
uint8_t otThreadGetRouterSelectionJitter (otInstance * aInstance)
Get the ROUTER_SELECTION_JITTER parameter used in the REED/Router role.
[in] | aInstance | A pointer to an OpenThread instance. |
Returns
The ROUTER_SELECTION_JITTER value.
See Also
530
of file include/openthread/thread_ftd.h
otThreadSetRouterSelectionJitter#
void otThreadSetRouterSelectionJitter (otInstance * aInstance, uint8_t aRouterJitter)
Set the ROUTER_SELECTION_JITTER parameter used in the REED/Router role.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aRouterJitter | The ROUTER_SELECTION_JITTER value. |
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.
See Also
544
of file include/openthread/thread_ftd.h
otThreadGetChildInfoById#
otError otThreadGetChildInfoById (otInstance * aInstance, uint16_t aChildId, otChildInfo * aChildInfo)
Gets diagnostic information for an attached Child by its Child ID or RLOC16.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aChildId | The Child ID or RLOC16 for the attached child. |
[out] | aChildInfo | A pointer to where the child information is placed. |
558
of file include/openthread/thread_ftd.h
otThreadGetChildInfoByIndex#
otError otThreadGetChildInfoByIndex (otInstance * aInstance, uint16_t aChildIndex, otChildInfo * aChildInfo)
The function retains diagnostic information for an attached Child by the internal table index.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aChildIndex | The table index. |
[out] | aChildInfo | A pointer to where the child information is placed. |
See Also
otGetMaxAllowedChildren
575
of file include/openthread/thread_ftd.h
otThreadGetChildNextIp6Address#
otError otThreadGetChildNextIp6Address (otInstance * aInstance, uint16_t aChildIndex, otChildIp6AddressIterator * aIterator, otIp6Address * aAddress)
Gets the next IPv6 address (using an iterator) for a given child.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aChildIndex | The child index. |
[inout] | aIterator | A pointer to the iterator. On success the iterator will be updated to point to next entry in the list. To get the first IPv6 address the iterator should be set to OT_CHILD_IP6_ADDRESS_ITERATOR_INIT. |
[out] | aAddress | A pointer to an IPv6 address where the child's next address is placed (on success). |
See Also
594
of file include/openthread/thread_ftd.h
otThreadGetRouterIdSequence#
uint8_t otThreadGetRouterIdSequence (otInstance * aInstance)
Get the current Router ID Sequence.
[in] | aInstance | A pointer to an OpenThread instance. |
Returns
The Router ID Sequence.
607
of file include/openthread/thread_ftd.h
otThreadGetMaxRouterId#
uint8_t otThreadGetMaxRouterId (otInstance * aInstance)
The function returns the maximum allowed router ID.
[in] | aInstance | A pointer to an OpenThread instance. |
Returns
The maximum allowed router ID.
617
of file include/openthread/thread_ftd.h
otThreadGetRouterInfo#
otError otThreadGetRouterInfo (otInstance * aInstance, uint16_t aRouterId, otRouterInfo * aRouterInfo)
The function retains diagnostic information for a given Thread Router.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aRouterId | The router ID or RLOC16 for a given router. |
[out] | aRouterInfo | A pointer to where the router information is placed. |
631
of file include/openthread/thread_ftd.h
otThreadGetNextCacheEntry#
otError otThreadGetNextCacheEntry (otInstance * aInstance, otCacheEntryInfo * aEntryInfo, otCacheEntryIterator * aIterator)
Gets the next EID cache entry (using an iterator).
[in] | aInstance | A pointer to an OpenThread instance. |
[out] | aEntryInfo | A pointer to where the EID cache entry information is placed. |
[inout] | aIterator | A pointer to an iterator. It will be updated to point to next entry on success. To get the first entry, initialize the iterator by setting all its fields to zero (e.g., |
646
of file include/openthread/thread_ftd.h
otThreadGetPskc#
void otThreadGetPskc (otInstance * aInstance, otPskc * aPskc)
Get the Thread PSKc.
[in] | aInstance | A pointer to an OpenThread instance. |
[out] | aPskc | A pointer to an |
See Also
657
of file include/openthread/thread_ftd.h
otThreadGetPskcRef#
otPskcRef otThreadGetPskcRef (otInstance * aInstance)
Get Key Reference to Thread PSKc stored.
[in] | aInstance | A pointer to an OpenThread instance. |
Requires the build-time feature OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE
to be enabled.
Returns
Key Reference to PSKc
See Also
671
of file include/openthread/thread_ftd.h
otThreadSetPskc#
otError otThreadSetPskc (otInstance * aInstance, const otPskc * aPskc)
Set the Thread PSKc.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aPskc | A pointer to the new Thread PSKc. |
Will only succeed when Thread protocols are disabled. A successful call to this function will also invalidate the Active and Pending Operational Datasets in non-volatile memory.
See Also
689
of file include/openthread/thread_ftd.h
otThreadSetPskcRef#
otError otThreadSetPskcRef (otInstance * aInstance, otPskcRef aKeyRef)
Set the Thread PSKc.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aKeyRef | Key Reference to the new Thread PSKc. |
Requires the build-time feature OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE
to be enabled.
Will only succeed when Thread protocols are disabled. A successful call to this function will also invalidate the Active and Pending Operational Datasets in non-volatile memory.
See Also
709
of file include/openthread/thread_ftd.h
otThreadGetParentPriority#
int8_t otThreadGetParentPriority (otInstance * aInstance)
Get the assigned parent priority.
[in] | aInstance | A pointer to an OpenThread instance. |
Returns
The assigned parent priority value, -2 means not assigned.
See Also
721
of file include/openthread/thread_ftd.h
otThreadSetParentPriority#
otError otThreadSetParentPriority (otInstance * aInstance, int8_t aParentPriority)
Set the parent priority.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aParentPriority | The parent priority value. |
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.
See Also
738
of file include/openthread/thread_ftd.h
otThreadGetMaxChildIpAddresses#
uint8_t otThreadGetMaxChildIpAddresses (otInstance * aInstance)
Gets the maximum number of IP addresses that each MTD child may register with this device as parent.
[in] | aInstance | A pointer to an OpenThread instance. |
Returns
The maximum number of IP addresses that each MTD child may register with this device as parent.
See Also
750
of file include/openthread/thread_ftd.h
otThreadSetMaxChildIpAddresses#
otError otThreadSetMaxChildIpAddresses (otInstance * aInstance, uint8_t aMaxIpAddresses)
Sets or restores the maximum number of IP addresses that each MTD child may register with this device as parent.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aMaxIpAddresses | The maximum number of IP addresses that each MTD child may register with this device as parent. 0 to clear the setting and restore the default. |
Pass 0
to clear the setting and restore the default.
Available when OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE
is enabled.
Note
Only used by Thread Test Harness to limit the address registrations of the reference parent in order to test the MTD DUT reaction.
See Also
773
of file include/openthread/thread_ftd.h
otThreadRegisterNeighborTableCallback#
void otThreadRegisterNeighborTableCallback (otInstance * aInstance, otNeighborTableCallback aCallback)
Registers a neighbor table callback function.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aCallback | A pointer to callback handler function. |
The provided callback (if non-NULL) will be invoked when there is a change in the neighbor table (e.g., a child or a router neighbor entry is being added/removed or an existing child's mode is changed).
Subsequent calls to this method will overwrite the previous callback. Note that this callback in invoked while the neighbor/child table is being updated and always before the otStateChangedCallback
.
825
of file include/openthread/thread_ftd.h
otThreadSetCcmEnabled#
void otThreadSetCcmEnabled (otInstance * aInstance, bool aEnabled)
Sets whether the device was commissioned using CCM.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aEnabled | TRUE if the device was commissioned using CCM, FALSE otherwise. |
Note
This API requires
OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE
, and is only used by Thread Test Harness to indicate whether this device was commissioned using CCM.
837
of file include/openthread/thread_ftd.h
otThreadSetThreadVersionCheckEnabled#
void otThreadSetThreadVersionCheckEnabled (otInstance * aInstance, bool aEnabled)
Sets whether the Security Policy TLV version-threshold for routing (VR field) is enabled.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aEnabled | TRUE to enable Security Policy TLV version-threshold for routing, FALSE otherwise. |
Note
This API requires
OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE
, and is only used by Thread Test Harness to indicate that thread protocol version check VR should be skipped.
849
of file include/openthread/thread_ftd.h
otThreadGetRouterIdRange#
void otThreadGetRouterIdRange (otInstance * aInstance, uint8_t * aMinRouterId, uint8_t * aMaxRouterId)
Gets the range of router IDs that are allowed to assign to nodes within the thread network.
[in] | aInstance | A pointer to an OpenThread instance. |
[out] | aMinRouterId | The minimum router ID. |
[out] | aMaxRouterId | The maximum router ID. |
Note
This API requires
OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE
, and is only used for test purpose. All the router IDs in the range [aMinRouterId, aMaxRouterId] are allowed.
See Also
864
of file include/openthread/thread_ftd.h
otThreadSetRouterIdRange#
otError otThreadSetRouterIdRange (otInstance * aInstance, uint8_t aMinRouterId, uint8_t aMaxRouterId)
Sets the range of router IDs that are allowed to assign to nodes within the thread network.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aMinRouterId | The minimum router ID. |
[in] | aMaxRouterId | The maximum router ID. |
Note
This API requires
OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE
, and is only used for test purpose. All the router IDs in the range [aMinRouterId, aMaxRouterId] are allowed.
See Also
882
of file include/openthread/thread_ftd.h
otThreadIsRouterIdAllocated#
bool otThreadIsRouterIdAllocated (otInstance * aInstance, uint8_t aRouterId)
Indicates whether or not a Router ID is currently allocated.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aRouterId | The router ID to check. |
894
of file include/openthread/thread_ftd.h
otThreadGetNextHopAndPathCost#
void otThreadGetNextHopAndPathCost (otInstance * aInstance, uint16_t aDestRloc16, uint16_t * aNextHopRloc16, uint8_t * aPathCost)
Gets the next hop and path cost towards a given RLOC16 destination.
[in] | aInstance | A pointer to an OpenThread instance. |
[in] | aDestRloc16 | The RLOC16 of destination. |
[out] | aNextHopRloc16 | A pointer to return RLOC16 of next hop, 0xfffe if no next hop. |
[out] | aPathCost | A pointer to return path cost towards destination. |
Can be used with either aNextHopRloc16
or aPathCost
being NULL indicating caller does not want to get the value.
908
of file include/openthread/thread_ftd.h