伺服器
這個模組包含的函式可使用 OpenThread 伺服器管理本機網路資料。
摘要
函式 |
|
---|---|
otServerAddService(otInstance *aInstance, const otServiceConfig *aConfig)
|
將服務設定新增至區域網路資料。
|
otServerGetNetDataLocal(otInstance *aInstance, bool aStable, uint8_t *aData, uint8_t *aDataLength)
|
這個方法可提供本機執行緒網路資料的完整或穩定版副本。
|
otServerGetNextService(otInstance *aInstance, otNetworkDataIterator *aIterator, otServiceConfig *aConfig)
|
這個函式會取得區域網路資料中的下一個服務。
|
otServerRegister(otInstance *aInstance)
|
立即向領導人註冊區域網路資料。
|
otServerRemoveService(otInstance *aInstance, uint32_t aEnterpriseNumber, const uint8_t *aServiceData, uint8_t aServiceDataLength)
|
移除區域網路資料的服務設定。
|
函式
otServerAddService
otError otServerAddService( otInstance *aInstance, const otServiceConfig *aConfig )
將服務設定新增至區域網路資料。
說明 | |||||||
---|---|---|---|---|---|---|---|
參數 |
|
||||||
傳回值 |
|
otServerRemoveService
otServerRegister
otServerGetNetDataLocal
otError otServerGetNetDataLocal( otInstance *aInstance, bool aStable, uint8_t *aData, uint8_t *aDataLength )
這個方法可提供本機執行緒網路資料的完整或穩定版副本。
說明 | |||||||||
---|---|---|---|---|---|---|---|---|---|
參數 |
|
otServerGetNextService
otError otServerGetNextService( otInstance *aInstance, otNetworkDataIterator *aIterator, otServiceConfig *aConfig )
這個函式會取得區域網路資料中的下一個服務。
說明 | |||||||
---|---|---|---|---|---|---|---|
參數 |
|
||||||
傳回值 |
|
otServerRegister
otError otServerRegister( otInstance *aInstance )
立即向領導人註冊區域網路資料。
說明 | |||
---|---|---|---|
參數 |
|
||
傳回值 |
|
otServerAddService
otServerRemoveService
otServerRemoveService
otError otServerRemoveService( otInstance *aInstance, uint32_t aEnterpriseNumber, const uint8_t *aServiceData, uint8_t aServiceDataLength )
移除區域網路資料的服務設定。
說明 | |||||||||
---|---|---|---|---|---|---|---|---|---|
參數 |
|
||||||||
傳回值 |
|
otServerAddService
otServerRegister