Class AntPlusFitnessEquipmentPcc
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
Subscriptions and commands for bikes.static class
Receiver for the CalculatedTrainerDistance event, which is: The accumulated calculated distance traveled.static class
Receiver for the CalculatedTrainerSpeed event, which is: The average speed between two received messages calculated from the best available data from the trainer.static class
Sent from the fitness equipment while a calibration is being performed.static class
Response from the fitness equipment after it completes calibration.static class
Manufacturer-set capabilities data from the fitness equipment.class
Subscriptions and commands for climbers.static class
Confirms the status of commands sent from an open display to the fitness equipment.class
Subscriptions and commands for ellipticals.static enum
Defines Equipment State Codesstatic enum
Defines the Equipment Type Codesstatic enum
Defines Heart Rate Data Source Codesstatic interface
Receiver for the BasicResistance event, which is: The basic resistance mode settings data.static interface
Receiver for the BikeData event, which is: The data specific to bikes.static interface
Receiver for the CalculatedTrainerPower event, which is: The average power between two received messages calculated from the best available data from the trainer.static interface
Receiver for the CalculatedTrainerTorque event, which is: The average torque between two received messages calculated from the best available data from the trainer.static interface
Receiver for the CalibrationInProgress event, which is: Response from the fitness equipment while it completes calibration.static interface
Receiver for the CalibrationResponse event, which is: Response from the fitness equipment after it completes calibration.static interface
Receiver for the Capabilities event, which is: Manufacturer-set capabilities data from the fitness equipment.static interface
Receiver for the ClimberData event, which is: The data specific to climbers.static interface
Receiver for the CommandStatus event, which is: Confirms the status of commands sent from an open display to the fitness equipment.static interface
Receiver for the EllipticalData event, which is: The data specific to ellipticals.static interface
Receiver for the FitnessEquipmentState event, which is: The current type and state of the fitness equipment.static interface
Receiver for the GeneralFitnessEquipmentData event, which is: The general information required to be sent by the fitness equipment.static interface
Receiver for the GeneralMetabolicData event, which is: The metabolic data for the user.static interface
Receiver for the GeneralSettings event, which is: The general settings data.static interface
Receiver for the LapOccured event, which is: This event is fired when the fitness equipment determines a lap has been finished by the user.static interface
Receiver for the NordicSkierData event, which is: The data specific to nordic skiers.class
Defines the keys and values used to communicate between the PCC and plugin.static interface
Receiver for the RawTrainerData event, which is: The basic power and cadence data calculated by the trainer itself.static interface
Receiver for the RawTrainerTorqueData event, which is: Event timing information and torque values from a trainer that measures torque on the rear wheel.static interface
Receiver for the RowerData event, which is: The data specific to bikes.static interface
Receiver for the TargetPower event, which is: The target power mode settings data.static interface
Receiver for the TrackResistance event, which is: The track resistance mode settings data.static interface
Receiver for the TrainerStatus event, which is: Indicates whether the trainer requires calibration and/or configuration data to be sent, and whether the target power range can be attained based on the current cycling speed.static interface
Receiver for the TreadmillData event, which is: The data specific to treadmills.static interface
Receiver for the UserConfiguration event, which is: The user configuration page transmits user-entered data from the open display to the fitness equipment.static interface
Receiver for the WindResistance event, which is: The wind resistance mode settings data.class
Subscriptions and commands for nordic skiers.class
Subscriptions and commands for rowers.static class
Provides information about the user and previously paired sensors.static enum
The data source code.class
Subscriptions and commands for trainers.static enum
Status flag from trainers which indicate possible required user intervention.class
Subscriptions and commands for treadmills.static class
The user configuration page transmits user-entered data from the open display to the fitness equipment.Nested classes/interfaces inherited from class com.dsi.ant.plugins.antplus.pccbase.AntPlusCommonPcc
AntPlusCommonPcc.CommonDataPage, AntPlusCommonPcc.IBatteryStatusReceiver, AntPlusCommonPcc.IManufacturerIdentificationReceiver, AntPlusCommonPcc.IManufacturerSpecificDataReceiver, AntPlusCommonPcc.IProductInformationReceiver, AntPlusCommonPcc.IRequestFinishedReceiver, AntPlusCommonPcc.IRssiReceiver
Nested classes/interfaces inherited from class com.dsi.ant.plugins.antplus.pccbase.AntPluginPcc
AntPluginPcc.IDeviceStateChangeReceiver, AntPluginPcc.IPluginAccessResultReceiver<T extends AntPluginPcc>, AntPluginPcc.RequestAccessResultHandler<T extends AntPluginPcc>, AntPluginPcc.RequestAccessResultHandler_AsyncSearchByDevNumber<T extends AntPluginPcc>, AntPluginPcc.RequestAccessResultHandler_UI<T extends AntPluginPcc>, AntPluginPcc.StandardReleaseHandle<T extends AntPluginPcc>
-
Field Summary
Fields inherited from class com.dsi.ant.plugins.antplus.pccbase.AntPlusCommonPcc
mCommandLock, mRequestFinishedReceiver
Fields inherited from class com.dsi.ant.plugins.antplus.pccbase.AntPluginPcc
mReleaseHandle, mStateChangeReceiver, PATH_ANTPLUS_PLUGINS_PKG, reportedServiceVersion, supportsRssiEvent
-
Method Summary
Modifier and TypeMethodDescriptionGetter for bike methods.Getter for climber methods.Getter for elliptical methods.Getter for nordic skier methods.protected String
protected int
Getter for rower methods.protected android.content.Intent
Getter for trainer methods.Getter for treadmill methods.protected void
handlePluginEvent
(android.os.Message eventMsg) protected boolean
requestBasicResistance
(AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver, AntPlusFitnessEquipmentPcc.IBasicResistanceReceiver basicResistanceReceiver) Send a request to the device to send the basic resistance.boolean
requestCapabilities
(AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver, AntPlusFitnessEquipmentPcc.ICapabilitiesReceiver capabilitiesReceiver) Send a request to the device to send the capabilities.protected boolean
requestCommandStatus
(AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver, AntPlusFitnessEquipmentPcc.ICommandStatusReceiver commandStatusReceiver) Send a request to the device to send the command status.requestNewOpenAccess
(android.app.Activity userActivity, android.content.Context bindToContext, boolean skipPreferredSearch, int searchProximityThreshold, AntPluginPcc.IPluginAccessResultReceiver<AntPlusFitnessEquipmentPcc> resultReceiver, AntPluginPcc.IDeviceStateChangeReceiver stateReceiver, AntPlusFitnessEquipmentPcc.IFitnessEquipmentStateReceiver feStateReceiver) This request access method searches directly for the fitness equipment broadcast without negotiating an ANT-FS session.requestNewOpenAccess
(android.app.Activity userActivity, android.content.Context bindToContext, AntPluginPcc.IPluginAccessResultReceiver<AntPlusFitnessEquipmentPcc> resultReceiver, AntPluginPcc.IDeviceStateChangeReceiver stateReceiver, AntPlusFitnessEquipmentPcc.IFitnessEquipmentStateReceiver feStateReceiver) This request access method searches directly for the fitness equipment broadcast without negotiating an ANT-FS session.requestNewOpenAccess
(android.content.Context bindToContext, int antDeviceNumber, int searchProximityThreshold, AntPluginPcc.IPluginAccessResultReceiver<AntPlusFitnessEquipmentPcc> resultReceiver, AntPluginPcc.IDeviceStateChangeReceiver stateReceiver, AntPlusFitnessEquipmentPcc.IFitnessEquipmentStateReceiver feStateReceiver) This request access method searches directly for the fitness equipment broadcast without negotiating an ANT-FS session.requestNewOpenAccess
(android.content.Context bindToContext, int searchProximityThreshold, AsyncScanController.IAsyncScanResultReceiver scanResultReceiver, AntPlusFitnessEquipmentPcc.IFitnessEquipmentStateReceiver feStateReceiver) This request access method searches directly for the fitness equipment broadcast without negotiating an ANT-FS session.requestNewPersonalSessionAccess
(android.content.Context bindToContext, AntPluginPcc.IPluginAccessResultReceiver<AntPlusFitnessEquipmentPcc> resultReceiver, AntPluginPcc.IDeviceStateChangeReceiver stateReceiver, AntPlusFitnessEquipmentPcc.IFitnessEquipmentStateReceiver feStateReceiver, int channelDeviceNumber) Sends a request to begin broadcasting in order to attempt to start a session with any nearby fitness equipment.requestNewPersonalSessionAccess
(android.content.Context bindToContext, AntPluginPcc.IPluginAccessResultReceiver<AntPlusFitnessEquipmentPcc> resultReceiver, AntPluginPcc.IDeviceStateChangeReceiver stateReceiver, AntPlusFitnessEquipmentPcc.IFitnessEquipmentStateReceiver feStateReceiver, int channelDeviceNumber, AntPlusFitnessEquipmentPcc.Settings settings, FitFileCommon.FitFile[] selectedFiles) Sends a request to begin broadcasting in order to attempt to start a session with any nearby fitness equipment.protected boolean
requestSetBasicResistance
(BigDecimal totalResistance, AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver) Send a request to the device to set the basic resistance.protected boolean
requestSetTargetPower
(BigDecimal targetPower, AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver) Send a request to the device to set the target power.protected boolean
requestSetTrackResistance
(BigDecimal grade, BigDecimal rollingResistanceCoefficient, AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver) Send a request to the device to set the track resistance.boolean
requestSetUserConfiguration
(AntPlusFitnessEquipmentPcc.UserConfiguration userConfig, AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver) Send a request to the device to set the user configuration.protected boolean
requestSetWindResistance
(BigDecimal windResistanceCoefficient, Integer windSpeed, BigDecimal draftingFactor, AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver) Send a request to the device to set the wind resistance.protected 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.boolean
requestSpinDownCalibration
(AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver, AntPlusFitnessEquipmentPcc.ICalibrationResponseReceiver calibrationResponseReceiver, AntPlusFitnessEquipmentPcc.ICalibrationInProgressReceiver calibrationInProgressReceiver) Send a request to the device to start spin down calibration.protected boolean
requestTargetPower
(AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver, AntPlusFitnessEquipmentPcc.ITargetPowerReceiver targetPowerReceiver) Send a request to the device to send the target power.protected boolean
requestTrackResistance
(AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver, AntPlusFitnessEquipmentPcc.ITrackResistanceReceiver trackResistanceReceiver) Send a request to the device to send the track resistance.boolean
requestUserConfiguration
(AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver, AntPlusFitnessEquipmentPcc.IUserConfigurationReceiver userConfigurationReceiver) Send a request to the device to send the user configuration.protected boolean
requestWindResistance
(AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver, AntPlusFitnessEquipmentPcc.IWindResistanceReceiver windResistanceReceiver) Send a request to the device to send the wind resistance.boolean
requestZeroOffsetCalibration
(AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver, AntPlusFitnessEquipmentPcc.ICalibrationResponseReceiver calibrationResponseReceiver, AntPlusFitnessEquipmentPcc.ICalibrationInProgressReceiver calibrationInProgressReceiver) Send a request to the device to start zero offset calibration.protected boolean
subscribeBasicResistanceEvent
(AntPlusFitnessEquipmentPcc.IBasicResistanceReceiver basicResistanceReceiver) Subscribe to receive BasicResistance events, which contain: The basic resistance mode settings data.boolean
subscribeCalibrationInProgressEvent
(AntPlusFitnessEquipmentPcc.ICalibrationInProgressReceiver calibrationInProgressReceiver) Subscribe to receive CalibrationInProgress events, which contain: Response from the fitness equipment while it completes calibration.boolean
subscribeCalibrationResponseEvent
(AntPlusFitnessEquipmentPcc.ICalibrationResponseReceiver calibrationResponseReceiver) Subscribe to receive CalibrationResponse events, which contain: Response from the fitness equipment after it completes calibration.boolean
subscribeCapabilitiesEvent
(AntPlusFitnessEquipmentPcc.ICapabilitiesReceiver capabilitiesReceiver) Subscribe to receive Capabilities events, which contain: Manufacturer-set capabilities data from the fitness equipment.protected 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.void
subscribeGeneralFitnessEquipmentDataEvent
(AntPlusFitnessEquipmentPcc.IGeneralFitnessEquipmentDataReceiver GeneralFitnessEquipmentDataReceiver) Subscribe to receive GeneralFitnessEquipmentData events, which contain: The general information required to be sent by the fitness equipment.void
subscribeGeneralMetabolicDataEvent
(AntPlusFitnessEquipmentPcc.IGeneralMetabolicDataReceiver GeneralMetabolicDataReceiver) Subscribe to receive GeneralMetabolicData events, which contain: The metabolic data for the user.void
subscribeGeneralSettingsEvent
(AntPlusFitnessEquipmentPcc.IGeneralSettingsReceiver GeneralSettingsReceiver) Subscribe to receive GeneralSettings events, which contain: The general settings data.void
subscribeLapOccuredEvent
(AntPlusFitnessEquipmentPcc.ILapOccuredReceiver LapOccuredReceiver) Subscribe to receive LapOccured events, which contain: This event is fired when the fitness equipment determines a lap has been finished by the user.protected boolean
subscribeTargetPowerEvent
(AntPlusFitnessEquipmentPcc.ITargetPowerReceiver targetPowerReceiver) Subscribe to receive TargetPower events, which contain: The target power mode settings data.protected boolean
subscribeTrackResistanceEvent
(AntPlusFitnessEquipmentPcc.ITrackResistanceReceiver trackResistanceReceiver) Subscribe to receive TrackResistance events, which contain: The track resistance mode settings data.boolean
subscribeUserConfigurationEvent
(AntPlusFitnessEquipmentPcc.IUserConfigurationReceiver userConfigurationReceiver) Subscribe to receive UserConfiguration events, which contain: The user configuration page transmits user-entered data from the open display to the fitness equipment.protected 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.Methods inherited from class com.dsi.ant.plugins.antplus.pccbase.AntPlusCommonPcc
requestCommonDataPage, requestManufacturerSpecificDataPage, sendManufacturerSpecificDataPage, sendRequestCommand, sendRequestCommand, sendRequestCommand, sendRequestCommand, subscribeBatteryStatusEvent, subscribeManufacturerIdentificationEvent, subscribeManufacturerSpecificDataEvent, subscribeProductInformationEvent, subscribeRssiEvent, supportsRssi
Methods inherited from class com.dsi.ant.plugins.antplus.pccbase.AntPluginPcc
bindAndRequest, closePluginConnection, createCmdMsg, getAntDeviceNumber, getCurrentDeviceState, getDeviceName, getInstalledPluginsVersionNumber, getInstalledPluginsVersionString, getMissingDependencyName, getMissingDependencyPackageName, handleNonCmdPluginMessage, isUserPreferredDeviceForPlugin, isUserRecognizedDevice, releaseAccess, requestAccess_Helper_AsyncScanController, requestAccess_Helper_AsyncSearchByDevNumber, requestAccess_Helper_Main, requestAccess_Helper_SearchActivity, requestAccess_Helper_SubMain, requestAsyncScan_Helper_SubMain, sendPluginCommand, sendPluginCommand, startPluginManagerActivity, subscribeToEvent, unsubscribeFromEvent
-
Method Details
-
getRequiredServiceVersionForBind
protected int getRequiredServiceVersionForBind()- Specified by:
getRequiredServiceVersionForBind
in classAntPluginPcc
-
requestNewPersonalSessionAccess
public static PccReleaseHandle<AntPlusFitnessEquipmentPcc> requestNewPersonalSessionAccess(android.content.Context bindToContext, AntPluginPcc.IPluginAccessResultReceiver<AntPlusFitnessEquipmentPcc> resultReceiver, AntPluginPcc.IDeviceStateChangeReceiver stateReceiver, AntPlusFitnessEquipmentPcc.IFitnessEquipmentStateReceiver feStateReceiver, int channelDeviceNumber) Sends a request to begin broadcasting in order to attempt to start a session with any nearby fitness equipment. Once a session is established the provided FitnessEquipmentStateReceiver will return the type of equipment connected to and the current state of the connected equipment. After receiving this event you can then subscribe to other appropriate events. This requires the user to initiate a new session with the fitness equipment. For example, the user may place the device in close physical proximity of an 'ANT+ Link Here' logo or a user may be required to interact with the fitness equipment in another manner.Note: If a Fitness Equipment session disconnects after the connection is established, the plugin treats this as a 'DEAD' device and a new connection can be attempted using this function again.
Note 2: In pluginLib v.2.1.8 this function was renamed from requestNewFeSessionAccess
- Parameters:
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 equipment, 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.feStateReceiver
- The receiver to receive state updates. This receiver is also notified when a connection with equipment is first established, sending an initial message to indicate the equipment type and initial state.channelDeviceNumber
- Recommended value is 0. Two-byte device number in the ANT channel ID to use when opening the fitness equipment channel. This number is used for pairing with fitness equipment and should be as unique as possible. Set to zero to let the plugin generate the device ID based on the ANDROID_ID. This number cannot be changed after initialization.- 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.
-
requestNewPersonalSessionAccess
public static PccReleaseHandle<AntPlusFitnessEquipmentPcc> requestNewPersonalSessionAccess(android.content.Context bindToContext, AntPluginPcc.IPluginAccessResultReceiver<AntPlusFitnessEquipmentPcc> resultReceiver, AntPluginPcc.IDeviceStateChangeReceiver stateReceiver, AntPlusFitnessEquipmentPcc.IFitnessEquipmentStateReceiver feStateReceiver, int channelDeviceNumber, AntPlusFitnessEquipmentPcc.Settings settings, FitFileCommon.FitFile[] selectedFiles) Sends a request to begin broadcasting in order to attempt to start a session with any nearby fitness equipment. Once a session is established the provided FitnessEquipmentStateReceiver will return the type of equipment connected to and the current state of the connected equipment. After receiving this event you can then subscribe to other appropriate events. This requires the user to initiate a new session with the fitness equipment. For example, the user may place the device in close physical proximity of an 'ANT+ Link Here' logo or a user may be required to interact with the fitness equipment in another manner.Note: If a Fitness Equipment session disconnects after the connection is established, the plugin treats this as a 'DEAD' device and a new connection can be attempted using this function again.
Note 2: In pluginLib v.2.1.8 this function was renamed from requestNewFeSessionAccess
- Parameters:
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 equipment, 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.feStateReceiver
- The receiver to receive state updates. This receiver is also notified when a connection with equipment is first established, sending an initial message to indicate the equipment type and initial state.channelDeviceNumber
- Recommended value is 0. Two-byte device number in the ANT channel ID to use when opening the fitness equipment channel. This number is used for pairing with fitness equipment and should be as unique as possible. Set to zero to let the plugin generate the device ID based on the ANDROID_ID. This number cannot be changed after initialization.settings
- Settings object containing information about the user and paired heart rate sensor (if any). This information can be downloaded by the fitness equipment at the start of the session. If set to null, a default settings file with "invalid" fields will be used.selectedFiles
- Array of FIT files that will be exposed to the fitness equipment as selected for download at the start of the session. This is an optional field; set to null if there are no files available for download. In order to be properly identified by the fitness equipment, the FIT file type (e.g. workout/course) must be configured usingFitFileCommon.FitFile.setFileType(short fitFileType)
- 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.
-
requestNewOpenAccess
public static PccReleaseHandle<AntPlusFitnessEquipmentPcc> requestNewOpenAccess(android.app.Activity userActivity, android.content.Context bindToContext, AntPluginPcc.IPluginAccessResultReceiver<AntPlusFitnessEquipmentPcc> resultReceiver, AntPluginPcc.IDeviceStateChangeReceiver stateReceiver, AntPlusFitnessEquipmentPcc.IFitnessEquipmentStateReceiver feStateReceiver) This request access method searches directly for the fitness equipment broadcast without negotiating an ANT-FS session. This is useful for connecting to FE-C equipment or standard fitness equipment that is already broadcasting.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
requestNewOpenAccess(Activity, Context, boolean, int, IPluginAccessResultReceiver, IDeviceStateChangeReceiver, IFitnessEquipmentStateReceiver)
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.feStateReceiver
- The receiver to receive state updates. This receiver is also notified when a connection with equipment is first established, sending an initial message to indicate the equipment type and initial state.- 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.
- Since:
- 2.1.8 members only; requires Plugin Service 2.2.9+
-
requestNewOpenAccess
public static PccReleaseHandle<AntPlusFitnessEquipmentPcc> requestNewOpenAccess(android.app.Activity userActivity, android.content.Context bindToContext, boolean skipPreferredSearch, int searchProximityThreshold, AntPluginPcc.IPluginAccessResultReceiver<AntPlusFitnessEquipmentPcc> resultReceiver, AntPluginPcc.IDeviceStateChangeReceiver stateReceiver, AntPlusFitnessEquipmentPcc.IFitnessEquipmentStateReceiver feStateReceiver) This request access method searches directly for the fitness equipment broadcast without negotiating an ANT-FS session. This is useful for connecting to FE-C equipment or standard fitness equipment that is already broadcasting.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.feStateReceiver
- The receiver to receive state updates. This receiver is also notified when a connection with equipment is first established, sending an initial message to indicate the equipment type and initial state.- 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.
- Since:
- 2.1.8 members only; requires Plugin Service 2.2.9+
-
requestNewOpenAccess
public static PccReleaseHandle<AntPlusFitnessEquipmentPcc> requestNewOpenAccess(android.content.Context bindToContext, int antDeviceNumber, int searchProximityThreshold, AntPluginPcc.IPluginAccessResultReceiver<AntPlusFitnessEquipmentPcc> resultReceiver, AntPluginPcc.IDeviceStateChangeReceiver stateReceiver, AntPlusFitnessEquipmentPcc.IFitnessEquipmentStateReceiver feStateReceiver) This request access method searches directly for the fitness equipment broadcast without negotiating an ANT-FS session. This is useful for connecting to FE-C equipment or standard fitness equipment that is already broadcasting.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.feStateReceiver
- The receiver to receive state updates. This receiver is also notified when a connection with equipment is first established, sending an initial message to indicate the equipment type and initial state.- 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.
- Since:
- 2.1.8 members only; requires Plugin Service 2.2.9+
-
requestNewOpenAccess
public static AsyncScanController<AntPlusFitnessEquipmentPcc> requestNewOpenAccess(android.content.Context bindToContext, int searchProximityThreshold, AsyncScanController.IAsyncScanResultReceiver scanResultReceiver, AntPlusFitnessEquipmentPcc.IFitnessEquipmentStateReceiver feStateReceiver) This request access method searches directly for the fitness equipment broadcast without negotiating an ANT-FS session. This is useful for connecting to FE-C equipment or standard fitness equipment that is already broadcasting.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.feStateReceiver
- The receiver to receive state updates. This receiver is also notified when a connection with equipment is first established, sending an initial message to indicate the equipment type and initial state.- 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
. - Since:
- 2.1.8 members only; requires Plugin Service 2.2.9+
-
getServiceBindIntent
protected android.content.Intent getServiceBindIntent()- Specified by:
getServiceBindIntent
in classAntPluginPcc
-
getPluginPrintableName
- Specified by:
getPluginPrintableName
in classAntPluginPcc
-
handlePluginEvent
protected void handlePluginEvent(android.os.Message eventMsg) - Overrides:
handlePluginEvent
in classAntPlusCommonPcc
-
getTreadmillMethods
Getter for treadmill methods. -
getEllipticalMethods
Getter for elliptical methods. -
getBikeMethods
Getter for bike methods. -
getRowerMethods
Getter for rower methods. -
getClimberMethods
Getter for climber methods. -
getNordicSkierMethods
Getter for nordic skier methods. -
getTrainerMethods
Getter for trainer methods. -
subscribeLapOccuredEvent
public void subscribeLapOccuredEvent(AntPlusFitnessEquipmentPcc.ILapOccuredReceiver LapOccuredReceiver) Subscribe to receive LapOccured events, which contain: This event is fired when the fitness equipment determines a lap has been finished by the user. This function can also be used to unsubscribe from an event, by passing null as the receiver.- Parameters:
LapOccuredReceiver
- receiver to receive events (or null to unsubscribe from this event).
-
subscribeGeneralFitnessEquipmentDataEvent
public void subscribeGeneralFitnessEquipmentDataEvent(AntPlusFitnessEquipmentPcc.IGeneralFitnessEquipmentDataReceiver GeneralFitnessEquipmentDataReceiver) Subscribe to receive GeneralFitnessEquipmentData events, which contain: The general information required to be sent by the fitness equipment. This function can also be used to unsubscribe from an event, by passing null as the receiver.- Parameters:
GeneralFitnessEquipmentDataReceiver
- receiver to receive events (or null to unsubscribe from this event).
-
subscribeGeneralSettingsEvent
public void subscribeGeneralSettingsEvent(AntPlusFitnessEquipmentPcc.IGeneralSettingsReceiver GeneralSettingsReceiver) Subscribe to receive GeneralSettings events, which contain: The general settings data. 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:
GeneralSettingsReceiver
- receiver to receive events (or null to unsubscribe from this event).
-
subscribeGeneralMetabolicDataEvent
public void subscribeGeneralMetabolicDataEvent(AntPlusFitnessEquipmentPcc.IGeneralMetabolicDataReceiver GeneralMetabolicDataReceiver) Subscribe to receive GeneralMetabolicData events, which contain: The metabolic data for the user. 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:
GeneralMetabolicDataReceiver
- receiver to receive events (or null to unsubscribe from this event).
-
subscribeCapabilitiesEvent
public boolean subscribeCapabilitiesEvent(AntPlusFitnessEquipmentPcc.ICapabilitiesReceiver capabilitiesReceiver) Subscribe to receive Capabilities events, which contain: Manufacturer-set capabilities data from the fitness equipment. All fitness equipment that support the FE-C use case are required to support this page. This function can also be used to unsubscribe from an event, by passing null as the receiver.- Parameters:
capabilitiesReceiver
- Receiver for the Capabilities event, which is: Manufacturer-set capabilities data from the fitness equipment. All fitness equipment that support the FE-C use case are required to support this page.- Returns:
- true if successful
- Since:
- 2.1.8; requires Plugin Service 2.2.9+
-
subscribeUserConfigurationEvent
public boolean subscribeUserConfigurationEvent(AntPlusFitnessEquipmentPcc.IUserConfigurationReceiver userConfigurationReceiver) Subscribe to receive UserConfiguration events, which contain: The user configuration page transmits user-entered data from the open display to the fitness equipment. This data is optional and may not be supported by all devices. This function can also be used to unsubscribe from an event, by passing null as the receiver.- Parameters:
userConfigurationReceiver
- Receiver for the UserConfiguration event, which is: The user configuration page transmits user-entered data from the open display to the fitness equipment. This data is optional and may not be supported by all devices.- Returns:
- true if successful
- Since:
- 2.1.8; requires Plugin Service 2.2.9+
-
subscribeCalibrationResponseEvent
public boolean subscribeCalibrationResponseEvent(AntPlusFitnessEquipmentPcc.ICalibrationResponseReceiver calibrationResponseReceiver) Subscribe to receive CalibrationResponse events, which contain: Response from the fitness equipment after it completes calibration. This is an optional data page as many fitness equipment units do not require calibration. This function can also be used to unsubscribe from an event, by passing null as the receiver.- Parameters:
calibrationResponseReceiver
- Receiver for the CalibrationResponse event, which is: Response from the fitness equipment after it completes calibration. This is an optional data page as many fitness equipment units do not require calibration.- Returns:
- true if successful
- Since:
- 2.1.8; requires Plugin Service 2.2.9+
-
subscribeCalibrationInProgressEvent
public boolean subscribeCalibrationInProgressEvent(AntPlusFitnessEquipmentPcc.ICalibrationInProgressReceiver calibrationInProgressReceiver) Subscribe to receive CalibrationInProgress events, which contain: Response from the fitness equipment while it completes calibration. This is an optional data page as many fitness equipment units do not require calibration. This function can also be used to unsubscribe from an event, by passing null as the receiver.- Parameters:
calibrationInProgressReceiver
- Receiver for the CalibrationInProgress event, which is: Response from the fitness equipment while it completes calibration. This is an optional data page as many fitness equipment units do not require calibration.- Returns:
- true if successful
- Since:
- 2.1.8; requires Plugin Service 2.2.9+
-
subscribeCommandStatusEvent
protected 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
protected 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 therequestCapabilities(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 therequestCapabilities(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
protected 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 therequestCapabilities(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 therequestCapabilities(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
protected 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 therequestCapabilities(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
protected 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 therequestCapabilities(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 therequestCapabilities(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
protected 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
protected 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
protected 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 therequestCapabilities(IRequestFinishedReceiver, ICapabilitiesReceiver)
method first to find if it is supported. The current total resistance setting can be gathered from thesubscribeGeneralSettingsEvent(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
protected 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 therequestCapabilities(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
protected 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 therequestCapabilities(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.25WrequestFinishedReceiver
- 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
protected 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 therequestCapabilities(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
protected 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 therequestCapabilities(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/mwindSpeed
- 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/hdraftingFactor
- 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.01requestFinishedReceiver
- 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
protected 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 therequestCapabilities(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^2dragCoefficient
- 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.88airDensity
- 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/hdraftingFactor
- 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.01requestFinishedReceiver
- 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
protected 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 therequestCapabilities(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
protected 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 therequestCapabilities(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.01rollingResistanceCoefficient
- 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^-5requestFinishedReceiver
- 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+
-
requestCapabilities
public boolean requestCapabilities(AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver, AntPlusFitnessEquipmentPcc.ICapabilitiesReceiver capabilitiesReceiver) Send a request to the device to send the capabilities.- Parameters:
requestFinishedReceiver
- Receiver for the results of the command request.capabilitiesReceiver
- Receiver for the Capabilities event, which is: Manufacturer-set capabilities data from 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+
-
requestUserConfiguration
public boolean requestUserConfiguration(AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver, AntPlusFitnessEquipmentPcc.IUserConfigurationReceiver userConfigurationReceiver) Send a request to the device to send the user configuration. This data is optional and may not be supported by all devices.- Parameters:
requestFinishedReceiver
- Receiver for the results of the command request.userConfigurationReceiver
- Receiver for the UserConfiguration event, which is: The user configuration page transmits user-entered data from the 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+
-
requestSetUserConfiguration
public boolean requestSetUserConfiguration(AntPlusFitnessEquipmentPcc.UserConfiguration userConfig, AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver) Send a request to the device to set the user configuration. This data is optional and may not be supported by all devices.- Parameters:
userConfig
- The user configuration page transmits user-entered data from the open display to the fitness equipment.requestFinishedReceiver
- Receiver for the results of the command request.RequestStatus.FAIL_BAD_PARAMS
Returned if any userConfig fields fall outside of respective valid ranges.- 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+
-
requestZeroOffsetCalibration
public boolean requestZeroOffsetCalibration(AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver, AntPlusFitnessEquipmentPcc.ICalibrationResponseReceiver calibrationResponseReceiver, AntPlusFitnessEquipmentPcc.ICalibrationInProgressReceiver calibrationInProgressReceiver) Send a request to the device to start zero offset calibration. TheAntPlusFitnessEquipmentPcc.TrainerMethods.subscribeTrainerStatusEvent(ITrainerStatusReceiver)
may request this be done by the user. The command may not be supported by all devices. If this command is supported you may begin to receive calibrationInProgress messages for a period of time before receiving the calibration response.- Parameters:
requestFinishedReceiver
- Receiver for the results of the command request.calibrationResponseReceiver
- Receiver for the CalibrationResponse event, which is: Response from the fitness equipment after it completes calibration. May be set to null if using the subscribe method instead of passing a receiver here.calibrationInProgressReceiver
- Receiver for the CalibrationInProgress event, which is: Response from the fitness equipment while it completes calibration. 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+
-
requestSpinDownCalibration
public boolean requestSpinDownCalibration(AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver, AntPlusFitnessEquipmentPcc.ICalibrationResponseReceiver calibrationResponseReceiver, AntPlusFitnessEquipmentPcc.ICalibrationInProgressReceiver calibrationInProgressReceiver) Send a request to the device to start spin down calibration. TheAntPlusFitnessEquipmentPcc.TrainerMethods.subscribeTrainerStatusEvent(ITrainerStatusReceiver)
may request this be done by the user. The command may not be supported by all devices. If this command is supported you may begin to receive calibrationInProgress messages for a period of time before receiving the calibration response.- Parameters:
requestFinishedReceiver
- Receiver for the results of the command request.calibrationResponseReceiver
- Receiver for the CalibrationResponse event, which is: Response from the fitness equipment after it completes calibration. May be set to null if using the subscribe method instead of passing a receiver here.calibrationInProgressReceiver
- Receiver for the CalibrationInProgress event, which is: Response from the fitness equipment while it completes calibration. 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+
-