Kallisto Linux API
Library for interacting with Kallisto devices
KallistoManager Class Reference

Public Member Functions

std::vector< hardware::Kallisto * > getKallistos ()
 
hardware::KallistogetKallisto (std::string address)
 
error::KallistoDetailedResult registerListener (hardware::KallistoEventListener &listener, hardware::Kallisto &kallisto)
 
error::KallistoDetailedResult unregisterListener (hardware::KallistoEventListener &listener, hardware::Kallisto &kallisto)
 
error::KallistoDetailedResult unregisterListener (hardware::KallistoEventListener &listener)
 
error::KallistoDetailedResult stayConnected (hardware::Kallisto &kallisto, bool enable)
 
error::KallistoDetailedResult createBond (hardware::Kallisto &kallisto)
 
error::KallistoDetailedResult removeBond (hardware::Kallisto &kallisto)
 
bool getBond (hardware::Kallisto &kallisto)
 
error::KallistoDetailedResult startDfu (hardware::Kallisto &kallisto, std::string file_path, void *listener)
 
error::KallistoDetailedResult abortDfu (hardware::Kallisto &kallisto)
 

Friends

class KallistoCore
 

Member Function Documentation

◆ abortDfu()

Aborts the current DFU procedure of the passed Kallisto. TODO: To be implemented.

Parameters
kallistoThe Kallisto to abort firmware update.
Returns
A detailed result.

◆ createBond()

Creates a BLE bond with the passed Kallisto. TODO: To be implemented.

Parameters
kallistoThe Kallisto to create bond with.
Returns
A detailed result.

◆ getBond()

bool getBond ( hardware::Kallisto kallisto)

Checks if the system has a bond with the passed Kallisto. TODO: To be implemented.

Parameters
kallistoThe Kallisto to check bond.
Returns
True if bonded.

◆ getKallisto()

hardware::Kallisto* getKallisto ( std::string  address)

Use this method to get the Kallisto with the passed address.

Note
The pointers are only safe to store while the Kallisto that contains it is available.
Parameters
addressThe address of the desired Kallisto.
Returns
The desired Kallisto or nullptr if not found

◆ getKallistos()

std::vector<hardware::Kallisto*> getKallistos ( )

Use this method to get the list of available Kallistos.

Note
The pointers are only safe to store while the Kallisto that contains it is available.
Returns
A list with all the Kallistos available.

◆ registerListener()

error::KallistoDetailedResult registerListener ( hardware::KallistoEventListener listener,
hardware::Kallisto kallisto 
)

Registers a listener for the passed Kallisto.

Parameters
listenerA listener to receive Kallisto events.
kallistoThe Kallisto to register to.
Returns
A detailed result.

◆ removeBond()

Removes the BLE bond from the passed Kallisto. TODO: To be implemented.

Parameters
kallistoThe Kallisto to remove bond from.
Returns
A detailed result.

◆ startDfu()

error::KallistoDetailedResult startDfu ( hardware::Kallisto kallisto,
std::string  file_path,
void *  listener 
)

Starts a device firmware update procedure with the passed Kallisto. TODO: To be implemented.

Parameters
kallistoThe Kallisto to update the firmware.
file_pathThe firmware package path.
listenerA listener to get DFU events. To be defined.
Returns
A detailed result.

◆ stayConnected()

error::KallistoDetailedResult stayConnected ( hardware::Kallisto kallisto,
bool  enable 
)

Signals that the system should keep a connection to the passed Kallisto even when not in use. Use the enable param to control this behaviour.

Parameters
kallistoThe Kallisto to stay connected with.
enableIf true, the system will maintain a connection to the device even when not in use. If the device is not connected it will connect right away.
Returns
A detailed result.

◆ unregisterListener() [1/2]

error::KallistoDetailedResult unregisterListener ( hardware::KallistoEventListener listener,
hardware::Kallisto kallisto 
)

Unregisters the listener for the passed Kallisto.

Parameters
listenerA listener to receive Kallisto events.
kallistoThe Kallisto to register to.
Returns
A detailed result.

◆ unregisterListener() [2/2]

Unregisters the listener for all Kallistos.

Parameters
listenerThe listener used in KallistoManager#registerListener(KallistoEventListener, Kallisto) call.
Returns
A detailed result.

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