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

Provides methods for parsing a FIT file. More...

#import <WFFitParser.h>

+ Inheritance diagram for WFFitParser:
+ Collaboration diagram for WFFitParser:

Class Methods

(NSDate *) + getDateFromTimestamp:
 Returns an NSDate from an ANT FS Timestamp. More...
 
(ULONG+ getTimestampFromDate:
 Returns an ANT FS Timestamp for the given date. More...
 
(WFFitActivityFileData *) + parseActivityFit:cancelPointer:sendProgressToDelegate:
 Parses a FIT file into a WFFitActivityFileData instance. More...
 
(NSArray *) + parseFit:cancelPointer:sendProgressToDelegate:
 Parses a FIT file into an array of entities. More...
 
(WFFitSettingsFileData *) + parseSettingsFit:
 Parses a FIT settings file into a WFFitSettingsFileData instance. More...
 

Detailed Description

Provides methods for parsing a FIT file.

Method Documentation

+ (NSDate*) getDateFromTimestamp: (ULONG ulTime

Returns an NSDate from an ANT FS Timestamp.

Parameters
ulTimeThe ANT FS Timestamp (the number of seconds elapsed since 00:00 in the morning of December 31, 1989).
Returns
The NSDate representation of the ANT FS Timestamp.
+ (ULONG) getTimestampFromDate: (NSDate *)  date

Returns an ANT FS Timestamp for the given date.

Parameters
dateThe date to be converted to an ANT FS Timestamp.
Returns
The ANT FS Timestamp representation of the specified date (the number of seconds elapsed since 00:00 in the morning of December 31, 1989).
+ (WFFitActivityFileData*) parseActivityFit: (NSString *)  filePath
cancelPointer: (volatile BOOL *)  pbCancel
sendProgressToDelegate: (id< WFFitParserDelegate >)  progressDelegate 

Parses a FIT file into a WFFitActivityFileData instance.

This method will parse a FIT file downloaded from most fitness watch types (Garmin FR60, FR310, etc). The workout data contained in the FIT file will be represented in the WFFitActivityFileData instance returned.

Parameters
filePathThe path to the FIT file to be parsed.
pbCancelA pointer to a BOOL value indicating whether the parsing operation should be cancelled. The parsing operation can take quite a while if the FIT file is large. Setting the underlying value at the pointer location to TRUE while the parsing is in progress will cause the parsing to be cancelled (this would need to be done from a thread other than the one on which this method was invoked). This parameter may not be NULL.
progressDelegateA reference to a WFFitParserDelegate which will receive progress updates. If progress updates are not desired, this parameter may be set to nil.
Returns
A WFFitActivityFileData representing the contents of the FIT file.
+ (NSArray*) parseFit: (NSString *)  filePath
cancelPointer: (volatile BOOL *)  pbCancel
sendProgressToDelegate: (id< WFFitParserDelegate >)  progressDelegate 

Parses a FIT file into an array of entities.

Parameters
filePathThe path to the FIT file to be parsed.
pbCancelA pointer to a BOOL value indicating whether the parsing operation should be cancelled. The parsing operation can take quite a while if the FIT file is large. Setting the underlying value at the pointer location to TRUE while the parsing is in progress will cause the parsing to be cancelled (this would need to be done from a thread other than the one on which this method was invoked). This parameter may not be NULL.
progressDelegateA reference to a WFFitParserDelegate which will receive progress updates. If progress updates are not desired, this parameter may be set to nil.
Returns
An array of entities representing the contents of the FIT file. The contents of this array will depend on the type of FIT file at the specified path. Entities are types such as WFFitMesgFileId, WFFitMessageBloodPressure, WFFitMessageWeightScale, WFFitMesgUserProfile, etc.
+ (WFFitSettingsFileData*) parseSettingsFit: (NSString *)  filePath

Parses a FIT settings file into a WFFitSettingsFileData instance.

Parameters
filePathThe path to the FIT file to be parsed.
Returns
A WFFitSettingsFileData representing the contents of the FIT file.