NLWdmClient

Summary

Inheritance

Inherits from: NSObject

Properties

name
NSString *
owner
id
resultCallbackQueue
dispatch_queue_t

Public functions

NS_UNAVAILABLE()
virtual instancetype
Disable default initializer inherited from NSObject.
close:(WdmClientCompletionBlock completionHandler)
virtual void
Forcefully release all resources and destroy all references.
flushUpdate:failure:(WdmClientCompletionBlock completionHandler, WdmClientFailureBlock failureHandler)
virtual void
Begins a flush of all trait data.
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)
Create the new data newDataSink.
refreshData:failure:(WdmClientCompletionBlock completionHandler, WdmClientFailureBlock failureHandler)
virtual void
Begins a sync of all trait data.
removeDataSinkRef:(long long traitInstancePtr)
virtual void
setNodeId:(uint64_t nodeId)
virtual void
set Weave node ID in trait catalog in WdmClient
statusReportToString:statusCode:(NSUInteger profileId, NSInteger statusCode)
virtual NSString *
toErrorString:(WEAVE_ERROR err)
virtual NSString *

Properties

name

NSString * name

owner

id owner

resultCallbackQueue

dispatch_queue_t resultCallbackQueue

Public functions

NS_UNAVAILABLE

virtual instancetype NS_UNAVAILABLE()

Disable default initializer inherited from NSObject.

close:

virtual void close:(
  WdmClientCompletionBlock completionHandler
)

Forcefully release all resources and destroy all references.

There is no way to revive this WDMClient after this call.

flushUpdate:failure:

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

Begins a flush of all trait data.

The result of this operation can be observed through the CompletionHandler and failureHandler, when operation completes, onWdmClientFlushUpdateComplete is called, application would receive statusResultsList, if it is empty, it means success without failed path, if anything inside, the array member could be NLWdmClientFlushUpdateError(local client error) or NLWdmClientFlushUpdateDeviceStatus(remote device status), application can use the path and dataSink from the above member to clear particular data or skip the error if necessary. When operation fails, it usually means the operation cannot complete at all, for example communication or protocol issue, onWdmClientError would be called.

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
)

Create the new data newDataSink.

Details
Parameters
nlResourceIdentifier
resource id is a globally-unique identifier for a Weave resource
profileId
trait profile id
instanceId
trait instance id
path
trait path

refreshData:failure:

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

Begins a sync of all trait data.

The result of this operation can be observed through the CompletionHandler and failureHandler

removeDataSinkRef:

virtual void removeDataSinkRef:(
  long long traitInstancePtr
)

setNodeId:

virtual void setNodeId:(
  uint64_t nodeId
)

set Weave node ID in trait catalog in WdmClient

Details
Parameters
nodeId
Weave node ID

statusReportToString:statusCode:

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

toErrorString:

virtual NSString * toErrorString:(
  WEAVE_ERROR err
)