Class LegacyHeartRateCompat

java.lang.Object
com.dsi.ant.plugins.internal.compatibility.LegacyHeartRateCompat
All Implemented Interfaces:
AntPlusHeartRatePcc.IHeartRateDataReceiver

public class LegacyHeartRateCompat extends Object implements AntPlusHeartRatePcc.IHeartRateDataReceiver
Provides compatibility to previous versions of the Heart Rate Plugin
  • Constructor Details

  • Method Details

    • onNewHeartRateDataTimestamp

      public void onNewHeartRateDataTimestamp(long estTimestamp, EnumSet<EventFlag> eventFlags, BigDecimal heartBeatEventTime)
      Called when legacy heartBeatTimestamp event is received. Calls up to the App with new heartRateData
    • onNewHeartRateData

      public void onNewHeartRateData(long estTimestamp, EnumSet<EventFlag> eventFlags, int computedHeartRate, long heartBeatCount, BigDecimal heartBeatEventTime, AntPlusHeartRatePcc.DataState dataState)
      When heart rate data is received with a null value for heartBeatEventTimestamp, this method should be called with the received data. When the legacy mechanism sends the heartBeatEventTimestamp, the App will be called back with this heart rate data combined with the Timestamp
      Specified by:
      onNewHeartRateData in interface AntPlusHeartRatePcc.IHeartRateDataReceiver
      Parameters:
      estTimestamp - The estimated timestamp of when this event was triggered. Useful for correlating multiple events and determining when data was sent for more accurate data records.
      eventFlags - Informational flags about the event.
      computedHeartRate - Current heart rate valid for display, computed by sensor. Units: BPM.
      heartBeatCount - Heart beat count. Units: beats. Rollover: Every ~9 quintillion beats.
      heartBeatEventTime - Sensor reported time counter value of last distance or speed computation (up to 1/1024s accuracy). Units: s. Rollover: Every ~9 quadrillion s.
      dataState - The state of the data. If stale, app should indicate to the user that the device is not active. @since 2.1.7; supported on Plugin Service 2.2.8+. Earlier versions of the service will only send LIVE_DATA flag.