Configuration

The Device object offers a range of methods that allow you to customize your interaction with your devices. These methods provide the capability to adjust parameters and issue specific commands to your device, enabling you to tailor its behavior to your specific requirements.

Here are a couple of examples:

Python
Android
Apple Platforms
Flutter
# Sets the time on the device.
async def set_time(timestamp: float)

# Set ECG filtration method.
#
# This method provides you the flexibility to adjust the electrocardiogram (ECG) filtration to
# your specific needs. Depending on your specific use case, you might prefer a more aggressive
# filtration to reduce noise or a normal filtration to retain more details in the signal.
def set_ecg_filtration_method(method: str)

# Send commands to the device (e.g. to change LED brightness).
def send(command: str)
/// Set ECG filtration method.
///
/// This method provides you the flexibility to adjust the electrocardiogram (ECG) filtration to
/// your specific needs. Depending on your specific use case, you might prefer a more aggressive
/// filtration to reduce noise or a normal filtration to retain more details in the signal.
fun setECGFiltrationMethod(ecgFiltrationMethod: ECGFiltrationMethod)

/// Send commands to the device (e.g. to change LED brightness).
fun send(command: String)
/// Set ECG filtration method.
///
/// This method provides you the flexibility to adjust the electrocardiogram (ECG) filtration to
/// your specific needs. Depending on your specific use case, you might prefer a more aggressive
/// filtration to reduce noise or a normal filtration to retain more details in the signal.
func setECGFiltrationMethod(_ ecgFiltrationMethod: ECGFiltrationMethod)

/// Send commands to the device (e.g. to change LED brightness).
public func send(_ message: String)
/// Set ECG filtration method.
///
/// This method provides you the flexibility to adjust the electrocardiogram (ECG) filtration to
/// your specific needs. Depending on your specific use case, you might prefer a more aggressive
/// filtration to reduce noise or a normal filtration to retain more details in the signal.
void setECGFiltrationMethod(ECGFiltrationMethod ecgFiltrationMethod)

/// Send commands to the device (e.g. to change LED brightness).
void send(String command)

Sending Commands

The send method gives you a direct communication line with your device. With this, you can issue commands to adjust parameters such as the LED brightness or configuring sampling rates. This could be particularly useful in different light conditions or to save battery life when needed.

However, it's important to note that sending commands while device is in the syncing process is not permitted. This restriction is in place to prevent potential conflicts between sending commands and receiving data. Thus, to ensure the smooth operation of your device, it's recommended to manage your configuration changes carefully, and avoid sending commands while the device is syncing data.

Processes


set

This process is responsible for setting specific parameters on the device.

Available commands:

  • set date - sets the date on the device, format DD:MM:YYYY
  • set time - sets the time on the device, format HH:mm:ss
  • set led_brght - sets the LED brightness on the device, range [1-16]
  • set ecg_debug - sets the debug mode for the ECG on the device, values 1/0
  • set ecg_fs 250 - the ECG sampling rate on the device. Available values: 250, 500, 1000. Default is 250. Important note: Changing the sampling rate directly on the device will make it incompatible with the Aidlab and Aidmed Health applications.

memtest

This process checks the status of the flash memory on the Aidlab device.

Available commands:

  • memtest - runs the memory test

ping

This process checks the connection with the Aidlab. It returns the value Pong.

Available commands:

  • ping - checks the device connection

log

This process sends real-time status log of the Aidlab to the receiving device.

Available commands:

  • log - prints the log

sync

This process retrieves previously saved data from the flash memory and sends it to the receiving device.

Available commands:

  • sync start - starts the synchronization process (if there is data to be sent)
  • sync stop - stops the synchronization process (if it is running)
  • sync count - returns the amount of data to be synchronized (in Kb)
  • sync clear - clears the data from the flash memory

dump

This process retrieves logs from the flash memory and sends them to the receiving device via Bluetooth. It allows you to understand what was happening on the Aidlab device at a given time.

Available commands:

  • dump start - starts the log sending process
  • dump stop - stops the log sending process
  • dump clear - completely clears the logs from the flash memory

results matching ""

    No results matching ""