Interface PolarDerivedMeasurementApi
-
- All Implemented Interfaces:
public interface PolarDerivedMeasurementApiDerived measurement API.
Derived measurements compute statistical summaries (e.g. min, max, std) over a configurable time window of raw sensor data and store one result per window.
-
-
Method Summary
Modifier and Type Method Description abstract Set<Integer>requestDerivedMeasurementGroupIds(String identifier, PolarBleApi.PolarDeviceDataType sourceType)Query which Derived Measurement Settings Group IDs are supported for the given source type. abstract PolarDerivedMeasurementSettingsGrouprequestDerivedMeasurementSettingsGroup(String identifier, Integer groupId)Request the full contents of one Derived Measurement Settings Group from the device. abstract UnitstartDerivedOfflineRecording(String identifier, PolarDerivedMeasurementSettings settings, PolarRecordingSecret secret)Start a derived offline recording on the device. abstract UnitstopDerivedOfflineRecording(String identifier)Stop the active derived offline recording on the device. -
-
Method Detail
-
requestDerivedMeasurementGroupIds
abstract Set<Integer> requestDerivedMeasurementGroupIds(String identifier, PolarBleApi.PolarDeviceDataType sourceType)
Query which Derived Measurement Settings Group IDs are supported for the given source type.
Call this before requestDerivedMeasurementSettingsGroup to discover which group IDs the device advertises for a source type (e.g. ACC).
- Parameters:
identifier- Polar device id found printed on the sensor/device or bt addresssourceType- the source measurement type to query (typically PolarDeviceDataType.ACC)- Returns:
set of Derived Measurement Settings Group IDs advertised by the device for this source type
-
requestDerivedMeasurementSettingsGroup
abstract PolarDerivedMeasurementSettingsGroup requestDerivedMeasurementSettingsGroup(String identifier, Integer groupId)
Request the full contents of one Derived Measurement Settings Group from the device.
Use this before starting a derived recording to discover which source types, sample rates, time windows, and computation methods are supported by a group.
Typical flow:
Call requestDerivedMeasurementGroupIds for the source type to get available group IDs.
Call this function for each group ID of interest.
Present PolarDerivedMeasurementSettingsGroup.supportedMethods to the user for selection.
Build PolarDerivedMeasurementSettings from the user's choices.
- Parameters:
identifier- Polar device id found printed on the sensor/device or bt addressgroupId- the Derived Measurement Settings Group ID to query- Returns:
PolarDerivedMeasurementSettingsGroup describing the available options for this group
-
startDerivedOfflineRecording
abstract Unit startDerivedOfflineRecording(String identifier, PolarDerivedMeasurementSettings settings, PolarRecordingSecret secret)
Start a derived offline recording on the device.
The device computes the selected derived methods over each PolarDerivedMeasurementSettings.timeWindowMs time window of source data and stores one derived sample per window. Fetch results with PolarOfflineRecordingApi.getOfflineRecord.
- Parameters:
identifier- Polar device id found printed on the sensor/device or bt addresssettings- the derived measurement settings including the chosen preset modesecret- optional encryption secret; if provided, the recording is encrypted on device
-
stopDerivedOfflineRecording
abstract Unit stopDerivedOfflineRecording(String identifier)
Stop the active derived offline recording on the device.
- Parameters:
identifier- Polar device id found printed on the sensor/device or bt address
-
-
-
-