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
WFWahooMotionAnalysisCalibrator.h
Go to the documentation of this file.
1 //
2 // WFWahooMotionAnalysisCalibrator.h
3 // WFConnector
4 //
5 // Created by Chris Uroda on 06/11/2014.
6 // Copyright (c) 2014 Wahoo Fitness. All rights reserved.
7 //
8 
9 //
10 // WFWahooMotionAnalysisCalibrator.h
11 // WFConnector
12 //
13 // Created by Chris Uroda on 06/11/2014.
14 // Copyright (c) 2014 Wahoo Fitness. All rights reserved.
15 //
16 
17 #import <Foundation/Foundation.h>
18 #import <WFConnector/WFSensorConnection.h>
19 
21 @class WFTimer;
22 
23 typedef NS_ENUM(NSInteger, WFWahooMotionAnalysisCalibratorState_t)
24 {
25  WF_WAHOO_MOTION_ANALYSIS_CALIBRATOR_STATE_IDLE,
26  WF_WAHOO_MOTION_ANALYSIS_CALIBRATOR_STATE_WORKING,
27  WF_WAHOO_MOTION_ANALYSIS_CALIBRATOR_STATE_UPLOADING,
28  WF_WAHOO_MOTION_ANALYSIS_CALIBRATOR_STATE_COMPLETED,
29  WF_WAHOO_MOTION_ANALYSIS_CALIBRATOR_STATE_FAILED,
30 };
31 
32 
33 typedef NS_ENUM(NSInteger, WFWahooMotionAnalysisCalibratorWorkingStatus_t)
34 {
35  WF_WAHOO_MOTION_ANALYSIS_CALIBRATOR_WORKING_STATUS_NOT_AVAILABLE,
36  WF_WAHOO_MOTION_ANALYSIS_CALIBRATOR_WORKING_STATUS_WAITING_FOR_DEVICE,
37  WF_WAHOO_MOTION_ANALYSIS_CALIBRATOR_WORKING_STATUS_WAITING_FOR_USER_READY,
38  WF_WAHOO_MOTION_ANALYSIS_CALIBRATOR_WORKING_STATUS_WAITING_FOR_USER_INPUT,
39  WF_WAHOO_MOTION_ANALYSIS_CALIBRATOR_WORKING_STATUS_IN_PROGRESS,
40  WF_WAHOO_MOTION_ANALYSIS_CALIBRATOR_WORKING_STATUS_PAUSED,
41  WF_WAHOO_MOTION_ANALYSIS_CALIBRATOR_WORKING_STATUS_PROCESSING,
42  WF_WAHOO_MOTION_ANALYSIS_CALIBRATOR_WORKING_STATUS_DEVICE_INTERRUPTION,
43 };
44 
45 
49 extern NSString* const WFWahooMotionAnalysisCalibratorErrorDomain;
50 
51 typedef NS_ENUM(NSUInteger, WFWahooMotionAnalysisCalibratorError)
52 {
53  WFWahooMotionAnalysisCalibratorErrorNone = 0,
54  WFWahooMotionAnalysisCalibratorErrorOperationNotPermitted,
55  WFWahooMotionAnalysisCalibratorErrorInvalidParameter,
56  WFWahooMotionAnalysisCalibratorErrorDeviceTimeout,
57  WFWahooMotionAnalysisCalibratorErrorDeviceError,
58  WFWahooMotionAnalysisCalibratorErrorDataSourceError,
59  WFWahooMotionAnalysisCalibratorErrorCalibrationTimeout,
60  WFWahooMotionAnalysisCalibratorErrorUserError,
61  WFWahooMotionAnalysisCalibratorErrorUnableToResolveCalibration,
62 };
63 
64 
68 @interface WFWahooMotionAnalysisCalibrator : NSObject
69 
73 @property (nonatomic, readonly) WFSensorConnection* sensorConnection;
74 
75 
79 @property (nonatomic, readonly) WFWahooMotionAnalysisCalibratorState_t state;
80 
81 
85 @property (nonatomic, readonly) WFWahooMotionAnalysisCalibratorWorkingStatus_t workingStatus;
86 
87 
91 @property (nonatomic, assign) id<WFWahooMotionAnalysisCalibratorDelegate> delegate;
92 
93 
94 
98 - (instancetype) initWithSensorConnection:(WFSensorConnection*)sensorConnection;
99 
100 
105 - (bool) beginCalibration;
106 
107 
112 - (void) abortCalibration;
113 
118 - (bool) continueCalibration;
119 
120 
126 
127 
133 
134 
135 @end
typedef NS_ENUM(NSInteger, WFWahooMotionAnalysisCalibratorState_t)
Definition: WFWahooMotionAnalysisCalibrator.h:23
id< WFWahooMotionAnalysisCalibratorDelegate > delegate
The delegate which will receive event/progress update callbacks.
Definition: WFWahooMotionAnalysisCalibrator.h:91
WFWahooMotionAnalysisCalibratorState_t state
The current state of this calibrator instance.
Definition: WFWahooMotionAnalysisCalibrator.h:79
The base class for all Wahoo Motion Analysis Calibrators.
Definition: WFWahooMotionAnalysisCalibrator.h:68
bool retryCalibrationProfileUpload()
Retry uploading the new calibration profile.
void abortCalibration()
Abort the calibration process.
bool continueCalibration()
Continue the calibration process when paused.
bool uploadDefaultCalibrationProfile()
Upload default calibration profile.
NSString *const WFWahooMotionAnalysisCalibratorErrorDomain
Error domain for WFWahooMotionAnalysisCalibrator errors.
WFSensorConnection * sensorConnection
The Sensor Connection which is being used to preform the calibration.
Definition: WFWahooMotionAnalysisCalibrator.h:73
Represents the connection for an ANT sensor.
Definition: WFSensorConnection.h:43
Definition: WFWahooMotionAnalysisCalibratorDelegate.h:12
bool beginCalibration()
Begin the calibration process.
WFWahooMotionAnalysisCalibratorWorkingStatus_t workingStatus
The current working status of this calibrator instance.
Definition: WFWahooMotionAnalysisCalibrator.h:85