MenuProgramming Languages

C++ SDK

The C++ SDK includes a Visual Studio 2015 solution with two example projects.

  • Decode: Demonstrates decoding a FIT file; and use of the Decode and Message Broadcaster objects and Message Listener event interfaces.
  • Encode: Demonstrates encoding a FIT file and programmatic generation of messages.

The example Visual Studio solution is located in the \cpp\examples folder:

\path\to\fit\sdk\cpp\examples\examples.sln

To build the example projects, open the provided Visual Studio solution using VS2015 or higher, and from the menu choose Build -> Rebuild Solution.

Example C++ Encode Program

The example encode project is a command line application that can be executed directly from Visual Studio’s Debug menu. The example project creates three sample fit files. The files will be written to the cpp\examples\encode folder.

Example C+ Decode Program

The example decode project is a command line application that can be executed directly from Visual Studio’s Debug menu. The decode project expects the name of the file to be decoded to be specified as a command line argument. The filename can be set from the project’s properties dialog box. The path can be relative or absolute. The decode project will write the contents of the file to the Command Prompt window.