#import <WTLDeviceController.h>
Definition at line 34 of file WTLDeviceController.h.
◆ API_AVAILABLE
- (NSNumber *controllerNodeID) API_AVAILABLE |
|
(macos(13.3)) |
|
|
|
(watchos(9.4)) |
|
|
|
(tvos(16.4)) |
|
|
|
| |
Return the Node ID assigned to the controller. Will return nil if the controller is not running (and hence does not know its node id).
◆ attestationChallengeForDeviceID:
- (NSData *_Nullable) attestationChallengeForDeviceID: |
|
(macos(13.3)) |
|
|
|
(watchos(9.4)) |
|
|
|
(tvos(16.4)) |
API_AVAILABLE |
|
|
| |
Return the attestation challenge for the secure session of the device being commissioned.
Attempts to retrieve the attestation challenge for a commissionee with the given Device ID. Returns nil if given Device ID does not match an active commissionee, or if a Secure Session is not availale.
◆ cancelCommissioningForNodeID:error:
- (BOOL) cancelCommissioningForNodeID: |
|
(NSNumber *) |
nodeID |
error: |
|
(macos(13.3)) |
|
|
|
(watchos(9.4)) |
|
|
|
(tvos(16.4)) |
API_AVAILABLE |
|
|
| |
Cancel commissioning for the given node id. This will shut down any existing commissioning session for that node id.
◆ cleanSession
◆ commissionDevice:commissioningParams:error:
◆ commissionNodeWithID:commissioningParams:error:
- (BOOL) commissionNodeWithID: |
|
(NSNumber *) |
nodeID |
commissioningParams: |
|
(WTLCommissioningParameters *) |
commissioningParams |
error: |
|
(macos(13.3)) |
|
|
|
(watchos(9.4)) |
|
|
|
(tvos(16.4)) |
API_AVAILABLE |
|
|
| |
Commission the node with the given node ID. The node ID must match the node ID that was used to set up the commissioning session.
◆ computePaseVerifier:iterations:salt:
◆ computePASEVerifierForSetupPasscode:iterations:salt:error:
+ (nullable NSData *) computePASEVerifierForSetupPasscode: |
|
(NSNumber *) |
setupPasscode |
iterations: |
|
(NSNumber *) |
iterations |
salt: |
|
(NSData *) |
salt |
error: |
|
(macos(13.3)) |
|
|
|
(watchos(9.4)) |
|
|
|
(tvos(16.4)) |
API_AVAILABLE |
|
|
| |
Compute a PASE verifier for the desired setup passcode.
- Parameters
-
[in] | setupPasscode | The desired passcode to use. |
[in] | iterations | The number of iterations to use when generating the verifier. |
[in] | salt | The 16-byte salt for verifier computation. |
Returns nil on errors (e.g. salt has the wrong size), otherwise the computed verifier bytes.
◆ continueCommissioningDevice:ignoreAttestationFailure:error:
- (BOOL) continueCommissioningDevice: |
|
(void *) |
opaqueDeviceHandle |
ignoreAttestationFailure: |
|
(BOOL) |
ignoreAttestationFailure |
error: |
|
(NSError *__autoreleasing *) |
error |
|
|
| |
Call this method after WTLDeviceAttestationDelegate deviceAttestationFailedForController:opaqueDeviceHandle:error: or deviceAttestationCompletedForController:opaqueDeviceHandle:attestationDeviceInfo:error: is called to continue commissioning the device.
◆ decodeXPCReadParams:
+ (WTLReadParams *_Nullable) decodeXPCReadParams: |
|
(NSDictionary< NSString *, id > *_Nullable) |
params |
|
Returns a deserialized read parameter object from an object received over XPC
Provided by category WTLDeviceController(XPC).
◆ decodeXPCResponseValues:
+ (NSArray< NSDictionary< NSString *, id > * > *_Nullable) decodeXPCResponseValues: |
|
(NSArray< NSDictionary< NSString *, id > * > *_Nullable) |
values |
|
Returns a decoded values object from a values object received from XPC for read, write and command interactions
Provided by category WTLDeviceController(XPC).
◆ decodeXPCSubscribeParams:
+ (WTLSubscribeParams *_Nullable) decodeXPCSubscribeParams: |
|
(NSDictionary< NSString *, id > *_Nullable) |
params |
|
Returns a deserialized subscribe parameter object from an object received over XPC
Provided by category WTLDeviceController(XPC).
◆ deviceBeingCommissionedWithNodeID:error:
- (nullable WTLBaseDevice *) deviceBeingCommissionedWithNodeID: |
|
(NSNumber *) |
nodeID |
error: |
|
(macos(13.3)) |
|
|
|
(watchos(9.4)) |
|
|
|
(tvos(16.4)) |
API_AVAILABLE |
|
|
| |
Get an WTLBaseDevice for a commissioning session that was set up for the given node ID. Returns nil if no such commissioning session is available.
◆ encodeXPCReadParams:
+ (NSDictionary< NSString *, id > *_Nullable) encodeXPCReadParams: |
|
(WTLReadParams *) |
params |
|
◆ encodeXPCResponseValues:
+ (NSArray< NSDictionary< NSString *, id > * > *_Nullable) encodeXPCResponseValues: |
|
(NSArray< NSDictionary< NSString *, id > * > *_Nullable) |
values |
|
Returns an encoded values object to send over XPC for read, write and command interactions
Provided by category WTLDeviceController(XPC).
◆ encodeXPCSubscribeParams:
+ (NSDictionary< NSString *, id > *_Nullable) encodeXPCSubscribeParams: |
|
(WTLSubscribeParams *_Nullable) |
params |
|
◆ fetchAttestationChallengeForDeviceId:
- (nullable NSData *) fetchAttestationChallengeForDeviceId: |
|
("Please use attestationChallengeForDeviceID") |
|
|
|
(macos(13.0, 13.3)) |
|
|
|
(watchos(9.1, 9.4)) |
|
|
|
(tvos(16.1, 16.4)) |
WTL_DEPRECATED |
|
|
| |
◆ getBaseDevice:queue:completionHandler:
- (BOOL) getBaseDevice: |
|
(uint64_t) |
deviceID |
queue: |
|
(dispatch_queue_t) |
queue |
completionHandler: |
|
("Please use ") |
[WTLBaseDevice deviceWithNodeID:controller:] |
|
|
(macos(13.0, 13.3)) |
|
|
|
(watchos(9.1, 9.4)) |
|
|
|
(tvos(16.1, 16.4)) |
WTL_DEPRECATED |
|
|
| |
◆ getCompressedFabricId
- (uint64_t) getCompressedFabricId |
|
|
|
◆ getDeviceBeingCommissioned:error:
◆ getFabricIndex
- (uint64_t) getFabricIndex |
|
|
|
◆ getPeerAddressAndPort:
- (nullable NSString *) getPeerAddressAndPort: |
|
(uint64_t) |
deviceId |
|
◆ isDeviceSessionExistWithNodeId:
- (BOOL) isDeviceSessionExistWithNodeId: |
|
(NSNumber *) |
nodeID |
|
◆ NS_UNAVAILABLE [1/2]
- (instancetype) NS_UNAVAILABLE |
|
|
|
Controllers are created via the WTLDeviceControllerFactory object.
◆ NS_UNAVAILABLE [2/2]
+ (instancetype) NS_UNAVAILABLE |
|
|
|
◆ openPairingWindow:duration:error:
- (BOOL) openPairingWindow: |
|
(uint64_t) |
deviceID |
duration: |
|
(NSUInteger) |
duration |
error: |
|
("Please use WTLDevice or WTLBaseDevice openCommissioningWindowWithSetupPasscode") |
|
|
|
(macos(13.0, 13.3)) |
|
|
|
(watchos(9.1, 9.4)) |
|
|
|
(tvos(16.1, 16.4)) |
WTL_DEPRECATED |
|
|
| |
◆ openPairingWindowWithPIN:duration:discriminator:setupPIN:error:
- (nullable NSString *) openPairingWindowWithPIN: |
|
(uint64_t) |
deviceID |
duration: |
|
(NSUInteger) |
duration |
discriminator: |
|
(NSUInteger) |
discriminator |
setupPIN: |
|
(NSUInteger) |
setupPIN |
error: |
|
("Please use WTLDevice or WTLBaseDevice openCommissioningWindowWithSetupPasscode") |
|
|
|
(macos(13.0, 13.3)) |
|
|
|
(watchos(9.1, 9.4)) |
|
|
|
(tvos(16.1, 16.4)) |
WTL_DEPRECATED |
|
|
| |
◆ pairDevice:address:port:setupPINCode:error:
◆ pairDevice:discriminator:setupPINCode:error:
◆ pairDevice:onboardingPayload:error:
◆ setDeviceControllerDelegate:queue:
- (void) setDeviceControllerDelegate: |
|
(id< WTLDeviceControllerDelegate >) |
delegate |
queue: |
|
(macos(13.3)) |
|
|
|
(watchos(9.4)) |
|
|
|
(tvos(16.4)) |
API_AVAILABLE |
|
|
| |
Set the Delegate for the device controller as well as the Queue on which the Delegate callbacks will be triggered
- Parameters
-
[in] | delegate | The delegate the commissioning process should use |
[in] | queue | The queue on which the callbacks will be delivered |
◆ setNocChainIssuer:queue:
◆ setPairingDelegate:queue:
- (void) setPairingDelegate: |
|
(id< WTLDevicePairingDelegate >) |
delegate |
queue: |
|
("Please use setDeviceControllerDelegate:") |
|
|
|
(macos(13.0, 13.3)) |
|
|
|
(watchos(9.1, 9.4)) |
|
|
|
(tvos(16.1, 16.4)) |
WTL_DEPRECATED |
|
|
| |
◆ setupCommissioningSessionWithPayload:newNodeID:error:
- (BOOL) setupCommissioningSessionWithPayload: |
|
(WTLSetupPayload *) |
payload |
newNodeID: |
|
(NSNumber *) |
newNodeID |
error: |
|
(macos(13.1)) |
|
|
|
(watchos(9.2)) |
|
|
|
(tvos(16.2)) |
API_AVAILABLE |
|
|
| |
Set up a commissioning session for a device, using the provided setup payload to discover it and connect to it.
- Parameters
-
payload | a setup payload (probably created from a QR code or numeric code onboarding payload). |
newNodeID | the planned node id for the node. @error error indication if discovery can't start at all (e.g. because the setup payload is invalid). |
The IP and port for the device will be discovered automatically based on the provided discriminator.
Then a PASE session will be established with the device, unless an error occurs. WTLDeviceControllerDelegate will be notified as follows:
- Discovery fails: onStatusUpdate with WTLCommissioningStatusFailed.
- Discovery succeeds but commissioning session setup fails: onPairingComplete with an error.
- Commissioning session setup succeeds: onPairingComplete with no error.
Once a commissioning session is set up, getDeviceBeingCommissioned can be used to get an WTLBaseDevice and discover what sort of network credentials the device might need, and commissionDevice can be used to commission the device.
◆ setupCommissioningSessionWithPayload:newNodeID:peripheral:error:
- (BOOL) setupCommissioningSessionWithPayload: |
|
(WTLSetupPayload *) |
payload |
newNodeID: |
|
(NSNumber *) |
newNodeID |
peripheral: |
|
(void *) |
peripheral |
error: |
|
(NSError *__autoreleasing _Nullable *) |
error |
|
|
| |
◆ sharedControllerWithId:xpcConnectBlock:
◆ sharedControllerWithID:xpcConnectBlock:
+ (WTLDeviceController *) sharedControllerWithID: |
|
(id< NSCopying > _Nullable) |
controllerID |
xpcConnectBlock: |
|
(macos(13.3)) |
|
|
|
(watchos(9.4)) |
|
|
|
(tvos(16.4)) |
API_AVAILABLE |
|
|
| |
Returns a shared device controller proxy for the controller object over XPC connection.
- Parameters
-
controllerID | an implementation specific id in case multiple shared device controllers are available over XPC connection |
xpcConnectBlock | block to connect to an XPC listener serving the shared device controllers in an implementation specific way |
Provided by category WTLDeviceController(XPC).
◆ shutdown
Shut down the controller. Calls to shutdown after the first one are NO-OPs. This must be called, either directly or via shutting down the WTLDeviceControllerFactory, to avoid leaking the controller.
◆ shutdownDeviceSessionForNode:
- (BOOL) shutdownDeviceSessionForNode: |
|
(NSNumber *) |
nodeID |
|
◆ stopDevicePairing:error:
◆ tvos [1/2]
◆ tvos [2/2]
◆ updateAdminVendorID:
- (void) updateAdminVendorID: |
|
(uint16_t) |
vid |
|
◆ writeTokenAfterCase:activeToken:
- (void) writeTokenAfterCase: |
|
(long long) |
nodeID |
activeToken: |
|
(NSString *) |
token |
|
|
| |
◆ writeTokenWithNodeId:activeToken:error:
- (WTLBaseDevice *) writeTokenWithNodeId: |
|
(NSNumber *) |
nodeID |
activeToken: |
|
(NSString *) |
token |
error: |
|
(NSError *__autoreleasing *) |
error |
|
|
| |
Optionally pre-warm the controller for setting up a commissioning session. This may be called before setupCommissioningSessionWithPayload if it's known that a commissioning attempt will soon take place but the commissioning payload is not known yet.
For example this may do a BLE scan in advance so results are ready earlier once the discriminator is known.
◆ WTL_DEPRECATED
- (NSNumber *controllerNodeId) WTL_DEPRECATED |
|
("Please use controllerNodeID") |
|
|
|
(macos(13.0, 13.3)) |
|
|
|
(watchos(9.1, 9.4)) |
|
|
|
(tvos(16.1, 16.4)) |
|
|
|
| |
◆ isPairingLiteDevice
- (BOOL) isPairingLiteDevice |
|
readwritenonatomicassign |
◆ isPairingThingDevice
- (BOOL) isPairingThingDevice |
|
readwritenonatomicassign |
◆ operationalCertificateIssuer
- (id<WTLOperationalCertificateIssuer>) operationalCertificateIssuer |
|
readatomicassign |
◆ operationalCertificateIssuerQueue
- (dispatch_queue_t) operationalCertificateIssuerQueue |
|
readatomicassign |
◆ running
The documentation for this class was generated from the following file:
- /Users/humtong/Downloads/Pods_副本/ThingSmartMatterKit/Build/VendorsFramework/Water.framework/Headers/WTLDeviceController.h