Class AntPlusBikePowerPcc


public class AntPlusBikePowerPcc extends AntPlusCommonPcc
Enables communication between a client and the BikePower plugin service.
  • Method Details

    • getRequiredServiceVersionForBind

      protected int getRequiredServiceVersionForBind()
      Specified by:
      getRequiredServiceVersionForBind in class AntPluginPcc
    • requestAccess

      public static PccReleaseHandle<AntPlusBikePowerPcc> requestAccess(android.app.Activity userActivity, android.content.Context bindToContext, boolean skipPreferredSearch, int searchProximityThreshold, AntPluginPcc.IPluginAccessResultReceiver<AntPlusBikePowerPcc> resultReceiver, AntPluginPcc.IDeviceStateChangeReceiver stateReceiver)
      Sends a request to the plugin to access a device and receive a live PCC instance. If the minimum version of the desired plugin is installed, this will start a search for a device to connect to and return the result on the provided result receiver. This method displays a search dialog UI while the search is in progress.

      If the user has a preferred device set for this plugin and skipPreferredSearch is not set true, this request will attempt to connect to that device first. Then if the search for the preferred device times-out, the user can choose to retry, cancel, or search for other devices. If there is no preferred device configured or skipPreferredSearch is set to true, the search will begin directly at searching for other devices.During the search for other devices, a list of devices detected in range is presented to the user. Any time during the search the user can select a device from the list to connect to, and can optionally save a name for that device and set it as the preferred device for future searches.

      Regardless of how the search proceeds, as soon as a device is connected or if an error occurs or the user cancels then the result will be posted to the supplied result receiver.

      Note: During the search this function will display UI elements to display the progress of the search to the user and allow them to interact and control the search. If this is not acceptable to the calling application, then do not use this version of requestAccess().
      Parameters:
      userActivity - The current foreground activity. Used to display search progress and results.
      bindToContext - The context to which the plugin will be bound. Used for plugin lifecycle management.
      skipPreferredSearch - True = Don't automatically connect to user's preferred device, but always go to search for other devices.
      searchProximityThreshold - It is recommended to always use -1 to use the user's default settings unless your application has a specific reason to do otherwise. This value represents the signal strength 'proximity' requirement on finding matches during searching, if a device does not meet the requirements it will not show up in the search at all. The value is a generic signal strength threshold from 1-10 where 1 is the strongest (ie: closest) and 10 is the lowest(ie: farthest away). 0 = don't use proximity search and -1 = use plugin user-specified default.
      resultReceiver - The receiver to receive the results of the request. Possible returns include:
      stateReceiver - The receiver to receive the state updates of the accessed device, assuming the request is successful. This receiver will receive notifications of all state changes to the device that occur subsequent to the initial state returned in the result receiver.
      Returns:
      A release handle for the device. This can be used to guarantee the device is properly shutdown and cleaned up, even before the device is actually received through the result receiver.
    • requestAccess

      public static PccReleaseHandle<AntPlusBikePowerPcc> requestAccess(android.app.Activity userActivity, android.content.Context bindToContext, AntPluginPcc.IPluginAccessResultReceiver<AntPlusBikePowerPcc> resultReceiver, AntPluginPcc.IDeviceStateChangeReceiver stateReceiver)
      Sends a request to the plugin to access a device and receive a live PCC instance. If the minimum version of the desired plugin is installed, this will start a search for a device to connect to and return the result on the provided result receiver. This method displays a search dialog UI while the search is in progress. This overload calls requestAccess(Activity, Context, boolean, int, IPluginAccessResultReceiver, IDeviceStateChangeReceiver) with skipPreferrredSearch=false and searchProximityThreshold=-1(user default).

      If the user has a preferred device set for this plugin and skipPreferredSearch is not set true, this request will attempt to connect to that device first. Then if the search for the preferred device times-out, the user can choose to retry, cancel, or search for other devices. If there is no preferred device configured or skipPreferredSearch is set to true, the search will begin directly at searching for other devices.During the search for other devices, a list of devices detected in range is presented to the user. Any time during the search the user can select a device from the list to connect to, and can optionally save a name for that device and set it as the preferred device for future searches.

      Regardless of how the search proceeds, as soon as a device is connected or if an error occurs or the user cancels then the result will be posted to the supplied result receiver.

      Note: During the search this function will display UI elements to display the progress of the search to the user and allow them to interact and control the search. If this is not acceptable to the calling application, then do not use this version of requestAccess().
      Parameters:
      userActivity - The current foreground activity. Used to display search progress and results.
      bindToContext - The context to which the plugin will be bound. Used for plugin lifecycle management.
      resultReceiver - The receiver to receive the results of the request. Possible returns include:
      stateReceiver - The receiver to receive the state updates of the accessed device, assuming the request is successful. This receiver will receive notifications of all state changes to the device that occur subsequent to the initial state returned in the result receiver.
      Returns:
      A release handle for the device. This can be used to guarantee the device is properly shutdown and cleaned up, even before the device is actually received through the result receiver.
    • requestAccess

      public static PccReleaseHandle<AntPlusBikePowerPcc> requestAccess(android.content.Context bindToContext, int antDeviceNumber, int searchProximityThreshold, AntPluginPcc.IPluginAccessResultReceiver<AntPlusBikePowerPcc> resultReceiver, AntPluginPcc.IDeviceStateChangeReceiver stateReceiver)
      Sends a request to the plugin to access a device and receive a live PCC instance. If the minimum version of the desired plugin is installed, this will start an asynchronous search for a device to connect to and return the result on the provided result receiver.

      The plugin will attempt to connect to a device with the provided deviceNumber and return a result when the device is connected or the search fails. The search will timeout after 10s, if you wish to keep searching you can call this method again.

      Note: If you set deviceNumber to 0 it will connect to the first available/found device.
      Parameters:
      bindToContext - The context to which the plugin will be bound. Used for plugin lifecycle management.
      antDeviceNumber - DeviceNumber to attempt to connect to. A deviceNumber of 0 indicates a desire to connect to first available device.
      searchProximityThreshold - This value represents the signal strength 'proximity' requirement on finding matches during searching, if a device does not meet the requirements it will not show up in the search at all. The value is a generic signal strength threshold from 1-10 where 1 is the strongest (ie: closest) and 10 is the lowest(ie: farthest away). 0 = don't use proximity search.
      resultReceiver - The receiver to receive the results of the request. Possible returns include:
      stateReceiver - The receiver to receive the state updates of the accessed device, assuming the request is successful. This receiver will receive notifications of all state changes to the device that occur subsequent to the initial state returned in the result receiver.
      Returns:
      A release handle for the device. This can be used to guarantee the device is properly shutdown and cleaned up, even before the device is actually received through the result receiver.
    • requestAsyncScanController

      public static AsyncScanController<AntPlusBikePowerPcc> requestAsyncScanController(android.content.Context bindToContext, int searchProximityThreshold, AsyncScanController.IAsyncScanResultReceiver scanResultReceiver)
      Sends a request to the plugin to start an asynchronous search for available devices. Using the returned AsyncScanController you can view available devices (including devices already connected to the plugin by other applications), receive user saved info and preferences for available devices, and eventually request access to a device you desire to connect to.

      Note: The scan is started automatically, and must be stopped by your application to avoid resource leaks. (See the controller documentation for more details: AsyncScanController.
      Parameters:
      bindToContext - The context to which the plugin will be bound. Used for plugin lifecycle management.
      searchProximityThreshold - This value represents the signal strength 'proximity' requirement on finding matches during searching, if a device does not meet the requirements it will not show up in the search at all. The value is a generic signal strength rating from 1-10 where 1 is the strongest (ie: closest) and 10 is the lowest(ie: farthest away). 0 = don't use proximity search.
      scanResultReceiver - The receiver to receive the info for available devices and status of the scan.
      Returns:
      The controller object for the asynchronous controller. Note: The scan is started automatically, and must be stopped by your application to avoid resource leaks. (See the controller documentation for more details: AsyncScanController.
    • getServiceBindIntent

      protected android.content.Intent getServiceBindIntent()
      Specified by:
      getServiceBindIntent in class AntPluginPcc
    • getPluginPrintableName

      protected String getPluginPrintableName()
      Specified by:
      getPluginPrintableName in class AntPluginPcc
    • handlePluginEvent

      protected void handlePluginEvent(android.os.Message eventMsg)
      Overrides:
      handlePluginEvent in class AntPlusCommonPcc
    • subscribeRawPowerOnlyDataEvent

      public void subscribeRawPowerOnlyDataEvent(AntPlusBikePowerPcc.IRawPowerOnlyDataReceiver RawPowerOnlyDataReceiver)
      Subscribe to receive RawPowerOnlyData events, which contain: The basic power data calculated by the sensor itself. This data is mandatory and must be sent by all non-CTF sensors. This function can also be used to unsubscribe from an event, by passing null as the receiver.
      Parameters:
      RawPowerOnlyDataReceiver - receiver to receive events (or null to unsubscribe from this event).
    • subscribePedalPowerBalanceEvent

      public void subscribePedalPowerBalanceEvent(AntPlusBikePowerPcc.IPedalPowerBalanceReceiver PedalPowerBalanceReceiver)
      Subscribe to receive PedalPowerBalance events, which contain: The pedal power data field provides the user's power contribution (as a percentage) between the left and right pedals, as measured by a pedal power sensor. This data field should be interpreted with the power-only update event count field to determine if the sensor data is new. This data is optional and may not be sent by all sensors. This function can also be used to unsubscribe from an event, by passing null as the receiver.
      Parameters:
      PedalPowerBalanceReceiver - receiver to receive events (or null to unsubscribe from this event).
    • subscribeInstantaneousCadenceEvent

      public void subscribeInstantaneousCadenceEvent(AntPlusBikePowerPcc.IInstantaneousCadenceReceiver InstantaneousCadenceReceiver)
      Subscribe to receive InstantaneousCadence events, which contain: The instantaneous cadence data. This event will only fire when the sensor indicates that the data has been updated. Instantaneous cadence which is derived from AntPlusBikePowerPcc.DataSource.POWER_ONLY_DATA will only be sent if it is the only AntPlusBikePowerPcc.DataSource available. This data is optional and may not be sent by all sensors. This function can also be used to unsubscribe from an event, by passing null as the receiver.
      Parameters:
      InstantaneousCadenceReceiver - receiver to receive events (or null to unsubscribe from this event).
    • subscribeRawWheelTorqueDataEvent

      public void subscribeRawWheelTorqueDataEvent(AntPlusBikePowerPcc.IRawWheelTorqueDataReceiver RawWheelTorqueDataReceiver)
      Subscribe to receive RawWheelTorqueData events, which contain: Event timing information and torque values from a power sensor that measures torque on the rear wheel. Timing is based on a 2048Hz clock and torque is transmitted in Newton meters. This data is optional and may not be sent by all sensors. Power sensors do not support wheel torque and crank torque simultaneously. This function can also be used to unsubscribe from an event, by passing null as the receiver.
      Parameters:
      RawWheelTorqueDataReceiver - receiver to receive events (or null to unsubscribe from this event).
    • subscribeRawCrankTorqueDataEvent

      public void subscribeRawCrankTorqueDataEvent(AntPlusBikePowerPcc.IRawCrankTorqueDataReceiver RawCrankTorqueDataReceiver)
      Subscribe to receive RawCrankTorqueData events, which contain: Event timing information and torque values from a power sensor that measures torque at the crank. Timing is based on a 2048Hz clock and torque is transmitted in Newton meters. This data is optional and may not be sent by all sensors. Power sensors do not support wheel torque and crank torque simultaneously. This function can also be used to unsubscribe from an event, by passing null as the receiver.
      Parameters:
      RawCrankTorqueDataReceiver - receiver to receive events (or null to unsubscribe from this event).
    • subscribeTorqueEffectivenessEvent

      public void subscribeTorqueEffectivenessEvent(AntPlusBikePowerPcc.ITorqueEffectivenessReceiver TorqueEffectivenessReceiver)
      Subscribe to receive TorqueEffectiveness events, which contain: The instantaneous values of left and right Torque Effectiveness from the sensor. This data is optional and may be sent by power-only or torque sensors. This function can also be used to unsubscribe from an event, by passing null as the receiver.
      Parameters:
      TorqueEffectivenessReceiver - receiver to receive events (or null to unsubscribe from this event).
    • subscribePedalSmoothnessEvent

      public void subscribePedalSmoothnessEvent(AntPlusBikePowerPcc.IPedalSmoothnessReceiver PedalSmoothnessReceiver)
      Subscribe to receive PedalSmoothness events, which contain: The instantaneous values of left and right, or combined, Pedal Smoothness from the sensor. This data is optional and may be sent by power-only or torque sensors. This function can also be used to unsubscribe from an event, by passing null as the receiver.
      Parameters:
      PedalSmoothnessReceiver - receiver to receive events (or null to unsubscribe from this event).
    • subscribeRawCtfDataEvent

      public void subscribeRawCtfDataEvent(AntPlusBikePowerPcc.IRawCtfDataReceiver RawCtfDataReceiver)
      Subscribe to receive RawCtfData events, which contain: Event timing information and crank torque values from a power sensor reported as frequency instead. This data is optional and may not be sent by all sensors. Note: Crank Torque Frequency sensors require daily calibration to receive correct data. This function can also be used to unsubscribe from an event, by passing null as the receiver.
      Parameters:
      RawCtfDataReceiver - receiver to receive events (or null to unsubscribe from this event).
    • subscribeCalibrationMessageEvent

      public void subscribeCalibrationMessageEvent(AntPlusBikePowerPcc.ICalibrationMessageReceiver calibrationMessageReceiver)
      Subscribe to receive CalibrationMessage events, which contain: Response data from the power meter when calibration occurs (either by request or automatically performed by the power meter) or is confering current calibration status. This data is optional and may not be sent by all sensors. This function can also be used to unsubscribe from an event, by passing null as the receiver.
      Parameters:
      calibrationMessageReceiver - receiver to receive events (or null to unsubscribe from this event).
    • subscribeAutoZeroStatusEvent

      public void subscribeAutoZeroStatusEvent(AntPlusBikePowerPcc.IAutoZeroStatusReceiver autoZeroStatusReceiver)
      Subscribe to receive AutoZeroStatus events, which contain: The updated Auto Zero status of the sensor. This function can also be used to unsubscribe from an event, by passing null as the receiver.
      Parameters:
      autoZeroStatusReceiver - receiver to receive events (or null to unsubscribe from this event).
    • subscribeCalculatedPowerEvent

      public void subscribeCalculatedPowerEvent(AntPlusBikePowerPcc.ICalculatedPowerReceiver CalculatedPowerReceiver)
      Subscribe to receive CalculatedPower events, which contain: The average power between two received messages calculated from the best available data from the power sensor. Recommended method. This data is mandatory and must be sent by all sensors. This function can also be used to unsubscribe from an event, by passing null as the receiver.
      Parameters:
      CalculatedPowerReceiver - receiver to receive events (or null to unsubscribe from this event).
    • subscribeCalculatedTorqueEvent

      public void subscribeCalculatedTorqueEvent(AntPlusBikePowerPcc.ICalculatedTorqueReceiver CalculatedTorqueReceiver)
      Subscribe to receive CalculatedTorque events, which contain: The average torque between two received messages calculated from the best available data from the power sensor. Recommended method. This data can only be sent by torque sensors. This function can also be used to unsubscribe from an event, by passing null as the receiver.
      Parameters:
      CalculatedTorqueReceiver - receiver to receive events (or null to unsubscribe from this event).
    • subscribeCalculatedCrankCadenceEvent

      public void subscribeCalculatedCrankCadenceEvent(AntPlusBikePowerPcc.ICalculatedCrankCadenceReceiver CalculatedCrankCadenceReceiver)
      Subscribe to receive CalculatedCrankCadence events, which contain: The average cadence between two received messages calculated from the bet available data from the power sensor. Recommended method. This data can only be sent by crank torque power sensors. This function can also be used to unsubscribe from an event, by passing null as the receiver.
      Parameters:
      CalculatedCrankCadenceReceiver - receiver to receive events (or null to unsubscribe from this event).
    • subscribeCalculatedWheelSpeedEvent

      public void subscribeCalculatedWheelSpeedEvent(AntPlusBikePowerPcc.CalculatedWheelSpeedReceiver CalculatedWheelSpeedReceiver)
      Subscribe to receive CalculatedWheelSpeed events, which contain: The average speed between two received messages calculated from the best available data from the power sensor. Recommended method. This data can only be sent by wheel torque power sensors. This function can also be used to unsubscribe from an event, by passing null as the receiver.
      Parameters:
      CalculatedWheelSpeedReceiver - receiver to receive events (or null to unsubscribe from this event).
    • subscribeCalculatedWheelDistanceEvent

      public void subscribeCalculatedWheelDistanceEvent(AntPlusBikePowerPcc.CalculatedWheelDistanceReceiver CalculatedWheelDistanceReceiver)
      Subscribe to receive CalculatedWheelDistance events, which contain: The distance travelled between two received messages calculated from the best available data from the power sensor. Recommended method. This data can only be sent by wheel torque power sensors. This function can also be used to unsubscribe from an event, by passing null as the receiver.
      Parameters:
      CalculatedWheelDistanceReceiver - receiver to receive events (or null to unsubscribe from this event).
    • subscribeMeasurementOutputDataEvent

      public void subscribeMeasurementOutputDataEvent(AntPlusBikePowerPcc.IMeasurementOutputDataReceiver measurementOutputDataReceiver)
      Subscribe to receive MeasurementOutputData events, which contain: Data sent by power meters intended to enrich the calibration process. This function can also be used to unsubscribe from an event, by passing null as the receiver.
      Parameters:
      measurementOutputDataReceiver - receiver to receive events (or null to unsubscribe from this event).
    • subscribeCrankParametersEvent

      public void subscribeCrankParametersEvent(AntPlusBikePowerPcc.ICrankParametersReceiver crankParametersReceiver)
      Subscribe to receive CrankParameters events, which contain: The power meter returned the requested crank parameters. This function can also be used to unsubscribe from an event, by passing null as the receiver.
      Parameters:
      crankParametersReceiver - receiver to receive events (or null to unsubscribe from this event).
    • requestManualCalibration

      public boolean requestManualCalibration(AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver)
      Send a request to the power meter to perform a manual calibration. CTF meter's typically require this to be performed once per day.
      Parameters:
      requestFinishedReceiver - Receiver for the results of the command request.
      Returns:
      True if request was submitted successfully and you are guaranteed a result on the result receiver.
      See Also:
    • requestManualCalibration

      public boolean requestManualCalibration(AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver, AntPlusBikePowerPcc.ICalibrationMessageReceiver calibrationMessageReceiver, AntPlusBikePowerPcc.IMeasurementOutputDataReceiver measurementOutputDataReceiver)
      Send a request to the power meter to perform a manual calibration. CTF meter's typically require this to be performed once per day.
      Parameters:
      requestFinishedReceiver - Receiver for the results of the command request.
      calibrationMessageReceiver - Receiver for the calibration message. Any receiver passed here will overwrite any pre-existing receiver subscription, except from subscribeCalibrationMessageEvent(com.dsi.ant.plugins.antplus.pcc.AntPlusBikePowerPcc.ICalibrationMessageReceiver).
      measurementOutputDataReceiver - Receiver for measurement output data during the calibration. Any receiver passed here will overwrite any pre-existing receiver subscription, except from subscribeMeasurementOutputDataEvent(com.dsi.ant.plugins.antplus.pcc.AntPlusBikePowerPcc.IMeasurementOutputDataReceiver).
      Returns:
      True if request was submitted successfully and you are guaranteed a result on the result receiver.
    • requestSetAutoZero

      public boolean requestSetAutoZero(boolean autoZeroEnable, AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver)
      Send a request to the power meter to configure auto-zero calibration.
      Parameters:
      autoZeroEnable - Enable/disable auto-zero calibration on the power meter.
      requestFinishedReceiver - Receiver for the results of the command request.* @return True if request was submitted successfully and you are guaranteed a result on the result receiver.
      Returns:
      True if request was submitted successfully and you are guaranteed a result on the result receiver.
      See Also:
    • requestSetAutoZero

      public boolean requestSetAutoZero(boolean autoZeroEnable, AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver, AntPlusBikePowerPcc.ICalibrationMessageReceiver calibrationMessageReceiver, AntPlusBikePowerPcc.IAutoZeroStatusReceiver autoZeroStatusReceiver)
      Send a request to the power meter to configure auto-zero calibration.
      Parameters:
      autoZeroEnable - Enable/disable auto-zero calibration on the power meter.
      requestFinishedReceiver - Receiver for the results of the command request.
      calibrationMessageReceiver - Receiver for the calibration message. Any receiver passed here will overwrite any pre-existing receiver subscription, except from subscribeCalibrationMessageEvent(com.dsi.ant.plugins.antplus.pcc.AntPlusBikePowerPcc.ICalibrationMessageReceiver).
      autoZeroStatusReceiver - Receiver for the auto zero status. Any receiver passed here will overwrite any pre-existing receiver subscription, except from subscribeAutoZeroStatusEvent(com.dsi.ant.plugins.antplus.pcc.AntPlusBikePowerPcc.IAutoZeroStatusReceiver).
      Returns:
      True if request was submitted successfully and you are guaranteed a result on the result receiver.
    • requestSetCtfSlope

      public boolean requestSetCtfSlope(BigDecimal slope, AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver)
      Send a request to the CTF power meter to configure slope.
      Parameters:
      slope - The slope value to configure to the CTF power meter.
      requestFinishedReceiver - Receiver for the results of the command request. RequestStatus.FAIL_BAD_PARAMS Returned when slope is not within a range of 10.0Nm/Hz - 50.0Nm/Hz.}
      Returns:
      True if request was submitted successfully and you are guaranteed a result on the result receiver.
      See Also:
    • requestSetCtfSlope

      public boolean requestSetCtfSlope(BigDecimal slope, AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver, AntPlusBikePowerPcc.ICalibrationMessageReceiver calibrationMessageReceiver)
      Send a request to the CTF power meter to configure slope.
      Parameters:
      slope - The slope value to configure to the CTF power meter.
      requestFinishedReceiver - Receiver for the results of the command request. RequestStatus.FAIL_BAD_PARAMS Returned when slope is not within a range of 10.0Nm/Hz - 50.0Nm/Hz.
      calibrationMessageReceiver - Receiver for the calibration message. Any receiver passed here will overwrite any pre-existing receiver subscription, except from subscribeCalibrationMessageEvent(com.dsi.ant.plugins.antplus.pcc.AntPlusBikePowerPcc.ICalibrationMessageReceiver).
      Returns:
      True if request was submitted successfully and you are guaranteed a result on the result receiver.
    • requestCustomCalibrationParameters

      public boolean requestCustomCalibrationParameters(byte[] manufacturerSpecificParameters, AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver)
      Send a request to the power meter to send custom calibration parameters.
      Parameters:
      manufacturerSpecificParameters - The six manufacturer specific bytes to be sent to the power meter.
      requestFinishedReceiver - Receiver for the results of the command request. RequestStatus.FAIL_BAD_PARAMS Returned when the length of manufacturerSpecificParameters is not 6.
      Returns:
      True if request was submitted successfully and you are guaranteed a result on the result receiver.
      See Also:
    • requestCustomCalibrationParameters

      public boolean requestCustomCalibrationParameters(byte[] manufacturerSpecificParameters, AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver, AntPlusBikePowerPcc.ICalibrationMessageReceiver calibrationMessageReceiver)
      Send a request to the power meter to send custom calibration parameters.
      Parameters:
      manufacturerSpecificParameters - The six manufacturer specific bytes to be sent to the power meter.
      requestFinishedReceiver - Receiver for the results of the command request. RequestStatus.FAIL_BAD_PARAMS Returned when the length of manufacturerSpecificParameters is not 6.
      calibrationMessageReceiver - Receiver for the calibration message. Any receiver passed here will overwrite any pre-existing receiver subscription, except from subscribeCalibrationMessageEvent(com.dsi.ant.plugins.antplus.pcc.AntPlusBikePowerPcc.ICalibrationMessageReceiver).
      Returns:
      True if request was submitted successfully and you are guaranteed a result on the result receiver.
    • requestSetCustomCalibrationParameters

      public boolean requestSetCustomCalibrationParameters(byte[] manufacturerSpecificParameters, AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver)
      Send a request to the power meter to set custom calibration parameters.
      Parameters:
      manufacturerSpecificParameters - The six manufacturer specific bytes to be sent to the power meter. RequestStatus.FAIL_BAD_PARAMS Returned when the length of manufacturerSpecificParameters is not 6.
      requestFinishedReceiver - Receiver for the results of the command request.
      Returns:
      True if request was submitted successfully and you are guaranteed a result on the result receiver.
      See Also:
    • requestSetCustomCalibrationParameters

      public boolean requestSetCustomCalibrationParameters(byte[] manufacturerSpecificParameters, AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver, AntPlusBikePowerPcc.ICalibrationMessageReceiver calibrationMessageReceiver)
      Send a request to the power meter to set custom calibration parameters.
      Parameters:
      manufacturerSpecificParameters - The six manufacturer specific bytes to be sent to the power meter.
      requestFinishedReceiver - Receiver for the results of the command request. RequestStatus.FAIL_BAD_PARAMS Returned when the length of manufacturerSpecificParameters is not 6.
      calibrationMessageReceiver - Receiver for the calibration message. Any receiver passed here will overwrite any pre-existing receiver subscription, except from subscribeCalibrationMessageEvent(com.dsi.ant.plugins.antplus.pcc.AntPlusBikePowerPcc.ICalibrationMessageReceiver).
      Returns:
      True if request was submitted successfully and you are guaranteed a result on the result receiver.
    • requestCrankParameters

      public boolean requestCrankParameters(AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver)
      Send a request to the power meter to get the crank parameters.
      Parameters:
      requestFinishedReceiver - Receiver for the results of the command request.
      Returns:
      True if request was submitted successfully and you are guaranteed a result on the result receiver.
      See Also:
    • requestCrankParameters

      public boolean requestCrankParameters(AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver, AntPlusBikePowerPcc.ICrankParametersReceiver crankParametersReceiver)
      Send a request to the power meter to get the crank parameters.
      Parameters:
      requestFinishedReceiver - Receiver for the results of the command request.
      crankParametersReceiver - Receiver for the crank parameters. Any receiver passed here will overwrite any pre-existing receiver subscription, except from subscribeCrankParametersEvent(ICrankParametersReceiver).
      Returns:
      True if request was submitted successfully and you are guaranteed a result on the result receiver.
    • requestSetCrankParameters

      public boolean requestSetCrankParameters(AntPlusBikePowerPcc.CrankLengthSetting crankLengthSetting, BigDecimal fullCrankLength, AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver)
      Send a request to the power meter to set the crank parameters.
      Parameters:
      crankLengthSetting - The AntPlusBikePowerPcc.CrankLengthSetting to be sent to the power meter. Must not be set to NULL.
      fullCrankLength - A valid crank length to set to the power meter. Set to NULL if not intending to set this value.
      requestFinishedReceiver - Receiver for the results of the command request. RequestStatus.FAIL_BAD_PARAMS Returned when crankLengthSetting is set to NULL, or if fullCrankLength is set to NULL when CrankLengthSetting is set to MANUAL_CRANK_LENGTH, of if fullCrankLength exceeds 236.5mm or if fullCrankLength falls below 110.0mm.
      Returns:
      True if request was submitted successfully and you are guaranteed a result on the result receiver.
    • requestCommandBurst

      public boolean requestCommandBurst(int requestedCommandId, byte[] commandData, AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver)
      Request to issue a command to the master device. The plugin will automatically handle the underlying transfer mechanism including the command sequence number, burst length, slave manufacturer ID, slave product ID, and slave serial number.
      Parameters:
      requestedCommandId - The command ID to send to the master device.
      commandData - The command data to be sent with the burst tranfer. The length must be a non-zero multiple of 8 bytes.
      requestFinishedReceiver - Receiver for the results of the command request. RequestStatus.FAIL_BAD_PARAMS Returned if requestedCommandId is outside a range of 0-255, or if commandData length is not a non-zero multiple of 8.
      Returns:
      True if request was submitted successfully and you are guaranteed a result on the result receiver.
      Since:
      2.1.5; requires Plugin Service 2.2.6+