123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304 |
- #region Copyright
- ////////////////////////////////////////////////////////////////////////////////
- // The following FIT Protocol software provided may be used with FIT protocol
- // devices only and remains the copyrighted property of Dynastream Innovations Inc.
- // The software is being provided on an "as-is" basis and as an accommodation,
- // and therefore all warranties, representations, or guarantees of any kind
- // (whether express, implied or statutory) including, without limitation,
- // warranties of merchantability, non-infringement, or fitness for a particular
- // purpose, are specifically disclaimed.
- //
- // Copyright 2016 Dynastream Innovations Inc.
- ////////////////////////////////////////////////////////////////////////////////
- // ****WARNING**** This file is auto-generated! Do NOT edit this file.
- // Profile Version = 16.60Release
- // Tag = production-akw-16.60.00-0-g5d3d436
- ////////////////////////////////////////////////////////////////////////////////
- #endregion
- using System;
- using System.Collections.Generic;
- using System.Diagnostics;
- using System.Text;
- using System.IO;
- namespace Dynastream.Fit
- {
- /// <summary>
- /// Implements the ObdiiData profile message.
- /// </summary>
- public class ObdiiDataMesg : Mesg
- {
- #region Fields
- #endregion
- #region Constructors
- public ObdiiDataMesg() : base(Profile.GetMesg(MesgNum.ObdiiData))
- {
- }
- public ObdiiDataMesg(Mesg mesg) : base(mesg)
- {
- }
- #endregion // Constructors
- #region Methods
- ///<summary>
- /// Retrieves the Timestamp field
- /// Units: s
- /// Comment: Timestamp message was output</summary>
- /// <returns>Returns DateTime representing the Timestamp field</returns>
- public DateTime GetTimestamp()
- {
- return TimestampToDateTime((uint?)GetFieldValue(253, 0, Fit.SubfieldIndexMainField));
- }
-
-
- /// <summary>
- /// Set Timestamp field
- /// Units: s
- /// Comment: Timestamp message was output</summary>
- /// <param name="timestamp_">Nullable field value to be set</param>
- public void SetTimestamp(DateTime timestamp_)
- {
- SetFieldValue(253, 0, timestamp_.GetTimeStamp(), Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the TimestampMs field
- /// Units: ms
- /// Comment: Fractional part of timestamp, added to timestamp</summary>
- /// <returns>Returns nullable ushort representing the TimestampMs field</returns>
- public ushort? GetTimestampMs()
- {
- return (ushort?)GetFieldValue(0, 0, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- /// Set TimestampMs field
- /// Units: ms
- /// Comment: Fractional part of timestamp, added to timestamp</summary>
- /// <param name="timestampMs_">Nullable field value to be set</param>
- public void SetTimestampMs(ushort? timestampMs_)
- {
- SetFieldValue(0, 0, timestampMs_, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- ///
- /// </summary>
- /// <returns>returns number of elements in field TimeOffset</returns>
- public int GetNumTimeOffset()
- {
- return GetNumFieldValues(1, Fit.SubfieldIndexMainField);
- }
- ///<summary>
- /// Retrieves the TimeOffset field
- /// Units: ms
- /// Comment: Offset of PID reading [i] from start_timestamp+start_timestamp_ms. Readings may span accross seconds.</summary>
- /// <param name="index">0 based index of TimeOffset element to retrieve</param>
- /// <returns>Returns nullable ushort representing the TimeOffset field</returns>
- public ushort? GetTimeOffset(int index)
- {
- return (ushort?)GetFieldValue(1, index, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- /// Set TimeOffset field
- /// Units: ms
- /// Comment: Offset of PID reading [i] from start_timestamp+start_timestamp_ms. Readings may span accross seconds.</summary>
- /// <param name="index">0 based index of time_offset</param>
- /// <param name="timeOffset_">Nullable field value to be set</param>
- public void SetTimeOffset(int index, ushort? timeOffset_)
- {
- SetFieldValue(1, index, timeOffset_, Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the Pid field
- /// Comment: Parameter ID</summary>
- /// <returns>Returns nullable byte representing the Pid field</returns>
- public byte? GetPid()
- {
- return (byte?)GetFieldValue(2, 0, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- /// Set Pid field
- /// Comment: Parameter ID</summary>
- /// <param name="pid_">Nullable field value to be set</param>
- public void SetPid(byte? pid_)
- {
- SetFieldValue(2, 0, pid_, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- ///
- /// </summary>
- /// <returns>returns number of elements in field RawData</returns>
- public int GetNumRawData()
- {
- return GetNumFieldValues(3, Fit.SubfieldIndexMainField);
- }
- ///<summary>
- /// Retrieves the RawData field
- /// Comment: Raw parameter data</summary>
- /// <param name="index">0 based index of RawData element to retrieve</param>
- /// <returns>Returns nullable byte representing the RawData field</returns>
- public byte? GetRawData(int index)
- {
- return (byte?)GetFieldValue(3, index, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- /// Set RawData field
- /// Comment: Raw parameter data</summary>
- /// <param name="index">0 based index of raw_data</param>
- /// <param name="rawData_">Nullable field value to be set</param>
- public void SetRawData(int index, byte? rawData_)
- {
- SetFieldValue(3, index, rawData_, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- ///
- /// </summary>
- /// <returns>returns number of elements in field PidDataSize</returns>
- public int GetNumPidDataSize()
- {
- return GetNumFieldValues(4, Fit.SubfieldIndexMainField);
- }
- ///<summary>
- /// Retrieves the PidDataSize field
- /// Comment: Optional, data size of PID[i]. If not specified refer to SAE J1979.</summary>
- /// <param name="index">0 based index of PidDataSize element to retrieve</param>
- /// <returns>Returns nullable byte representing the PidDataSize field</returns>
- public byte? GetPidDataSize(int index)
- {
- return (byte?)GetFieldValue(4, index, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- /// Set PidDataSize field
- /// Comment: Optional, data size of PID[i]. If not specified refer to SAE J1979.</summary>
- /// <param name="index">0 based index of pid_data_size</param>
- /// <param name="pidDataSize_">Nullable field value to be set</param>
- public void SetPidDataSize(int index, byte? pidDataSize_)
- {
- SetFieldValue(4, index, pidDataSize_, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- ///
- /// </summary>
- /// <returns>returns number of elements in field SystemTime</returns>
- public int GetNumSystemTime()
- {
- return GetNumFieldValues(5, Fit.SubfieldIndexMainField);
- }
- ///<summary>
- /// Retrieves the SystemTime field
- /// Comment: 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.</summary>
- /// <param name="index">0 based index of SystemTime element to retrieve</param>
- /// <returns>Returns nullable uint representing the SystemTime field</returns>
- public uint? GetSystemTime(int index)
- {
- return (uint?)GetFieldValue(5, index, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- /// Set SystemTime field
- /// Comment: 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.</summary>
- /// <param name="index">0 based index of system_time</param>
- /// <param name="systemTime_">Nullable field value to be set</param>
- public void SetSystemTime(int index, uint? systemTime_)
- {
- SetFieldValue(5, index, systemTime_, Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the StartTimestamp field
- /// Comment: Timestamp of first sample recorded in the message. Used with time_offset to generate time of each sample</summary>
- /// <returns>Returns DateTime representing the StartTimestamp field</returns>
- public DateTime GetStartTimestamp()
- {
- return TimestampToDateTime((uint?)GetFieldValue(6, 0, Fit.SubfieldIndexMainField));
- }
-
-
- /// <summary>
- /// Set StartTimestamp field
- /// Comment: Timestamp of first sample recorded in the message. Used with time_offset to generate time of each sample</summary>
- /// <param name="startTimestamp_">Nullable field value to be set</param>
- public void SetStartTimestamp(DateTime startTimestamp_)
- {
- SetFieldValue(6, 0, startTimestamp_.GetTimeStamp(), Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the StartTimestampMs field
- /// Units: ms
- /// Comment: Fractional part of start_timestamp</summary>
- /// <returns>Returns nullable ushort representing the StartTimestampMs field</returns>
- public ushort? GetStartTimestampMs()
- {
- return (ushort?)GetFieldValue(7, 0, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- /// Set StartTimestampMs field
- /// Units: ms
- /// Comment: Fractional part of start_timestamp</summary>
- /// <param name="startTimestampMs_">Nullable field value to be set</param>
- public void SetStartTimestampMs(ushort? startTimestampMs_)
- {
- SetFieldValue(7, 0, startTimestampMs_, Fit.SubfieldIndexMainField);
- }
-
- #endregion // Methods
- } // Class
- } // namespace
|