Packages

A high-performance Elixir library for decoding Garmin .fit files using a C++ NIF.

Current section

Files

Jump to
fit_decoder c_src fit_sdk cpp fit_buffer_encode.hpp
Raw

c_src/fit_sdk/cpp/fit_buffer_encode.hpp

/////////////////////////////////////////////////////////////////////////////////////////////
// Copyright 2025 Garmin International, Inc.
// Licensed under the Flexible and Interoperable Data Transfer (FIT) Protocol License; you
// may not use this file except in compliance with the Flexible and Interoperable Data
// Transfer (FIT) Protocol License.
/////////////////////////////////////////////////////////////////////////////////////////////
// ****WARNING**** This file is auto-generated! Do NOT edit this file.
// Profile Version = 21.171.0Release
// Tag = production/release/21.171.0-0-g57fed75
/////////////////////////////////////////////////////////////////////////////////////////////
#if !defined(FIT_BUFFER_ENCODE_HPP)
#define FIT_BUFFER_ENCODE_HPP
#include <iosfwd>
#include <sstream>
#include <string>
#include "fit.hpp"
#include "fit_mesg.hpp"
#include "fit_mesg_definition.hpp"
#include "fit_mesg_definition_listener.hpp"
#include "fit_mesg_listener.hpp"
namespace fit
{
class BufferEncode : public MesgListener, public MesgDefinitionListener
{
public:
BufferEncode(void);
void Open();
void Write(const MesgDefinition& mesgDef);
void Write(const Mesg& mesg);
void Write(const std::vector<Mesg>& mesgs);
std::string Close(void);
void OnMesg(Mesg& mesg);
void OnMesgDefinition(MesgDefinition& mesgDef);
private:
std::stringstream stringWriter;
FIT_UINT32 dataSize;
MesgDefinition lastMesgDefinition[FIT_MAX_LOCAL_MESGS];
};
} // namespace fit
#endif // defined(FIT_BUFFER_ENCODE_HPP)