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

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

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

Public Member Functions

 BarometerDataMessage ()
 Constructs a BarometerDataMessage object. More...
 
DateTime timestamp () const
 Returns the BarometerDataMessage data message's timestamp field's current value. More...
 
quint16 timestampMs () const
 Returns the BarometerDataMessage data message's timestampMs field's current value. More...
 
quint16 sampleTimeOffset () const
 Returns the BarometerDataMessage data message's sampleTimeOffset field's current value. More...
 
quint32 baroPres () const
 Returns the BarometerDataMessage data message's baroPres field's current value. More...
 
void setTimestamp (const DateTime timestamp)
 Sets the timestamp field to timestamp. More...
 
void setTimestampMs (const quint16 timestampMs)
 Sets the timestampMs field to timestampMs. More...
 
void setSampleTimeOffset (const quint16 sampleTimeOffset)
 Sets the sampleTimeOffset field to sampleTimeOffset. More...
 
void setBaroPres (const quint32 baroPres)
 Sets the baroPres field to baroPres. 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

 BarometerDataMessage (BarometerDataMessagePrivate *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 BarometerDataMessage class represents a FIT BarometerDataMessage data message.

See also
DataMessage

Definition at line 39 of file barometerdatamessage.h.

Constructor & Destructor Documentation

◆ BarometerDataMessage() [1/2]

BarometerDataMessage::BarometerDataMessage ( )

Constructs a BarometerDataMessage 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 barometerdatamessage.cpp.

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

◆ BarometerDataMessage() [2/2]

BarometerDataMessage::BarometerDataMessage ( BarometerDataMessagePrivate *const  d)
explicitprotected

Constructs a BarometerDataMessage object with private implementation d.

Parameters
dPointer to private implementation.

Definition at line 64 of file barometerdatamessage.cpp.

65 {
66 
67 }

Member Function Documentation

◆ baroPres()

quint32 BarometerDataMessage::baroPres ( ) const

Returns the BarometerDataMessage data message's baroPres field's current value.

These are the raw ADC reading. The samples may span across seconds. A conversion will need to be done on this data once read.

Returns
the baroPres field value.

Definition at line 118 of file barometerdatamessage.cpp.

119 {
120  Q_D(const BarometerDataMessage);
121  return d->baroPres;
122 }
The BarometerDataMessage class represents a FIT BarometerDataMessage data message.

Referenced by setBaroPres().

Here is the caller graph for this function:

◆ sampleTimeOffset()

quint16 BarometerDataMessage::sampleTimeOffset ( ) const

Returns the BarometerDataMessage data message's sampleTimeOffset field's current value.

Each time in the array describes the time at which the barometer sample with the corrosponding index was taken. The samples may span across seconds. Array size must match the number of samples in baro_cal

Returns
the sampleTimeOffset field value.

Definition at line 104 of file barometerdatamessage.cpp.

105 {
106  Q_D(const BarometerDataMessage);
107  return d->sampleTimeOffset;
108 }

Referenced by setSampleTimeOffset().

Here is the caller graph for this function:

◆ setBaroPres()

void BarometerDataMessage::setBaroPres ( const quint32  baroPres)

Sets the baroPres field to baroPres.

Parameters
baroPresThe field value to set.

Definition at line 159 of file barometerdatamessage.cpp.

160 {
162  d->baroPres = baroPres;
163 }
quint32 baroPres() const
Returns the BarometerDataMessage data message's baroPres field's current value.

References baroPres().

Here is the call graph for this function:

◆ setSampleTimeOffset()

void BarometerDataMessage::setSampleTimeOffset ( const quint16  sampleTimeOffset)

Sets the sampleTimeOffset field to sampleTimeOffset.

Parameters
sampleTimeOffsetThe field value to set.

Definition at line 149 of file barometerdatamessage.cpp.

150 {
152  d->sampleTimeOffset = sampleTimeOffset;
153 }
quint16 sampleTimeOffset() const
Returns the BarometerDataMessage data message's sampleTimeOffset field's current value.

References sampleTimeOffset().

Here is the call graph for this function:

◆ setTimestamp()

void BarometerDataMessage::setTimestamp ( const DateTime  timestamp)

Sets the timestamp field to timestamp.

Parameters
timestampThe field value to set.

Definition at line 129 of file barometerdatamessage.cpp.

130 {
132  d->timestamp = timestamp;
133 }
DateTime timestamp() const
Returns the BarometerDataMessage data message's timestamp field's current value.

References timestamp().

Here is the call graph for this function:

◆ setTimestampMs()

void BarometerDataMessage::setTimestampMs ( const quint16  timestampMs)

Sets the timestampMs field to timestampMs.

Parameters
timestampMsThe field value to set.

Definition at line 139 of file barometerdatamessage.cpp.

140 {
142  d->timestampMs = timestampMs;
143 }
quint16 timestampMs() const
Returns the BarometerDataMessage data message's timestampMs field's current value.

References timestampMs().

Here is the call graph for this function:

◆ timestamp()

DateTime BarometerDataMessage::timestamp ( ) const

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

Whole second part of the timestamp

Returns
the timestamp field value.

Definition at line 76 of file barometerdatamessage.cpp.

77 {
78  Q_D(const BarometerDataMessage);
79  return d->timestamp;
80 }

Referenced by setTimestamp().

Here is the caller graph for this function:

◆ timestampMs()

quint16 BarometerDataMessage::timestampMs ( ) const

Returns the BarometerDataMessage data message's timestampMs field's current value.

Millisecond part of the timestamp.

Returns
the timestampMs field value.

Definition at line 89 of file barometerdatamessage.cpp.

90 {
91  Q_D(const BarometerDataMessage);
92  return d->timestampMs;
93 }

Referenced by setTimestampMs().

Here is the caller graph for this function:

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