Kallisto Linux API
Library for interacting with Kallisto devices
BluetoothDispatcher Class Referenceabstract

#include <bluetooth_dispatcher.hpp>

Inheritance diagram for BluetoothDispatcher:

Data Structures

class  NotificationListener
 

Public Member Functions

virtual error::KallistoDetailedResult getRssi (int &buffer)=0
 
virtual std::vector< std::string > getServices ()=0
 
virtual std::vector< std::string > getCharacteristics (std::string service_uuid)=0
 
virtual error::KallistoDetailedResult readCharacteristic (std::string service_uuid, std::string characteristic_uuid, std::vector< unsigned char > &buffer)=0
 
virtual error::KallistoDetailedResult writeCharacteristic (std::string service_uuid, std::string characteristic_uuid, std::vector< unsigned char > &buffer)=0
 
virtual error::KallistoDetailedResult enableNotification (std::string service_uuid, std::string characteristic_uuid, NotificationListener &listener)=0
 
virtual error::KallistoDetailedResult disableNotification (std::string service_uuid, std::string characteristic_uuid, NotificationListener &listener)=0
 

Protected Member Functions

 BluetoothDispatcher ()
 
virtual ~BluetoothDispatcher ()
 
 BluetoothDispatcher (BluetoothDispatcher const &)=delete
 
 BluetoothDispatcher (BluetoothDispatcher &&)=delete
 
void operator= (BluetoothDispatcher const &)=delete
 
void operator= (BluetoothDispatcher &&)=delete
 

Detailed Description

Interface given to Sensors in order to interact with the Bluetooth.

Constructor & Destructor Documentation

◆ BluetoothDispatcher() [1/2]

BluetoothDispatcher ( )
protected

Constructor

◆ ~BluetoothDispatcher()

virtual ~BluetoothDispatcher ( )
protectedvirtual

Destructor

◆ BluetoothDispatcher() [2/2]

BluetoothDispatcher ( BluetoothDispatcher const &  )
protecteddelete

Remove copy and move.

Member Function Documentation

◆ disableNotification()

virtual error::KallistoDetailedResult disableNotification ( std::string  service_uuid,
std::string  characteristic_uuid,
NotificationListener listener 
)
pure virtual

Disables notifications of the the characteristic with the passed UUID of the service with the passed UUID.

Parameters
service_uuidThe UUID of the service containing the characteristic that should have its' notifications disabled.
characteristic_uuidThe UUID of the characteristic that should have its' notifications disabled.
listenerThe listener used in enableNotification(std::string, std::string, NotificationListener) call.
Returns
A detailed result.

Implemented in BluetoothDevice.

◆ enableNotification()

virtual error::KallistoDetailedResult enableNotification ( std::string  service_uuid,
std::string  characteristic_uuid,
NotificationListener listener 
)
pure virtual

Enables notifications of the the characteristic with the passed UUID of the service with the passed UUID.

Parameters
service_uuidThe UUID of the service containing the characteristic that should have its' notifications enabled.
characteristic_uuidThe UUID of the characteristic that should have its' notifications enabled.
listenerThe listener to receive notifications.
Returns
A detailed result.

Implemented in BluetoothDevice.

◆ getCharacteristics()

virtual std::vector<std::string> getCharacteristics ( std::string  service_uuid)
pure virtual

Get the remote device BLE characteristic list of the service with the passed UUID.

Parameters
service_uuidThe UUID of the service whose characteristic should be returned.
Returns
A list of UUIDs representing the BLE characteristic of the passed service. Will be empty if the service is not found.

Implemented in KallistoImpl, and BluetoothDevice.

◆ getRssi()

virtual error::KallistoDetailedResult getRssi ( int &  buffer)
pure virtual

Get the current RSSI value.

Parameters
[out]bufferThe RSSI value..
Returns
A detailed result.

Implemented in KallistoImpl, and BluetoothDevice.

◆ getServices()

virtual std::vector<std::string> getServices ( )
pure virtual

Get the remote device BLE service list.

Returns
A vector of UUIDs representing the BLE services.

Implemented in KallistoImpl, and BluetoothDevice.

◆ readCharacteristic()

virtual error::KallistoDetailedResult readCharacteristic ( std::string  service_uuid,
std::string  characteristic_uuid,
std::vector< unsigned char > &  buffer 
)
pure virtual

Reads the characteristic with the passed UUID of the service with the passed UUID.

Parameters
[in]service_uuidThe UUID of the service containing the characteristic that should be read.
[in]characteristic_uuidThe UUID of the characteristic that should be read.
[out]bufferThe data read.
Returns
A detailed result.

Implemented in KallistoImpl, and BluetoothDevice.

◆ writeCharacteristic()

virtual error::KallistoDetailedResult writeCharacteristic ( std::string  service_uuid,
std::string  characteristic_uuid,
std::vector< unsigned char > &  buffer 
)
pure virtual

Writes the passed data to the characteristic with the passed UUID of the service with the passed UUID.

Parameters
[in]service_uuidThe UUID of the service containing the characteristic that should be written.
[in]characteristic_uuidThe UUID of the characteristic that should be written.
[in]bufferA byte buffer with the data to be written.
Returns
A detailed result.

Implemented in KallistoImpl, and BluetoothDevice.


The documentation for this class was generated from the following file: