NLWdmClient

摘要

继承

继承自 :NSObject

属性

name
NSString *
owner
id
resultCallbackQueue
dispatch_queue_t

公共函数

NS_UNAVAILABLE()
virtual instancetype
停用从 NSObject 继承的默认初始化程序。
close:(WdmClientCompletionBlock completionHandler)
virtual void
强制释放所有资源并销毁所有引用。
flushUpdate:failure:(WdmClientCompletionBlock completionHandler, WdmClientFailureBlock failureHandler)
virtual void
开始刷写所有特征数据。
getDataSink:(long long traitInstancePtr)
init:weaveWorkQueue:appCallbackQueue:exchangeMgr:messageLayer:nlWeaveDeviceManager:(NSString *name, dispatch_queue_t weaveWorkQueue, dispatch_queue_t appCallbackQueue, nl::Weave::WeaveExchangeManager *exchangeMgr, nl::Weave::WeaveMessageLayer *messageLayer, NLWeaveDeviceManager *NS_DESIGNATED_INITIALIZER)
virtual instancetype
newDataSink:profileId:instanceId:path:(NLResourceIdentifier *nlResourceIdentifier, uint32_t profileId, uint64_t instanceId, NSString *path)
创建新数据 newDataSink。
refreshData:failure:(WdmClientCompletionBlock completionHandler, WdmClientFailureBlock failureHandler)
virtual void
开始同步所有特征数据。
removeDataSinkRef:(long long traitInstancePtr)
virtual void
setNodeId:(uint64_t nodeId)
virtual void
在 WdmClient 的特征目录中设置 Weave 节点 ID
statusReportToString:statusCode:(NSUInteger profileId, NSInteger statusCode)
virtual NSString *
toErrorString:(WEAVE_ERROR err)
virtual NSString *

属性

name

NSString * name

所有者

id owner

resultCallbackQueue

dispatch_queue_t resultCallbackQueue

公共函数

NS_UNAVAILABLE

virtual instancetype NS_UNAVAILABLE()

停用从 NSObject 继承的默认初始化程序。

关闭:

virtual void close:(
  WdmClientCompletionBlock completionHandler
)

强制释放所有资源并销毁所有引用。

调用后将无法恢复该 WDMClient。

flushUpdate:failure:

virtual void flushUpdate:failure:(
  WdmClientCompletionBlock completionHandler,
  WdmClientFailureBlock failureHandler
)

开始刷写所有特征数据。

您可以通过 CompletionHandler 和 failedHandler 观察此操作的结果。当操作完成时,会调用 onWdmClientFlushUpdateComplete,应用将收到 statusResultsList,如果为空,则表示成功没有失败路径,如果其中的任何内容,数组成员可以是 NLWdmClientFlushUpdateError(local client error) 或 NLWdmClientFlushUpdateDeviceStatus(如果从上述路径中清除必要的数据,可以使用远程应用状态清除应用状态当操作失败时,通常意味着操作完全无法完成(例如,通信或协议问题),系统将调用 onWdmClientError。

getDataSink:

virtual NLGenericTraitUpdatableDataSink * getDataSink:(
  long long traitInstancePtr
)

init:weaveWorkQueue:appCallbackQueue:exchangeMgr:messageLayer:nlWeaveDeviceManager:

virtual instancetype init:weaveWorkQueue:appCallbackQueue:exchangeMgr:messageLayer:nlWeaveDeviceManager:(
  NSString *name,
  dispatch_queue_t weaveWorkQueue,
  dispatch_queue_t appCallbackQueue,
  nl::Weave::WeaveExchangeManager *exchangeMgr,
  nl::Weave::WeaveMessageLayer *messageLayer,
  NLWeaveDeviceManager *NS_DESIGNATED_INITIALIZER
)

newDataSink:profileId:instanceId:path:

virtual NLGenericTraitUpdatableDataSink * newDataSink:profileId:instanceId:path:(
  NLResourceIdentifier *nlResourceIdentifier,
  uint32_t profileId,
  uint64_t instanceId,
  NSString *path
)

创建新数据 newDataSink。

具体说明
参数
nlResourceIdentifier
resource id 是 Weave 资源的全局唯一标识符
profileId
特征个人资料 ID
instanceId
特征实例 ID
path
特征路径

refreshData:failure:

virtual void refreshData:failure:(
  WdmClientCompletionBlock completionHandler,
  WdmClientFailureBlock failureHandler
)

开始同步所有特征数据。

您可以通过 CompletionHandler 和 failedHandler 观察此操作的结果

removeDataSinkRef:

virtual void removeDataSinkRef:(
  long long traitInstancePtr
)

setNodeId:

virtual void setNodeId:(
  uint64_t nodeId
)

在 WdmClient 的特征目录中设置 Weave 节点 ID

具体说明
参数
nodeId
Weave 节点 ID

statusReportToString:statusCode:

virtual NSString * statusReportToString:statusCode:(
  NSUInteger profileId,
  NSInteger statusCode
)

toErrorString:

virtual NSString * toErrorString:(
  WEAVE_ERROR err
)