路由器/主管
這個模組含有「執行緒路由器」和「領導者」功能。
摘要
列舉 |
|
---|---|
otCacheEntryState
|
列舉 這個列舉定義了 EID 快取項目的狀態。 |
otNeighborTableEvent{
|
列舉 這個列舉定義了在 otNeighborTableCallback 中使用的常數,以指出相鄰的資料表變更。 |
Typedefs |
|
---|---|
otCacheEntryInfo
|
typedefstruct otCacheEntryInfo
這個結構代表 EID 快取項目。 |
otCacheEntryIterator
|
typedefstruct otCacheEntryIterator
此類型代表用於疊代 EID 快取資料表項目的疊代器。 |
otCacheEntryState
|
typedefenum otCacheEntryState
這個列舉定義了 EID 快取項目的狀態。 |
otChildIp6AddressIterator
|
typedefuint16_t
用來疊代 Thread Child 項目的 IPv6 位址。 |
otNeighborTableCallback)(otNeighborTableEvent aEvent, const otNeighborTableEntryInfo *aEntryInfo)
|
typedefvoid(*
呼叫此函式指標以通知鄰居表格有變更。 |
Functions |
|
---|---|
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 快取項目 (使用 iterator)。
|
otThreadGetNextHopAndPathCost(otInstance *aInstance, uint16_t aDestRloc16, uint16_t *aNextHopRloc16, uint8_t *aPathCost)
|
void
這個函式會取得特定 RLOC16 目的地的下一個躍點和路徑費用。
|
otThreadGetParentPriority(otInstance *aInstance)
|
int8_t
取得指定的父項優先順序。
|
otThreadGetPreferredLeaderPartitionId(otInstance *aInstance)
|
uint32_t
取得在領導角色中執行時偏好的執行緒執行緒分區分區 ID。
|
otThreadGetPskc(otInstance *aInstance, otPskc *aPskc)
|
void
取得執行緒 PSKc。
|
otThreadGetPskcRef(otInstance *aInstance)
|
取得儲存 Thread PSKc 的金鑰參考。
|
otThreadGetRouterDowngradeThreshold(otInstance *aInstance)
|
uint8_t
取得路由器角色中使用的 ROUTER_DOWNPARAGRAPH_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 |
此結構包含 Thread Child 的診斷資訊。 |
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
|
正在移除路由器。 |
Typedefs
otCacheEntryIterator
struct otCacheEntryIterator otCacheEntryIterator
此類型代表用於疊代 EID 快取資料表項目的疊代器。
如要初始化疊代器並從快取資料表中的第一個項目開始,請將結構中的所有欄位設定為零 (例如,memset
的疊代器為零)。
otChildIp6AddressIterator
uint16_t otChildIp6AddressIterator
用來疊代 Thread Child 項目的 IPv6 位址。
OTNeighborTableCallback
void(* otNeighborTableCallback)(otNeighborTableEvent aEvent, const otNeighborTableEntryInfo *aEntryInfo)
呼叫此函式指標以通知鄰居表格有變更。
詳細資料 | |||||
---|---|---|---|---|---|
參數 |
|
Functions
OTThread 成為主管
otError otThreadBecomeLeader( otInstance *aInstance )
成為領先者,建立新分區。
詳細資料 | |||||
---|---|---|---|---|---|
參數 |
|
||||
回傳值 |
|
otThreadMakeRouter
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
otThreadGetChildNextIp6 地址
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 (otThreadGetLocalLeaderWeight)
uint8_t otThreadGetLocalLeaderWeight( otInstance *aInstance )
取得在領導角色營運時使用的執行緒主管權重。
詳細資料 | |||
---|---|---|---|
參數 |
|
||
傳回 |
執行緒負責人權重值。
|
otThreadSetLeaderWeight
otThreadGetMaxAllowedChildren
uint16_t otThreadGetMaxAllowedChildren( otInstance *aInstance )
取得目前允許的子項數目上限。
詳細資料 | |||
---|---|---|---|
參數 |
|
||
傳回 |
目前允許的子項數量上限。
|
otThreadSetMaxAllowedChildren
otThreadGetMaxChildIpAddress
uint8_t otThreadGetMaxChildIpAddresses( otInstance *aInstance )
取得每部 MTD 子項向這個裝置註冊的 IP 位址數目上限,以註冊為家長的裝置。
詳細資料 | |||
---|---|---|---|
參數 |
|
||
傳回 |
每個 MTD 子項可向此裝置註冊為父項的 IP 位址數量上限。
|
otThreadSetMaxChildIpAddress
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 快取項目 (使用 iterator)。
詳細資料 | |||||||
---|---|---|---|---|---|---|---|
參數 |
|
||||||
回傳值 |
|
otThreadGetNextHopAndPath 費用
void otThreadGetNextHopAndPathCost( otInstance *aInstance, uint16_t aDestRloc16, uint16_t *aNextHopRloc16, uint8_t *aPathCost )
這個函式會取得特定 RLOC16 目的地的下一個躍點和路徑費用。
此函式可與 aNextHopRloc16
或 aPathCost
搭配使用,用來表示呼叫者不想取得該值。
詳細資料 | |||||||||
---|---|---|---|---|---|---|---|---|---|
參數 |
|
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 )
取得儲存 Thread PSKc 的金鑰參考。
這項功能需要啟用建構時間功能 OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE
。
詳細資料 | |||
---|---|---|---|
參數 |
|
||
傳回 |
PSKc 金鑰參考
|
otThreadSetPskcRef
otThreadGetRouterDowngradeThreshold
uint8_t otThreadGetRouterDowngradeThreshold( otInstance *aInstance )
取得路由器角色中使用的 ROUTER_DOWNPARAGRAPH_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
otThreadIsRouter 符合資格
bool otThreadIsRouterEligible( otInstance *aInstance )
這個方法會指出裝置是否具備路由器資格。
詳細資料 | |||||
---|---|---|---|---|---|
參數 |
|
||||
回傳值 |
|
otThreadRegisterNeighborTableCallback
void otThreadRegisterNeighborTableCallback( otInstance *aInstance, otNeighborTableCallback aCallback )
這個函式會註冊鄰居表格的回呼函式。
當鄰居資料表中有任何變更 (例如,新增/移除子項或路由器的相鄰項目,或是現有子模式發生變更時),系統會叫用所提供的回呼 (如果不是 NULL)。
後續對這個方法的呼叫將會覆寫先前的回呼。請注意,在更新相鄰/子項資料表期間,一律在 otStateChangedCallback
之前已叫用這個回呼。
詳細資料 | |||||
---|---|---|---|---|---|
參數 |
|
otThreadReleaseRouterId
otError otThreadReleaseRouterId( otInstance *aInstance, uint8_t aRouterId )
釋出裝置在「領導」角色中分配的路由器 ID。
詳細資料 | |||||||||
---|---|---|---|---|---|---|---|---|---|
參數 |
|
||||||||
回傳值 |
|
otThreadSetCcm 的已啟用
void otThreadSetCcmEnabled( otInstance *aInstance, bool aEnabled )
這個函式可設定裝置是否使用 CCM 委任。
詳細資料 | |||||
---|---|---|---|---|---|
參數 |
|
otThreadSetContextIdReuseDelay
void otThreadSetContextIdReuseDelay( otInstance *aInstance, uint32_t aDelay )
設定「領導」角色中使用的 CONTEXT_ID_REUSE_DELAY 參數。
詳細資料 | |||||
---|---|---|---|---|---|
參數 |
|
otThreadGetContextIdReuseDelay
otThreadSetJoinerUdp 埠
otError otThreadSetJoinerUdpPort( otInstance *aInstance, uint16_t aJoinerUdpPort )
設定彙整器 UDP 通訊埠。
詳細資料 | |||||
---|---|---|---|---|---|
參數 |
|
||||
回傳值 |
|
otThreadGetJoinerUdpPort
otThreadSetLocalLeaderWeight (otThreadSetLocalLeaderWeight)
void otThreadSetLocalLeaderWeight( otInstance *aInstance, uint8_t aWeight )
設定在負責人角色運作時使用的執行緒主管權重。
詳細資料 | |||||
---|---|---|---|---|---|
參數 |
|
otThreadGetLeaderWeight
OTThreadSetMaxAllowedChildren
otError otThreadSetMaxAllowedChildren( otInstance *aInstance, uint16_t aMaxChildren )
設定目前允許的子項數量上限。
只有在 Thread 通訊協定作業停止時,才能設定這個參數。
詳細資料 | |||||||
---|---|---|---|---|---|---|---|
參數 |
|
||||||
回傳值 |
|
otThreadGetMaxAllowedChildren
otThreadSetMaxChildIpAddress
otError otThreadSetMaxChildIpAddresses( otInstance *aInstance, uint8_t aMaxIpAddresses )
設定或還原每個 MTD 子項向這個裝置註冊的 IP 位址數量上限 (以家長為基準)。
傳遞 0
即可清除設定並還原預設值。
必須啟用 OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE
才能使用此功能。
詳細資料 | |||||
---|---|---|---|---|---|
參數 |
|
||||
回傳值 |
|
otThreadGetMaxChildIpAddress
otThreadSetNetworkIdTimeout
void otThreadSetNetworkIdTimeout( otInstance *aInstance, uint8_t aTimeout )
設定「領導」角色中使用的 NETWORK_ID_TIMEOUT 參數。
詳細資料 | |||||
---|---|---|---|---|---|
參數 |
|
otThreadGetNetworkIdTimeout
otThreadSetParentPriority
otError otThreadSetParentPriority( otInstance *aInstance, int8_t aParentPriority )
設定父項的優先順序。
詳細資料 | |||||
---|---|---|---|---|---|
參數 |
|
||||
回傳值 |
|
otThreadGetParentPriority
otThreadSetPreferredLeader 分區資料表 ID
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
otThreadSetRouter 符合資格
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
otThreadSetRouter 升級閾值
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 取得。如需詳細資訊或為說明文件貢獻一己之力,請參閱資源。