Contrib-Packages
This section describes all contrib packages.
For balderhub-battery
- class balderhub.ble.contrib.battery.setup_features.BatteryLevelReader(**kwargs)
Bases:
BatteryLevelReaderSetup Level implementation over BLE for reading the battery level
- class DUT
Bases:
VDevicevdevice 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:
DeviceActivityFeatureSetup Level implementation for returning the activity of an ANT device by checking if it sends messages
- class DUT
Bases:
VDevicevdevice 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:
BpmValueReaderFeatureSetup Level feature implementation of the
balderhub.heart.lib.scenario_features.BpmValueReaderFeaturewhile reading the values over BLE- class DUT
Bases:
VDevicedevice 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:
RRValueReaderFeatureSetup Level feature implementation of the
balderhub.heart.lib.scenario_features.RRValueReaderFeaturewhile reading the values over BLE- class DUT
Bases:
VDevicedevice 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