Wahoo Fitness API  3.6.1
Documentation for the iPhone version of the Wahoo Fitness API.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
WFBTLEBikeSpeedCadenceData Class Reference

Represents the data available from the BTLE Bike Speed and Cadence sensor. More...

#import <WFBTLEBikeSpeedCadenceData.h>

+ Inheritance diagram for WFBTLEBikeSpeedCadenceData:
+ Collaboration diagram for WFBTLEBikeSpeedCadenceData:

Instance Methods

(NSString *) - formattedCadence:
 Returns the cadence as a string formatted for display. More...
 
(NSString *) - formattedDistance:
 Returns the distance as a string formatted for display. More...
 
(NSString *) - formattedSpeed:
 Returns the speed as a string formatted for display. More...
 

Properties

float accumCadenceTime
 The accumulated time (in seconds) since the sensor was connected or reset. More...
 
ULONG accumCrankRevolutions
 The accumulated crank revolutions since the sensor was connected or reset. More...
 
float accumSpeedTime
 The accumulated time (in seconds) since the sensor was connected or reset. More...
 
ULONG accumWheelRevolutions
 The accumulated wheel revolutions since the sensor was connected or reset. More...
 
WFBTLECommonDatabtleCommonData
 Gets the metadata for the BTLE device. More...
 
NSTimeInterval cadenceTimestamp
 The real-time timestamp for cadence data from the sensor (as an offset from the Cocoa reference date). More...
 
BOOL cadenceTimestampOverflow
 Indicates that the time between cadence data samples from the sensor has exceeded the rollover time (64 seconds). More...
 
WFBTLESensorLocation_t eSensorLocation
 Gets a WFBTLESensorLocation_t which describes the sensor location. More...
 
UCHAR instantCrankRPM
 The instantaneous crank RPM, based on the last two sensor measurements. More...
 
USHORT instantWheelRPM
 The instantaneous wheel RPM, based on the last two sensor measurements. More...
 
BOOL isDataStale
 TRUE if data is considered stale, otherwise FALSE. More...
 
WFBTLECSCFeatures_tpstFeatures
 Gets a pointer to a WFBTLECSCFeatures_t structure which contains information about the device features. More...
 
WFConnectorSettingssettings
 Gets the persistent settings for the Wahoo API. More...
 
NSTimeInterval speedTimestamp
 The real-time timestamp for speed data from the sensor (as an offset from the Cocoa reference date). More...
 
BOOL speedTimestampOverflow
 Indicates that the time between speed data samples from the sensor has exceeded the rollover time (64 seconds). More...
 
ULONG ulOdometerWheelRevolutions
 Gets the total wheel revolutions for the device, since the last reset. More...
 
WFWahooCSCDatawahooData
 Gets the additional data available from Wahoo Fitness BTLE CSC devices. More...
 

Detailed Description

Represents the data available from the BTLE Bike Speed and Cadence sensor.

BTLE sensors send data in multiple packets. The WFBTLEBikeSpeedCadenceData combines the most commonly used of this data into a single entity. The data represents the latest of each data type sent from the sensor.

Note
The WFBTLEBikeSpeedCadenceData is an extension of the WFBikeSpeedCadenceData class. This class is specific to the data available from the BTLE speed and cadence sensors. Much of the data is the same as that available from the ANT+ speed and cadence sensors. The Wahoo Fitness Speed and Cadence sensors provide data beyond that specified by the BTLE CSC profile. This data is available through the WFBTLEBikeSpeedCadenceData::wahooData property. If the connected sensor is a non-Wahoo sensor, this data is not available.

Method Documentation

- (NSString*) formattedCadence: (BOOL showUnits

Returns the cadence as a string formatted for display.

See also
WFConnectorSettings
Parameters
showUnitsIf TRUE the units will be included in the string returned. Otherwise, the units are not included.
Returns
The formatted display string (cadence in RPMs).
- (NSString*) formattedDistance: (BOOL showUnits

Returns the distance as a string formatted for display.

See also
WFConnectorSettings
Parameters
showUnitsIf TRUE the units will be included in the string returned. Otherwise, the units are not included.
Returns
The formatted display string (distance in km or miles).
- (NSString*) formattedSpeed: (BOOL showUnits

Returns the speed as a string formatted for display.

See also
WFConnectorSettings
Parameters
showUnitsIf TRUE the units will be included in the string returned. Otherwise, the units are not included.
Returns
The formatted display string (speed in km/h or MPH).

Property Documentation

- (float) accumCadenceTime
readwritenonatomicassigninherited

The accumulated time (in seconds) since the sensor was connected or reset.

- (ULONG) accumCrankRevolutions
readwritenonatomicassigninherited

The accumulated crank revolutions since the sensor was connected or reset.

- (float) accumSpeedTime
readwritenonatomicassigninherited

The accumulated time (in seconds) since the sensor was connected or reset.

- (ULONG) accumWheelRevolutions
readwritenonatomicassigninherited

The accumulated wheel revolutions since the sensor was connected or reset.

- (WFBTLECommonData*) btleCommonData
readwritenonatomicretain

Gets the metadata for the BTLE device.

- (NSTimeInterval) cadenceTimestamp
readwritenonatomicassigninherited

The real-time timestamp for cadence data from the sensor (as an offset from the Cocoa reference date).

Time values from the sensors are implemented as an offset in seconds between the time when the sensor is turned on and the time when a data sample is taken. This value is typically a 16-bit unsigned integer in units of 1/1024 second. The rollover is then 64 seconds.

A base real-time value is stored when the first sample from the sensor is received. The timestamp of each subsequent sample is the base time value offset by the time value offset from the sensor. If the time between samples is greater than the rollover time, the base time value is set to the time the first sample after the delay is received.

- (BOOL) cadenceTimestampOverflow
readwritenonatomicassigninherited

Indicates that the time between cadence data samples from the sensor has exceeded the rollover time (64 seconds).

- (WFBTLESensorLocation_t) eSensorLocation
readwritenonatomicassign

Gets a WFBTLESensorLocation_t which describes the sensor location.

- (UCHAR) instantCrankRPM
readwritenonatomicassigninherited

The instantaneous crank RPM, based on the last two sensor measurements.

- (USHORT) instantWheelRPM
readwritenonatomicassigninherited

The instantaneous wheel RPM, based on the last two sensor measurements.

- (BOOL) isDataStale
readnonatomicassigninherited

TRUE if data is considered stale, otherwise FALSE.

- (WFBTLECSCFeatures_t*) pstFeatures
readnonatomicassign

Gets a pointer to a WFBTLECSCFeatures_t structure which contains information about the device features.

Note
If the sensor does not report features, this property will be nil.
- (WFConnectorSettings*) settings
readnonatomicassigninherited

Gets the persistent settings for the Wahoo API.

- (NSTimeInterval) speedTimestamp
readwritenonatomicassigninherited

The real-time timestamp for speed data from the sensor (as an offset from the Cocoa reference date).

Time values from the sensors are implemented as an offset in seconds between the time when the sensor is turned on and the time when a data sample is taken. This value is typically a 16-bit unsigned integer in units of 1/1024 second. The rollover is then 64 seconds.

A base real-time value is stored when the first sample from the sensor is received. The timestamp of each subsequent sample is the base time value offset by the time value offset from the sensor. If the time between samples is greater than the rollover time, the base time value is set to the time the first sample after the delay is received.

- (BOOL) speedTimestampOverflow
readwritenonatomicassigninherited

Indicates that the time between speed data samples from the sensor has exceeded the rollover time (64 seconds).

- (ULONG) ulOdometerWheelRevolutions
readwritenonatomicassign

Gets the total wheel revolutions for the device, since the last reset.

- (WFWahooCSCData*) wahooData
readwritenonatomicretain

Gets the additional data available from Wahoo Fitness BTLE CSC devices.

Note
This property is only available for Waho Fitness BTLE Bike Speed and Cadence devices. For all other devices, this property will be nil.