105 return d->calibrationFactor;
118 return d->calibrationDivisor;
131 return d->levelShift;
229 , timestamp(static_cast<
DateTime>(-1))
231 , calibrationFactor(0xFFFFFFFF)
232 , calibrationDivisor(0xFFFFFFFF)
233 , levelShift(0xFFFFFFFF)
234 , offsetCal(0x7FFFFFFF)
250 const int fieldId,
const QByteArray &data,
const FitBaseType baseType,
const bool bigEndian)
254 if (!
verify(data, baseType, 4, FitBaseType::Uint32,
"one_d_sensor_calibration.timestamp"))
return false;
255 this->
timestamp =
static_cast<DateTime>(bigEndian ? qFromBigEndian<quint32>(data) : qFromLittleEndian<quint32>(data));
258 if (!
verify(data, baseType, 1, FitBaseType::Enum,
"one_d_sensor_calibration.sensorType"))
return false;
262 if (!
verify(data, baseType, 4, FitBaseType::Uint32,
"one_d_sensor_calibration.calibrationFactor"))
return false;
263 this->
calibrationFactor =
static_cast<quint32
>(bigEndian ? qFromBigEndian<quint32>(data) : qFromLittleEndian<quint32>(data));
266 if (!
verify(data, baseType, 4, FitBaseType::Uint32,
"one_d_sensor_calibration.calibrationDivisor"))
return false;
267 this->
calibrationDivisor =
static_cast<quint32
>(bigEndian ? qFromBigEndian<quint32>(data) : qFromLittleEndian<quint32>(data));
270 if (!
verify(data, baseType, 4, FitBaseType::Uint32,
"one_d_sensor_calibration.levelShift"))
return false;
271 this->
levelShift =
static_cast<quint32
>(bigEndian ? qFromBigEndian<quint32>(data) : qFromLittleEndian<quint32>(data));
274 if (!
verify(data, baseType, 4, FitBaseType::Sint32,
"one_d_sensor_calibration.offsetCal"))
return false;
275 this->
offsetCal =
static_cast<qint32
>(bigEndian ? qFromBigEndian< qint32>(data) : qFromLittleEndian< qint32>(data));
278 qWarning() <<
"ignoring unknown one_d_sensor_calibration 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.
quint32 calibrationDivisor
The OneDSensorCalibrationMessage FIT message's calibrationDivisor field.
virtual ~OneDSensorCalibrationMessagePrivate()
quint32 calibrationFactor
The OneDSensorCalibrationMessage FIT message's calibrationFactor field.
SensorType sensorType
The OneDSensorCalibrationMessage FIT message's sensorType field.
bool setField(const int fieldId, const QByteArray &data, const FitBaseType baseType, const bool bigEndian) override
DateTime timestamp
The OneDSensorCalibrationMessage FIT message's timestamp field.
quint32 levelShift
The OneDSensorCalibrationMessage FIT message's levelShift field.
qint32 offsetCal
The OneDSensorCalibrationMessage FIT message's offsetCal field.
The OneDSensorCalibrationMessage class represents a FIT OneDSensorCalibrationMessage data message.
void setTimestamp(const DateTime timestamp)
Sets the timestamp field to timestamp.
void setLevelShift(const quint32 levelShift)
Sets the levelShift field to levelShift.
quint32 calibrationFactor() const
Returns the OneDSensorCalibrationMessage data message's calibrationFactor field's current value.
void setOffsetCal(const qint32 offsetCal)
Sets the offsetCal field to offsetCal.
void setCalibrationDivisor(const quint32 calibrationDivisor)
Sets the calibrationDivisor field to calibrationDivisor.
void setCalibrationFactor(const quint32 calibrationFactor)
Sets the calibrationFactor field to calibrationFactor.
void setSensorType(const SensorType sensorType)
Sets the sensorType field to sensorType.
OneDSensorCalibrationMessage()
Constructs a OneDSensorCalibrationMessage object.
SensorType sensorType() const
Returns the OneDSensorCalibrationMessage data message's sensorType field's current value.
quint32 calibrationDivisor() const
Returns the OneDSensorCalibrationMessage data message's calibrationDivisor field's current value.
quint32 levelShift() const
Returns the OneDSensorCalibrationMessage data message's levelShift field's current value.
qint32 offsetCal() const
Returns the OneDSensorCalibrationMessage data message's offsetCal field's current value.
DateTime timestamp() const
Returns the OneDSensorCalibrationMessage data message's timestamp field's current value.
Declares the OneDSensorCalibrationMessage class.
Declares the OneDSensorCalibrationMessagePrivate class.
SensorType
Garmin FIT SensorType type.
FitBaseType
Garmin FIT FitBaseType type.
DateTime
Seconds since UTC 00:00 Dec 31 1989.