ActuatorProvider

public interface ActuatorProvider

Interface to provide KallistoActuators to the system.

A developer can provide their own actuators to the system implementing this interface and passing it using KallistoActuatorManager.getInstance(Context,BleDeviceManagerConfiguration,LoggerConfiguration,ScannerConfiguration,ScannerFilter,List).

Methods

provide

List<KallistoActuator> provide(Kallisto kallisto, ScanRecord scanRecord, BleDispatcher bleDispatcher)

Should provide a list of actuators, if they are present in the Kallisto device.

The parameter ScanRecord should be used to check if a Kallisto device contains a given actuator so a custom device should advertise which actuators are available.

If ScannerConfiguration.getLegacyDiscovery() is disabled, all BLE operations requested to the bleDispatcher will fail and the calls BleDispatcher.getServices() and BleDispatcher.getCharacteristics(UUID) will report empty data.

If ScannerConfiguration.getLegacyDiscovery() is enabled, BLE operations can used to identify the available actuators by using their UUID, for example.

Parameters
  • kallisto – The Kallisto device under discovery.

  • scanRecord – The advertising data of the device. Can be null if no scan record is available.

  • bleDispatcher – Interface to perform BLE operations. Should be saved to allow interaction with the remote device.

Returns

A list of actuators available in the Kallisto device