110 return d->percentHydration;
121 return d->visceralFatMass;
143 return d->muscleMass;
165 return d->physiqueRating;
189 return d->metabolicAge;
200 return d->visceralFatRating;
214 return d->userProfileIndex;
369 , timestamp(static_cast<
DateTime>(-1))
370 , weight(static_cast<
Weight>(-1))
372 , percentHydration(0xFFFF)
373 , visceralFatMass(0xFFFF)
377 , physiqueRating(0xFF)
380 , visceralFatRating(0xFF)
397 const int fieldId,
const QByteArray &data,
const FitBaseType baseType,
const bool bigEndian)
401 if (!
verify(data, baseType, 4, FitBaseType::Uint32,
"weight_scale.timestamp"))
return false;
402 this->
timestamp =
static_cast<DateTime>(bigEndian ? qFromBigEndian<quint32>(data) : qFromLittleEndian<quint32>(data));
405 if (!
verify(data, baseType, 2, FitBaseType::Uint16,
"weight_scale.weight"))
return false;
406 this->
weight =
static_cast<Weight>(bigEndian ? qFromBigEndian<quint16>(data) : qFromLittleEndian<quint16>(data));
409 if (!
verify(data, baseType, 2, FitBaseType::Uint16,
"weight_scale.percentFat"))
return false;
410 this->
percentFat =
static_cast<quint16
>(bigEndian ? qFromBigEndian<quint16>(data) : qFromLittleEndian<quint16>(data));
413 if (!
verify(data, baseType, 2, FitBaseType::Uint16,
"weight_scale.percentHydration"))
return false;
414 this->
percentHydration =
static_cast<quint16
>(bigEndian ? qFromBigEndian<quint16>(data) : qFromLittleEndian<quint16>(data));
417 if (!
verify(data, baseType, 2, FitBaseType::Uint16,
"weight_scale.visceralFatMass"))
return false;
418 this->
visceralFatMass =
static_cast<quint16
>(bigEndian ? qFromBigEndian<quint16>(data) : qFromLittleEndian<quint16>(data));
421 if (!
verify(data, baseType, 2, FitBaseType::Uint16,
"weight_scale.boneMass"))
return false;
422 this->
boneMass =
static_cast<quint16
>(bigEndian ? qFromBigEndian<quint16>(data) : qFromLittleEndian<quint16>(data));
425 if (!
verify(data, baseType, 2, FitBaseType::Uint16,
"weight_scale.muscleMass"))
return false;
426 this->
muscleMass =
static_cast<quint16
>(bigEndian ? qFromBigEndian<quint16>(data) : qFromLittleEndian<quint16>(data));
429 if (!
verify(data, baseType, 2, FitBaseType::Uint16,
"weight_scale.basalMet"))
return false;
430 this->
basalMet =
static_cast<quint16
>(bigEndian ? qFromBigEndian<quint16>(data) : qFromLittleEndian<quint16>(data));
433 if (!
verify(data, baseType, 1, FitBaseType::Uint8,
"weight_scale.physiqueRating"))
return false;
437 if (!
verify(data, baseType, 2, FitBaseType::Uint16,
"weight_scale.activeMet"))
return false;
438 this->
activeMet =
static_cast<quint16
>(bigEndian ? qFromBigEndian<quint16>(data) : qFromLittleEndian<quint16>(data));
441 if (!
verify(data, baseType, 1, FitBaseType::Uint8,
"weight_scale.metabolicAge"))
return false;
445 if (!
verify(data, baseType, 1, FitBaseType::Uint8,
"weight_scale.visceralFatRating"))
return false;
449 if (!
verify(data, baseType, 2, FitBaseType::Uint16,
"weight_scale.userProfileIndex"))
return false;
453 qWarning() <<
"ignoring unknown weight_scale 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.
quint16 percentFat
The WeightScaleMessage FIT message's percentFat field.
quint8 visceralFatRating
The WeightScaleMessage FIT message's visceralFatRating field.
bool setField(const int fieldId, const QByteArray &data, const FitBaseType baseType, const bool bigEndian) override
MessageIndex userProfileIndex
The WeightScaleMessage FIT message's userProfileIndex field.
quint8 metabolicAge
The WeightScaleMessage FIT message's metabolicAge field.
quint8 physiqueRating
The WeightScaleMessage FIT message's physiqueRating field.
DateTime timestamp
The WeightScaleMessage FIT message's timestamp field.
quint16 muscleMass
The WeightScaleMessage FIT message's muscleMass field.
quint16 boneMass
The WeightScaleMessage FIT message's boneMass field.
quint16 activeMet
The WeightScaleMessage FIT message's activeMet field.
quint16 visceralFatMass
The WeightScaleMessage FIT message's visceralFatMass field.
quint16 percentHydration
The WeightScaleMessage FIT message's percentHydration field.
quint16 basalMet
The WeightScaleMessage FIT message's basalMet field.
Weight weight
The WeightScaleMessage FIT message's weight field.
virtual ~WeightScaleMessagePrivate()
The WeightScaleMessage class represents a FIT WeightScaleMessage data message.
quint16 boneMass() const
Returns the WeightScaleMessage data message's boneMass field's current value.
void setBoneMass(const quint16 boneMass)
Sets the boneMass field to boneMass.
quint8 physiqueRating() const
Returns the WeightScaleMessage data message's physiqueRating field's current value.
void setTimestamp(const DateTime timestamp)
Sets the timestamp field to timestamp.
quint8 visceralFatRating() const
Returns the WeightScaleMessage data message's visceralFatRating field's current value.
quint16 activeMet() const
Returns the WeightScaleMessage data message's activeMet field's current value.
void setVisceralFatMass(const quint16 visceralFatMass)
Sets the visceralFatMass field to visceralFatMass.
void setPercentFat(const quint16 percentFat)
Sets the percentFat field to percentFat.
quint16 muscleMass() const
Returns the WeightScaleMessage data message's muscleMass field's current value.
void setPhysiqueRating(const quint8 physiqueRating)
Sets the physiqueRating field to physiqueRating.
MessageIndex userProfileIndex() const
Returns the WeightScaleMessage data message's userProfileIndex field's current value.
void setBasalMet(const quint16 basalMet)
Sets the basalMet field to basalMet.
quint8 metabolicAge() const
Returns the WeightScaleMessage data message's metabolicAge field's current value.
quint16 percentFat() const
Returns the WeightScaleMessage data message's percentFat field's current value.
quint16 visceralFatMass() const
Returns the WeightScaleMessage data message's visceralFatMass field's current value.
Weight weight() const
Returns the WeightScaleMessage data message's weight field's current value.
void setPercentHydration(const quint16 percentHydration)
Sets the percentHydration field to percentHydration.
DateTime timestamp() const
Returns the WeightScaleMessage data message's timestamp field's current value.
quint16 percentHydration() const
Returns the WeightScaleMessage data message's percentHydration field's current value.
void setMuscleMass(const quint16 muscleMass)
Sets the muscleMass field to muscleMass.
void setActiveMet(const quint16 activeMet)
Sets the activeMet field to activeMet.
WeightScaleMessage()
Constructs a WeightScaleMessage object.
void setUserProfileIndex(const MessageIndex userProfileIndex)
Sets the userProfileIndex field to userProfileIndex.
void setMetabolicAge(const quint8 metabolicAge)
Sets the metabolicAge field to metabolicAge.
void setVisceralFatRating(const quint8 visceralFatRating)
Sets the visceralFatRating field to visceralFatRating.
void setWeight(const Weight weight)
Sets the weight field to weight.
quint16 basalMet() const
Returns the WeightScaleMessage data message's basalMet field's current value.
Weight
Garmin FIT Weight type.
FitBaseType
Garmin FIT FitBaseType type.
MessageIndex
Garmin FIT MessageIndex type.
DateTime
Seconds since UTC 00:00 Dec 31 1989.
Declares the WeightScaleMessage class.
Declares the WeightScaleMessagePrivate class.