77 return d->maxHeartRate;
88 return d->thresholdHeartRate;
99 return d->functionalThresholdPower;
110 return d->hrCalcType;
121 return d->pwrCalcType;
197 , thresholdHeartRate(0xFF)
198 , functionalThresholdPower(0xFFFF)
216 const int fieldId,
const QByteArray &data,
const FitBaseType baseType,
const bool bigEndian)
220 if (!
verify(data, baseType, 1, FitBaseType::Uint8,
"zones_target.maxHeartRate"))
return false;
224 if (!
verify(data, baseType, 1, FitBaseType::Uint8,
"zones_target.thresholdHeartRate"))
return false;
228 if (!
verify(data, baseType, 2, FitBaseType::Uint16,
"zones_target.functionalThresholdPower"))
return false;
229 this->
functionalThresholdPower =
static_cast<quint16
>(bigEndian ? qFromBigEndian<quint16>(data) : qFromLittleEndian<quint16>(data));
232 if (!
verify(data, baseType, 1, FitBaseType::Enum,
"zones_target.hrCalcType"))
return false;
236 if (!
verify(data, baseType, 1, FitBaseType::Enum,
"zones_target.pwrCalcType"))
return false;
240 qWarning() <<
"ignoring unknown zones_target 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.
PwrZoneCalc pwrCalcType
The ZonesTargetMessage FIT message's pwrCalcType field.
HrZoneCalc hrCalcType
The ZonesTargetMessage FIT message's hrCalcType field.
bool setField(const int fieldId, const QByteArray &data, const FitBaseType baseType, const bool bigEndian) override
quint8 maxHeartRate
The ZonesTargetMessage FIT message's maxHeartRate field.
quint8 thresholdHeartRate
The ZonesTargetMessage FIT message's thresholdHeartRate field.
virtual ~ZonesTargetMessagePrivate()
quint16 functionalThresholdPower
The ZonesTargetMessage FIT message's functionalThresholdPower field.
The ZonesTargetMessage class represents a FIT ZonesTargetMessage data message.
void setFunctionalThresholdPower(const quint16 functionalThresholdPower)
Sets the functionalThresholdPower field to functionalThresholdPower.
void setPwrCalcType(const PwrZoneCalc pwrCalcType)
Sets the pwrCalcType field to pwrCalcType.
void setHrCalcType(const HrZoneCalc hrCalcType)
Sets the hrCalcType field to hrCalcType.
quint8 thresholdHeartRate() const
Returns the ZonesTargetMessage data message's thresholdHeartRate field's current value.
PwrZoneCalc pwrCalcType() const
Returns the ZonesTargetMessage data message's pwrCalcType field's current value.
quint16 functionalThresholdPower() const
Returns the ZonesTargetMessage data message's functionalThresholdPower field's current value.
void setThresholdHeartRate(const quint8 thresholdHeartRate)
Sets the thresholdHeartRate field to thresholdHeartRate.
ZonesTargetMessage()
Constructs a ZonesTargetMessage object.
quint8 maxHeartRate() const
Returns the ZonesTargetMessage data message's maxHeartRate field's current value.
void setMaxHeartRate(const quint8 maxHeartRate)
Sets the maxHeartRate field to maxHeartRate.
HrZoneCalc hrCalcType() const
Returns the ZonesTargetMessage data message's hrCalcType field's current value.
FitBaseType
Garmin FIT FitBaseType type.
PwrZoneCalc
Garmin FIT PwrZoneCalc type.
HrZoneCalc
Garmin FIT HrZoneCalc type.
Declares the ZonesTargetMessage class.
Declares the ZonesTargetMessagePrivate class.