路由器/领导者
此模块包含线程路由器和领先变体的函数。
摘要
枚举 |
|
---|---|
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
获取“主管”角色中使用的 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
获取路由器角色中使用的 NETWORK_ID_TIMEOUT 参数。
|
otThreadGetNextCacheEntry(otInstance *aInstance, otCacheEntryInfo *aEntryInfo, otCacheEntryIterator *aIterator)
|
此函数将获取下一个 EID 缓存条目(使用迭代器)。
|
otThreadGetParentPriority(otInstance *aInstance)
|
int8_t
获取分配的父级优先级。
|
otThreadGetPreferredLeaderPartitionId(otInstance *aInstance)
|
uint32_t
获取以“主要”角色操作时使用的首选线程主要分区 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
设置“主管”角色中使用的 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
设置“领导”角色中使用的 NETWORK_ID_TIMEOUT 参数。
|
otThreadSetParentPriority(otInstance *aInstance, int8_t aParentPriority)
|
设置父级优先级。
|
otThreadSetPreferredLeaderPartitionId(otInstance *aInstance, uint32_t aPartitionId)
|
void
设置以“主要”角色操作时使用的首选线程主要分区 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
设置主要角色使用的 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
设置主要角色使用的 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)
可调用此函数指针来通知邻居表发生了更改。
详细信息 | |||||
---|---|---|---|---|---|
参数 |
|
函数
oThreadThreadLeader
otError otThreadBecomeLeader( otInstance *aInstance )
成为队长并开始新的分区。
详细信息 | |||||
---|---|---|---|---|---|
参数 |
|
||||
返回值 |
|
oThreadThreadRoute 变为
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 )
获取“主管”角色中使用的 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 )
获取路由器角色中使用的 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 )
获取以“主要”角色操作时使用的首选线程主要分区 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 )
设置“主管”角色中使用的 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 )
设置“领导”角色中使用的 NETWORK_ID_TIMEOUT 参数。
详细信息 | |||||
---|---|---|---|---|---|
参数 |
|
otThreadGetNetworkIdTimeout
otThreadSetParentPriority
otError otThreadSetParentPriority( otInstance *aInstance, int8_t aParentPriority )
设置父级优先级。
详细信息 | |||||
---|---|---|---|---|---|
参数 |
|
||||
返回值 |
|
otThreadGetParentPriority
otThreadSetPreferredLeaderpartitionId
void otThreadSetPreferredLeaderPartitionId( otInstance *aInstance, uint32_t aPartitionId )
设置以“主要”角色操作时使用的首选线程主要分区 ID。
详细信息 | |||||
---|---|---|---|---|---|
参数 |
|
otThreadSetPreferredRouterId
otError otThreadSetPreferredRouterId( otInstance *aInstance, uint8_t aRouterId )
设置首选路由器 ID。
成为路由器/领导者后,节点会尝试使用此路由器 ID。如果首选路由器 ID 未设置或无法使用,则系统会选择随机生成的路由器 ID。只有在设备角色分离或停用时才能设置此属性。
详细信息 | |||||
---|---|---|---|---|---|
参数 |
|
||||
返回值 |
|
otThreadSetPskc
otError otThreadSetPskc( otInstance *aInstance, const otPskc *aPskc )
设置线程 PSKc。
只有在停用 Thread 协议的情况下,该函数才会成功。成功调用此函数还将使非易失性内存中的活跃和待处理操作数据集失效。
详细信息 | |||||
---|---|---|---|---|---|
参数 |
|
||||
返回值 |
|
otThreadGetPskc
otThreadSetPskcRef
otError otThreadSetPskcRef( otInstance *aInstance, otPskcRef aKeyRef )
设置线程 PSKc。
该函数需要启用构建时功能 OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE
。
只有在停用 Thread 协议的情况下,该函数才会成功。成功调用此函数还将使非易失性内存中的活跃和待处理操作数据集失效。
详细信息 | |||||
---|---|---|---|---|---|
参数 |
|
||||
返回值 |
|
otThreadGetPskcRef
otThreadSetRouterDowngradeThreshold
void otThreadSetRouterDowngradeThreshold( otInstance *aInstance, uint8_t aThreshold )
设置主要角色使用的 ROUTER_DOWNGrade_THRESHOLD 参数。
详细信息 | |||||
---|---|---|---|---|---|
参数 |
|
otThreadGetRouterDowngradeThreshold
otThreadSetRoutereligible
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 )
设置主要角色使用的 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 上的源代码。 如需了解详情或为我们的文档做贡献,请参阅资源。