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
fit_convert.h
Go to the documentation of this file.
1 // The following FIT Protocol software provided may be used with FIT protocol
3 // devices only and remains the copyrighted property of Dynastream Innovations Inc.
4 // The software is being provided on an "as-is" basis and as an accommodation,
5 // and therefore all warranties, representations, or guarantees of any kind
6 // (whether express, implied or statutory) including, without limitation,
7 // warranties of merchantability, non-infringement, or fitness for a particular
8 // purpose, are specifically disclaimed.
9 //
10 // Copyright 2008 Dynastream Innovations Inc.
12 // ****WARNING**** This file is auto-generated! Do NOT edit this file.
13 // Profile Version = 2.0Release
14 // Tag = $Name: AKW2_000 $
15 // Product = SDK
16 // Alignment = 4 bytes, padding disabled.
18 
19 
20 #if !defined(FIT_CONVERT_H)
21 #define FIT_CONVERT_H
22 
23 #include "fit_product.h"
24 
25 
27 // Public Definitions
29 
30 typedef enum
31 {
39 
40 typedef enum
41 {
54 
55 typedef struct
56 {
59  #if defined(FIT_CONVERT_TIME_RECORD)
61  #endif
62  union
63  {
66  }u;
69  #if defined(FIT_CONVERT_CHECK_CRC)
71  #endif
80  #if defined(FIT_CONVERT_TIME_RECORD)
82  #endif
84 
85 
87 // Public Function Prototypes
89 
90 #if defined(__cplusplus)
91  extern "C" {
92 #endif
93 
94 #if defined(FIT_CONVERT_MULTI_THREAD)
95  void FitConvert_Init(FIT_CONVERT_STATE *state, FIT_BOOL read_file_header);
96 #else
97  void FitConvert_Init(FIT_BOOL read_file_header);
98 #endif
99 // Initialize the state of the converter to start parsing the file.
102 
103 #if defined(FIT_CONVERT_MULTI_THREAD)
104  FIT_CONVERT_RETURN FitConvert_Read(FIT_CONVERT_STATE *state, const void *data, FIT_UINT32 size);
105 #else
106  FIT_CONVERT_RETURN FitConvert_Read(const void *data, FIT_UINT32 size);
107 #endif
108 // Convert a stream of bytes.
110 // Parameters:
111 // state Pointer to converter state.
112 // data Pointer to a buffer containing bytes from the file stream.
113 // size Number of bytes in the data buffer.
114 //
115 // Returns FIT_CONVERT_CONTINUE when the all bytes in data have
116 // been decoded successfully and ready to accept next bytes in the
117 // file stream. No message is available yet.
118 // Returns FIT_CONVERT_MESSAGE_AVAILABLE when a message is
119 // complete. The message is valid until this function is called
120 // again.
121 // Returns FIT_CONVERT_ERROR if a decoding error occurs.
122 // Returns FIT_CONVERT_END_OF_FILE when the file has been decoded successfully.
124 
125 #if defined(FIT_CONVERT_MULTI_THREAD)
127 #else
129 #endif
130 // Returns the global message number of the decoded message.
133 
134 #if defined(FIT_CONVERT_MULTI_THREAD)
136 #else
138 #endif
139 // Returns a pointer to the data of the decoded message.
141 // Copy or cast to FIT_*_MESG structure.
143 
144 #if defined(FIT_CONVERT_MULTI_THREAD)
145  void FitConvert_RestoreFields(FIT_CONVERT_STATE *state, const void *mesg_data);
146 #else
147  void FitConvert_RestoreFields(const void *mesg_data);
148 #endif
149 // Restores fields that are not in decoded message from mesg_data.
151 // Use when modifying an existing file.
153 
156 // MMOORE: this function was added to obtain the current offset
157 // during the parsing process.
159 
160 #if defined(__cplusplus)
161  }
162 #endif
163 
164 #endif // !defined(FIT_CONVERT_H)
165 
FIT_MESG_NUM FitConvert_GetMessageNumber(void)
const FIT_MESG_DEF * mesg_def
Definition: fit_convert.h:68
uint8_t FIT_UINT8
Definition: fit.h:78
Definition: fit_convert.h:43
Definition: fit_convert.h:50
FIT_UINT8 mesg_index
Definition: fit_convert.h:73
FIT_UINT8 mesg_offset
Definition: fit_convert.h:75
FIT_CONVERT_DECODE_STATE
Definition: fit_convert.h:40
Definition: fit_convert.h:52
#define FIT_MESG_SIZE
Definition: fit_sdk.h:780
Definition: fit_convert.h:36
FIT_UINT8 field_offset
Definition: fit_convert.h:79
FIT_UINT8 field_index
Definition: fit_convert.h:78
FIT_UINT32 timestamp
Definition: fit_convert.h:60
Definition: fit_convert.h:35
Definition: fit_convert.h:47
FIT_UINT32 WFFitConvert_CurrentOffset()
FIT_UINT32 file_bytes_left
Definition: fit_convert.h:57
#define FIT_LOCAL_MESGS
Definition: fit_config.h:24
Definition: fit_convert.h:32
uint32_t FIT_UINT32
Definition: fit.h:98
Definition: fit_convert.h:55
FIT_ENUM FIT_BOOL
Definition: fit.h:140
FIT_FILE_HDR file_hdr
Definition: fit_convert.h:64
Definition: fit_convert.h:51
FIT_CONVERT_DECODE_STATE decode_state
Definition: fit_convert.h:72
void FitConvert_RestoreFields(const void *mesg_data)
Definition: fit_convert.h:46
Definition: fit_convert.h:44
uint16_t FIT_UINT16
Definition: fit.h:88
FIT_UINT8 field_num
Definition: fit_convert.h:77
Definition: fit_convert.h:45
Definition: fit.h:196
FIT_CONVERT_RETURN
Definition: fit_convert.h:30
Definition: fit_convert.h:37
Definition: fit_convert.h:34
FIT_UINT8 last_time_offset
Definition: fit_convert.h:81
Definition: fit_convert.h:42
FIT_CONVERT_RETURN FitConvert_Read(const void *data, FIT_UINT32 size)
const FIT_UINT8 * FitConvert_GetMessageData(void)
Definition: fit_convert.h:48
#define FIT_MAX_LOCAL_MESGS
Definition: fit.h:180
Definition: fit_convert.h:49
Definition: fit.h:156
FIT_UINT16 crc
Definition: fit_convert.h:70
FIT_UINT8 num_fields
Definition: fit_convert.h:76
Definition: fit_convert.h:33
FIT_UINT32 data_offset
Definition: fit_convert.h:58
void FitConvert_Init(FIT_BOOL read_file_header)
Definition: fit_sdk.h:766
FIT_UINT16 FIT_MESG_NUM
Definition: fit_sdk.h:59