77 return d->messageIndex;
171 const int fieldId,
const QByteArray &data,
const FitBaseType baseType,
const bool bigEndian)
175 if (!
verify(data, baseType, 2, FitBaseType::Uint16,
"hr_zone.messageIndex"))
return false;
176 this->
messageIndex =
static_cast<MessageIndex>(bigEndian ? qFromBigEndian<quint16>(data) : qFromLittleEndian<quint16>(data));
179 if (!
verify(data, baseType, 1, FitBaseType::Uint8,
"hr_zone.highBpm"))
return false;
180 this->
highBpm =
static_cast<quint8
>(data.at(0));
183 if (!
verify(data, baseType, 1, FitBaseType::String,
"hr_zone.name"))
return false;
184 this->
name = QString::fromUtf8(data);
187 qWarning() <<
"ignoring unknown hr_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 ~HrZoneMessagePrivate()
QString name
The HrZoneMessage FIT message's name field.
quint8 highBpm
The HrZoneMessage FIT message's highBpm field.
MessageIndex messageIndex
The HrZoneMessage FIT message's messageIndex field.
The HrZoneMessage class represents a FIT HrZoneMessage data message.
MessageIndex messageIndex() const
Returns the HrZoneMessage data message's messageIndex field's current value.
void setName(const QString name)
Sets the name field to name.
QString name() const
Returns the HrZoneMessage data message's name field's current value.
HrZoneMessage()
Constructs a HrZoneMessage object.
quint8 highBpm() const
Returns the HrZoneMessage data message's highBpm 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.
Declares the HrZoneMessage class.
Declares the HrZoneMessagePrivate class.
FitBaseType
Garmin FIT FitBaseType type.
MessageIndex
Garmin FIT MessageIndex type.