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

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

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

Public Member Functions

 ObdiiDataMessage ()
 Constructs a ObdiiDataMessage object. More...
 
DateTime timestamp () const
 Returns the ObdiiDataMessage data message's timestamp field's current value. More...
 
quint16 timestampMs () const
 Returns the ObdiiDataMessage data message's timestampMs field's current value. More...
 
quint16 timeOffset () const
 Returns the ObdiiDataMessage data message's timeOffset field's current value. More...
 
quint8 pid () const
 Returns the ObdiiDataMessage data message's pid field's current value. More...
 
quint8 rawData () const
 Returns the ObdiiDataMessage data message's rawData field's current value. More...
 
quint8 pidDataSize () const
 Returns the ObdiiDataMessage data message's pidDataSize field's current value. More...
 
quint32 systemTime () const
 Returns the ObdiiDataMessage data message's systemTime field's current value. More...
 
DateTime startTimestamp () const
 Returns the ObdiiDataMessage data message's startTimestamp field's current value. More...
 
quint16 startTimestampMs () const
 Returns the ObdiiDataMessage data message's startTimestampMs 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 setTimeOffset (const quint16 timeOffset)
 Sets the timeOffset field to timeOffset. More...
 
void setPid (const quint8 pid)
 Sets the pid field to pid. More...
 
void setRawData (const quint8 rawData)
 Sets the rawData field to rawData. More...
 
void setPidDataSize (const quint8 pidDataSize)
 Sets the pidDataSize field to pidDataSize. More...
 
void setSystemTime (const quint32 systemTime)
 Sets the systemTime field to systemTime. More...
 
void setStartTimestamp (const DateTime startTimestamp)
 Sets the startTimestamp field to startTimestamp. More...
 
void setStartTimestampMs (const quint16 startTimestampMs)
 Sets the startTimestampMs field to startTimestampMs. 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

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

See also
DataMessage

Definition at line 39 of file obdiidatamessage.h.

Constructor & Destructor Documentation

◆ ObdiiDataMessage() [1/2]

ObdiiDataMessage::ObdiiDataMessage ( )

Constructs a ObdiiDataMessage 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 obdiidatamessage.cpp.

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

◆ ObdiiDataMessage() [2/2]

ObdiiDataMessage::ObdiiDataMessage ( ObdiiDataMessagePrivate *const  d)
explicitprotected

Constructs a ObdiiDataMessage object with private implementation d.

Parameters
dPointer to private implementation.

Definition at line 64 of file obdiidatamessage.cpp.

65 {
66 
67 }

Member Function Documentation

◆ pid()

quint8 ObdiiDataMessage::pid ( ) const

Returns the ObdiiDataMessage data message's pid field's current value.

Parameter ID

Returns
the pid field value.

Definition at line 116 of file obdiidatamessage.cpp.

117 {
118  Q_D(const ObdiiDataMessage);
119  return d->pid;
120 }
The ObdiiDataMessage class represents a FIT ObdiiDataMessage data message.

Referenced by setPid().

Here is the caller graph for this function:

◆ pidDataSize()

quint8 ObdiiDataMessage::pidDataSize ( ) const

Returns the ObdiiDataMessage data message's pidDataSize field's current value.

Optional, data size of PID[i]. If not specified refer to SAE J1979.

Returns
the pidDataSize field value.

Definition at line 142 of file obdiidatamessage.cpp.

143 {
144  Q_D(const ObdiiDataMessage);
145  return d->pidDataSize;
146 }

Referenced by setPidDataSize().

Here is the caller graph for this function:

◆ rawData()

quint8 ObdiiDataMessage::rawData ( ) const

Returns the ObdiiDataMessage data message's rawData field's current value.

Raw parameter data

Returns
the rawData field value.

Definition at line 129 of file obdiidatamessage.cpp.

130 {
131  Q_D(const ObdiiDataMessage);
132  return d->rawData;
133 }

Referenced by setRawData().

Here is the caller graph for this function:

◆ setPid()

void ObdiiDataMessage::setPid ( const quint8  pid)

Sets the pid field to pid.

Parameters
pidThe field value to set.

Definition at line 225 of file obdiidatamessage.cpp.

226 {
227  Q_D(ObdiiDataMessage);
228  d->pid = pid;
229 }
quint8 pid() const
Returns the ObdiiDataMessage data message's pid field's current value.

References pid().

Here is the call graph for this function:

◆ setPidDataSize()

void ObdiiDataMessage::setPidDataSize ( const quint8  pidDataSize)

Sets the pidDataSize field to pidDataSize.

Parameters
pidDataSizeThe field value to set.

Definition at line 245 of file obdiidatamessage.cpp.

246 {
247  Q_D(ObdiiDataMessage);
248  d->pidDataSize = pidDataSize;
249 }
quint8 pidDataSize() const
Returns the ObdiiDataMessage data message's pidDataSize field's current value.

References pidDataSize().

Here is the call graph for this function:

◆ setRawData()

void ObdiiDataMessage::setRawData ( const quint8  rawData)

Sets the rawData field to rawData.

Parameters
rawDataThe field value to set.

Definition at line 235 of file obdiidatamessage.cpp.

236 {
237  Q_D(ObdiiDataMessage);
238  d->rawData = rawData;
239 }
quint8 rawData() const
Returns the ObdiiDataMessage data message's rawData field's current value.

References rawData().

Here is the call graph for this function:

◆ setStartTimestamp()

void ObdiiDataMessage::setStartTimestamp ( const DateTime  startTimestamp)

Sets the startTimestamp field to startTimestamp.

Parameters
startTimestampThe field value to set.

Definition at line 265 of file obdiidatamessage.cpp.

266 {
267  Q_D(ObdiiDataMessage);
268  d->startTimestamp = startTimestamp;
269 }
DateTime startTimestamp() const
Returns the ObdiiDataMessage data message's startTimestamp field's current value.

References startTimestamp().

Here is the call graph for this function:

◆ setStartTimestampMs()

void ObdiiDataMessage::setStartTimestampMs ( const quint16  startTimestampMs)

Sets the startTimestampMs field to startTimestampMs.

Parameters
startTimestampMsThe field value to set.

Definition at line 275 of file obdiidatamessage.cpp.

276 {
277  Q_D(ObdiiDataMessage);
278  d->startTimestampMs = startTimestampMs;
279 }
quint16 startTimestampMs() const
Returns the ObdiiDataMessage data message's startTimestampMs field's current value.

References startTimestampMs().

Here is the call graph for this function:

◆ setSystemTime()

void ObdiiDataMessage::setSystemTime ( const quint32  systemTime)

Sets the systemTime field to systemTime.

Parameters
systemTimeThe field value to set.

Definition at line 255 of file obdiidatamessage.cpp.

256 {
257  Q_D(ObdiiDataMessage);
258  d->systemTime = systemTime;
259 }
quint32 systemTime() const
Returns the ObdiiDataMessage data message's systemTime field's current value.

References systemTime().

Here is the call graph for this function:

◆ setTimeOffset()

void ObdiiDataMessage::setTimeOffset ( const quint16  timeOffset)

Sets the timeOffset field to timeOffset.

Parameters
timeOffsetThe field value to set.

Definition at line 215 of file obdiidatamessage.cpp.

216 {
217  Q_D(ObdiiDataMessage);
218  d->timeOffset = timeOffset;
219 }
quint16 timeOffset() const
Returns the ObdiiDataMessage data message's timeOffset field's current value.

References timeOffset().

Here is the call graph for this function:

◆ setTimestamp()

void ObdiiDataMessage::setTimestamp ( const DateTime  timestamp)

Sets the timestamp field to timestamp.

Parameters
timestampThe field value to set.

Definition at line 195 of file obdiidatamessage.cpp.

196 {
197  Q_D(ObdiiDataMessage);
198  d->timestamp = timestamp;
199 }
DateTime timestamp() const
Returns the ObdiiDataMessage data message's timestamp field's current value.

References timestamp().

Here is the call graph for this function:

◆ setTimestampMs()

void ObdiiDataMessage::setTimestampMs ( const quint16  timestampMs)

Sets the timestampMs field to timestampMs.

Parameters
timestampMsThe field value to set.

Definition at line 205 of file obdiidatamessage.cpp.

206 {
207  Q_D(ObdiiDataMessage);
208  d->timestampMs = timestampMs;
209 }
quint16 timestampMs() const
Returns the ObdiiDataMessage data message's timestampMs field's current value.

References timestampMs().

Here is the call graph for this function:

◆ startTimestamp()

DateTime ObdiiDataMessage::startTimestamp ( ) const

Returns the ObdiiDataMessage data message's startTimestamp field's current value.

Timestamp of first sample recorded in the message. Used with time_offset to generate time of each sample

Returns
the startTimestamp field value.

Definition at line 171 of file obdiidatamessage.cpp.

172 {
173  Q_D(const ObdiiDataMessage);
174  return d->startTimestamp;
175 }

Referenced by setStartTimestamp().

Here is the caller graph for this function:

◆ startTimestampMs()

quint16 ObdiiDataMessage::startTimestampMs ( ) const

Returns the ObdiiDataMessage data message's startTimestampMs field's current value.

Fractional part of start_timestamp

Returns
the startTimestampMs field value.

Definition at line 184 of file obdiidatamessage.cpp.

185 {
186  Q_D(const ObdiiDataMessage);
187  return d->startTimestampMs;
188 }

Referenced by setStartTimestampMs().

Here is the caller graph for this function:

◆ systemTime()

quint32 ObdiiDataMessage::systemTime ( ) const

Returns the ObdiiDataMessage data message's systemTime field's current value.

System time associated with sample expressed in ms, can be used instead of time_offset. There will be a system_time value for each raw_data element. For multibyte pids the system_time is repeated.

Returns
the systemTime field value.

Definition at line 157 of file obdiidatamessage.cpp.

158 {
159  Q_D(const ObdiiDataMessage);
160  return d->systemTime;
161 }

Referenced by setSystemTime().

Here is the caller graph for this function:

◆ timeOffset()

quint16 ObdiiDataMessage::timeOffset ( ) const

Returns the ObdiiDataMessage data message's timeOffset field's current value.

Offset of PID reading [i] from start_timestamp+start_timestamp_ms. Readings may span accross seconds.

Returns
the timeOffset field value.

Definition at line 103 of file obdiidatamessage.cpp.

104 {
105  Q_D(const ObdiiDataMessage);
106  return d->timeOffset;
107 }

Referenced by setTimeOffset().

Here is the caller graph for this function:

◆ timestamp()

DateTime ObdiiDataMessage::timestamp ( ) const

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

Timestamp message was output

Returns
the timestamp field value.

Definition at line 76 of file obdiidatamessage.cpp.

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

Referenced by setTimestamp().

Here is the caller graph for this function:

◆ timestampMs()

quint16 ObdiiDataMessage::timestampMs ( ) const

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

Fractional part of timestamp, added to timestamp

Returns
the timestampMs field value.

Definition at line 89 of file obdiidatamessage.cpp.

90 {
91  Q_D(const ObdiiDataMessage);
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: