88 return d->manufacturer;
110 return d->serialNumber;
123 return d->timeCreated;
149 return d->productName;
244 , type(static_cast<
File>(-1))
248 , timeCreated(static_cast<
DateTime>(-1))
265 const int fieldId,
const QByteArray &data,
const FitBaseType baseType,
const bool bigEndian)
269 if (!
verify(data, baseType, 1, FitBaseType::Enum,
"file_id.type"))
return false;
270 this->
type =
static_cast<File>(data.at(0));
273 if (!
verify(data, baseType, 2, FitBaseType::Uint16,
"file_id.manufacturer"))
return false;
274 this->
manufacturer =
static_cast<Manufacturer>(bigEndian ? qFromBigEndian<quint16>(data) : qFromLittleEndian<quint16>(data));
277 if (!
verify(data, baseType, 2, FitBaseType::Uint16,
"file_id.product"))
return false;
278 this->
product =
static_cast<quint16
>(bigEndian ? qFromBigEndian<quint16>(data) : qFromLittleEndian<quint16>(data));
281 if (!
verify(data, baseType, 4, FitBaseType::Uint32z,
"file_id.serialNumber"))
return false;
282 this->
serialNumber =
static_cast<quint32z>(bigEndian ? qFromBigEndian<quint32>(data) : qFromLittleEndian<quint32>(data));
285 if (!
verify(data, baseType, 4, FitBaseType::Uint32,
"file_id.timeCreated"))
return false;
286 this->
timeCreated =
static_cast<DateTime>(bigEndian ? qFromBigEndian<quint32>(data) : qFromLittleEndian<quint32>(data));
289 if (!
verify(data, baseType, 2, FitBaseType::Uint16,
"file_id.number"))
return false;
290 this->
number =
static_cast<quint16
>(bigEndian ? qFromBigEndian<quint16>(data) : qFromLittleEndian<quint16>(data));
293 if (!
verify(data, baseType, 1, FitBaseType::String,
"file_id.productName"))
return false;
297 qWarning() <<
"ignoring unknown file_id 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.
Manufacturer manufacturer
The FileIdMessage FIT message's manufacturer field.
bool setField(const int fieldId, const QByteArray &data, const FitBaseType baseType, const bool bigEndian) override
DateTime timeCreated
The FileIdMessage FIT message's timeCreated field.
quint32z serialNumber
The FileIdMessage FIT message's serialNumber field.
QString productName
The FileIdMessage FIT message's productName field.
quint16 number
The FileIdMessage FIT message's number field.
virtual ~FileIdMessagePrivate()
quint16 product
The FileIdMessage FIT message's product field.
File type
The FileIdMessage FIT message's type field.
The FileIdMessage class represents a FIT FileIdMessage data message.
FileIdMessage()
Constructs a FileIdMessage object.
QString productName() const
Returns the FileIdMessage data message's productName field's current value.
File type() const
Returns the FileIdMessage data message's type field's current value.
void setNumber(const quint16 number)
Sets the number field to number.
void setTimeCreated(const DateTime timeCreated)
Sets the timeCreated field to timeCreated.
Manufacturer manufacturer() const
Returns the FileIdMessage data message's manufacturer field's current value.
void setType(const File type)
Sets the type field to type.
void setProductName(const QString productName)
Sets the productName field to productName.
void setManufacturer(const Manufacturer manufacturer)
Sets the manufacturer field to manufacturer.
void setProduct(const quint16 product)
Sets the product field to product.
quint16 number() const
Returns the FileIdMessage data message's number field's current value.
quint32z serialNumber() const
Returns the FileIdMessage data message's serialNumber field's current value.
DateTime timeCreated() const
Returns the FileIdMessage data message's timeCreated field's current value.
void setSerialNumber(const quint32z serialNumber)
Sets the serialNumber field to serialNumber.
quint16 product() const
Returns the FileIdMessage data message's product field's current value.
Declares the FileIdMessage class.
Declares the FileIdMessagePrivate 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.