77 return d->messageIndex;
110 return d->fatCalories;
194 const int fieldId,
const QByteArray &data,
const FitBaseType baseType,
const bool bigEndian)
198 if (!
verify(data, baseType, 2, FitBaseType::Uint16,
"met_zone.messageIndex"))
return false;
199 this->
messageIndex =
static_cast<MessageIndex>(bigEndian ? qFromBigEndian<quint16>(data) : qFromLittleEndian<quint16>(data));
202 if (!
verify(data, baseType, 1, FitBaseType::Uint8,
"met_zone.highBpm"))
return false;
203 this->
highBpm =
static_cast<quint8
>(data.at(0));
206 if (!
verify(data, baseType, 2, FitBaseType::Uint16,
"met_zone.calories"))
return false;
207 this->
calories =
static_cast<quint16
>(bigEndian ? qFromBigEndian<quint16>(data) : qFromLittleEndian<quint16>(data));
210 if (!
verify(data, baseType, 1, FitBaseType::Uint8,
"met_zone.fatCalories"))
return false;
211 this->
fatCalories =
static_cast<quint8
>(data.at(0));
214 qWarning() <<
"ignoring unknown met_zone message field number" << fieldId << bigEndian;
#define QTFIT_END_NAMESPACE
Macro for ending the QtFit library's top-most namespace (if one is defined).
#define QTFIT_BEGIN_NAMESPACE
Macro for starting the QtFit library's top-most namespace (if one is defined).
MesgNum globalMessageNumber
FIT Globla Message Number for this FIT Data Message.
bool verify(const QByteArray &data, const FitBaseType actualType, const int expectedSize, const FitBaseType expectedType, const char *messageFieldName)
The AbstractDataMessage class is the polymorphic base class for all FIT Data Message classes.
bool setField(const int fieldId, const QByteArray &data, const FitBaseType baseType, const bool bigEndian) override
virtual ~MetZoneMessagePrivate()
MessageIndex messageIndex
The MetZoneMessage FIT message's messageIndex field.
quint16 calories
The MetZoneMessage FIT message's calories field.
quint8 highBpm
The MetZoneMessage FIT message's highBpm field.
quint8 fatCalories
The MetZoneMessage FIT message's fatCalories field.
The MetZoneMessage class represents a FIT MetZoneMessage data message.
MessageIndex messageIndex() const
Returns the MetZoneMessage data message's messageIndex field's current value.
void setCalories(const quint16 calories)
Sets the calories field to calories.
quint8 fatCalories() const
Returns the MetZoneMessage data message's fatCalories field's current value.
void setHighBpm(const quint8 highBpm)
Sets the highBpm field to highBpm.
void setMessageIndex(const MessageIndex messageIndex)
Sets the messageIndex field to messageIndex.
quint8 highBpm() const
Returns the MetZoneMessage data message's highBpm field's current value.
MetZoneMessage()
Constructs a MetZoneMessage object.
quint16 calories() const
Returns the MetZoneMessage data message's calories field's current value.
void setFatCalories(const quint8 fatCalories)
Sets the fatCalories field to fatCalories.
Declares the MetZoneMessage class.
Declares the MetZoneMessagePrivate class.
FitBaseType
Garmin FIT FitBaseType type.
MessageIndex
Garmin FIT MessageIndex type.