服務器
該模塊包括使用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