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
WFBTLEHeartrateData Class Reference

Represents the data available from the BTLE Heart Rate sensor. More...

#import <WFBTLEHeartrateData.h>

+ Inheritance diagram for WFBTLEHeartrateData:
+ Collaboration diagram for WFBTLEHeartrateData:

Instance Methods

(NSString *) - formattedHeartrate:
 Returns the heart rate as a string formatted for display. More...
 

Properties

ULONG accumBeatCount
 A 32-bit integer value which increments with each heart beat event. More...
 
USHORT beatTime
 Represents the time of the last valid heart beat event. More...
 
WFBTLECommonDatabtleCommonData
 Common sensor data for BTLE sensors, provides information about the sensor. More...
 
UCHAR computedHeartrate
 Instantaneous heart rate, in beats per minute. More...
 
BOOL isDataStale
 TRUE if data is considered stale, otherwise FALSE. More...
 
NSArray * rrIntervals
 Gets an array of R-R intervals reported by the sensor since the last time data was read. More...
 
WFBTLEHeartrateData_SensorContactStatus sensorContactStatus
 
WFConnectorSettingssettings
 Gets the persistent settings for the Wahoo API. More...
 
NSTimeInterval timestamp
 The real-time timestamp for data from the sensor (as an offset from the Cocoa reference date). More...
 
BOOL timestampOverflow
 Indicates that the time between data samples from the sensor has exceeded the rollover time (64 seconds). More...
 

Detailed Description

Represents the data available from the BTLE Heart Rate sensor.

BTLE sensors send data in multiple packets. The WFBTLEHeartrateData 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.

Method Documentation

- (NSString*) formattedHeartrate: (BOOL showUnits

Returns the heart rate 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 (heart rate in BPM).

Property Documentation

- (ULONG) accumBeatCount
readwritenonatomicassigninherited

A 32-bit integer value which increments with each heart beat event.

This value represents the same data as WFHeartrateRawData::beatCount, but stores values larger than 255.

- (USHORT) beatTime
readwritenonatomicassigninherited

Represents the time of the last valid heart beat event.

The time units are 1/1024 seconds. Since the values are stored in two byte integers which have a maximum value of 65536, the value will roll over at 64 seconds (65536 / 1024). This should be taken into consideration when determining the currency of the data.

- (WFBTLECommonData *) btleCommonData
readwritenonatomicretain

Common sensor data for BTLE sensors, provides information about the sensor.

Note
This property is only available for BTLE sensors. All other sensors will have a nil value.
- (UCHAR) computedHeartrate
readwritenonatomicassigninherited

Instantaneous heart rate, in beats per minute.

The valid values are 1-255, a value of 0 represents invalid data.

- (BOOL) isDataStale
readnonatomicassigninherited

TRUE if data is considered stale, otherwise FALSE.

- (NSArray *) rrIntervals
readwritenonatomicretain

Gets an array of R-R intervals reported by the sensor since the last time data was read.

When R-R intervals are not available, this property will be nil.

When available, this property will contain one or more NSNumber instances, each representing an R-R interval in seconds. The array is in ascending order (the oldest value is first). Each NSNumber instance contains an NSTimeInterval value.

Note
The R-R values represent those reported by the sensor since the last time that getHeartrateData (WFHeartrateConnection) was invoked. The API will cache the R-R intervals received between calls to getHeartrateData (WFHeartrateConnection), and will empty the cache when that method is called.
- (WFBTLEHeartrateData_SensorContactStatus) sensorContactStatus
readwritenonatomicassign
- (WFConnectorSettings*) settings
readnonatomicassigninherited

Gets the persistent settings for the Wahoo API.

- (NSTimeInterval) timestamp
readwritenonatomicassigninherited

The real-time timestamp for 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) timestampOverflow
readwritenonatomicassigninherited

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