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
這會開始清除所有 trait 資料。
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
開始同步處理所有 trait 資料。
removeDataSinkRef:(long long traitInstancePtr)
virtual void
setNodeId:(uint64_t nodeId)
virtual void
在 WdmClient 的「trait」目錄中設定 Weave 節點 ID
statusReportToString:statusCode:(NSUInteger profileId, NSInteger statusCode)
virtual NSString *
toErrorString:(WEAVE_ERROR err)
virtual NSString *

屬性

名稱

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
)

這會開始清除所有 trait 資料。

您可以透過 FinishHandler 和 failedHandler 觀察這項作業結果,當作業完成、onWdmClientFlushUpdateComplete 呼叫時,應用程式會收到 statusResultsList。如果內容空白,代表成功沒有失敗路徑,則陣列成員可能是 NLWdmClientFlushUpdateError(local client error),或者如果發生這個特定裝置路徑,則可能是 NLWdmClientFlinks當作業失敗時,通常表示作業完全無法完成,例如通訊或通訊協定問題,系統會呼叫 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
資源 ID 是 Weave 資源的全域專屬 ID
profileId
trait 設定檔 ID
instanceId
trait 執行個體 ID
path
trait 路徑

updateData:failure:

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

開始同步處理所有 trait 資料。

可以透過 COMPLETEHandler 和 failedHandler 觀察這項作業的結果

removeDataSinkRef:

virtual void removeDataSinkRef:(
  long long traitInstancePtr
)

setNodeId:

virtual void setNodeId:(
  uint64_t nodeId
)

在 WdmClient 的「trait」目錄中設定 Weave 節點 ID

詳細說明
參數
nodeId
Weave 節點 ID

statusReportToString:statusCode:

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

toErrorString:

virtual NSString * toErrorString:(
  WEAVE_ERROR err
)