Package 

Class CyclingSpeedAndCadenceMeasurementDataCallback

  • All Implemented Interfaces:
    android.os.Parcelable , no.nordicsemi.android.ble.callback.DataReceivedCallback , no.nordicsemi.android.ble.callback.profile.ProfileDataCallback , no.nordicsemi.android.ble.common.profile.csc.CyclingSpeedAndCadenceCallback , no.nordicsemi.android.ble.common.profile.csc.CyclingSpeedAndCadenceMeasurementCallback

    
    public abstract class CyclingSpeedAndCadenceMeasurementDataCallback
    extends ProfileReadResponse implements CyclingSpeedAndCadenceMeasurementCallback, CyclingSpeedAndCadenceCallback
                        

    Data callback that parses value into CSC Measurement data. If the value received do not match required syntax onInvalidDataReceived callback will be called. will be called.

    • Method Summary

      Modifier and Type Method Description
      void onDataReceived(@NonNull() BluetoothDevice device, @NonNull() Data data)
      void onWheelMeasurementReceived(@NonNull() BluetoothDevice device, long wheelRevolutions, int lastWheelEventTime) Method called when the data received had wheel revolution data present.
      void onCrankMeasurementReceived(@NonNull() BluetoothDevice device, int crankRevolutions, int lastCrankEventTime) Method called when the data received had crank revolution data present.
      • Methods inherited from class no.nordicsemi.android.ble.callback.profile.ProfileReadResponse

        isValid, onInvalidDataReceived, writeToParcel
      • Methods inherited from class no.nordicsemi.android.ble.response.ReadResponse

        describeContents, getBluetoothDevice, getRawData, onDataReceived
      • Methods inherited from class no.nordicsemi.android.ble.common.profile.csc.CyclingSpeedAndCadenceMeasurementCallback

        onCrankMeasurementReceived, onWheelMeasurementReceived
      • Methods inherited from class no.nordicsemi.android.ble.common.profile.csc.CyclingSpeedAndCadenceCallback

        getWheelCircumference, onCrankDataChanged, onDistanceChanged
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CyclingSpeedAndCadenceMeasurementDataCallback

        CyclingSpeedAndCadenceMeasurementDataCallback()
    • Method Detail

      • onWheelMeasurementReceived

         void onWheelMeasurementReceived(@NonNull() BluetoothDevice device, long wheelRevolutions, int lastWheelEventTime)

        Method called when the data received had wheel revolution data present.The default implementation calculates the total distance, distance since connection andcurrent speed and calls onDistanceChanged.

        Parameters:
        device - the target device.
        wheelRevolutions - cumulative wheel revolutions since the CSC device was reset (UINT32).
        lastWheelEventTime - the last wheel event time in 1/1024 s (UINT16).
      • onCrankMeasurementReceived

         void onCrankMeasurementReceived(@NonNull() BluetoothDevice device, int crankRevolutions, int lastCrankEventTime)

        Method called when the data received had crank revolution data present.The default implementation calculates the crank cadence and gear ratio andcalls onCrankDataChanged

        Parameters:
        device - the target device.
        crankRevolutions - cumulative crank revolutions since the CSC device was reset (UINT16).
        lastCrankEventTime - the last crank event time in 1/1024 s (UINT16).