public class AntPlusFitnessEquipmentPcc.BikeMethods
extends java.lang.Object
Constructor and Description |
---|
AntPlusFitnessEquipmentPcc.BikeMethods() |
Modifier and Type | Method and Description |
---|---|
boolean |
requestBasicResistance(AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver,
AntPlusFitnessEquipmentPcc.IBasicResistanceReceiver basicResistanceReceiver)
Send a request to the device to send the basic resistance.
|
boolean |
requestCommandStatus(AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver,
AntPlusFitnessEquipmentPcc.ICommandStatusReceiver commandStatusReceiver)
Send a request to the device to send the command status.
|
boolean |
requestSetBasicResistance(java.math.BigDecimal totalResistance,
AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver)
Send a request to the device to set the basic resistance.
|
boolean |
requestSetTargetPower(java.math.BigDecimal targetPower,
AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver)
Send a request to the device to set the target power.
|
boolean |
requestSetTrackResistance(java.math.BigDecimal grade,
java.math.BigDecimal rollingResistanceCoefficient,
AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver)
Send a request to the device to set the track resistance.
|
boolean |
requestSetWindResistance(java.math.BigDecimal frontalSurfaceArea,
java.math.BigDecimal dragCoefficient,
java.math.BigDecimal airDensity,
java.lang.Integer windSpeed,
java.math.BigDecimal draftingFactor,
AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver)
Send a request to the device to set the wind resistance.
|
boolean |
requestSetWindResistance(java.math.BigDecimal windResistanceCoefficient,
java.lang.Integer windSpeed,
java.math.BigDecimal draftingFactor,
AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver)
Send a request to the device to set the wind resistance.
|
boolean |
requestTargetPower(AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver,
AntPlusFitnessEquipmentPcc.ITargetPowerReceiver targetPowerReceiver)
Send a request to the device to send the target power.
|
boolean |
requestTrackResistance(AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver,
AntPlusFitnessEquipmentPcc.ITrackResistanceReceiver trackResistanceReceiver)
Send a request to the device to send the track resistance.
|
boolean |
requestWindResistance(AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver,
AntPlusFitnessEquipmentPcc.IWindResistanceReceiver windResistanceReceiver)
Send a request to the device to send the wind resistance.
|
boolean |
subscribeBasicResistanceEvent(AntPlusFitnessEquipmentPcc.IBasicResistanceReceiver basicResistanceReceiver)
Subscribe to receive BasicResistance events, which contain:
The basic resistance mode settings data.
|
void |
subscribeBikeDataEvent(AntPlusFitnessEquipmentPcc.IBikeDataReceiver BikeDataReceiver)
Subscribe to receive BikeData events, which contain:
The data specific to bikes.
|
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.
|
boolean |
subscribeTargetPowerEvent(AntPlusFitnessEquipmentPcc.ITargetPowerReceiver targetPowerReceiver)
Subscribe to receive TargetPower events, which contain:
The target power mode settings data.
|
boolean |
subscribeTrackResistanceEvent(AntPlusFitnessEquipmentPcc.ITrackResistanceReceiver trackResistanceReceiver)
Subscribe to receive TrackResistance events, which contain:
The track resistance mode settings data.
|
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.
|
public AntPlusFitnessEquipmentPcc.BikeMethods()
public void subscribeBikeDataEvent(AntPlusFitnessEquipmentPcc.IBikeDataReceiver BikeDataReceiver)
BikeDataReceiver
- receiver to receive events (or null to unsubscribe from this event).public boolean subscribeCommandStatusEvent(AntPlusFitnessEquipmentPcc.ICommandStatusReceiver commandStatusReceiver)
commandStatusReceiver
- Receiver for the CommandStatus event, which is: Confirms the status of commands sent from an open display to the fitness equipment.public boolean subscribeBasicResistanceEvent(AntPlusFitnessEquipmentPcc.IBasicResistanceReceiver basicResistanceReceiver)
#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.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 #requestCapabilities(IRequestFinishedReceiver, ICapabilitiesReceiver)
method first to find if it is supported.public boolean subscribeTargetPowerEvent(AntPlusFitnessEquipmentPcc.ITargetPowerReceiver targetPowerReceiver)
#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.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 #requestCapabilities(IRequestFinishedReceiver, ICapabilitiesReceiver)
method first to find if it is supported.public boolean subscribeWindResistanceEvent(AntPlusFitnessEquipmentPcc.IWindResistanceReceiver windResistanceReceiver)
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 #requestCapabilities(IRequestFinishedReceiver, ICapabilitiesReceiver)
method first to find if it is supported.public boolean subscribeTrackResistanceEvent(AntPlusFitnessEquipmentPcc.ITrackResistanceReceiver trackResistanceReceiver)
#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.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 #requestCapabilities(IRequestFinishedReceiver, ICapabilitiesReceiver)
method first to find if it is supported.public boolean requestCommandStatus(AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver, AntPlusFitnessEquipmentPcc.ICommandStatusReceiver commandStatusReceiver)
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.public boolean requestBasicResistance(AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver, AntPlusFitnessEquipmentPcc.IBasicResistanceReceiver basicResistanceReceiver)
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.public boolean requestSetBasicResistance(java.math.BigDecimal totalResistance, AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver)
#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.totalResistance
- Percentage of maximum resistance to be applied.requestFinishedReceiver
- Receiver for the results of the command request. RequestStatus.FAIL_BAD_PARAMS
Returned if totalResistance is not within 0% - 100%.public boolean requestTargetPower(AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver, AntPlusFitnessEquipmentPcc.ITargetPowerReceiver targetPowerReceiver)
#requestCapabilities(IRequestFinishedReceiver, ICapabilitiesReceiver)
method first to find if it is supported.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.public boolean requestSetTargetPower(java.math.BigDecimal targetPower, AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver)
#requestCapabilities(IRequestFinishedReceiver, ICapabilitiesReceiver)
method first to find if it is supported.targetPower
- The target power for fitness equipment operating in target power mode.requestFinishedReceiver
- Receiver for the results of the command request. RequestStatus.FAIL_BAD_PARAMS
Returned if targetPower is not within 0W - 1000W.public boolean requestWindResistance(AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver, AntPlusFitnessEquipmentPcc.IWindResistanceReceiver windResistanceReceiver)
#requestCapabilities(IRequestFinishedReceiver, ICapabilitiesReceiver)
method first to find if it is supported.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.public boolean requestSetWindResistance(java.math.BigDecimal windResistanceCoefficient, java.lang.Integer windSpeed, java.math.BigDecimal draftingFactor, AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver)
#requestCapabilities(IRequestFinishedReceiver, ICapabilitiesReceiver)
method first to find if it is supported.windResistanceCoefficient
- Product of Frontal Surface Area, Drag Coefficient and Air Density. Default value of 0.51 kg/m is used if field is null.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.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.
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.public boolean requestSetWindResistance(java.math.BigDecimal frontalSurfaceArea, java.math.BigDecimal dragCoefficient, java.math.BigDecimal airDensity, java.lang.Integer windSpeed, java.math.BigDecimal draftingFactor, AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver)
#requestCapabilities(IRequestFinishedReceiver, ICapabilitiesReceiver)
method first to find if it is supported.frontalSurfaceArea
- The frontal surface area of the user plus virtual equipment. Default values are used if field is null. Units: 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
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.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.
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.public boolean requestTrackResistance(AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver, AntPlusFitnessEquipmentPcc.ITrackResistanceReceiver trackResistanceReceiver)
#requestCapabilities(IRequestFinishedReceiver, ICapabilitiesReceiver)
method first to find if it is supported.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.public boolean requestSetTrackResistance(java.math.BigDecimal grade, java.math.BigDecimal rollingResistanceCoefficient, AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver)
#requestCapabilities(IRequestFinishedReceiver, ICapabilitiesReceiver)
method first to find if it is supported.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.
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.
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.Copyright © 2015 Dynastream Innovations Inc. All Rights Reserved.