public interface BleLockCommunicator
TapkeyServiceFactoryto retrieve an instance of BleLockCommunicator.
|Modifier and Type||Method and Description|
Executes a command on the specified lock.
<TOut> Promise<TOut> executeCommandAsync(String bluetoothAddress, String physicalLockId, Func1<TlcpConnection,Promise<TOut>,RuntimeException> commandFunc, CancellationToken cancellationToken)
CommandExecutionFacadeand 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.
TOut- the command result's type.
bluetoothAddress- the Bluetooth address of the lock to execute the command on.
physicalLockId- 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.
commandFunc- the command to execute on the lock. Usually implemented using
cancellationToken- a cancellation token to be used for cancellation. The token should be forwarded to