Trainer Stationary Bike Class
This class supports the stationary bike fitness equipment type.
Definition
Namespace: SmallEarthTech.AntPlus.DeviceProfiles.FitnessEquipment
Assembly: SmallEarthTech.AntPlus (in SmallEarthTech.AntPlus.dll) Version: 6.0.4+3bc433b476ad11fc6896cfd0bd783d60504dc315
Assembly: SmallEarthTech.AntPlus (in SmallEarthTech.AntPlus.dll) Version: 6.0.4+3bc433b476ad11fc6896cfd0bd783d60504dc315
C#
public class TrainerStationaryBike : FitnessEquipmentVB
Public Class TrainerStationaryBike
Inherits FitnessEquipmentC++
public ref class TrainerStationaryBike : public FitnessEquipmentF#
type TrainerStationaryBike =
class
inherit FitnessEquipment
end- Inheritance
- ObservableObject AntDevice FitnessEquipment TrainerStationaryBike
Remarks
An important consideration is an appropriate timeout to determine if a device has gone offline - battery
has died, device has been turned off, device is out of range of receiver, ane/or the RF environment the
device and receiver are operating in. Most devices broadcast at 4Hz, with the notable exception of
Geocache and Asset Tracker.
A reasonable rule of thumb is to set the timeout at 8 messages times the channel period per second; typically
2 seconds. Consult the device profile documentation at https://www.thisisant.com for a device and consult the channel
period defined for master devices.
Constructors
| TrainerStationaryBike(ChannelId, IAntChannel, ILoggerTrainerStationaryBike, TimeoutOptions) | Initializes a new instance of the TrainerStationaryBike class. |
| TrainerStationaryBike(ChannelId, IAntChannel, ILoggerTrainerStationaryBike, Int32) | Initializes a new instance of the TrainerStationaryBike class. |
Properties
| AveragePower | Gets the average power in watts. |
| CalibrationStatus | Gets the result of the requested calibration. |
| ChannelCount | This is a multiple of the base transmission frequency. All derived classes must implement this property.
See the master Channel Period specified in the specific ANT device specification for the count value. (Inherited from FitnessEquipment) |
| ChannelId | Gets the channel identifier. (Inherited from AntDevice) |
| CommonDataPages | Gets the common data pages. (Inherited from FitnessEquipment) |
| CurrentTemperature | Gets the current temperature in degrees Celsius. |
| DeviceImageStream | Gets the device image stream from the embedded resource image associated with the derived device class. (Inherited from FitnessEquipment) |
| GeneralData | Gets the general data. (Inherited from FitnessEquipment) |
| GeneralMetabolic | Gets the general metabolic reports. (Inherited from FitnessEquipment) |
| GeneralSettings | Gets the general settings. (Inherited from FitnessEquipment) |
| InstantaneousCadence | Gets the instantaneous pedaling cadence in revolutions per minute. |
| InstantaneousPower | Gets the instantaneous power in watts. |
| MaxTrainerResistance | Gets the maximum trainer resistance. (Inherited from FitnessEquipment) |
| Offline | Gets a value indicating whether this AntDevice is offline. (Inherited from AntDevice) |
| SpeedStatus | Gets the calibration speed status. |
| SpinDownTime | Gets the spin down time after calibration has been performed. |
| State | Gets the equipment state. (Inherited from FitnessEquipment) |
| TargetPower | Gets the trainer target power. |
| TargetSpeed | Gets the target speed during calibration. |
| TargetSpinDownTime | Gets the target spin down time in milliseconds during calibration. |
| Temperature | Gets the current temperature in degrees Celsius. |
| TemperatureStatus | Gets the calibration temperature status. |
| TrainerStatus | Gets the trainer status. |
| TrainerTorque | Gets the trainer torque. |
| TrainingModes | Gets the supported training modes. (Inherited from FitnessEquipment) |
| ZeroOffset | Gets the zero offset reported by the trainer. |
Methods
| CalibrationRequest | Calibrations the request. |
| Dispose |
Releases the resources used by the current instance of the class.
(Inherited from AntDevice) |
| HandleFEState | Handles the state of the fitness equipment. (Inherited from FitnessEquipment) |
| Parse |
Parses the specified data page.
(Overrides FitnessEquipmentParse(Byte)) |
| RequestDataPageT | Requests the data page. (Inherited from AntDevice) |
| RequestFECapabilities | Requests the fitness equipment capabilities. (Inherited from FitnessEquipment) |
| SendExtAcknowledgedMessage | Sends an acknowledged message to the ANT device. (Inherited from AntDevice) |
| SetBasicResistance | Sets the percentage of maximum resistance resistance. (Inherited from FitnessEquipment) |
| SetTargetPower | Sets the target power in wats. (Inherited from FitnessEquipment) |
| SetTrackResistance | Sets the track resistance. (Inherited from FitnessEquipment) |
| SetUserConfiguration | Sets the user configuration. (Inherited from FitnessEquipment) |
| SetWindResistance | Sets the wind resistance. (Inherited from FitnessEquipment) |
| ToString |
Returns a string representation of the current derived AntDevice.
(Overrides AntDeviceToString) |
Events
| DeviceWentOffline | Occurs when no messages have been received from the device within the specified timeout duration. (Inherited from AntDevice) |
| LapToggled | Occurs when a lap toggle is signaled by the device. (Inherited from FitnessEquipment) |
Fields
| _logger | The logger for derived classes to use. (Inherited from AntDevice) |
| handledPage |
Flag indicating the data page was handled by Parse(Byte).
(Inherited from FitnessEquipment) |