Contrib-Packages

This section describes all contrib packages.

For balderhub-battery

class balderhub.ble.contrib.battery.setup_features.BatteryLevelReader(**kwargs)

Bases: BatteryLevelReader

Setup Level implementation over BLE for reading the battery level

class DUT

Bases: VDevice

vdevice representing the device under test that implements the GattBatteryServiceFeature

read_current_battery_level() float | None

reads the current battery level (return None if the device is powered off)

class balderhub.ble.contrib.battery.setup_features.DeviceActivityFeature(**kwargs)

Bases: DeviceActivityFeature

Setup Level implementation for returning the activity of an ANT device by checking if it sends messages

class DUT

Bases: VDevice

vdevice describing the device under test

is_active() bool
Returns:

returns True if the device is active, False otherwise

property timeout_to_wait_for_advertisements_sec: float
Returns:

timeout to use to wait for advertisements

For balderhub-heart

class balderhub.ble.contrib.heart.setup_features.BpmValueReaderFeature(**kwargs)

Bases: BpmValueReaderFeature

Setup Level feature implementation of the balderhub.heart.lib.scenario_features.BpmValueReaderFeature while reading the values over BLE

class DUT

Bases: VDevice

device under test specifying the HRM profile

cleanup()

method to clean up the resources used by the feature

prepare()

method that prepares the feature

read_last_bpm_value()

reads the RR-Value from the DUT once

property timeout_to_wait_for_new_message

Maximum time to wait for a new BLE message

class balderhub.ble.contrib.heart.setup_features.RRValueReaderFeature(**kwargs)

Bases: RRValueReaderFeature

Setup Level feature implementation of the balderhub.heart.lib.scenario_features.RRValueReaderFeature while reading the values over BLE

class DUT

Bases: VDevice

device under test specifying the HRM profile

cleanup()

method to clean up the resources used by the feature

prepare()

method that prepares the feature

read_last_rr_value_in_sec() float

reads the RR-Value from the DUT once

Returns:

the rr-value time in seconds or None if measurement was not possible this time

property timeout_to_wait_for_new_rr_value_sec

maximum time to wait for a RR value