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,
"power_zone.messageIndex"))
return false;
176 this->
messageIndex =
static_cast<MessageIndex>(bigEndian ? qFromBigEndian<quint16>(data) : qFromLittleEndian<quint16>(data));
179 if (!
verify(data, baseType, 2, FitBaseType::Uint16,
"power_zone.highValue"))
return false;
180 this->
highValue =
static_cast<quint16
>(bigEndian ? qFromBigEndian<quint16>(data) : qFromLittleEndian<quint16>(data));
183 if (!
verify(data, baseType, 1, FitBaseType::String,
"power_zone.name"))
return false;
184 this->
name = QString::fromUtf8(data);
187 qWarning() <<
"ignoring unknown power_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.
virtual ~PowerZoneMessagePrivate()
QString name
The PowerZoneMessage FIT message's name field.
bool setField(const int fieldId, const QByteArray &data, const FitBaseType baseType, const bool bigEndian) override
MessageIndex messageIndex
The PowerZoneMessage FIT message's messageIndex field.
quint16 highValue
The PowerZoneMessage FIT message's highValue field.
The PowerZoneMessage class represents a FIT PowerZoneMessage data message.
MessageIndex messageIndex() const
Returns the PowerZoneMessage data message's messageIndex field's current value.
void setHighValue(const quint16 highValue)
Sets the highValue field to highValue.
PowerZoneMessage()
Constructs a PowerZoneMessage object.
quint16 highValue() const
Returns the PowerZoneMessage data message's highValue field's current value.
void setMessageIndex(const MessageIndex messageIndex)
Sets the messageIndex field to messageIndex.
QString name() const
Returns the PowerZoneMessage data message's name field's current value.
void setName(const QString name)
Sets the name field to name.
Declares the PowerZoneMessage class.
Declares the PowerZoneMessagePrivate class.
FitBaseType
Garmin FIT FitBaseType type.
MessageIndex
Garmin FIT MessageIndex type.