Contrib-Packages
This section describes all contrib packages.
For balderhub-battery
- class balderhub.ant.contrib.battery.setup_features.DeviceActivityFeature(**kwargs)
Bases:
DeviceActivityFeatureSetup Level implementation for returning the activity of an ANT device by checking if it sends messages
- cleanup() None
Cleans up the environment to be able to run the
DeviceActivityFeature.is_active()method.Note
This method will not be called before EVERY
is_activecall, but when using this feature you need to make sure that theDeviceActivityFeature.is_active()call is within theprepare()andcleanupcall.
- is_active() bool
- Returns:
returns True if the device is active, False otherwise
- prepare() None
Prepares the environment to be able to run the
DeviceActivityFeature.is_active()method.Note
This method will not be called before EVERY
is_activecall, but when using this feature you need to make sure that theDeviceActivityFeature.is_active()call is within theprepare()andcleanupcall.
- property time_to_wait_for_new_msg_sec
- Returns:
returns the time in seconds, the feature should wait for a new ant broadcast message
- class balderhub.ant.contrib.battery.setup_features.BatteryLevelReader(**kwargs)
Bases:
BatteryLevelReaderSetup Level implementation for reading the battery level over ANT
- property initial_wait_sec
- Returns:
returns time in seconds to wait for the device to have done the measurement
- read_current_battery_level() float | None
reads the current battery level (return None if the device is powered off)
For balderhub-heart
- class balderhub.ant.contrib.heart.setup_features.BpmValueReaderFeature(**kwargs)
Bases:
BpmValueReaderFeatureSetup Level feature implementation of the
balderhub.heart.lib.scenario_features.BpmValueReaderFeaturewhile reading the values over ANT- 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 time_to_wait_for_new_msg_sec: float
- Returns:
returns the time in seconds, the feature should wait for a new ant broadcast message
- class balderhub.ant.contrib.heart.setup_features.RRValueReaderFeature(**kwargs)
Bases:
RRValueReaderFeatureSetup Level feature implementation of the
balderhub.heart.lib.scenario_features.RRValueReaderFeaturewhile reading the values over ANT- cleanup()
method to clean up the resources used by the feature
- prepare()
method that prepares the feature
- read_last_rr_value_in_sec() float | None
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 time_to_wait_for_new_msg_sec: float
- Returns:
returns the time in seconds, the feature should wait for a new ant broadcast message
- wait_for_next_rr_value_in_sec() float | None
Waits until the next RR-Value is available
- Returns:
the rr-value time in seconds or None if measurement was not possible this time