QtFit  0.1
Internal library development documentation
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
DeviceInfoMessage Class Reference

The DeviceInfoMessage class represents a FIT DeviceInfoMessage data message. More...

Inheritance diagram for DeviceInfoMessage:
[legend]
Collaboration diagram for DeviceInfoMessage:
[legend]

Public Member Functions

 DeviceInfoMessage ()
 Constructs a DeviceInfoMessage object. More...
 
DateTime timestamp () const
 Returns the DeviceInfoMessage data message's timestamp field's current value. More...
 
DeviceIndex deviceIndex () const
 Returns the DeviceInfoMessage data message's deviceIndex field's current value. More...
 
quint8 deviceType () const
 Returns the DeviceInfoMessage data message's deviceType field's current value. More...
 
Manufacturer manufacturer () const
 Returns the DeviceInfoMessage data message's manufacturer field's current value. More...
 
quint32z serialNumber () const
 Returns the DeviceInfoMessage data message's serialNumber field's current value. More...
 
quint16 product () const
 Returns the DeviceInfoMessage data message's product field's current value. More...
 
quint16 softwareVersion () const
 Returns the DeviceInfoMessage data message's softwareVersion field's current value. More...
 
quint8 hardwareVersion () const
 Returns the DeviceInfoMessage data message's hardwareVersion field's current value. More...
 
quint32 cumOperatingTime () const
 Returns the DeviceInfoMessage data message's cumOperatingTime field's current value. More...
 
quint16 batteryVoltage () const
 Returns the DeviceInfoMessage data message's batteryVoltage field's current value. More...
 
BatteryStatus batteryStatus () const
 Returns the DeviceInfoMessage data message's batteryStatus field's current value. More...
 
BodyLocation sensorPosition () const
 Returns the DeviceInfoMessage data message's sensorPosition field's current value. More...
 
QString descriptor () const
 Returns the DeviceInfoMessage data message's descriptor field's current value. More...
 
quint8z antTransmissionType () const
 Returns the DeviceInfoMessage data message's antTransmissionType field's current value. More...
 
quint16z antDeviceNumber () const
 Returns the DeviceInfoMessage data message's antDeviceNumber field's current value. More...
 
AntNetwork antNetwork () const
 Returns the DeviceInfoMessage data message's antNetwork field's current value. More...
 
SourceType sourceType () const
 Returns the DeviceInfoMessage data message's sourceType field's current value. More...
 
QString productName () const
 Returns the DeviceInfoMessage data message's productName field's current value. More...
 
void setTimestamp (const DateTime timestamp)
 Sets the timestamp field to timestamp. More...
 
void setDeviceIndex (const DeviceIndex deviceIndex)
 Sets the deviceIndex field to deviceIndex. More...
 
void setDeviceType (const quint8 deviceType)
 Sets the deviceType field to deviceType. More...
 
void setManufacturer (const Manufacturer manufacturer)
 Sets the manufacturer field to manufacturer. More...
 
void setSerialNumber (const quint32z serialNumber)
 Sets the serialNumber field to serialNumber. More...
 
void setProduct (const quint16 product)
 Sets the product field to product. More...
 
void setSoftwareVersion (const quint16 softwareVersion)
 Sets the softwareVersion field to softwareVersion. More...
 
void setHardwareVersion (const quint8 hardwareVersion)
 Sets the hardwareVersion field to hardwareVersion. More...
 
void setCumOperatingTime (const quint32 cumOperatingTime)
 Sets the cumOperatingTime field to cumOperatingTime. More...
 
void setBatteryVoltage (const quint16 batteryVoltage)
 Sets the batteryVoltage field to batteryVoltage. More...
 
void setBatteryStatus (const BatteryStatus batteryStatus)
 Sets the batteryStatus field to batteryStatus. More...
 
void setSensorPosition (const BodyLocation sensorPosition)
 Sets the sensorPosition field to sensorPosition. More...
 
void setDescriptor (const QString descriptor)
 Sets the descriptor field to descriptor. More...
 
void setAntTransmissionType (const quint8z antTransmissionType)
 Sets the antTransmissionType field to antTransmissionType. More...
 
void setAntDeviceNumber (const quint16z antDeviceNumber)
 Sets the antDeviceNumber field to antDeviceNumber. More...
 
void setAntNetwork (const AntNetwork antNetwork)
 Sets the antNetwork field to antNetwork. More...
 
void setSourceType (const SourceType sourceType)
 Sets the sourceType field to sourceType. More...
 
void setProductName (const QString productName)
 Sets the productName field to productName. More...
 
- Public Member Functions inherited from AbstractDataMessage
 ~AbstractDataMessage ()
 Destroys the AbstractDataMessage object.
 
MesgNum globalMessageNumber () const
 Returns the data message's global message number. More...
 

Protected Member Functions

 DeviceInfoMessage (DeviceInfoMessagePrivate *const d)
 
- Protected Member Functions inherited from AbstractDataMessage
 AbstractDataMessage (AbstractDataMessagePrivate *const d)
 

Additional Inherited Members

- Static Public Member Functions inherited from AbstractDataMessage
static AbstractDataMessagefromData (const DataDefinition *const defn, const QByteArray &record)
 Constructs the relevant AbstractDataMessage-derived class to parse record according to defn. More...
 
- Protected Attributes inherited from AbstractDataMessage
AbstractDataMessagePrivate *const d_ptr
 Internal d-pointer.
 

Detailed Description

The DeviceInfoMessage class represents a FIT DeviceInfoMessage data message.

See also
DataMessage

Definition at line 39 of file deviceinfomessage.h.

Constructor & Destructor Documentation

◆ DeviceInfoMessage() [1/2]

DeviceInfoMessage::DeviceInfoMessage ( )

Constructs a DeviceInfoMessage object.

Typically, instances of this class will be returned by FitStreamReader::readNext, but this constructor may be used, along with the relevant setter methods, to create a valid message.

Definition at line 52 of file deviceinfomessage.cpp.

53 {
54 
55 }
The AbstractDataMessage class is the polymorphic base class for all FIT Data Message classes.

◆ DeviceInfoMessage() [2/2]

DeviceInfoMessage::DeviceInfoMessage ( DeviceInfoMessagePrivate *const  d)
explicitprotected

Constructs a DeviceInfoMessage object with private implementation d.

Parameters
dPointer to private implementation.

Definition at line 64 of file deviceinfomessage.cpp.

65 {
66 
67 }

Member Function Documentation

◆ antDeviceNumber()

quint16z DeviceInfoMessage::antDeviceNumber ( ) const

Returns the DeviceInfoMessage data message's antDeviceNumber field's current value.

Returns
the antDeviceNumber field value.

Definition at line 234 of file deviceinfomessage.cpp.

235 {
236  Q_D(const DeviceInfoMessage);
237  return d->antDeviceNumber;
238 }
The DeviceInfoMessage class represents a FIT DeviceInfoMessage data message.

Referenced by setAntDeviceNumber().

Here is the caller graph for this function:

◆ antNetwork()

AntNetwork DeviceInfoMessage::antNetwork ( ) const

Returns the DeviceInfoMessage data message's antNetwork field's current value.

Returns
the antNetwork field value.

Definition at line 245 of file deviceinfomessage.cpp.

246 {
247  Q_D(const DeviceInfoMessage);
248  return d->antNetwork;
249 }

Referenced by setAntNetwork().

Here is the caller graph for this function:

◆ antTransmissionType()

quint8z DeviceInfoMessage::antTransmissionType ( ) const

Returns the DeviceInfoMessage data message's antTransmissionType field's current value.

Returns
the antTransmissionType field value.

Definition at line 223 of file deviceinfomessage.cpp.

224 {
225  Q_D(const DeviceInfoMessage);
226  return d->antTransmissionType;
227 }

Referenced by setAntTransmissionType().

Here is the caller graph for this function:

◆ batteryStatus()

BatteryStatus DeviceInfoMessage::batteryStatus ( ) const

Returns the DeviceInfoMessage data message's batteryStatus field's current value.

Returns
the batteryStatus field value.

Definition at line 186 of file deviceinfomessage.cpp.

187 {
188  Q_D(const DeviceInfoMessage);
189  return d->batteryStatus;
190 }

Referenced by setBatteryStatus().

Here is the caller graph for this function:

◆ batteryVoltage()

quint16 DeviceInfoMessage::batteryVoltage ( ) const

Returns the DeviceInfoMessage data message's batteryVoltage field's current value.

Returns
the batteryVoltage field value.

Definition at line 175 of file deviceinfomessage.cpp.

176 {
177  Q_D(const DeviceInfoMessage);
178  return d->batteryVoltage;
179 }

Referenced by setBatteryVoltage().

Here is the caller graph for this function:

◆ cumOperatingTime()

quint32 DeviceInfoMessage::cumOperatingTime ( ) const

Returns the DeviceInfoMessage data message's cumOperatingTime field's current value.

Reset by new battery or charge.

Returns
the cumOperatingTime field value.

Definition at line 164 of file deviceinfomessage.cpp.

165 {
166  Q_D(const DeviceInfoMessage);
167  return d->cumOperatingTime;
168 }

Referenced by setCumOperatingTime().

Here is the caller graph for this function:

◆ descriptor()

QString DeviceInfoMessage::descriptor ( ) const

Returns the DeviceInfoMessage data message's descriptor field's current value.

Used to describe the sensor or location

Returns
the descriptor field value.

Definition at line 212 of file deviceinfomessage.cpp.

213 {
214  Q_D(const DeviceInfoMessage);
215  return d->descriptor;
216 }

Referenced by setDescriptor().

Here is the caller graph for this function:

◆ deviceIndex()

DeviceIndex DeviceInfoMessage::deviceIndex ( ) const

Returns the DeviceInfoMessage data message's deviceIndex field's current value.

Returns
the deviceIndex field value.

Definition at line 85 of file deviceinfomessage.cpp.

86 {
87  Q_D(const DeviceInfoMessage);
88  return d->deviceIndex;
89 }

Referenced by setDeviceIndex().

Here is the caller graph for this function:

◆ deviceType()

quint8 DeviceInfoMessage::deviceType ( ) const

Returns the DeviceInfoMessage data message's deviceType field's current value.

Returns
the deviceType field value.

Definition at line 96 of file deviceinfomessage.cpp.

97 {
98  Q_D(const DeviceInfoMessage);
99  return d->deviceType;
100 }

Referenced by setDeviceType().

Here is the caller graph for this function:

◆ hardwareVersion()

quint8 DeviceInfoMessage::hardwareVersion ( ) const

Returns the DeviceInfoMessage data message's hardwareVersion field's current value.

Returns
the hardwareVersion field value.

Definition at line 151 of file deviceinfomessage.cpp.

152 {
153  Q_D(const DeviceInfoMessage);
154  return d->hardwareVersion;
155 }

Referenced by setHardwareVersion().

Here is the caller graph for this function:

◆ manufacturer()

Manufacturer DeviceInfoMessage::manufacturer ( ) const

Returns the DeviceInfoMessage data message's manufacturer field's current value.

Returns
the manufacturer field value.

Definition at line 107 of file deviceinfomessage.cpp.

108 {
109  Q_D(const DeviceInfoMessage);
110  return d->manufacturer;
111 }

Referenced by setManufacturer().

Here is the caller graph for this function:

◆ product()

quint16 DeviceInfoMessage::product ( ) const

Returns the DeviceInfoMessage data message's product field's current value.

Returns
the product field value.

Definition at line 129 of file deviceinfomessage.cpp.

130 {
131  Q_D(const DeviceInfoMessage);
132  return d->product;
133 }

Referenced by setProduct().

Here is the caller graph for this function:

◆ productName()

QString DeviceInfoMessage::productName ( ) const

Returns the DeviceInfoMessage data message's productName field's current value.

Optional free form string to indicate the devices name or model

Returns
the productName field value.

Definition at line 269 of file deviceinfomessage.cpp.

270 {
271  Q_D(const DeviceInfoMessage);
272  return d->productName;
273 }

Referenced by setProductName().

Here is the caller graph for this function:

◆ sensorPosition()

BodyLocation DeviceInfoMessage::sensorPosition ( ) const

Returns the DeviceInfoMessage data message's sensorPosition field's current value.

Indicates the location of the sensor

Returns
the sensorPosition field value.

Definition at line 199 of file deviceinfomessage.cpp.

200 {
201  Q_D(const DeviceInfoMessage);
202  return d->sensorPosition;
203 }

Referenced by setSensorPosition().

Here is the caller graph for this function:

◆ serialNumber()

quint32z DeviceInfoMessage::serialNumber ( ) const

Returns the DeviceInfoMessage data message's serialNumber field's current value.

Returns
the serialNumber field value.

Definition at line 118 of file deviceinfomessage.cpp.

119 {
120  Q_D(const DeviceInfoMessage);
121  return d->serialNumber;
122 }

Referenced by setSerialNumber().

Here is the caller graph for this function:

◆ setAntDeviceNumber()

void DeviceInfoMessage::setAntDeviceNumber ( const quint16z  antDeviceNumber)

Sets the antDeviceNumber field to antDeviceNumber.

Parameters
antDeviceNumberThe field value to set.

Definition at line 420 of file deviceinfomessage.cpp.

421 {
422  Q_D(DeviceInfoMessage);
423  d->antDeviceNumber = antDeviceNumber;
424 }
quint16z antDeviceNumber() const
Returns the DeviceInfoMessage data message's antDeviceNumber field's current value.

References antDeviceNumber().

Here is the call graph for this function:

◆ setAntNetwork()

void DeviceInfoMessage::setAntNetwork ( const AntNetwork  antNetwork)

Sets the antNetwork field to antNetwork.

Parameters
antNetworkThe field value to set.

Definition at line 430 of file deviceinfomessage.cpp.

431 {
432  Q_D(DeviceInfoMessage);
433  d->antNetwork = antNetwork;
434 }
AntNetwork antNetwork() const
Returns the DeviceInfoMessage data message's antNetwork field's current value.

References antNetwork().

Here is the call graph for this function:

◆ setAntTransmissionType()

void DeviceInfoMessage::setAntTransmissionType ( const quint8z  antTransmissionType)

Sets the antTransmissionType field to antTransmissionType.

Parameters
antTransmissionTypeThe field value to set.

Definition at line 410 of file deviceinfomessage.cpp.

411 {
412  Q_D(DeviceInfoMessage);
413  d->antTransmissionType = antTransmissionType;
414 }
quint8z antTransmissionType() const
Returns the DeviceInfoMessage data message's antTransmissionType field's current value.

References antTransmissionType().

Here is the call graph for this function:

◆ setBatteryStatus()

void DeviceInfoMessage::setBatteryStatus ( const BatteryStatus  batteryStatus)

Sets the batteryStatus field to batteryStatus.

Parameters
batteryStatusThe field value to set.

Definition at line 380 of file deviceinfomessage.cpp.

381 {
382  Q_D(DeviceInfoMessage);
383  d->batteryStatus = batteryStatus;
384 }
BatteryStatus batteryStatus() const
Returns the DeviceInfoMessage data message's batteryStatus field's current value.

References batteryStatus().

Here is the call graph for this function:

◆ setBatteryVoltage()

void DeviceInfoMessage::setBatteryVoltage ( const quint16  batteryVoltage)

Sets the batteryVoltage field to batteryVoltage.

Parameters
batteryVoltageThe field value to set.

Definition at line 370 of file deviceinfomessage.cpp.

371 {
372  Q_D(DeviceInfoMessage);
373  d->batteryVoltage = batteryVoltage;
374 }
quint16 batteryVoltage() const
Returns the DeviceInfoMessage data message's batteryVoltage field's current value.

References batteryVoltage().

Here is the call graph for this function:

◆ setCumOperatingTime()

void DeviceInfoMessage::setCumOperatingTime ( const quint32  cumOperatingTime)

Sets the cumOperatingTime field to cumOperatingTime.

Parameters
cumOperatingTimeThe field value to set.

Definition at line 360 of file deviceinfomessage.cpp.

361 {
362  Q_D(DeviceInfoMessage);
363  d->cumOperatingTime = cumOperatingTime;
364 }
quint32 cumOperatingTime() const
Returns the DeviceInfoMessage data message's cumOperatingTime field's current value.

References cumOperatingTime().

Here is the call graph for this function:

◆ setDescriptor()

void DeviceInfoMessage::setDescriptor ( const QString  descriptor)

Sets the descriptor field to descriptor.

Parameters
descriptorThe field value to set.

Definition at line 400 of file deviceinfomessage.cpp.

401 {
402  Q_D(DeviceInfoMessage);
403  d->descriptor = descriptor;
404 }
QString descriptor() const
Returns the DeviceInfoMessage data message's descriptor field's current value.

References descriptor().

Here is the call graph for this function:

◆ setDeviceIndex()

void DeviceInfoMessage::setDeviceIndex ( const DeviceIndex  deviceIndex)

Sets the deviceIndex field to deviceIndex.

Parameters
deviceIndexThe field value to set.

Definition at line 290 of file deviceinfomessage.cpp.

291 {
292  Q_D(DeviceInfoMessage);
293  d->deviceIndex = deviceIndex;
294 }
DeviceIndex deviceIndex() const
Returns the DeviceInfoMessage data message's deviceIndex field's current value.

References deviceIndex().

Here is the call graph for this function:

◆ setDeviceType()

void DeviceInfoMessage::setDeviceType ( const quint8  deviceType)

Sets the deviceType field to deviceType.

Parameters
deviceTypeThe field value to set.

Definition at line 300 of file deviceinfomessage.cpp.

301 {
302  Q_D(DeviceInfoMessage);
303  d->deviceType = deviceType;
304 }
quint8 deviceType() const
Returns the DeviceInfoMessage data message's deviceType field's current value.

References deviceType().

Here is the call graph for this function:

◆ setHardwareVersion()

void DeviceInfoMessage::setHardwareVersion ( const quint8  hardwareVersion)

Sets the hardwareVersion field to hardwareVersion.

Parameters
hardwareVersionThe field value to set.

Definition at line 350 of file deviceinfomessage.cpp.

351 {
352  Q_D(DeviceInfoMessage);
353  d->hardwareVersion = hardwareVersion;
354 }
quint8 hardwareVersion() const
Returns the DeviceInfoMessage data message's hardwareVersion field's current value.

References hardwareVersion().

Here is the call graph for this function:

◆ setManufacturer()

void DeviceInfoMessage::setManufacturer ( const Manufacturer  manufacturer)

Sets the manufacturer field to manufacturer.

Parameters
manufacturerThe field value to set.

Definition at line 310 of file deviceinfomessage.cpp.

311 {
312  Q_D(DeviceInfoMessage);
313  d->manufacturer = manufacturer;
314 }
Manufacturer manufacturer() const
Returns the DeviceInfoMessage data message's manufacturer field's current value.

References manufacturer().

Here is the call graph for this function:

◆ setProduct()

void DeviceInfoMessage::setProduct ( const quint16  product)

Sets the product field to product.

Parameters
productThe field value to set.

Definition at line 330 of file deviceinfomessage.cpp.

331 {
332  Q_D(DeviceInfoMessage);
333  d->product = product;
334 }
quint16 product() const
Returns the DeviceInfoMessage data message's product field's current value.

References product().

Here is the call graph for this function:

◆ setProductName()

void DeviceInfoMessage::setProductName ( const QString  productName)

Sets the productName field to productName.

Parameters
productNameThe field value to set.

Definition at line 450 of file deviceinfomessage.cpp.

451 {
452  Q_D(DeviceInfoMessage);
453  d->productName = productName;
454 }
QString productName() const
Returns the DeviceInfoMessage data message's productName field's current value.

References productName().

Here is the call graph for this function:

◆ setSensorPosition()

void DeviceInfoMessage::setSensorPosition ( const BodyLocation  sensorPosition)

Sets the sensorPosition field to sensorPosition.

Parameters
sensorPositionThe field value to set.

Definition at line 390 of file deviceinfomessage.cpp.

391 {
392  Q_D(DeviceInfoMessage);
393  d->sensorPosition = sensorPosition;
394 }
BodyLocation sensorPosition() const
Returns the DeviceInfoMessage data message's sensorPosition field's current value.

References sensorPosition().

Here is the call graph for this function:

◆ setSerialNumber()

void DeviceInfoMessage::setSerialNumber ( const quint32z  serialNumber)

Sets the serialNumber field to serialNumber.

Parameters
serialNumberThe field value to set.

Definition at line 320 of file deviceinfomessage.cpp.

321 {
322  Q_D(DeviceInfoMessage);
323  d->serialNumber = serialNumber;
324 }
quint32z serialNumber() const
Returns the DeviceInfoMessage data message's serialNumber field's current value.

References serialNumber().

Here is the call graph for this function:

◆ setSoftwareVersion()

void DeviceInfoMessage::setSoftwareVersion ( const quint16  softwareVersion)

Sets the softwareVersion field to softwareVersion.

Parameters
softwareVersionThe field value to set.

Definition at line 340 of file deviceinfomessage.cpp.

341 {
342  Q_D(DeviceInfoMessage);
343  d->softwareVersion = softwareVersion;
344 }
quint16 softwareVersion() const
Returns the DeviceInfoMessage data message's softwareVersion field's current value.

References softwareVersion().

Here is the call graph for this function:

◆ setSourceType()

void DeviceInfoMessage::setSourceType ( const SourceType  sourceType)

Sets the sourceType field to sourceType.

Parameters
sourceTypeThe field value to set.

Definition at line 440 of file deviceinfomessage.cpp.

441 {
442  Q_D(DeviceInfoMessage);
443  d->sourceType = sourceType;
444 }
SourceType sourceType() const
Returns the DeviceInfoMessage data message's sourceType field's current value.

References sourceType().

Here is the call graph for this function:

◆ setTimestamp()

void DeviceInfoMessage::setTimestamp ( const DateTime  timestamp)

Sets the timestamp field to timestamp.

Parameters
timestampThe field value to set.

Definition at line 280 of file deviceinfomessage.cpp.

281 {
282  Q_D(DeviceInfoMessage);
283  d->timestamp = timestamp;
284 }
DateTime timestamp() const
Returns the DeviceInfoMessage data message's timestamp field's current value.

References timestamp().

Here is the call graph for this function:

◆ softwareVersion()

quint16 DeviceInfoMessage::softwareVersion ( ) const

Returns the DeviceInfoMessage data message's softwareVersion field's current value.

Returns
the softwareVersion field value.

Definition at line 140 of file deviceinfomessage.cpp.

141 {
142  Q_D(const DeviceInfoMessage);
143  return d->softwareVersion;
144 }

Referenced by setSoftwareVersion().

Here is the caller graph for this function:

◆ sourceType()

SourceType DeviceInfoMessage::sourceType ( ) const

Returns the DeviceInfoMessage data message's sourceType field's current value.

Returns
the sourceType field value.

Definition at line 256 of file deviceinfomessage.cpp.

257 {
258  Q_D(const DeviceInfoMessage);
259  return d->sourceType;
260 }

Referenced by setSourceType().

Here is the caller graph for this function:

◆ timestamp()

DateTime DeviceInfoMessage::timestamp ( ) const

Returns the DeviceInfoMessage data message's timestamp field's current value.

Returns
the timestamp field value.

Definition at line 74 of file deviceinfomessage.cpp.

75 {
76  Q_D(const DeviceInfoMessage);
77  return d->timestamp;
78 }

Referenced by setTimestamp().

Here is the caller graph for this function:

The documentation for this class was generated from the following files: