Router 刀/引线
此模块包含线程路由器和主节点的函数。
摘要
枚举 |
|
---|---|
otCacheEntryState
|
枚举 此枚举定义了 EID 缓存条目状态。 |
otNeighborTableEvent{
|
枚举 此枚举定义了 otNeighborTableCallback 中使用的常量,用于指示邻域表的更改。 |
类型定义符 |
|
---|---|
otCacheEntryInfo
|
typedefstruct otCacheEntryInfo
此结构表示一个 EID 缓存条目。 |
otCacheEntryIterator
|
typedefstruct otCacheEntryIterator
此类型表示用于遍历 EID 缓存表条目的迭代器。 |
otCacheEntryState
|
typedefenum otCacheEntryState
此枚举定义了 EID 缓存条目状态。 |
otChildIp6AddressIterator
|
typedefuint16_t
用于遍历线程子条目的 IPv6 地址。 |
otNeighborTableCallback)(otNeighborTableEvent aEvent, const otNeighborTableEntryInfo *aEntryInfo)
|
typedefvoid(*
调用此函数指针是为了通知邻居表发生了更改。 |
函数 |
|
---|---|
otThreadBecomeLeader(otInstance *aInstance)
|
成为领导者并启动新的分区。
|
otThreadBecomeRouter(otInstance *aInstance)
|
尝试成为路由器。
|
otThreadGetChildInfoById(otInstance *aInstance, uint16_t aChildId, otChildInfo *aChildInfo)
|
该函数会保留附加子项的子 ID 或 RLOC16 的诊断信息。
|
otThreadGetChildInfoByIndex(otInstance *aInstance, uint16_t aChildIndex, otChildInfo *aChildInfo)
|
此函数通过内部表索引保留附加的子项的诊断信息。
|
otThreadGetChildNextIp6Address(otInstance *aInstance, uint16_t aChildIndex, otChildIp6AddressIterator *aIterator, otIp6Address *aAddress)
|
此函数为给定子项获取下一个 IPv6 地址(使用迭代器)。
|
otThreadGetContextIdReuseDelay(otInstance *aInstance)
|
uint32_t
获取“Leader”角色中使用的 CONTEXT_ID_REUSE_Delay 参数。
|
otThreadGetJoinerUdpPort(otInstance *aInstance)
|
uint16_t
获取连接符 UDP 端口。
|
otThreadGetLocalLeaderWeight(otInstance *aInstance)
|
uint8_t
获取在担任主管角色时使用的讨论帖线程权重。
|
otThreadGetMaxAllowedChildren(otInstance *aInstance)
|
uint16_t
获取当前允许的子项数上限。
|
otThreadGetMaxChildIpAddresses(otInstance *aInstance)
|
uint8_t
此函数可获取每个 MTD 子级可作为父设备注册的 IP 地址数量上限。
|
otThreadGetMaxRouterId(otInstance *aInstance)
|
uint8_t
此函数会返回允许的路由器 ID 上限。
|
otThreadGetNetworkIdTimeout(otInstance *aInstance)
|
uint8_t
获取 Router 角色中使用的 NETWORK_ID_TIMEOUT 参数。
|
otThreadGetNextCacheEntry(otInstance *aInstance, otCacheEntryInfo *aEntryInfo, otCacheEntryIterator *aIterator)
|
此函数获取下一个 EID 缓存条目(使用迭代器)。
|
otThreadGetParentPriority(otInstance *aInstance)
|
int8_t
获取分配的父级优先级。
|
otThreadGetPreferredLeaderPartitionId(otInstance *aInstance)
|
uint32_t
获取在 Leader 角色中操作时使用的首选 Thread Leader Partition ID。
|
otThreadGetPskc(otInstance *aInstance, otPskc *aPskc)
|
void
获取线程 PSKc。
|
otThreadGetPskcRef(otInstance *aInstance)
|
获取对所存储线程 PSKc 的密钥引用。
|
otThreadGetRouterDowngradeThreshold(otInstance *aInstance)
|
uint8_t
获取路由器角色中使用的 ROUTER_DOWNGRADE_THRESHOLD 参数。
|
otThreadGetRouterIdRange(otInstance *aInstance, uint8_t *aMinRouterId, uint8_t *aMaxRouterId)
|
void
此函数可获取允许分配给线程网络内节点的路由器 ID 范围。
|
otThreadGetRouterIdSequence(otInstance *aInstance)
|
uint8_t
获取当前的路由器 ID 序列。
|
otThreadGetRouterInfo(otInstance *aInstance, uint16_t aRouterId, otRouterInfo *aRouterInfo)
|
函数会保留给定线程路由器的诊断信息。
|
otThreadGetRouterSelectionJitter(otInstance *aInstance)
|
uint8_t
获取在 REED/Router 角色中使用的 ROUTER_SELECTION_JITTER 参数。
|
otThreadGetRouterUpgradeThreshold(otInstance *aInstance)
|
uint8_t
获取在 REED 角色中使用的 ROUTER_UPGRADE_THRESHOLD 参数。
|
otThreadIsRouterEligible(otInstance *aInstance)
|
bool
此方法可指示设备是否可以使用路由器。
|
otThreadRegisterNeighborTableCallback(otInstance *aInstance, otNeighborTableCallback aCallback)
|
void
此函数可注册邻居表回调函数。
|
otThreadReleaseRouterId(otInstance *aInstance, uint8_t aRouterId)
|
释放设备在领导者角色中分配的路由器 ID。
|
otThreadSetCcmEnabled(otInstance *aInstance, bool aEnabled)
|
void
此函数设置是否使用 CCM 委托设备。
|
otThreadSetContextIdReuseDelay(otInstance *aInstance, uint32_t aDelay)
|
void
设置“Leader”角色中使用的 CONTEXT_ID_REUSE_Delay 参数。
|
otThreadSetJoinerUdpPort(otInstance *aInstance, uint16_t aJoinerUdpPort)
|
设置连接符 UDP 端口。
|
otThreadSetLocalLeaderWeight(otInstance *aInstance, uint8_t aWeight)
|
void
设置在“主管”角色中执行操作的“讨论帖主要权重”。
|
otThreadSetMaxAllowedChildren(otInstance *aInstance, uint16_t aMaxChildren)
|
设置当前允许的子级数量上限。
|
otThreadSetMaxChildIpAddresses(otInstance *aInstance, uint8_t aMaxIpAddresses)
|
此函数可设置/恢复每个 MTD 子级可作为父设备注册的 IP 地址数量上限。
|
otThreadSetNetworkIdTimeout(otInstance *aInstance, uint8_t aTimeout)
|
void
设置在 Leader 角色中使用的 NETWORK_ID_TIMEOUT 参数。
|
otThreadSetParentPriority(otInstance *aInstance, int8_t aParentPriority)
|
设置父级优先级。
|
otThreadSetPreferredLeaderPartitionId(otInstance *aInstance, uint32_t aPartitionId)
|
void
设置在 Leader 角色中操作时使用的首选 Thread Leader Partition ID。
|
otThreadSetPreferredRouterId(otInstance *aInstance, uint8_t aRouterId)
|
设置首选路由器 ID。
|
otThreadSetPskc(otInstance *aInstance, const otPskc *aPskc)
|
设置线程 PSKc。
|
otThreadSetPskcRef(otInstance *aInstance, otPskcRef aKeyRef)
|
设置线程 PSKc。
|
otThreadSetRouterDowngradeThreshold(otInstance *aInstance, uint8_t aThreshold)
|
void
设置在 Leader 角色中使用的 ROUTER_DOWNGRADE_THRESHOLD 参数。
|
otThreadSetRouterEligible(otInstance *aInstance, bool aEligible)
|
此函数设置设备是否可以使用路由器。
|
otThreadSetRouterIdRange(otInstance *aInstance, uint8_t aMinRouterId, uint8_t aMaxRouterId)
|
此函数会设置允许分配给线程网络内节点的路由器 ID 范围。
|
otThreadSetRouterSelectionJitter(otInstance *aInstance, uint8_t aRouterJitter)
|
void
设置 REED/Router 角色中使用的 ROUTER_SELECTION_JITTER 参数。
|
otThreadSetRouterUpgradeThreshold(otInstance *aInstance, uint8_t aThreshold)
|
void
设置在 Leader 角色中使用的 ROUTER_UPGRADE_THRESHOLD 参数。
|
otThreadSetSteeringData(otInstance *aInstance, const otExtAddress *aExtAddress)
|
void
设置转向带外数据。
|
otThreadSetThreadVersionCheckEnabled(otInstance *aInstance, bool aEnabled)
|
void
此函数用于设置是否启用安全政策 TLV 版本阈值(VR 字段)。
|
结构体 |
|
---|---|
otCacheEntryInfo |
此结构表示一个 EID 缓存条目。 |
otCacheEntryIterator |
此类型表示用于遍历 EID 缓存表条目的迭代器。 |
otChildInfo |
此结构包含线程子级的诊断信息。 |
otNeighborTableEntryInfo |
此类型表示邻居表条目信息(子项或路由器),并用作邻居表回调 |
枚举
otCacheEntryState
otCacheEntryState
此枚举定义了 EID 缓存条目状态。
otNeighborTableEvent
otNeighborTableEvent
此枚举定义了 otNeighborTableCallback
中使用的常量,用于指示邻域表的更改。
属性 | |
---|---|
OT_NEIGHBOR_TABLE_EVENT_CHILD_ADDED
|
正在添加一个子级。 |
OT_NEIGHBOR_TABLE_EVENT_CHILD_MODE_CHANGED
|
现有孩子的模式会发生变化。 |
OT_NEIGHBOR_TABLE_EVENT_CHILD_REMOVED
|
正在移除儿童。 |
OT_NEIGHBOR_TABLE_EVENT_ROUTER_ADDED
|
正在添加路由器。 |
OT_NEIGHBOR_TABLE_EVENT_ROUTER_REMOVED
|
正在移除一个路由器。 |
类型定义符
otCacheEntryIterator
struct otCacheEntryIterator otCacheEntryIterator
此类型表示用于遍历 EID 缓存表条目的迭代器。
要初始化迭代器并从缓存表中的第一个条目开始,请将它在结构中的所有字段都设为零(例如, memset
)返回零。
otChildIp6AddressIterator
uint16_t otChildIp6AddressIterator
用于遍历线程子条目的 IPv6 地址。
otNeighborTableCallback
void(* otNeighborTableCallback)(otNeighborTableEvent aEvent, const otNeighborTableEntryInfo *aEntryInfo)
调用此函数指针是为了通知邻居表发生了更改。
详情 | |||||
---|---|---|---|---|---|
参数 |
|
函数
otThread 成为潜在客户
otError otThreadBecomeLeader( otInstance *aInstance )
成为领导者并启动新的分区。
详情 | |||||
---|---|---|---|---|---|
参数 |
|
||||
返回值 |
|
otThread 成为 Router
otError otThreadBecomeRouter( otInstance *aInstance )
尝试成为路由器。
详情 | |||||
---|---|---|---|---|---|
参数 |
|
||||
返回值 |
|
otThreadGetChildInfoById
otError otThreadGetChildInfoById( otInstance *aInstance, uint16_t aChildId, otChildInfo *aChildInfo )
该函数会保留附加子项的子 ID 或 RLOC16 的诊断信息。
详情 | |||||||
---|---|---|---|---|---|---|---|
参数 |
|
||||||
返回值 |
|
otThreadGetChildInfoByIndex
otError otThreadGetChildInfoByIndex( otInstance *aInstance, uint16_t aChildIndex, otChildInfo *aChildInfo )
此函数通过内部表索引保留附加的子项的诊断信息。
详情 | |||||||
---|---|---|---|---|---|---|---|
参数 |
|
||||||
返回值 |
|
otGetMaxAllowedChildren
otThreadGetChildNextIp6Address
otError otThreadGetChildNextIp6Address( otInstance *aInstance, uint16_t aChildIndex, otChildIp6AddressIterator *aIterator, otIp6Address *aAddress )
此函数为给定子项获取下一个 IPv6 地址(使用迭代器)。
详情 | |||||||||
---|---|---|---|---|---|---|---|---|---|
参数 |
|
||||||||
返回值 |
|
otThreadGetChildInfoByIndex
otThreadGetContextIdReuseDelay
uint32_t otThreadGetContextIdReuseDelay( otInstance *aInstance )
获取“Leader”角色中使用的 CONTEXT_ID_REUSE_Delay 参数。
详情 | |||
---|---|---|---|
参数 |
|
||
返回值 |
CONTEXT_ID_REUSE_Delay 值。
|
otThreadSetContextIdReuseDelay
otThreadGetJoinerUdpPort
uint16_t otThreadGetJoinerUdpPort( otInstance *aInstance )
获取连接符 UDP 端口。
详情 | |||
---|---|---|---|
参数 |
|
||
返回值 |
连接者 UDP 端口号。
|
otThreadSetJoinerUdpPort
otThreadGetLocalLeaderWeight
uint8_t otThreadGetLocalLeaderWeight( otInstance *aInstance )
获取在担任主管角色时使用的讨论帖线程权重。
详情 | |||
---|---|---|---|
参数 |
|
||
返回值 |
线程领先权重值。
|
otThreadSetLeaderWeight
otThreadGetMaxAllowedChildren
uint16_t otThreadGetMaxAllowedChildren( otInstance *aInstance )
获取当前允许的子项数上限。
详情 | |||
---|---|---|---|
参数 |
|
||
返回值 |
目前允许的儿童数量上限。
|
otThreadSetMaxAllowedChildren
otThreadGetMaxChildIpAddresses
uint8_t otThreadGetMaxChildIpAddresses( otInstance *aInstance )
此函数可获取每个 MTD 子级可作为父设备注册的 IP 地址数量上限。
详情 | |||
---|---|---|---|
参数 |
|
||
返回值 |
每个 MTD 子级可作为父设备注册的 IP 地址数量上限。
|
otThreadSetMaxChildIpAddresses
otThreadGetMaxRouterId
uint8_t otThreadGetMaxRouterId( otInstance *aInstance )
此函数会返回允许的路由器 ID 上限。
详情 | |||
---|---|---|---|
参数 |
|
||
返回值 |
允许的最大路由器 ID。
|
otThreadGetNetworkIdTimeout
uint8_t otThreadGetNetworkIdTimeout( otInstance *aInstance )
获取 Router 角色中使用的 NETWORK_ID_TIMEOUT 参数。
详情 | |||
---|---|---|---|
参数 |
|
||
返回值 |
NETWORK_ID_TIMEOUT 值。
|
otThreadSetNetworkIdTimeout
otThreadGetNextCacheEntry
otError otThreadGetNextCacheEntry( otInstance *aInstance, otCacheEntryInfo *aEntryInfo, otCacheEntryIterator *aIterator )
此函数获取下一个 EID 缓存条目(使用迭代器)。
详情 | |||||||
---|---|---|---|---|---|---|---|
参数 |
|
||||||
返回值 |
|
otThreadGetParentPriority
int8_t otThreadGetParentPriority( otInstance *aInstance )
获取分配的父级优先级。
详情 | |||
---|---|---|---|
参数 |
|
||
返回值 |
指定的父级优先级值设为 -2 表示未分配。
|
otThreadSetParentPriority
otThreadGetPreferredLeaderPartitionId
uint32_t otThreadGetPreferredLeaderPartitionId( otInstance *aInstance )
获取在 Leader 角色中操作时使用的首选 Thread Leader Partition ID。
详情 | |||
---|---|---|---|
参数 |
|
||
返回值 |
线程领导者分区 ID 值。
|
otThreadGetPskc
void otThreadGetPskc( otInstance *aInstance, otPskc *aPskc )
获取线程 PSKc。
详情 | |||||
---|---|---|---|---|---|
参数 |
|
otThreadSetPskc
otThreadGetPskcRef
otPskcRef otThreadGetPskcRef( otInstance *aInstance )
获取对所存储线程 PSKc 的密钥引用。
此函数需要启用构建时功能 OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE
。
详情 | |||
---|---|---|---|
参数 |
|
||
返回值 |
对 PSKc 的密钥引用
|
otThreadSetPskcRef
otThreadGetRouterDowngradeThreshold
uint8_t otThreadGetRouterDowngradeThreshold( otInstance *aInstance )
获取路由器角色中使用的 ROUTER_DOWNGRADE_THRESHOLD 参数。
详情 | |||
---|---|---|---|
参数 |
|
||
返回值 |
ROUTER_DOWNGRADE_THRESHOLD 值。
|
otThreadSetRouterDowngradeThreshold
otThreadGetRouterIdRange
void otThreadGetRouterIdRange( otInstance *aInstance, uint8_t *aMinRouterId, uint8_t *aMaxRouterId )
此函数可获取允许分配给线程网络内节点的路由器 ID 范围。
详情 | |||||||
---|---|---|---|---|---|---|---|
参数 |
|
otThreadSetRouterIdRange
otThreadGetRouterIdSequence
uint8_t otThreadGetRouterIdSequence( otInstance *aInstance )
获取当前的路由器 ID 序列。
详情 | |||
---|---|---|---|
参数 |
|
||
返回值 |
路由器 ID 序列。
|
otThreadGetRouterInfo
otError otThreadGetRouterInfo( otInstance *aInstance, uint16_t aRouterId, otRouterInfo *aRouterInfo )
函数会保留给定线程路由器的诊断信息。
详情 | |||||||
---|---|---|---|---|---|---|---|
参数 |
|
||||||
返回值 |
|
otThreadGetRouterSelectionJitter
uint8_t otThreadGetRouterSelectionJitter( otInstance *aInstance )
获取在 REED/Router 角色中使用的 ROUTER_SELECTION_JITTER 参数。
详情 | |||
---|---|---|---|
参数 |
|
||
返回值 |
ROUTER_SELECTION_JITTER 值。
|
otThreadSetRouterSelectionJitter
otThreadGetRouterUpgradeThreshold
uint8_t otThreadGetRouterUpgradeThreshold( otInstance *aInstance )
获取在 REED 角色中使用的 ROUTER_UPGRADE_THRESHOLD 参数。
详情 | |||
---|---|---|---|
参数 |
|
||
返回值 |
ROUTER_UPGRADE_THRESHOLD 值。
|
otThreadSetRouterUpgradeThreshold
otThreadIsRoutereligible
bool otThreadIsRouterEligible( otInstance *aInstance )
此方法可指示设备是否可以使用路由器。
详情 | |||||
---|---|---|---|---|---|
参数 |
|
||||
返回值 |
|
otThreadRegisterNeighborTableCallback
void otThreadRegisterNeighborTableCallback( otInstance *aInstance, otNeighborTableCallback aCallback )
此函数可注册邻居表回调函数。
当邻域表发生更改(例如正在添加/移除子项或路由器邻居条目,或现有子项的模式发生更改)时,将调用提供的回调函数(如果为非 NULL)。
对此方法的后续调用将覆盖之前的回调。请注意,此调用在邻居/子表正在更新时调用,且始终在 otStateChangedCallback
之前调用。
详情 | |||||
---|---|---|---|---|---|
参数 |
|
otThreadReleaseRouterId
otError otThreadReleaseRouterId( otInstance *aInstance, uint8_t aRouterId )
释放设备在领导者角色中分配的路由器 ID。
详情 | |||||||||
---|---|---|---|---|---|---|---|---|---|
参数 |
|
||||||||
返回值 |
|
otThreadSetCcmEnabled
void otThreadSetCcmEnabled( otInstance *aInstance, bool aEnabled )
此函数设置是否使用 CCM 委托设备。
详情 | |||||
---|---|---|---|---|---|
参数 |
|
otThreadSetContextIdReuseDelay
void otThreadSetContextIdReuseDelay( otInstance *aInstance, uint32_t aDelay )
设置“Leader”角色中使用的 CONTEXT_ID_REUSE_Delay 参数。
详情 | |||||
---|---|---|---|---|---|
参数 |
|
otThreadGetContextIdReuseDelay
otThreadSetJoinerUdpPort
otError otThreadSetJoinerUdpPort( otInstance *aInstance, uint16_t aJoinerUdpPort )
设置连接符 UDP 端口。
详情 | |||||
---|---|---|---|---|---|
参数 |
|
||||
返回值 |
|
otThreadGetJoinerUdpPort
otThreadSetLocalLeaderWeight
void otThreadSetLocalLeaderWeight( otInstance *aInstance, uint8_t aWeight )
设置在“主管”角色中执行操作的“讨论帖主要权重”。
详情 | |||||
---|---|---|---|---|---|
参数 |
|
otThreadGetLeaderWeight
otThreadSetMaxAllowedChildren
otError otThreadSetMaxAllowedChildren( otInstance *aInstance, uint16_t aMaxChildren )
设置当前允许的子级数量上限。
此参数只能在线程协议操作停止时设置。
详情 | |||||||
---|---|---|---|---|---|---|---|
参数 |
|
||||||
返回值 |
|
otThreadGetMaxAllowedChildren
otThreadSetMaxChildIpAddresses
otError otThreadSetMaxChildIpAddresses( otInstance *aInstance, uint8_t aMaxIpAddresses )
此函数可设置/恢复每个 MTD 子级可作为父设备注册的 IP 地址数量上限。
详情 | |||||
---|---|---|---|---|---|
参数 |
|
||||
返回值 |
|
otThreadGetMaxChildIpAddresses
otThreadSetNetworkIdTimeout
void otThreadSetNetworkIdTimeout( otInstance *aInstance, uint8_t aTimeout )
设置在 Leader 角色中使用的 NETWORK_ID_TIMEOUT 参数。
详情 | |||||
---|---|---|---|---|---|
参数 |
|
otThreadGetNetworkIdTimeout
otThreadSetParentPriority
otError otThreadSetParentPriority( otInstance *aInstance, int8_t aParentPriority )
设置父级优先级。
详情 | |||||
---|---|---|---|---|---|
参数 |
|
||||
返回值 |
|
otThreadGetParentPriority
otThreadSetPreferredLeaderPartitionId
void otThreadSetPreferredLeaderPartitionId( otInstance *aInstance, uint32_t aPartitionId )
设置在 Leader 角色中操作时使用的首选 Thread Leader Partition ID。
详情 | |||||
---|---|---|---|---|---|
参数 |
|
otThreadSetPreferredRouterId
otError otThreadSetPreferredRouterId( otInstance *aInstance, uint8_t aRouterId )
设置首选路由器 ID。
成为路由器/领导者后,节点将尝试使用此路由器 ID。如果首选路由器 ID 未设置或无法使用,系统将选择随机生成的路由器 ID。仅当设备角色已分离或停用时,才能设置此属性。
详情 | |||||
---|---|---|---|---|---|
参数 |
|
||||
返回值 |
|
otThreadSetPskc
otError otThreadSetPskc( otInstance *aInstance, const otPskc *aPskc )
设置线程 PSKc。
只有在停用线程协议后,此函数才能成功。如果成功调用此函数,则非易失性内存中的活跃和待处理操作数据集也无效。
详情 | |||||
---|---|---|---|---|---|
参数 |
|
||||
返回值 |
|
otThreadGetPskc
otThreadSetPskcRef
otError otThreadSetPskcRef( otInstance *aInstance, otPskcRef aKeyRef )
设置线程 PSKc。
此函数需要启用构建时功能 OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE
。
只有在停用线程协议后,此函数才能成功。如果成功调用此函数,则非易失性内存中的活跃和待处理操作数据集也无效。
详情 | |||||
---|---|---|---|---|---|
参数 |
|
||||
返回值 |
|
otThreadGetPskcRef
otThreadSetRouterDowngradeThreshold
void otThreadSetRouterDowngradeThreshold( otInstance *aInstance, uint8_t aThreshold )
设置在 Leader 角色中使用的 ROUTER_DOWNGRADE_THRESHOLD 参数。
详情 | |||||
---|---|---|---|---|---|
参数 |
|
otThreadGetRouterDowngradeThreshold
otThreadSetRouterAvailable
otError otThreadSetRouterEligible( otInstance *aInstance, bool aEligible )
此函数设置设备是否可以使用路由器。
如果 aEligible
为 False,并且设备目前以路由器的形式运行,则此调用将使设备分离,然后尝试重新连接子设备。
详情 | |||||
---|---|---|---|---|---|
参数 |
|
||||
返回值 |
|
otThreadSetRouterIdRange
otError otThreadSetRouterIdRange( otInstance *aInstance, uint8_t aMinRouterId, uint8_t aMaxRouterId )
此函数会设置允许分配给线程网络内节点的路由器 ID 范围。
详情 | |||||||
---|---|---|---|---|---|---|---|
参数 |
|
||||||
返回值 |
|
otThreadGetRouterIdRange
otThreadSetRouterSelectionJitter
void otThreadSetRouterSelectionJitter( otInstance *aInstance, uint8_t aRouterJitter )
设置 REED/Router 角色中使用的 ROUTER_SELECTION_JITTER 参数。
详情 | |||||
---|---|---|---|---|---|
参数 |
|
otThreadGetRouterSelectionJitter
otThreadSetRouterUpgradeThreshold
void otThreadSetRouterUpgradeThreshold( otInstance *aInstance, uint8_t aThreshold )
设置在 Leader 角色中使用的 ROUTER_UPGRADE_THRESHOLD 参数。
详情 | |||||
---|---|---|---|---|---|
参数 |
|
otThreadGetRouterUpgradeThreshold
otThreadSetSteeringData
void otThreadSetSteeringData( otInstance *aInstance, const otExtAddress *aExtAddress )
设置转向带外数据。
应设置配置选项 OPENTHREAD_CONFIG_MLE_STEERING_DATA_SET_OOB_ENABLE
,以启用带外导向数据设置。
详情 | |||||
---|---|---|---|---|---|
参数 |
|
otThreadSetThreadVersionCheckEnabled
void otThreadSetThreadVersionCheckEnabled( otInstance *aInstance, bool aEnabled )
此函数用于设置是否启用安全政策 TLV 版本阈值(VR 字段)。
详情 | |||||
---|---|---|---|---|---|
参数 |
|
宏
OT_CHILD_IP6_ADDRESS_ITERATOR_INIT
OT_CHILD_IP6_ADDRESS_ITERATOR_INIT 0
otChildIP6AddressIterator 的初始化函数。
资源
OpenThread API 参考主题源自源代码,可在 GitHub 上找到。 如需了解详情或为我们的文档做贡献,请参阅资源。