99 return d->manufacturer;
121 return d->serialNumber;
132 return d->timeCreated;
217 , timestamp(static_cast<
DateTime>(-1))
218 , type(static_cast<
File>(-1))
222 , timeCreated(static_cast<
DateTime>(-1))
238 const int fieldId,
const QByteArray &data,
const FitBaseType baseType,
const bool bigEndian)
242 if (!
verify(data, baseType, 4, FitBaseType::Uint32,
"training_file.timestamp"))
return false;
243 this->
timestamp =
static_cast<DateTime>(bigEndian ? qFromBigEndian<quint32>(data) : qFromLittleEndian<quint32>(data));
246 if (!
verify(data, baseType, 1, FitBaseType::Enum,
"training_file.type"))
return false;
247 this->
type =
static_cast<File>(data.at(0));
250 if (!
verify(data, baseType, 2, FitBaseType::Uint16,
"training_file.manufacturer"))
return false;
251 this->
manufacturer =
static_cast<Manufacturer>(bigEndian ? qFromBigEndian<quint16>(data) : qFromLittleEndian<quint16>(data));
254 if (!
verify(data, baseType, 2, FitBaseType::Uint16,
"training_file.product"))
return false;
255 this->
product =
static_cast<quint16
>(bigEndian ? qFromBigEndian<quint16>(data) : qFromLittleEndian<quint16>(data));
258 if (!
verify(data, baseType, 4, FitBaseType::Uint32z,
"training_file.serialNumber"))
return false;
259 this->
serialNumber =
static_cast<quint32z>(bigEndian ? qFromBigEndian<quint32>(data) : qFromLittleEndian<quint32>(data));
262 if (!
verify(data, baseType, 4, FitBaseType::Uint32,
"training_file.timeCreated"))
return false;
263 this->
timeCreated =
static_cast<DateTime>(bigEndian ? qFromBigEndian<quint32>(data) : qFromLittleEndian<quint32>(data));
266 qWarning() <<
"ignoring unknown training_file 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.
File type
The TrainingFileMessage FIT message's type field.
quint16 product
The TrainingFileMessage FIT message's product field.
DateTime timeCreated
The TrainingFileMessage FIT message's timeCreated field.
DateTime timestamp
The TrainingFileMessage FIT message's timestamp field.
virtual ~TrainingFileMessagePrivate()
bool setField(const int fieldId, const QByteArray &data, const FitBaseType baseType, const bool bigEndian) override
Manufacturer manufacturer
The TrainingFileMessage FIT message's manufacturer field.
quint32z serialNumber
The TrainingFileMessage FIT message's serialNumber field.
The TrainingFileMessage class represents a FIT TrainingFileMessage data message.
Manufacturer manufacturer() const
Returns the TrainingFileMessage data message's manufacturer field's current value.
void setTimeCreated(const DateTime timeCreated)
Sets the timeCreated field to timeCreated.
void setTimestamp(const DateTime timestamp)
Sets the timestamp field to timestamp.
void setManufacturer(const Manufacturer manufacturer)
Sets the manufacturer field to manufacturer.
DateTime timeCreated() const
Returns the TrainingFileMessage data message's timeCreated field's current value.
quint32z serialNumber() const
Returns the TrainingFileMessage data message's serialNumber field's current value.
quint16 product() const
Returns the TrainingFileMessage data message's product field's current value.
void setType(const File type)
Sets the type field to type.
File type() const
Returns the TrainingFileMessage data message's type field's current value.
void setSerialNumber(const quint32z serialNumber)
Sets the serialNumber field to serialNumber.
DateTime timestamp() const
Returns the TrainingFileMessage data message's timestamp field's current value.
TrainingFileMessage()
Constructs a TrainingFileMessage object.
void setProduct(const quint16 product)
Sets the product field to product.
Declares the TrainingFileMessage class.
Declares the TrainingFileMessagePrivate class.
FitBaseType
Garmin FIT FitBaseType type.
Manufacturer
Garmin FIT Manufacturer type.
File
Garmin FIT File type.
quint32 quint32z
32-bit unsigned integer, with 0-is-invalid semantics.
DateTime
Seconds since UTC 00:00 Dec 31 1989.