一般
該模塊包括所有線程角色的功能。
概要
類型定義 | |
---|---|
otBorderRouterConfig | 類型定義struct otBorderRouterConfig 此結構表示邊界路由器配置。 |
otExternalRouteConfig | 類型定義struct otExternalRouteConfig 此結構表示外部路由配置。 |
otIpCounters | 類型定義struct otIpCounters 此結構表示IP級別計數器。 |
otLeaderData | 類型定義struct otLeaderData 此結構表示線程領導者數據。 |
otLinkModeConfig | 類型定義struct otLinkModeConfig 此結構表示MLE鏈接模式配置。 |
otMleCounters | 類型定義struct otMleCounters 此結構表示線程MLE計數器。 |
otNeighborInfoIterator | 類型定義int16_t 用於遍歷鄰居表。 |
otNetworkDataIterator | 類型定義uint32_t 用於遍歷網絡數據信息。 |
otNetworkDiagChildEntry | 類型定義struct otNetworkDiagChildEntry 此結構表示網絡診斷子表條目。 |
otNetworkDiagConnectivity | 類型定義struct otNetworkDiagConnectivity 此結構表示網絡診斷連接性值。 |
otNetworkDiagIterator | 類型定義uint16_t 用於遍歷網絡診斷TLV。 |
otNetworkDiagMacCounters | 類型定義struct otNetworkDiagMacCounters 此結構表示“網絡診斷Mac計數器”值。 |
otNetworkDiagRoute | 類型定義struct otNetworkDiagRoute 此結構表示網絡診斷路由TLV值。 |
otNetworkDiagRouteData | 類型定義struct otNetworkDiagRouteData 此結構表示網絡診斷路由數據。 |
otNetworkDiagTlv | 類型定義struct otNetworkDiagTlv 此結構表示網絡診斷TLV。 |
otReceiveDiagnosticGetCallback )(otError aError, otMessage *aMessage, const otMessageInfo *aMessageInfo, void *aContext) | 類型定義void(* 收到網絡診斷獲取響應時,將調用此函數指針。 |
otRoutePreference | 類型定義enum otRoutePreference 為otExternalRouteConfig和otBorderRouterConfig中的成員mPreference定義有效值。 |
otServerConfig | 類型定義struct otServerConfig 此結構表示服務器配置。 |
otServiceConfig | 類型定義struct otServiceConfig 此結構表示服務配置。 |
otThreadDiscoveryRequestCallback )(const otThreadDiscoveryRequestInfo *aInfo, void *aContext) | 類型定義void(* 每當接收到MLE發現請求消息時,都會調用此函數指針。 |
otThreadDiscoveryRequestInfo | 類型定義 此結構表示線程發現請求數據。 |
otThreadParentResponseCallback )(otThreadParentResponseInfo *aInfo, void *aContext) | 類型定義void(* 每當接收到MLE父響應消息時,都會調用此函數指針。 |
otThreadParentResponseInfo | 類型定義struct otThreadParentResponseInfo 此結構表示MLE父響應數據。 |
職能 | |
---|---|
otNetDataGet ( otInstance *aInstance, bool aStable, uint8_t *aData, uint8_t *aDataLength) | 此方法提供了分區線程網絡數據的完整副本或穩定副本。 |
otNetDataGetNextOnMeshPrefix ( otInstance *aInstance, otNetworkDataIterator *aIterator, otBorderRouterConfig *aConfig) | 此功能獲取分區的網絡數據中的下一個On Mesh Prefix。 |
otNetDataGetNextRoute ( otInstance *aInstance, otNetworkDataIterator *aIterator, otExternalRouteConfig *aConfig) | 此功能獲取分區的網絡數據中的下一個外部路由。 |
otNetDataGetNextService ( otInstance *aInstance, otNetworkDataIterator *aIterator, otServiceConfig *aConfig) | 此功能獲取分區的網絡數據中的下一個服務。 |
otNetDataGetStableVersion ( otInstance *aInstance) | uint8_t 獲取穩定的網絡數據版本。 |
otNetDataGetVersion ( otInstance *aInstance) | uint8_t 獲取網絡數據版本。 |
otNetDataSteeringDataCheckJoiner ( otInstance *aInstance, const otExtAddress *aEui64) | 檢查轉向數據是否包括Joiner。 |
otNetDataSteeringDataCheckJoinerWithDiscerner ( otInstance *aInstance, const struct otJoinerDiscerner *aDiscerner) | 檢查轉向數據是否包括具有給定區別值的Joiner。 |
otThreadBecomeChild ( otInstance *aInstance) | 嘗試重新連接小時候。 |
otThreadBecomeDetached ( otInstance *aInstance) | 脫離線程網絡。 |
otThreadDiscover ( otInstance *aInstance, uint32_t aScanChannels, uint16_t aPanId, bool aJoiner, bool aEnableEui64Filtering, otHandleActiveScanResult aCallback, void *aCallbackContext) | 此功能啟動線程發現掃描。 |
otThreadGetChildTimeout ( otInstance *aInstance) | uint32_t 獲取以“子級”角色操作時使用的“線程子級超時”。 |
otThreadGetDeviceRole ( otInstance *aInstance) | 獲取設備角色。 |
otThreadGetDomainName ( otInstance *aInstance) | const char * 獲取線程域名。 |
otThreadGetExtendedPanId ( otInstance *aInstance) | const otExtendedPanId * 獲取IEEE 802.15.4擴展PAN ID。 |
otThreadGetFixedDuaInterfaceIdentifier ( otInstance *aInstance) | const otIp6InterfaceIdentifier * 獲取為線程域單播地址手動指定的接口標識符。 |
otThreadGetIp6Counters ( otInstance *aInstance) | const otIpCounters * 獲取IPv6計數器。 |
otThreadGetKeySequenceCounter ( otInstance *aInstance) | uint32_t 獲取thrKeySequenceCounter。 |
otThreadGetKeySwitchGuardTime ( otInstance *aInstance) | uint32_t 獲取thrKeySwitchGuardTime。 |
otThreadGetLeaderData ( otInstance *aInstance, otLeaderData *aLeaderData) | 此函數獲取線程領導者數據。 |
otThreadGetLeaderRloc ( otInstance *aInstance, otIp6Address *aLeaderRloc) | 此函數返回指向領導者的RLOC的指針。 |
otThreadGetLeaderRouterId ( otInstance *aInstance) | uint8_t 獲取領導者的路由器ID。 |
otThreadGetLeaderWeight ( otInstance *aInstance) | uint8_t 獲得領導者的權重。 |
otThreadGetLinkLocalIp6Address ( otInstance *aInstance) | const otIp6Address * 此函數返迴線程鏈接本地IPv6地址。 |
otThreadGetLinkMode ( otInstance *aInstance) | 獲取MLE鏈接模式配置。 |
otThreadGetMasterKey ( otInstance *aInstance) | const otMasterKey * 獲取thrMasterKey。 |
otThreadGetMeshLocalEid ( otInstance *aInstance) | const otIp6Address * 此函數返回一個指向Mesh Local EID地址的指針。 |
otThreadGetMeshLocalPrefix ( otInstance *aInstance) | const otMeshLocalPrefix * 該函數返回一個指向網格局部前綴的指針。 |
otThreadGetMleCounters ( otInstance *aInstance) | const otMleCounters * 獲取線程MLE計數器。 |
otThreadGetNetworkName ( otInstance *aInstance) | const char * 獲取線程網絡名稱。 |
otThreadGetNextDiagnosticTlv (const otMessage *aMessage, otNetworkDiagIterator *aIterator, otNetworkDiagTlv *aNetworkDiagTlv) | 此功能獲取消息中的下一個網絡診斷TLV。 |
otThreadGetNextNeighborInfo ( otInstance *aInstance, otNeighborInfoIterator *aIterator, otNeighborInfo *aInfo) | 此函數獲取下一個鄰居信息。 |
otThreadGetParentAverageRssi ( otInstance *aInstance, int8_t *aParentRssi) | 該函數檢索線程父級的平均RSSI。 |
otThreadGetParentInfo ( otInstance *aInstance, otRouterInfo *aParentInfo) | 該功能檢索作為父級的線程路由器的診斷信息。 |
otThreadGetParentLastRssi ( otInstance *aInstance, int8_t *aLastRssi) | 該函數從線程父檢索最後一個數據包的RSSI。 |
otThreadGetPartitionId ( otInstance *aInstance) | uint32_t 獲取分區ID。 |
otThreadGetRloc ( otInstance *aInstance) | const otIp6Address * 此函數返回一個指向線程路由定位器(RLOC)地址的指針。 |
otThreadGetRloc16 ( otInstance *aInstance) | uint16_t 獲取RLOC16。 |
otThreadGetVersion (void) | uint16_t 此函數獲取線程協議版本。 |
otThreadIsDiscoverInProgress ( otInstance *aInstance) | bool 此功能確定當前是否正在進行MLE線程發現。 |
otThreadIsSingleton ( otInstance *aInstance) | bool 此功能指示節點是否是網絡上的唯一路由器。 |
otThreadRegisterParentResponseCallback ( otInstance *aInstance, otThreadParentResponseCallback aCallback, void *aContext) | void 此函數註冊一個回調以接收MLE父響應數據。 |
otThreadResetIp6Counters ( otInstance *aInstance) | void 重置IPv6計數器。 |
otThreadResetMleCounters ( otInstance *aInstance) | void 重置線程MLE計數器。 |
otThreadSendAddressNotification ( otInstance *aInstance, otIp6Address *aDestination, otIp6Address *aTarget, otIp6InterfaceIdentifier *aMlIid) | void 此函數發送主動地址通知(ADDR_NTF.ntf)消息。 |
otThreadSendDiagnosticGet ( otInstance *aInstance, const otIp6Address *aDestination, const uint8_t aTlvTypes[], uint8_t aCount) | 發送網絡診斷獲取請求。 |
otThreadSendDiagnosticReset ( otInstance *aInstance, const otIp6Address *aDestination, const uint8_t aTlvTypes[], uint8_t aCount) | 發送網絡診斷重置請求。 |
otThreadSendProactiveBackboneNotification ( otInstance *aInstance, otIp6Address *aTarget, otIp6InterfaceIdentifier *aMlIid, uint32_t aTimeSinceLastTransaction) | 此功能在“主幹網”鏈接上發送“主動主幹網通知”(PRO_BB.ntf)消息。 |
otThreadSetChildTimeout ( otInstance *aInstance, uint32_t aTimeout) | void 設置以“子級”角色操作時使用的“線程子級超時”。 |
otThreadSetDiscoveryRequestCallback ( otInstance *aInstance, otThreadDiscoveryRequestCallback aCallback, void *aContext) | void 此函數設置回調以接收MLE發現請求數據。 |
otThreadSetDomainName ( otInstance *aInstance, const char *aDomainName) | 設置線程域名。 |
otThreadSetEnabled ( otInstance *aInstance, bool aEnabled) | 此功能啟動線程協議操作。 |
otThreadSetExtendedPanId ( otInstance *aInstance, const otExtendedPanId *aExtendedPanId) | 設置IEEE 802.15.4擴展PAN ID。 |
otThreadSetFixedDuaInterfaceIdentifier ( otInstance *aInstance, const otIp6InterfaceIdentifier *aIid) | 設置/清除為線程域單播地址手動指定的接口標識符。 |
otThreadSetJoinerAdvertisement ( otInstance *aInstance, uint32_t aOui, const uint8_t *aAdvData, uint8_t aAdvDataLength) | 發現線程網絡時,此方法設置“線程連接器廣告”。 |
otThreadSetKeySequenceCounter ( otInstance *aInstance, uint32_t aKeySequenceCounter) | void 設置thrKeySequenceCounter。 |
otThreadSetKeySwitchGuardTime ( otInstance *aInstance, uint32_t aKeySwitchGuardTime) | void 設置thrKeySwitchGuardTime。 |
otThreadSetLinkMode ( otInstance *aInstance, otLinkModeConfig aConfig) | 設置MLE鏈接模式配置。 |
otThreadSetMasterKey ( otInstance *aInstance, const otMasterKey *aKey) | 設置thrMasterKey。 |
otThreadSetMeshLocalPrefix ( otInstance *aInstance, const otMeshLocalPrefix *aMeshLocalPrefix) | 此功能設置網格局部前綴。 |
otThreadSetNetworkName ( otInstance *aInstance, const char *aNetworkName) | 設置線程網絡名稱。 |
otThreadSetReceiveDiagnosticGetCallback ( otInstance *aInstance, otReceiveDiagnosticGetCallback aCallback, void *aCallbackContext) | void 此函數註冊一個回調以提供接收到的原始網絡診斷獲取響應有效負載。 |
結構 | |
---|---|
otBorderRouterConfig | 此結構表示邊界路由器配置。 |
otExternalRouteConfig | 此結構表示外部路由配置。 |
otIpCounters | 此結構表示IP級別計數器。 |
otLeaderData | 此結構表示線程領導者數據。 |
otLinkModeConfig | 此結構表示MLE鏈接模式配置。 |
otMleCounters | 此結構表示線程MLE計數器。 |
otNeighborInfo | 此結構保存相鄰線程節點的診斷信息。 |
otNetworkDiagChildEntry | 此結構表示網絡診斷子表條目。 |
otNetworkDiagConnectivity | 此結構表示網絡診斷連接性值。 |
otNetworkDiagMacCounters | 此結構表示“網絡診斷Mac計數器”值。 |
otNetworkDiagRoute | 此結構表示網絡診斷路由TLV值。 |
otNetworkDiagRouteData | 此結構表示網絡診斷路由數據。 |
otNetworkDiagTlv | 此結構表示網絡診斷TLV。 |
otRouterInfo | 此結構保存線程路由器的診斷信息。 |
otServerConfig | 此結構表示服務器配置。 |
otServiceConfig | 此結構表示服務配置。 |
otThreadDiscoveryRequestInfo | 此結構表示線程發現請求數據。 |
otThreadParentResponseInfo | 此結構表示MLE父響應數據。 |
枚舉
匿名枚舉
anonymous enum
otDeviceRole
otDeviceRole
otRoutePreference
otRoutePreference
為otExternalRouteConfig和otBorderRouterConfig中的成員mPreference定義有效值。
物產 | |
---|---|
OT_ROUTE_PREFERENCE_HIGH | 路線偏好較高。 |
OT_ROUTE_PREFERENCE_LOW | 路由優先級低。 |
OT_ROUTE_PREFERENCE_MED | 中等路線偏好。 |
類型定義
otNeighborInfoIterator
int16_t otNeighborInfoIterator
用於遍歷鄰居表。
otNetworkDataIterator
uint32_t otNetworkDataIterator
用於遍歷網絡數據信息。
otNetworkDiagIterator
uint16_t otNetworkDiagIterator
用於遍歷網絡診斷TLV。
otNetworkDiagMacCounters
struct otNetworkDiagMacCounters otNetworkDiagMacCounters
此結構表示“網絡診斷Mac計數器”值。
有關成員字段的定義,請參見RFC 2863 。
otReceiveDiagnosticGetCallback
void(* otReceiveDiagnosticGetCallback)(otError aError, otMessage *aMessage, const otMessageInfo *aMessageInfo, void *aContext)
收到網絡診斷獲取響應時,將調用此函數指針。
細節 | |||||||||
---|---|---|---|---|---|---|---|---|---|
參量 |
|
otRoutePreference
enum otRoutePreference otRoutePreference
為otExternalRouteConfig和otBorderRouterConfig中的成員mPreference定義有效值。
otThreadDiscoveryRequestCallback
void(* otThreadDiscoveryRequestCallback)(const otThreadDiscoveryRequestInfo *aInfo, void *aContext)
每當接收到MLE發現請求消息時,都會調用此函數指針。
細節 | |||||
---|---|---|---|---|---|
參量 |
|
otThreadDiscoveryRequestInfo
struct otThreadDiscoveryRequestInfo otThreadDiscoveryRequestInfo
此結構表示線程發現請求數據。
otThreadParentResponseCallback
void(* otThreadParentResponseCallback)(otThreadParentResponseInfo *aInfo, void *aContext)
每當接收到MLE父響應消息時,都會調用此函數指針。
細節 | |||||
---|---|---|---|---|---|
參量 |
|
otThreadParentResponseInfo
struct otThreadParentResponseInfo otThreadParentResponseInfo
此結構表示MLE父響應數據。
職能
otNetDataGet
otError otNetDataGet( otInstance *aInstance, bool aStable, uint8_t *aData, uint8_t *aDataLength )
此方法提供了分區線程網絡數據的完整副本或穩定副本。
細節 | |||||||||
---|---|---|---|---|---|---|---|---|---|
參量 |
|
otNetDataGetNextOnMeshPrefix
otError otNetDataGetNextOnMeshPrefix( otInstance *aInstance, otNetworkDataIterator *aIterator, otBorderRouterConfig *aConfig )
此功能獲取分區的網絡數據中的下一個On Mesh Prefix。
細節 | |||||||
---|---|---|---|---|---|---|---|
參量 |
| ||||||
返回值 |
|
otNetDataGetNextRoute
otError otNetDataGetNextRoute( otInstance *aInstance, otNetworkDataIterator *aIterator, otExternalRouteConfig *aConfig )
此功能獲取分區的網絡數據中的下一個外部路由。
細節 | |||||||
---|---|---|---|---|---|---|---|
參量 |
| ||||||
返回值 |
|
otNetDataGetNextService
otError otNetDataGetNextService( otInstance *aInstance, otNetworkDataIterator *aIterator, otServiceConfig *aConfig )
此功能獲取分區的網絡數據中的下一個服務。
細節 | |||||||
---|---|---|---|---|---|---|---|
參量 |
| ||||||
返回值 |
|
otNetDataGetStableVersion
uint8_t otNetDataGetStableVersion( otInstance *aInstance )
獲取穩定的網絡數據版本。
細節 | |||
---|---|---|---|
參量 |
| ||
退貨 | 穩定的網絡數據版本。 |
otNetDataGetVersion
uint8_t otNetDataGetVersion( otInstance *aInstance )
獲取網絡數據版本。
細節 | |||
---|---|---|---|
參量 |
| ||
退貨 | 網絡數據版本。 |
otNetDataSteeringDataCheckJoiner
otError otNetDataSteeringDataCheckJoiner( otInstance *aInstance, const otExtAddress *aEui64 )
檢查轉向數據是否包括Joiner。
細節 | |||||||
---|---|---|---|---|---|---|---|
參量 |
| ||||||
返回值 |
|
otNetDataSteeringDataCheckJoinerWithDiscerner
otError otNetDataSteeringDataCheckJoinerWithDiscerner( otInstance *aInstance, const struct otJoinerDiscerner *aDiscerner )
檢查轉向數據是否包括具有給定區別值的Joiner。
細節 | |||||||
---|---|---|---|---|---|---|---|
參量 |
| ||||||
返回值 |
|
otThreadBecomeChild
otError otThreadBecomeChild( otInstance *aInstance )
嘗試重新連接小時候。
細節 | |||||
---|---|---|---|---|---|
參量 |
| ||||
返回值 |
|
otThreadBecomeDetached
otError otThreadBecomeDetached( otInstance *aInstance )
脫離線程網絡。
細節 | |||||
---|---|---|---|---|---|
參量 |
| ||||
返回值 |
|
otThreadDiscover
otError otThreadDiscover( otInstance *aInstance, uint32_t aScanChannels, uint16_t aPanId, bool aJoiner, bool aEnableEui64Filtering, otHandleActiveScanResult aCallback, void *aCallbackContext )
此功能啟動線程發現掃描。
細節 | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
參量 |
| ||||||||||||||
返回值 |
|
otThreadGetChildTimeout
uint32_t otThreadGetChildTimeout( otInstance *aInstance )
獲取以“子級”角色操作時使用的“線程子級超時”。
細節 | |||
---|---|---|---|
參量 |
| ||
退貨 | 線程子超時值(以秒為單位)。 |
otThreadSetChildTimeout
otThreadGetDeviceRole
otDeviceRole otThreadGetDeviceRole( otInstance *aInstance )
獲取設備角色。
細節 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
參量 |
| ||||||||||
返回值 |
|
otThreadGetDomainName
const char * otThreadGetDomainName( otInstance *aInstance )
獲取線程域名。
此功能僅在Thread 1.2之後可用。
細節 | |||
---|---|---|---|
參量 |
| ||
退貨 | 指向線程域名的指針。 |
otThreadSetDomainName
otThreadGetExtendedPanId
const otExtendedPanId * otThreadGetExtendedPanId( otInstance *aInstance )
獲取IEEE 802.15.4擴展PAN ID。
細節 | |||
---|---|---|---|
參量 |
| ||
退貨 | 指向IEEE 802.15.4擴展PAN ID的指針。 |
otThreadSetExtendedPanId
otThreadGetFixedDuaInterfaceIdentifier
const otIp6InterfaceIdentifier * otThreadGetFixedDuaInterfaceIdentifier( otInstance *aInstance )
獲取為線程域單播地址手動指定的接口標識符。
僅當啟用OPENTHREAD_CONFIG_DUA_ENABLE
線程1.2之後,此功能才可用。
細節 | |||
---|---|---|---|
參量 |
| ||
退貨 | 指向手動設置的接口標識符的指針;如果未設置,則為NULL。 |
otThreadSetFixedDuaInterfaceIdentifier
otThreadGetIp6Counters
const otIpCounters * otThreadGetIp6Counters( otInstance *aInstance )
獲取IPv6計數器。
細節 | |||
---|---|---|---|
參量 |
| ||
退貨 | 指向IPv6計數器的指針。 |
otThreadGetKeySequenceCounter
uint32_t otThreadGetKeySequenceCounter( otInstance *aInstance )
獲取thrKeySequenceCounter。
細節 | |||
---|---|---|---|
參量 |
| ||
退貨 | thrKeySequenceCounter值。 |
otThreadSetKeySequenceCounter
otThreadGetKeySwitchGuardTime
uint32_t otThreadGetKeySwitchGuardTime( otInstance *aInstance )
獲取thrKeySwitchGuardTime。
細節 | |||
---|---|---|---|
參量 |
| ||
退貨 | thrKeySwitchGuardTime值(以小時為單位)。 |
otThreadSetKeySwitchGuardGuardTime
otThreadGetLeaderData
otError otThreadGetLeaderData( otInstance *aInstance, otLeaderData *aLeaderData )
此函數獲取線程領導者數據。
細節 | |||||
---|---|---|---|---|---|
參量 |
| ||||
返回值 |
|
otThreadGetLeaderRloc
otError otThreadGetLeaderRloc( otInstance *aInstance, otIp6Address *aLeaderRloc )
此函數返回指向領導者的RLOC的指針。
細節 | |||||||
---|---|---|---|---|---|---|---|
參量 |
| ||||||
返回值 |
|
otThreadGetLeaderRouterId
第0931章獲取領導者的路由器ID。
細節 | |||
---|---|---|---|
參量 |
| ||
退貨 | 領導者的路由器ID。 |
otThreadGetLeaderWeight
uint8_t otThreadGetLeaderWeight( otInstance *aInstance )
獲得領導者的權重。
細節 | |||
---|---|---|---|
參量 |
| ||
退貨 | 領導者的體重。 |
otThreadGetLinkLocalIp6Address
const otIp6Address * otThreadGetLinkLocalIp6Address( otInstance *aInstance )
此函數返迴線程鏈接本地IPv6地址。
使用IEEE802.15.4擴展地址作為接口標識符派生線程鏈接本地地址。
細節 | |||
---|---|---|---|
參量 |
| ||
退貨 | 指向線程鏈接本地IPv6地址的指針。 |
otThreadGetLinkMode
otLinkModeConfig otThreadGetLinkMode( otInstance *aInstance )
otThreadGetMasterKey
const otMasterKey * otThreadGetMasterKey( otInstance *aInstance )
獲取thrMasterKey。
細節 | |||
---|---|---|---|
參量 |
| ||
退貨 | 指向包含thrMasterKey的緩衝區的指針。 |
otThreadSetMasterKey
otThreadGetMeshLocalEid
const otIp6Address * otThreadGetMeshLocalEid( otInstance *aInstance )
此函數返回一個指向Mesh Local EID地址的指針。
細節 | |||
---|---|---|---|
參量 |
| ||
退貨 | 指向網格本地EID地址的指針。 |
otThreadGetMeshLocalPrefix
const otMeshLocalPrefix * otThreadGetMeshLocalPrefix( otInstance *aInstance )
該函數返回一個指向網格局部前綴的指針。
細節 | |||
---|---|---|---|
參量 |
| ||
退貨 | 指向網格本地前綴的指針。 |
otThreadGetMleCounters
const otMleCounters * otThreadGetMleCounters( otInstance *aInstance )
獲取線程MLE計數器。
細節 | |||
---|---|---|---|
參量 |
| ||
退貨 | 指向線程MLE計數器的指針。 |
otThreadGetNetworkName
const char * otThreadGetNetworkName( otInstance *aInstance )
otThreadGetNextDiagnosticTlv
otError otThreadGetNextDiagnosticTlv( const otMessage *aMessage, otNetworkDiagIterator *aIterator, otNetworkDiagTlv *aNetworkDiagTlv )
此功能獲取消息中的下一個網絡診斷TLV。
僅噹噹前返回值為OT_ERROR_NONE時,才允許對該函數進行後續調用。
細節 | |||||||
---|---|---|---|---|---|---|---|
參量 |
| ||||||
返回值 |
|
otThreadGetNextNeighborInfo
第028章此函數獲取下一個鄰居信息。
它用於遍歷鄰居表的條目。
細節 | |||||||
---|---|---|---|---|---|---|---|
參量 |
| ||||||
返回值 |
|
otThreadGetParentAverageRssi
otError otThreadGetParentAverageRssi( otInstance *aInstance, int8_t *aParentRssi )
該函數檢索線程父級的平均RSSI。
細節 | |||||
---|---|---|---|---|---|
參量 |
|
otThreadGetParentInfo
otError otThreadGetParentInfo( otInstance *aInstance, otRouterInfo *aParentInfo )
該功能檢索作為父級的線程路由器的診斷信息。
細節 | |||||
---|---|---|---|---|---|
參量 |
|
otThreadGetParentLastRssi
otError otThreadGetParentLastRssi( otInstance *aInstance, int8_t *aLastRssi )
該函數從線程父檢索最後一個數據包的RSSI。
細節 | |||||||
---|---|---|---|---|---|---|---|
參量 |
| ||||||
返回值 |
|
otThreadGetPartitionId
uint32_t otThreadGetPartitionId( otInstance *aInstance )
獲取分區ID。
細節 | |||
---|---|---|---|
參量 |
| ||
退貨 | 分區ID。 |
otThreadGetRloc
const otIp6Address * otThreadGetRloc( otInstance *aInstance )
此函數返回一個指向線程路由定位器(RLOC)地址的指針。
細節 | |||
---|---|---|---|
參量 |
| ||
退貨 | 指向線程路由定位器(RLOC)地址的指針。 |
otThreadGetRloc16
uint16_t otThreadGetRloc16( otInstance *aInstance )
獲取RLOC16。
細節 | |||
---|---|---|---|
參量 |
| ||
退貨 | RLOC16。 |
otThreadGetVersion
uint16_t otThreadGetVersion( void )
此函數獲取線程協議版本。
細節 | |
---|---|
退貨 | 線程協議版本。 |
otThreadIsDiscoverInProgress
bool otThreadIsDiscoverInProgress( otInstance *aInstance )
此功能確定當前是否正在進行MLE線程發現。
細節 | |||
---|---|---|---|
參量 |
|
otThreadIsSingleton
bool otThreadIsSingleton( otInstance *aInstance )
此功能指示節點是否是網絡上的唯一路由器。
細節 | |||||
---|---|---|---|---|---|
參量 |
| ||||
返回值 |
|
otThreadRegisterParentResponseCallback
void otThreadRegisterParentResponseCallback( otInstance *aInstance, otThreadParentResponseCallback aCallback, void *aContext )
此函數註冊一個回調以接收MLE父響應數據。
細節 | |||||||
---|---|---|---|---|---|---|---|
參量 |
|
otThreadResetIp6Counters
void otThreadResetIp6Counters( otInstance *aInstance )
重置IPv6計數器。
細節 | |||
---|---|---|---|
參量 |
|
otThreadResetMleCounters
void otThreadResetMleCounters( otInstance *aInstance )
重置線程MLE計數器。
細節 | |||
---|---|---|---|
參量 |
|
otThreadSendAddressNotification
void otThreadSendAddressNotification( otInstance *aInstance, otIp6Address *aDestination, otIp6Address *aTarget, otIp6InterfaceIdentifier *aMlIid )
此函數發送主動地址通知(ADDR_NTF.ntf)消息。
僅當啟用OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE
時,此功能才可用。
細節 | |||||||||
---|---|---|---|---|---|---|---|---|---|
參量 |
|
otThreadSendDiagnosticGet
otError otThreadSendDiagnosticGet( otInstance *aInstance, const otIp6Address *aDestination, const uint8_t aTlvTypes[], uint8_t aCount )
發送網絡診斷獲取請求。
細節 | |||||||||
---|---|---|---|---|---|---|---|---|---|
參量 |
| ||||||||
返回值 |
|
otThreadSendDiagnosticReset
otError otThreadSendDiagnosticReset( otInstance *aInstance, const otIp6Address *aDestination, const uint8_t aTlvTypes[], uint8_t aCount )
發送網絡診斷重置請求。
細節 | |||||||||
---|---|---|---|---|---|---|---|---|---|
參量 |
| ||||||||
返回值 |
|
otThreadSendProactiveBackboneNotification
otError otThreadSendProactiveBackboneNotification( otInstance *aInstance, otIp6Address *aTarget, otIp6InterfaceIdentifier *aMlIid, uint32_t aTimeSinceLastTransaction )
此功能在“主幹網”鏈接上發送“主動主幹網通知”(PRO_BB.ntf)消息。
僅當啟用OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE
時,此功能才可用。
細節 | |||||||||
---|---|---|---|---|---|---|---|---|---|
參量 |
| ||||||||
返回值 |
|
otThreadSetChildTimeout
void otThreadSetChildTimeout( otInstance *aInstance, uint32_t aTimeout )
設置以“子級”角色操作時使用的“線程子級超時”。
細節 | |||||
---|---|---|---|---|---|
參量 |
|
otThreadGetChildTimeout
otThreadSetDiscoveryRequestCallback
void otThreadSetDiscoveryRequestCallback( otInstance *aInstance, otThreadDiscoveryRequestCallback aCallback, void *aContext )
此函數設置回調以接收MLE發現請求數據。
細節 | |||||||
---|---|---|---|---|---|---|---|
參量 |
|
otThreadSetDomainName
otError otThreadSetDomainName( otInstance *aInstance, const char *aDomainName )
設置線程域名。
此功能僅在Thread 1.2之後可用。僅當禁用線程協議時,此功能才能成功。
細節 | |||||
---|---|---|---|---|---|
參量 |
| ||||
返回值 |
|
otThreadGetDomainName
otThreadSetEnabled
otError otThreadSetEnabled( otInstance *aInstance, bool aEnabled )
此功能啟動線程協議操作。
調用此函數時,接口必須啟動。
細節 | |||||
---|---|---|---|---|---|
參量 |
| ||||
返回值 |
|
otThreadSetExtendedPanId
otError otThreadSetExtendedPanId( otInstance *aInstance, const otExtendedPanId *aExtendedPanId )
設置IEEE 802.15.4擴展PAN ID。
僅在禁用線程協議時才能調用此函數。成功調用此函數會使非易失性存儲器中的活動和待處理操作數據集無效。
細節 | |||||
---|---|---|---|---|---|
參量 |
| ||||
返回值 |
|
otThreadGetExtendedPanId
otThreadSetFixedDuaInterfaceIdentifier
otError otThreadSetFixedDuaInterfaceIdentifier( otInstance *aInstance, const otIp6InterfaceIdentifier *aIid )
設置/清除為線程域單播地址手動指定的接口標識符。
僅當啟用OPENTHREAD_CONFIG_DUA_ENABLE
線程1.2之後,此功能才可用。
細節 | |||||
---|---|---|---|---|---|
參量 |
| ||||
返回值 |
|
otThreadGetFixedDuaInterfaceIdentifier
otThreadSetJoinerAdvertisement
otError otThreadSetJoinerAdvertisement( otInstance *aInstance, uint32_t aOui, const uint8_t *aAdvData, uint8_t aAdvDataLength )
發現線程網絡時,此方法設置“線程連接器廣告”。
Thread Joiner Advertisement用於允許Joiner通過新提議的Joiner Advertisement TLV宣傳自己的應用程序特定信息(例如,供應商ID,產品ID,區分符等),並將此信息提供給Commissioner或Commissioner。沒有人與人互動的候選人。
細節 | |||||||||
---|---|---|---|---|---|---|---|---|---|
參量 |
| ||||||||
返回值 |
|
otThreadSetKeySequenceCounter
void otThreadSetKeySequenceCounter( otInstance *aInstance, uint32_t aKeySequenceCounter )
設置thrKeySequenceCounter。
細節 | |||||
---|---|---|---|---|---|
參量 |
|
otThreadGetKeySequenceCounter
otThreadSetKeySwitchGuardGuardTime
void otThreadSetKeySwitchGuardTime( otInstance *aInstance, uint32_t aKeySwitchGuardTime )
設置thrKeySwitchGuardTime。
細節 | |||||
---|---|---|---|---|---|
參量 |
|
otThreadGetKeySwitchGuardTime
otThreadSetLinkMode
otError otThreadSetLinkMode( otInstance *aInstance, otLinkModeConfig aConfig )
設置MLE鏈接模式配置。
細節 | |||||
---|---|---|---|---|---|
參量 |
| ||||
返回值 |
|
otThreadGetLinkMode
otThreadSetMasterKey
otError otThreadSetMasterKey( otInstance *aInstance, const otMasterKey *aKey )
設置thrMasterKey。
僅當禁用線程協議時,此功能才能成功。成功調用此函數會使非易失性存儲器中的活動和待處理操作數據集無效。
細節 | |||||||
---|---|---|---|---|---|---|---|
參量 |
| ||||||
返回值 |
|
otThreadGetMasterKey
otThreadSetMeshLocalPrefix
otError otThreadSetMeshLocalPrefix( otInstance *aInstance, const otMeshLocalPrefix *aMeshLocalPrefix )
此功能設置網格局部前綴。
僅當禁用線程協議時,此功能才能成功。成功調用此函數會使非易失性存儲器中的活動和待處理操作數據集無效。
細節 | |||||
---|---|---|---|---|---|
參量 |
| ||||
返回值 |
|
otThreadSetNetworkName
otError otThreadSetNetworkName( otInstance *aInstance, const char *aNetworkName )
設置線程網絡名稱。
僅當禁用線程協議時,此功能才能成功。成功調用此函數會使非易失性存儲器中的活動和待處理操作數據集無效。
細節 | |||||
---|---|---|---|---|---|
參量 |
| ||||
返回值 |
|
otThreadGetNetworkName
otThreadSetReceiveDiagnosticGetCallback
void otThreadSetReceiveDiagnosticGetCallback( otInstance *aInstance, otReceiveDiagnosticGetCallback aCallback, void *aCallbackContext )
此函數註冊一個回調以提供接收到的原始網絡診斷獲取響應有效負載。
細節 | |||||||
---|---|---|---|---|---|---|---|
參量 |
|
巨集
OT_JOINER_ADVDATA_MAX_LENGTH
OT_JOINER_ADVDATA_MAX_LENGTH 64
Joiner廣告的最大AdvData長度。
OT_NEIGHBOR_INFO_ITERATOR_INIT
OT_NEIGHBOR_INFO_ITERATOR_INIT 0
otNeighborInfoIterator的初始化程序。
OT_NETWORK_BASE_TLV_MAX_LENGTH
OT_NETWORK_BASE_TLV_MAX_LENGTH 254
線程基礎TLV的最大值長度。
OT_NETWORK_DATA_ITERATOR_INIT
OT_NETWORK_DATA_ITERATOR_INIT 0
otNetworkDataIterator的初始化程序。
OT_NETWORK_DIAGNOSTIC_CHILD_TABLE_ENTRY_SIZE
OT_NETWORK_DIAGNOSTIC_CHILD_TABLE_ENTRY_SIZE 3
網絡診斷子表條目的大小。
OT_NETWORK_DIAGNOSTIC_ITERATOR_INIT
OT_NETWORK_DIAGNOSTIC_ITERATOR_INIT 0
otNetworkDiagIterator的初始化程序。
OT_NETWORK_DIAGNOSTIC_TYPELIST_MAX_ENTRIES
OT_NETWORK_DIAGNOSTIC_TYPELIST_MAX_ENTRIES 19
要請求或重置的網絡診斷TLV類型的最大數量。
OT_NETWORK_MAX_ROUTER_ID
OT_NETWORK_MAX_ROUTER_ID 62
最大路由器ID。
OT_SERVER_DATA_MAX_SIZE
OT_SERVER_DATA_MAX_SIZE 248
服務器數據的最大大小(以字節為單位)。這是理論極限,實際極限要低得多。
OT_SERVICE_DATA_MAX_SIZE
OT_SERVICE_DATA_MAX_SIZE 252
服務數據的最大大小(以字節為單位)。