public protocol TKMBleLockCommunicator
The BLE (Bluetooth Low Energy) lock communicator provides means to communicate with Tapkey locks via BLE. It can be used to send commands to locks.
TKMServiceFactory to retrieve an instance of BleLockCommunicator.
Executes a command on the specified lock. This method takes a command function that uses the
TKMCommandExecutionFacadeand executes it on the Tapkey lock with the specified Bluetooth address. To ensure that the device at the specified Bluetooth address is the intended Tapkey lock, the lock’s physical lock ID can be passed and will be validated before executing the command. In case verification fails, the returned Promise will resolve to null. Verifying the lock’s ID does not impose a runtime penalty.
the Bluetooth address of the lock to execute the command on.
an optional parameter to verify that the device at bluetoothAddress is a Tapkey lock with the given physical lock ID. Set to null if verification is not required.
the command to execute on the lock. Usually implemented using
a cancellation token to be used for cancellation. The token should be forwarded to
a Promise that resolves to the command’s result, or null if a physical lock ID was passed and verification failed.