服务器
此模块包含使用 OpenThread Server 管理本地网络数据的功能。
摘要
函数 |
|
---|---|
otServerAddService(otInstance *aInstance, const otServiceConfig *aConfig)
|
向本地网络数据添加服务配置。
|
otServerGetNetDataLocal(otInstance *aInstance, bool aStable, uint8_t *aData, uint8_t *aDataLength)
|
提供本地 Thread 网络数据的完整或稳定副本。
|
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
)
提供本地 Thread 网络数据的完整或稳定副本。
具体说明 | |||||||||
---|---|---|---|---|---|---|---|---|---|
参数 |
|
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 上提供的源代码。如需了解详情,或者为我们的文档做贡献,请参阅资源。