Packages
fit_decoder
0.1.0
A high-performance Elixir library for decoding Garmin .fit files using a C++ NIF.
Current section
Files
Jump to
Current section
Files
c_src/fit_sdk/cpp/fit_video_description_mesg.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_VIDEO_DESCRIPTION_MESG_HPP)
#define FIT_VIDEO_DESCRIPTION_MESG_HPP
#include "fit_mesg.hpp"
namespace fit
{
class VideoDescriptionMesg : public Mesg
{
public:
class FieldDefNum final
{
public:
static const FIT_UINT8 MessageIndex = 254;
static const FIT_UINT8 MessageCount = 0;
static const FIT_UINT8 Text = 1;
static const FIT_UINT8 Invalid = FIT_FIELD_NUM_INVALID;
};
VideoDescriptionMesg(void) : Mesg(Profile::MESG_VIDEO_DESCRIPTION)
{
}
VideoDescriptionMesg(const Mesg &mesg) : Mesg(mesg)
{
}
///////////////////////////////////////////////////////////////////////
// Checks the validity of message_index field
// Returns FIT_TRUE if field is valid
///////////////////////////////////////////////////////////////////////
FIT_BOOL IsMessageIndexValid() const
{
const Field* field = GetField(254);
if( FIT_NULL == field )
{
return FIT_FALSE;
}
return field->IsValueValid();
}
///////////////////////////////////////////////////////////////////////
// Returns message_index field
// Comment: Long descriptions will be split into multiple parts
///////////////////////////////////////////////////////////////////////
FIT_MESSAGE_INDEX GetMessageIndex(void) const
{
return GetFieldUINT16Value(254, 0, FIT_SUBFIELD_INDEX_MAIN_FIELD);
}
///////////////////////////////////////////////////////////////////////
// Set message_index field
// Comment: Long descriptions will be split into multiple parts
///////////////////////////////////////////////////////////////////////
void SetMessageIndex(FIT_MESSAGE_INDEX messageIndex)
{
SetFieldUINT16Value(254, messageIndex, 0, FIT_SUBFIELD_INDEX_MAIN_FIELD);
}
///////////////////////////////////////////////////////////////////////
// Checks the validity of message_count field
// Returns FIT_TRUE if field is valid
///////////////////////////////////////////////////////////////////////
FIT_BOOL IsMessageCountValid() const
{
const Field* field = GetField(0);
if( FIT_NULL == field )
{
return FIT_FALSE;
}
return field->IsValueValid();
}
///////////////////////////////////////////////////////////////////////
// Returns message_count field
// Comment: Total number of description parts
///////////////////////////////////////////////////////////////////////
FIT_UINT16 GetMessageCount(void) const
{
return GetFieldUINT16Value(0, 0, FIT_SUBFIELD_INDEX_MAIN_FIELD);
}
///////////////////////////////////////////////////////////////////////
// Set message_count field
// Comment: Total number of description parts
///////////////////////////////////////////////////////////////////////
void SetMessageCount(FIT_UINT16 messageCount)
{
SetFieldUINT16Value(0, messageCount, 0, FIT_SUBFIELD_INDEX_MAIN_FIELD);
}
///////////////////////////////////////////////////////////////////////
// Checks the validity of text field
// Returns FIT_TRUE if field is valid
///////////////////////////////////////////////////////////////////////
FIT_BOOL IsTextValid() const
{
const Field* field = GetField(1);
if( FIT_NULL == field )
{
return FIT_FALSE;
}
return field->IsValueValid();
}
///////////////////////////////////////////////////////////////////////
// Returns text field
///////////////////////////////////////////////////////////////////////
FIT_WSTRING GetText(void) const
{
return GetFieldSTRINGValue(1, 0, FIT_SUBFIELD_INDEX_MAIN_FIELD);
}
///////////////////////////////////////////////////////////////////////
// Set text field
///////////////////////////////////////////////////////////////////////
void SetText(FIT_WSTRING text)
{
SetFieldSTRINGValue(1, text, 0);
}
};
} // namespace fit
#endif // !defined(FIT_VIDEO_DESCRIPTION_MESG_HPP)