77 return d->messageIndex;
88 return d->wktStepName;
99 return d->durationType;
110 return d->durationValue;
121 return d->targetType;
132 return d->targetValue;
143 return d->customTargetValueLow;
154 return d->customTargetValueHigh;
198 return d->exerciseCategory;
209 return d->exerciseName;
220 return d->exerciseWeight;
231 return d->weightDisplayUnit;
408 , durationValue(0xFFFFFFFF)
410 , targetValue(0xFFFFFFFF)
411 , customTargetValueLow(0xFFFFFFFF)
412 , customTargetValueHigh(0xFFFFFFFF)
416 , exerciseName(0xFFFF)
417 , exerciseWeight(0xFFFF)
434 const int fieldId,
const QByteArray &data,
const FitBaseType baseType,
const bool bigEndian)
438 if (!
verify(data, baseType, 2, FitBaseType::Uint16,
"workout_step.messageIndex"))
return false;
439 this->
messageIndex =
static_cast<MessageIndex>(bigEndian ? qFromBigEndian<quint16>(data) : qFromLittleEndian<quint16>(data));
442 if (!
verify(data, baseType, 1, FitBaseType::String,
"workout_step.wktStepName"))
return false;
446 if (!
verify(data, baseType, 1, FitBaseType::Enum,
"workout_step.durationType"))
return false;
450 if (!
verify(data, baseType, 4, FitBaseType::Uint32,
"workout_step.durationValue"))
return false;
451 this->
durationValue =
static_cast<quint32
>(bigEndian ? qFromBigEndian<quint32>(data) : qFromLittleEndian<quint32>(data));
454 if (!
verify(data, baseType, 1, FitBaseType::Enum,
"workout_step.targetType"))
return false;
458 if (!
verify(data, baseType, 4, FitBaseType::Uint32,
"workout_step.targetValue"))
return false;
459 this->
targetValue =
static_cast<quint32
>(bigEndian ? qFromBigEndian<quint32>(data) : qFromLittleEndian<quint32>(data));
462 if (!
verify(data, baseType, 4, FitBaseType::Uint32,
"workout_step.customTargetValueLow"))
return false;
463 this->
customTargetValueLow =
static_cast<quint32
>(bigEndian ? qFromBigEndian<quint32>(data) : qFromLittleEndian<quint32>(data));
466 if (!
verify(data, baseType, 4, FitBaseType::Uint32,
"workout_step.customTargetValueHigh"))
return false;
467 this->
customTargetValueHigh =
static_cast<quint32
>(bigEndian ? qFromBigEndian<quint32>(data) : qFromLittleEndian<quint32>(data));
470 if (!
verify(data, baseType, 1, FitBaseType::Enum,
"workout_step.intensity"))
return false;
474 if (!
verify(data, baseType, 1, FitBaseType::String,
"workout_step.notes"))
return false;
475 this->
notes = QString::fromUtf8(data);
478 if (!
verify(data, baseType, 1, FitBaseType::Enum,
"workout_step.equipment"))
return false;
482 if (!
verify(data, baseType, 2, FitBaseType::Uint16,
"workout_step.exerciseCategory"))
return false;
486 if (!
verify(data, baseType, 2, FitBaseType::Uint16,
"workout_step.exerciseName"))
return false;
487 this->
exerciseName =
static_cast<quint16
>(bigEndian ? qFromBigEndian<quint16>(data) : qFromLittleEndian<quint16>(data));
490 if (!
verify(data, baseType, 2, FitBaseType::Uint16,
"workout_step.exerciseWeight"))
return false;
491 this->
exerciseWeight =
static_cast<quint16
>(bigEndian ? qFromBigEndian<quint16>(data) : qFromLittleEndian<quint16>(data));
494 if (!
verify(data, baseType, 2, FitBaseType::Uint16,
"workout_step.weightDisplayUnit"))
return false;
498 qWarning() <<
"ignoring unknown workout_step 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 exerciseName
The WorkoutStepMessage FIT message's exerciseName field.
bool setField(const int fieldId, const QByteArray &data, const FitBaseType baseType, const bool bigEndian) override
quint32 customTargetValueLow
The WorkoutStepMessage FIT message's customTargetValueLow field.
ExerciseCategory exerciseCategory
The WorkoutStepMessage FIT message's exerciseCategory field.
MessageIndex messageIndex
The WorkoutStepMessage FIT message's messageIndex field.
quint16 exerciseWeight
The WorkoutStepMessage FIT message's exerciseWeight field.
quint32 targetValue
The WorkoutStepMessage FIT message's targetValue field.
Intensity intensity
The WorkoutStepMessage FIT message's intensity field.
QString wktStepName
The WorkoutStepMessage FIT message's wktStepName field.
WorkoutEquipment equipment
The WorkoutStepMessage FIT message's equipment field.
FitBaseUnit weightDisplayUnit
The WorkoutStepMessage FIT message's weightDisplayUnit field.
virtual ~WorkoutStepMessagePrivate()
quint32 durationValue
The WorkoutStepMessage FIT message's durationValue field.
WktStepTarget targetType
The WorkoutStepMessage FIT message's targetType field.
QString notes
The WorkoutStepMessage FIT message's notes field.
quint32 customTargetValueHigh
The WorkoutStepMessage FIT message's customTargetValueHigh field.
WktStepDuration durationType
The WorkoutStepMessage FIT message's durationType field.
The WorkoutStepMessage class represents a FIT WorkoutStepMessage data message.
void setWktStepName(const QString wktStepName)
Sets the wktStepName field to wktStepName.
void setExerciseWeight(const quint16 exerciseWeight)
Sets the exerciseWeight field to exerciseWeight.
Intensity intensity() const
Returns the WorkoutStepMessage data message's intensity field's current value.
QString wktStepName() const
Returns the WorkoutStepMessage data message's wktStepName field's current value.
WktStepTarget targetType() const
Returns the WorkoutStepMessage data message's targetType field's current value.
void setTargetValue(const quint32 targetValue)
Sets the targetValue field to targetValue.
void setCustomTargetValueLow(const quint32 customTargetValueLow)
Sets the customTargetValueLow field to customTargetValueLow.
void setDurationType(const WktStepDuration durationType)
Sets the durationType field to durationType.
quint32 customTargetValueHigh() const
Returns the WorkoutStepMessage data message's customTargetValueHigh field's current value.
ExerciseCategory exerciseCategory() const
Returns the WorkoutStepMessage data message's exerciseCategory field's current value.
void setIntensity(const Intensity intensity)
Sets the intensity field to intensity.
WorkoutEquipment equipment() const
Returns the WorkoutStepMessage data message's equipment field's current value.
void setTargetType(const WktStepTarget targetType)
Sets the targetType field to targetType.
void setDurationValue(const quint32 durationValue)
Sets the durationValue field to durationValue.
quint32 customTargetValueLow() const
Returns the WorkoutStepMessage data message's customTargetValueLow field's current value.
FitBaseUnit weightDisplayUnit() const
Returns the WorkoutStepMessage data message's weightDisplayUnit field's current value.
quint32 durationValue() const
Returns the WorkoutStepMessage data message's durationValue field's current value.
void setMessageIndex(const MessageIndex messageIndex)
Sets the messageIndex field to messageIndex.
WktStepDuration durationType() const
Returns the WorkoutStepMessage data message's durationType field's current value.
quint32 targetValue() const
Returns the WorkoutStepMessage data message's targetValue field's current value.
void setNotes(const QString notes)
Sets the notes field to notes.
void setWeightDisplayUnit(const FitBaseUnit weightDisplayUnit)
Sets the weightDisplayUnit field to weightDisplayUnit.
void setEquipment(const WorkoutEquipment equipment)
Sets the equipment field to equipment.
QString notes() const
Returns the WorkoutStepMessage data message's notes field's current value.
void setExerciseName(const quint16 exerciseName)
Sets the exerciseName field to exerciseName.
quint16 exerciseWeight() const
Returns the WorkoutStepMessage data message's exerciseWeight field's current value.
MessageIndex messageIndex() const
Returns the WorkoutStepMessage data message's messageIndex field's current value.
quint16 exerciseName() const
Returns the WorkoutStepMessage data message's exerciseName field's current value.
WorkoutStepMessage()
Constructs a WorkoutStepMessage object.
void setCustomTargetValueHigh(const quint32 customTargetValueHigh)
Sets the customTargetValueHigh field to customTargetValueHigh.
void setExerciseCategory(const ExerciseCategory exerciseCategory)
Sets the exerciseCategory field to exerciseCategory.
Intensity
Garmin FIT Intensity type.
WorkoutEquipment
Garmin FIT WorkoutEquipment type.
FitBaseType
Garmin FIT FitBaseType type.
ExerciseCategory
Garmin FIT ExerciseCategory type.
FitBaseUnit
Garmin FIT FitBaseUnit type.
MessageIndex
Garmin FIT MessageIndex type.
WktStepTarget
Garmin FIT WktStepTarget type.
WktStepDuration
Garmin FIT WktStepDuration type.
Declares the WorkoutStepMessage class.
Declares the WorkoutStepMessagePrivate class.