77 return d->messageIndex;
88 return d->friendlyName;
154 return d->elevSetting;
165 return d->weightSetting;
176 return d->restingHeartRate;
187 return d->defaultMaxRunningHeartRate;
198 return d->defaultMaxBikingHeartRate;
209 return d->defaultMaxHeartRate;
231 return d->speedSetting;
242 return d->distSetting;
253 return d->powerSetting;
264 return d->activityClass;
275 return d->positionSetting;
286 return d->temperatureSetting;
345 return d->heightSetting;
358 return d->userRunningStepLength;
371 return d->userWalkingStepLength;
382 return d->depthSetting;
709 , gender(static_cast<
Gender>(-1))
713 , language(static_cast<
Language>(-1))
716 , restingHeartRate(0xFF)
717 , defaultMaxRunningHeartRate(0xFF)
718 , defaultMaxBikingHeartRate(0xFF)
719 , defaultMaxHeartRate(0xFF)
732 , userRunningStepLength(0xFFFF)
733 , userWalkingStepLength(0xFFFF)
735 , diveCount(0xFFFFFFFF)
751 const int fieldId,
const QByteArray &data,
const FitBaseType baseType,
const bool bigEndian)
755 if (!
verify(data, baseType, 2, FitBaseType::Uint16,
"user_profile.messageIndex"))
return false;
756 this->
messageIndex =
static_cast<MessageIndex>(bigEndian ? qFromBigEndian<quint16>(data) : qFromLittleEndian<quint16>(data));
759 if (!
verify(data, baseType, 1, FitBaseType::String,
"user_profile.friendlyName"))
return false;
763 if (!
verify(data, baseType, 1, FitBaseType::Enum,
"user_profile.gender"))
return false;
767 if (!
verify(data, baseType, 1, FitBaseType::Uint8,
"user_profile.age"))
return false;
768 this->
age =
static_cast<quint8
>(data.at(0));
771 if (!
verify(data, baseType, 1, FitBaseType::Uint8,
"user_profile.height"))
return false;
772 this->
height =
static_cast<quint8
>(data.at(0));
775 if (!
verify(data, baseType, 2, FitBaseType::Uint16,
"user_profile.weight"))
return false;
776 this->
weight =
static_cast<quint16
>(bigEndian ? qFromBigEndian<quint16>(data) : qFromLittleEndian<quint16>(data));
779 if (!
verify(data, baseType, 1, FitBaseType::Enum,
"user_profile.language"))
return false;
783 if (!
verify(data, baseType, 1, FitBaseType::Enum,
"user_profile.elevSetting"))
return false;
787 if (!
verify(data, baseType, 1, FitBaseType::Enum,
"user_profile.weightSetting"))
return false;
791 if (!
verify(data, baseType, 1, FitBaseType::Uint8,
"user_profile.restingHeartRate"))
return false;
795 if (!
verify(data, baseType, 1, FitBaseType::Uint8,
"user_profile.defaultMaxRunningHeartRate"))
return false;
799 if (!
verify(data, baseType, 1, FitBaseType::Uint8,
"user_profile.defaultMaxBikingHeartRate"))
return false;
803 if (!
verify(data, baseType, 1, FitBaseType::Uint8,
"user_profile.defaultMaxHeartRate"))
return false;
807 if (!
verify(data, baseType, 1, FitBaseType::Enum,
"user_profile.hrSetting"))
return false;
811 if (!
verify(data, baseType, 1, FitBaseType::Enum,
"user_profile.speedSetting"))
return false;
815 if (!
verify(data, baseType, 1, FitBaseType::Enum,
"user_profile.distSetting"))
return false;
819 if (!
verify(data, baseType, 1, FitBaseType::Enum,
"user_profile.powerSetting"))
return false;
823 if (!
verify(data, baseType, 1, FitBaseType::Enum,
"user_profile.activityClass"))
return false;
827 if (!
verify(data, baseType, 1, FitBaseType::Enum,
"user_profile.positionSetting"))
return false;
831 if (!
verify(data, baseType, 1, FitBaseType::Enum,
"user_profile.temperatureSetting"))
return false;
835 if (!
verify(data, baseType, 2, FitBaseType::Uint16,
"user_profile.localId"))
return false;
836 this->
localId =
static_cast<UserLocalId>(bigEndian ? qFromBigEndian<quint16>(data) : qFromLittleEndian<quint16>(data));
839 if (!
verify(data, baseType, 1, FitBaseType::Byte,
"user_profile.globalId"))
return false;
840 this->
globalId =
static_cast<quint8
>(data.at(0));
843 if (!
verify(data, baseType, 4, FitBaseType::Uint32,
"user_profile.wakeTime"))
return false;
844 this->
wakeTime =
static_cast<LocaltimeIntoDay>(bigEndian ? qFromBigEndian<quint32>(data) : qFromLittleEndian<quint32>(data));
847 if (!
verify(data, baseType, 4, FitBaseType::Uint32,
"user_profile.sleepTime"))
return false;
848 this->
sleepTime =
static_cast<LocaltimeIntoDay>(bigEndian ? qFromBigEndian<quint32>(data) : qFromLittleEndian<quint32>(data));
851 if (!
verify(data, baseType, 1, FitBaseType::Enum,
"user_profile.heightSetting"))
return false;
855 if (!
verify(data, baseType, 2, FitBaseType::Uint16,
"user_profile.userRunningStepLength"))
return false;
856 this->
userRunningStepLength =
static_cast<quint16
>(bigEndian ? qFromBigEndian<quint16>(data) : qFromLittleEndian<quint16>(data));
859 if (!
verify(data, baseType, 2, FitBaseType::Uint16,
"user_profile.userWalkingStepLength"))
return false;
860 this->
userWalkingStepLength =
static_cast<quint16
>(bigEndian ? qFromBigEndian<quint16>(data) : qFromLittleEndian<quint16>(data));
863 if (!
verify(data, baseType, 1, FitBaseType::Enum,
"user_profile.depthSetting"))
return false;
867 if (!
verify(data, baseType, 4, FitBaseType::Uint32,
"user_profile.diveCount"))
return false;
868 this->
diveCount =
static_cast<quint32
>(bigEndian ? qFromBigEndian<quint32>(data) : qFromLittleEndian<quint32>(data));
871 qWarning() <<
"ignoring unknown user_profile 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.
quint8 restingHeartRate
The UserProfileMessage FIT message's restingHeartRate field.
LocaltimeIntoDay sleepTime
The UserProfileMessage FIT message's sleepTime field.
DisplayHeart hrSetting
The UserProfileMessage FIT message's hrSetting field.
quint8 defaultMaxHeartRate
The UserProfileMessage FIT message's defaultMaxHeartRate field.
quint16 userRunningStepLength
The UserProfileMessage FIT message's userRunningStepLength field.
DisplayMeasure distSetting
The UserProfileMessage FIT message's distSetting field.
MessageIndex messageIndex
The UserProfileMessage FIT message's messageIndex field.
DisplayMeasure heightSetting
The UserProfileMessage FIT message's heightSetting field.
LocaltimeIntoDay wakeTime
The UserProfileMessage FIT message's wakeTime field.
quint8 defaultMaxRunningHeartRate
The UserProfileMessage FIT message's defaultMaxRunningHeartRate field.
Language language
The UserProfileMessage FIT message's language field.
DisplayMeasure weightSetting
The UserProfileMessage FIT message's weightSetting field.
virtual ~UserProfileMessagePrivate()
quint8 age
The UserProfileMessage FIT message's age field.
quint16 userWalkingStepLength
The UserProfileMessage FIT message's userWalkingStepLength field.
DisplayMeasure temperatureSetting
The UserProfileMessage FIT message's temperatureSetting field.
Gender gender
The UserProfileMessage FIT message's gender field.
DisplayMeasure elevSetting
The UserProfileMessage FIT message's elevSetting field.
quint8 globalId
The UserProfileMessage FIT message's globalId field.
DisplayPower powerSetting
The UserProfileMessage FIT message's powerSetting field.
quint16 weight
The UserProfileMessage FIT message's weight field.
quint8 defaultMaxBikingHeartRate
The UserProfileMessage FIT message's defaultMaxBikingHeartRate field.
DisplayPosition positionSetting
The UserProfileMessage FIT message's positionSetting field.
quint32 diveCount
The UserProfileMessage FIT message's diveCount field.
UserLocalId localId
The UserProfileMessage FIT message's localId field.
bool setField(const int fieldId, const QByteArray &data, const FitBaseType baseType, const bool bigEndian) override
ActivityClass activityClass
The UserProfileMessage FIT message's activityClass field.
quint8 height
The UserProfileMessage FIT message's height field.
DisplayMeasure speedSetting
The UserProfileMessage FIT message's speedSetting field.
QString friendlyName
The UserProfileMessage FIT message's friendlyName field.
DisplayMeasure depthSetting
The UserProfileMessage FIT message's depthSetting field.
The UserProfileMessage class represents a FIT UserProfileMessage data message.
void setLocalId(const UserLocalId localId)
Sets the localId field to localId.
UserProfileMessage()
Constructs a UserProfileMessage object.
DisplayMeasure speedSetting() const
Returns the UserProfileMessage data message's speedSetting field's current value.
DisplayPosition positionSetting() const
Returns the UserProfileMessage data message's positionSetting field's current value.
ActivityClass activityClass() const
Returns the UserProfileMessage data message's activityClass field's current value.
quint8 globalId() const
Returns the UserProfileMessage data message's globalId field's current value.
quint8 defaultMaxHeartRate() const
Returns the UserProfileMessage data message's defaultMaxHeartRate field's current value.
DisplayHeart hrSetting() const
Returns the UserProfileMessage data message's hrSetting field's current value.
quint8 height() const
Returns the UserProfileMessage data message's height field's current value.
quint8 restingHeartRate() const
Returns the UserProfileMessage data message's restingHeartRate field's current value.
QString friendlyName() const
Returns the UserProfileMessage data message's friendlyName field's current value.
void setGender(const Gender gender)
Sets the gender field to gender.
quint16 userRunningStepLength() const
Returns the UserProfileMessage data message's userRunningStepLength field's current value.
void setWeightSetting(const DisplayMeasure weightSetting)
Sets the weightSetting field to weightSetting.
void setRestingHeartRate(const quint8 restingHeartRate)
Sets the restingHeartRate field to restingHeartRate.
void setPowerSetting(const DisplayPower powerSetting)
Sets the powerSetting field to powerSetting.
quint16 weight() const
Returns the UserProfileMessage data message's weight field's current value.
void setHeightSetting(const DisplayMeasure heightSetting)
Sets the heightSetting field to heightSetting.
void setDefaultMaxBikingHeartRate(const quint8 defaultMaxBikingHeartRate)
Sets the defaultMaxBikingHeartRate field to defaultMaxBikingHeartRate.
void setDefaultMaxRunningHeartRate(const quint8 defaultMaxRunningHeartRate)
Sets the defaultMaxRunningHeartRate field to defaultMaxRunningHeartRate.
void setFriendlyName(const QString friendlyName)
Sets the friendlyName field to friendlyName.
DisplayMeasure distSetting() const
Returns the UserProfileMessage data message's distSetting field's current value.
void setPositionSetting(const DisplayPosition positionSetting)
Sets the positionSetting field to positionSetting.
void setDiveCount(const quint32 diveCount)
Sets the diveCount field to diveCount.
void setLanguage(const Language language)
Sets the language field to language.
DisplayMeasure temperatureSetting() const
Returns the UserProfileMessage data message's temperatureSetting field's current value.
DisplayMeasure heightSetting() const
Returns the UserProfileMessage data message's heightSetting field's current value.
quint16 userWalkingStepLength() const
Returns the UserProfileMessage data message's userWalkingStepLength field's current value.
DisplayMeasure depthSetting() const
Returns the UserProfileMessage data message's depthSetting field's current value.
void setMessageIndex(const MessageIndex messageIndex)
Sets the messageIndex field to messageIndex.
Gender gender() const
Returns the UserProfileMessage data message's gender field's current value.
quint8 age() const
Returns the UserProfileMessage data message's age field's current value.
void setSpeedSetting(const DisplayMeasure speedSetting)
Sets the speedSetting field to speedSetting.
void setDistSetting(const DisplayMeasure distSetting)
Sets the distSetting field to distSetting.
void setWakeTime(const LocaltimeIntoDay wakeTime)
Sets the wakeTime field to wakeTime.
void setDepthSetting(const DisplayMeasure depthSetting)
Sets the depthSetting field to depthSetting.
LocaltimeIntoDay sleepTime() const
Returns the UserProfileMessage data message's sleepTime field's current value.
void setUserRunningStepLength(const quint16 userRunningStepLength)
Sets the userRunningStepLength field to userRunningStepLength.
DisplayPower powerSetting() const
Returns the UserProfileMessage data message's powerSetting field's current value.
Language language() const
Returns the UserProfileMessage data message's language field's current value.
LocaltimeIntoDay wakeTime() const
Returns the UserProfileMessage data message's wakeTime field's current value.
quint8 defaultMaxBikingHeartRate() const
Returns the UserProfileMessage data message's defaultMaxBikingHeartRate field's current value.
void setAge(const quint8 age)
Sets the age field to age.
void setElevSetting(const DisplayMeasure elevSetting)
Sets the elevSetting field to elevSetting.
DisplayMeasure weightSetting() const
Returns the UserProfileMessage data message's weightSetting field's current value.
void setGlobalId(const quint8 globalId)
Sets the globalId field to globalId.
void setSleepTime(const LocaltimeIntoDay sleepTime)
Sets the sleepTime field to sleepTime.
void setDefaultMaxHeartRate(const quint8 defaultMaxHeartRate)
Sets the defaultMaxHeartRate field to defaultMaxHeartRate.
quint32 diveCount() const
Returns the UserProfileMessage data message's diveCount field's current value.
void setTemperatureSetting(const DisplayMeasure temperatureSetting)
Sets the temperatureSetting field to temperatureSetting.
DisplayMeasure elevSetting() const
Returns the UserProfileMessage data message's elevSetting field's current value.
void setActivityClass(const ActivityClass activityClass)
Sets the activityClass field to activityClass.
MessageIndex messageIndex() const
Returns the UserProfileMessage data message's messageIndex field's current value.
void setHeight(const quint8 height)
Sets the height field to height.
void setUserWalkingStepLength(const quint16 userWalkingStepLength)
Sets the userWalkingStepLength field to userWalkingStepLength.
UserLocalId localId() const
Returns the UserProfileMessage data message's localId field's current value.
quint8 defaultMaxRunningHeartRate() const
Returns the UserProfileMessage data message's defaultMaxRunningHeartRate field's current value.
void setHrSetting(const DisplayHeart hrSetting)
Sets the hrSetting field to hrSetting.
void setWeight(const quint16 weight)
Sets the weight field to weight.
UserLocalId
Garmin FIT UserLocalId type.
DisplayHeart
Garmin FIT DisplayHeart type.
Language
Garmin FIT Language type.
Gender
Garmin FIT Gender type.
FitBaseType
Garmin FIT FitBaseType type.
ActivityClass
Garmin FIT ActivityClass type.
DisplayMeasure
Garmin FIT DisplayMeasure type.
MessageIndex
Garmin FIT MessageIndex type.
DisplayPosition
Garmin FIT DisplayPosition type.
DisplayPower
Garmin FIT DisplayPower type.
quint32 LocaltimeIntoDay
Number of seconds into the day since local 00:00:00.
Declares the UserProfileMessage class.
Declares the UserProfileMessagePrivate class.