服务器
此模块包含使用 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
资源
OpenThread API 参考主题源自源代码,可在 GitHub 上找到。 如需了解详情或为我们的文档做贡献,请参阅资源。