Class AntPlusFitnessEquipmentPcc.BikeMethods

java.lang.Object
com.dsi.ant.plugins.antplus.pcc.AntPlusFitnessEquipmentPcc.BikeMethods
Enclosing class:
AntPlusFitnessEquipmentPcc

public class AntPlusFitnessEquipmentPcc.BikeMethods extends Object
Subscriptions and commands for bikes.
  • Constructor Details

    • BikeMethods

      public BikeMethods()
  • Method Details

    • subscribeBikeDataEvent

      public void subscribeBikeDataEvent(AntPlusFitnessEquipmentPcc.IBikeDataReceiver BikeDataReceiver)
      Subscribe to receive BikeData events, which contain: The data specific to bikes. This data is optional and may not be sent by all fitness equipment. This function can also be used to unsubscribe from an event, by passing null as the receiver.
      Parameters:
      BikeDataReceiver - receiver to receive events (or null to unsubscribe from this event).
    • subscribeCommandStatusEvent

      public boolean subscribeCommandStatusEvent(AntPlusFitnessEquipmentPcc.ICommandStatusReceiver commandStatusReceiver)
      Subscribe to receive CommandStatus events, which contain: Confirms the status of commands sent from an open display to the fitness equipment. This function can also be used to unsubscribe from an event, by passing null as the receiver.
      Parameters:
      commandStatusReceiver - Receiver for the CommandStatus event, which is: Confirms the status of commands sent from an open display to the fitness equipment.
      Returns:
      true if successful
      Since:
      2.1.8; requires Plugin Service 2.2.9+
    • subscribeBasicResistanceEvent

      public boolean subscribeBasicResistanceEvent(AntPlusFitnessEquipmentPcc.IBasicResistanceReceiver basicResistanceReceiver)
      Subscribe to receive BasicResistance events, which contain: The basic resistance mode settings data. This data is optional and may not be supported by all devices. Use the AntPlusFitnessEquipmentPcc.requestCapabilities(IRequestFinishedReceiver, ICapabilitiesReceiver) method first to find if it is supported. This function can also be used to unsubscribe from an event, by passing null as the receiver.
      Parameters:
      basicResistanceReceiver - Receiver for the BasicResistance event, which is: The basic resistance mode settings data. This data is optional and may not be supported by all devices. Use the AntPlusFitnessEquipmentPcc.requestCapabilities(IRequestFinishedReceiver, ICapabilitiesReceiver) method first to find if it is supported.
      Returns:
      true if successful
      Since:
      2.1.8; requires Plugin Service 2.2.9+
    • subscribeTargetPowerEvent

      public boolean subscribeTargetPowerEvent(AntPlusFitnessEquipmentPcc.ITargetPowerReceiver targetPowerReceiver)
      Subscribe to receive TargetPower events, which contain: The target power mode settings data. This data is optional and may not be supported by all devices. Use the AntPlusFitnessEquipmentPcc.requestCapabilities(IRequestFinishedReceiver, ICapabilitiesReceiver) method first to find if it is supported. This function can also be used to unsubscribe from an event, by passing null as the receiver.
      Parameters:
      targetPowerReceiver - Receiver for the TargetPower event, which is: The target power mode settings data. This data is optional and may not be supported by all devices. Use the AntPlusFitnessEquipmentPcc.requestCapabilities(IRequestFinishedReceiver, ICapabilitiesReceiver) method first to find if it is supported.
      Returns:
      true if successful
      Since:
      2.1.8; requires Plugin Service 2.2.9+
    • subscribeWindResistanceEvent

      public boolean subscribeWindResistanceEvent(AntPlusFitnessEquipmentPcc.IWindResistanceReceiver windResistanceReceiver)
      Subscribe to receive WindResistance events, which contain: This function can also be used to unsubscribe from an event, by passing null as the receiver.
      Parameters:
      windResistanceReceiver - Receiver for the WindResistance event, which is: The wind resistance mode settings data. This data is optional and may not be supported by all devices. Use the AntPlusFitnessEquipmentPcc.requestCapabilities(IRequestFinishedReceiver, ICapabilitiesReceiver) method first to find if it is supported.
      Returns:
      true if successful
      Since:
      2.1.8; requires Plugin Service 2.2.9+
    • subscribeTrackResistanceEvent

      public boolean subscribeTrackResistanceEvent(AntPlusFitnessEquipmentPcc.ITrackResistanceReceiver trackResistanceReceiver)
      Subscribe to receive TrackResistance events, which contain: The track resistance mode settings data. This data is optional and may not be supported by all devices. Use the AntPlusFitnessEquipmentPcc.requestCapabilities(IRequestFinishedReceiver, ICapabilitiesReceiver) method first to find if it is supported. This function can also be used to unsubscribe from an event, by passing null as the receiver.
      Parameters:
      trackResistanceReceiver - Receiver for the TrackResistance event, which is: The track resistance mode settings data. This data is optional and may not be supported by all devices. Use the AntPlusFitnessEquipmentPcc.requestCapabilities(IRequestFinishedReceiver, ICapabilitiesReceiver) method first to find if it is supported.
      Returns:
      true if successful
      Since:
      2.1.8; requires Plugin Service 2.2.9+
    • requestCommandStatus

      public boolean requestCommandStatus(AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver, AntPlusFitnessEquipmentPcc.ICommandStatusReceiver commandStatusReceiver)
      Send a request to the device to send the command status.
      Parameters:
      requestFinishedReceiver - Receiver for the results of the command request.
      commandStatusReceiver - Receiver for the CommandStatus event, which is: Confirms the status of commands sent from an open display to the fitness equipment. May be set to null if using the subscribe method instead of passing a receiver here.
      Returns:
      True if request was submitted successfully and you are guaranteed a result on the result receiver.
      Since:
      2.1.8; requires Plugin Service 2.2.9+
    • requestBasicResistance

      public boolean requestBasicResistance(AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver, AntPlusFitnessEquipmentPcc.IBasicResistanceReceiver basicResistanceReceiver)
      Send a request to the device to send the basic resistance.
      Parameters:
      requestFinishedReceiver - Receiver for the results of the command request.
      basicResistanceReceiver - Receiver for the BasicResistance event, which is: The basic resistance mode settings data. May be set to null if using the subscribe method instead of passing a receiver here.
      Returns:
      True if request was submitted successfully and you are guaranteed a result on the result receiver.
      Since:
      2.1.8; requires Plugin Service 2.2.9+
    • requestSetBasicResistance

      public boolean requestSetBasicResistance(BigDecimal totalResistance, AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver)
      Send a request to the device to set the basic resistance. This data is optional and may not be supported by all devices. Use the AntPlusFitnessEquipmentPcc.requestCapabilities(IRequestFinishedReceiver, ICapabilitiesReceiver) method first to find if it is supported. The current total resistance setting can be gathered from the AntPlusFitnessEquipmentPcc.subscribeGeneralSettingsEvent(IGeneralSettingsReceiver) event.
      Parameters:
      totalResistance - Percentage of maximum resistance to be applied.
      Units: %. Valid range: 0% - 100%. Resolution: 0.5%
      requestFinishedReceiver - Receiver for the results of the command request. RequestStatus.FAIL_BAD_PARAMS Returned if totalResistance is not within 0% - 100%.
      Returns:
      True if request was submitted successfully and you are guaranteed a result on the result receiver.
      Since:
      2.1.8; requires Plugin Service 2.2.9+
    • requestTargetPower

      public boolean requestTargetPower(AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver, AntPlusFitnessEquipmentPcc.ITargetPowerReceiver targetPowerReceiver)
      Send a request to the device to send the target power. This data is optional and may not be supported by all devices. Use the AntPlusFitnessEquipmentPcc.requestCapabilities(IRequestFinishedReceiver, ICapabilitiesReceiver) method first to find if it is supported.
      Parameters:
      requestFinishedReceiver - Receiver for the results of the command request.
      targetPowerReceiver - Receiver for the TargetPower event, which is: The target power mode settings data. May be set to null if using the subscribe method instead of passing a receiver here.
      Returns:
      True if request was submitted successfully and you are guaranteed a result on the result receiver.
      Since:
      2.1.8; requires Plugin Service 2.2.9+
    • requestSetTargetPower

      public boolean requestSetTargetPower(BigDecimal targetPower, AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver)
      Send a request to the device to set the target power. This data is optional and may not be supported by all devices. Use the AntPlusFitnessEquipmentPcc.requestCapabilities(IRequestFinishedReceiver, ICapabilitiesReceiver) method first to find if it is supported.
      Parameters:
      targetPower - The target power for fitness equipment operating in target power mode.
      Units: W. Valid range: 0W - 1000W. Resolution: 0.25W
      requestFinishedReceiver - Receiver for the results of the command request. RequestStatus.FAIL_BAD_PARAMS Returned if targetPower is not within 0W - 1000W.
      Returns:
      True if request was submitted successfully and you are guaranteed a result on the result receiver.
      Since:
      2.1.8; requires Plugin Service 2.2.9+
    • requestWindResistance

      public boolean requestWindResistance(AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver, AntPlusFitnessEquipmentPcc.IWindResistanceReceiver windResistanceReceiver)
      Send a request to the device to send the wind resistance. This data is optional and may not be supported by all devices. Use the AntPlusFitnessEquipmentPcc.requestCapabilities(IRequestFinishedReceiver, ICapabilitiesReceiver) method first to find if it is supported.
      Parameters:
      requestFinishedReceiver - Receiver for the results of the command request.
      windResistanceReceiver - Receiver for the WindResistance event, which is: The wind resistance mode settings data. May be set to null if using the subscribe method instead of passing a receiver here.
      Returns:
      True if request was submitted successfully and you are guaranteed a result on the result receiver.
      Since:
      2.1.8; requires Plugin Service 2.2.9+
    • requestSetWindResistance

      public boolean requestSetWindResistance(BigDecimal windResistanceCoefficient, Integer windSpeed, BigDecimal draftingFactor, AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver)
      Send a request to the device to set the wind resistance. This data is optional and may not be supported by all devices. Use the AntPlusFitnessEquipmentPcc.requestCapabilities(IRequestFinishedReceiver, ICapabilitiesReceiver) method first to find if it is supported.
      Parameters:
      windResistanceCoefficient - Product of Frontal Surface Area, Drag Coefficient and Air Density. Default value of 0.51 kg/m is used if field is null.
      Units: kg/m. Valid range: 0kg/m - 1.86kg/m. Resolution: 0.01kg/m
      windSpeed - Speed of simulated wind acting on the cyclist. (+) - Head Wind (-) - Tail Wind. Default value of 0 km/h is used if field is null.
      Units: km/h. Valid range: -127km/h - 127km/h. Resolution: 1km/h
      draftingFactor - The drafting factor is used to set the resistance reduction due to travelling behind a virtual competitor. The drafting factor scales the total wind resistance depending on the position of the user relative to other virtual competitors. The drafting scale factor ranges from 0.0 to 1.0, where 0.0 removes all air resistance from the simulation, and 1.0 indicates no drafting effects (e.g. cycling alone, or in the lead of a pack). Default value of 1.00 is used if field is null.
      Units: none. Valid range: 0.00 - 1.00. Resolution: 0.01
      requestFinishedReceiver - Receiver for the results of the command request. RequestStatus.FAIL_BAD_PARAMS Returned if windResistanceCoefficient is not within 0kg/m - 1.86 kg/m, or windSpeed is not within -127km/h - 127km/h, or draftingFactor is not within 0.00 - 1.00.
      Returns:
      True if request was submitted successfully and you are guaranteed a result on the result receiver.
      Since:
      2.1.8; requires Plugin Service 2.2.9+
    • requestSetWindResistance

      public boolean requestSetWindResistance(BigDecimal frontalSurfaceArea, BigDecimal dragCoefficient, BigDecimal airDensity, Integer windSpeed, BigDecimal draftingFactor, AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver)
      Send a request to the device to set the wind resistance. This data is optional and may not be supported by all devices. Use the AntPlusFitnessEquipmentPcc.requestCapabilities(IRequestFinishedReceiver, ICapabilitiesReceiver) method first to find if it is supported.
      Parameters:
      frontalSurfaceArea - The frontal surface area of the user plus virtual equipment. Default values are used if field is null. Units: m^2.
      Sample values:
      All-terrain (Mountain) Bike: 0.57 m^2
      Upright Commuting Bike: 0.55 m^2
      Road Bike, Touring Position (Default): 0.40 m^2
      Racing Bike, Rider Crouched, Tight Clothing: 0.36 m^2
      dragCoefficient - The drag coefficient is a dimensionless factor used to quantify air resistance based on how streamlined the user plus virtual equipment is. Default values are used if field is null. Units: none
      Sample values:
      All-terrain (Mountain) Bike: 1.20
      Upright Commuting Bike: 1.15
      Road Bike, Touring Position (Default): 1.00
      Racing Bike, Rider Crouched, Tight Clothing: 0.88
      airDensity - The air density is set in units of kilograms per cubic meter. Default values are used if field is null. Air density is dependent on the temperature, elevation, and humidity of the simulated track. The standard density of air, 1.275kg/m3 (15C at sea level) may be used as the default value for the air density field.
      windSpeed - Speed of simulated wind acting on the cyclist. (+) - Head Wind (-) - Tail Wind. Default value of 0 km/h is used if field is null.
      Units: km/h. Valid range: -127km/h - 127km/h. Resolution: 1km/h
      draftingFactor - The drafting factor is used to set the resistance reduction due to travelling behind a virtual competitor. The drafting factor scales the total wind resistance depending on the position of the user relative to other virtual competitors. The drafting scale factor ranges from 0.0 to 1.0, where 0.0 removes all air resistance from the simulation, and 1.0 indicates no drafting effects (e.g. cycling alone, or in the lead of a pack). Default value of 1.00 is used if field is null.
      Units: none. Valid range: 0.00 - 1.00. Resolution: 0.01
      requestFinishedReceiver - Receiver for the results of the command request. RequestStatus.FAIL_BAD_PARAMS Returned if calculated windResistanceCoefficient is not within 0kg/m - 1.86 kg/m or windSpeed is not within -127km/h - 127km/h, or draftingFactor is not within 0.00 - 1.00.
      Returns:
      True if request was submitted successfully and you are guaranteed a result on the result receiver.
      Since:
      2.1.8; requires Plugin Service 2.2.9+
    • requestTrackResistance

      public boolean requestTrackResistance(AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver, AntPlusFitnessEquipmentPcc.ITrackResistanceReceiver trackResistanceReceiver)
      Send a request to the device to send the track resistance. This data is optional and may not be supported by all devices. Use the AntPlusFitnessEquipmentPcc.requestCapabilities(IRequestFinishedReceiver, ICapabilitiesReceiver) method first to find if it is supported.
      Parameters:
      requestFinishedReceiver - Receiver for the results of the command request.
      trackResistanceReceiver - Receiver for the TrackResistance event, which is: The track resistance mode settings data. May be set to null if using the subscribe method instead of passing a receiver here.
      Returns:
      True if request was submitted successfully and you are guaranteed a result on the result receiver.
      Since:
      2.1.8; requires Plugin Service 2.2.9+
    • requestSetTrackResistance

      public boolean requestSetTrackResistance(BigDecimal grade, BigDecimal rollingResistanceCoefficient, AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver)
      Send a request to the device to set the track resistance. This data is optional and may not be supported by all devices. Use the AntPlusFitnessEquipmentPcc.requestCapabilities(IRequestFinishedReceiver, ICapabilitiesReceiver) method first to find if it is supported.
      Parameters:
      grade - Grade of simulated track. Gravitational resistance is calculated using the grade of the simulated track and the combined mass of the user plus fitness equipment. A default value of 0% will be assumed if set to null.
      Units: %. Valid range: -200.00% - 200.00%. Resolution: 0.01
      rollingResistanceCoefficient - The coefficient of rolling resistance is a dimensionless factor used to quantify rolling resistance based on the friction between the bicycle tires and the track surface. A default value of 0.004 will be assumed if set to null.
      Sample values:
      Wooden Track: 0.001
      Smooth Concrete: 0.002
      Asphalt Road (default): 0.004
      Rough Road: 0.008
      Units: none. Valid range: 0 - 0.0127. Resolution: 5x10^-5
      requestFinishedReceiver - Receiver for the results of the command request. RequestStatus.FAIL_BAD_PARAMS Returned if grade is outside of -200.00% - 200.00%, or if rollingResistanceCoefficient is outside of 0 - 0.0127.
      Returns:
      True if request was submitted successfully and you are guaranteed a result on the result receiver.
      Since:
      2.1.8; requires Plugin Service 2.2.9+