BikeCadenceSensor Class

This class supports bike cadence sensors.

Definition

Namespace: SmallEarthTech.AntPlus.DeviceProfiles.BikeSpeedAndCadence
Assembly: SmallEarthTech.AntPlus (in SmallEarthTech.AntPlus.dll) Version: 4.0.0.0+01fc5ca24e8f030354f28ec9cef320bc5cbb0ef6
C#
public class BikeCadenceSensor : CommonSpeedCadence
Inheritance
Object    ObservableObject    AntDevice    CommonSpeedCadence    BikeCadenceSensor

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. 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

BikeCadenceSensor(ChannelId, IAntChannel, ILoggerBikeCadenceSensor, TimeoutOptions) Initializes a new instance of the BikeCadenceSensor class.
BikeCadenceSensor(ChannelId, IAntChannel, ILoggerBikeCadenceSensor, Int32) Initializes a new instance of the BikeCadenceSensor class.

Properties

BatteryStatusGets the battery status.
(Inherited from CommonSpeedCadence)
ChannelCountThis 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.
(Overrides AntDeviceChannelCount)
ChannelIdGets the channel identifier.
(Inherited from AntDevice)
CumulativeOperatingTimeGets the cumulative operating time.
(Inherited from CommonSpeedCadence)
DeviceImageStreamGets the device image stream from the embedded resource image associated with the derived device class.
(Overrides AntDeviceDeviceImageStream)
InstantaneousCadenceGets the instantaneous cadence in rotations per minute.
ManufacturerInfoGets the manufacturer information.
(Inherited from CommonSpeedCadence)
OfflineGets a value indicating whether this AntDevice is offline.
(Inherited from AntDevice)
ProductInfoGets the product information.
(Inherited from CommonSpeedCadence)
StoppedGets a value indicating whether this sensor has detected stopped condition.
(Inherited from CommonSpeedCadence)

Methods

DisposePerforms application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
(Inherited from AntDevice)
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
ParseParses the specified data page.
(Overrides CommonSpeedCadenceParse(Byte))
RequestDataPageTRequests the data page.
(Inherited from AntDevice)
SendExtAcknowledgedMessageSends an acknowledged message to the ANT device.
(Inherited from AntDevice)
ToStringReturns a string that represents the current object.
(Overrides AntDeviceToString)

Events

DeviceWentOfflineOccurs when no messages have been received from the device within the specified timeout duration.
(Inherited from AntDevice)

Fields

_loggerThe logger for derived classes to use.
(Inherited from AntDevice)
DeviceClass The device type value transmitted in the channel ID.
isFirstDataMessageThe is first data message received.
(Inherited from CommonSpeedCadence)
prevEventTimeThe previous event time
(Inherited from CommonSpeedCadence)
prevRevCountThe previous revolution count
(Inherited from CommonSpeedCadence)

See Also