#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 { /// /// Implements the ObdiiData profile message. /// 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 /// /// Retrieves the Timestamp field /// Units: s /// Comment: Timestamp message was output /// Returns DateTime representing the Timestamp field public DateTime GetTimestamp() { return TimestampToDateTime((uint?)GetFieldValue(253, 0, Fit.SubfieldIndexMainField)); } /// /// Set Timestamp field /// Units: s /// Comment: Timestamp message was output /// Nullable field value to be set public void SetTimestamp(DateTime timestamp_) { SetFieldValue(253, 0, timestamp_.GetTimeStamp(), Fit.SubfieldIndexMainField); } /// /// Retrieves the TimestampMs field /// Units: ms /// Comment: Fractional part of timestamp, added to timestamp /// Returns nullable ushort representing the TimestampMs field public ushort? GetTimestampMs() { return (ushort?)GetFieldValue(0, 0, Fit.SubfieldIndexMainField); } /// /// Set TimestampMs field /// Units: ms /// Comment: Fractional part of timestamp, added to timestamp /// Nullable field value to be set public void SetTimestampMs(ushort? timestampMs_) { SetFieldValue(0, 0, timestampMs_, Fit.SubfieldIndexMainField); } /// /// /// /// returns number of elements in field TimeOffset public int GetNumTimeOffset() { return GetNumFieldValues(1, Fit.SubfieldIndexMainField); } /// /// Retrieves the TimeOffset field /// Units: ms /// Comment: Offset of PID reading [i] from start_timestamp+start_timestamp_ms. Readings may span accross seconds. /// 0 based index of TimeOffset element to retrieve /// Returns nullable ushort representing the TimeOffset field public ushort? GetTimeOffset(int index) { return (ushort?)GetFieldValue(1, index, Fit.SubfieldIndexMainField); } /// /// Set TimeOffset field /// Units: ms /// Comment: Offset of PID reading [i] from start_timestamp+start_timestamp_ms. Readings may span accross seconds. /// 0 based index of time_offset /// Nullable field value to be set public void SetTimeOffset(int index, ushort? timeOffset_) { SetFieldValue(1, index, timeOffset_, Fit.SubfieldIndexMainField); } /// /// Retrieves the Pid field /// Comment: Parameter ID /// Returns nullable byte representing the Pid field public byte? GetPid() { return (byte?)GetFieldValue(2, 0, Fit.SubfieldIndexMainField); } /// /// Set Pid field /// Comment: Parameter ID /// Nullable field value to be set public void SetPid(byte? pid_) { SetFieldValue(2, 0, pid_, Fit.SubfieldIndexMainField); } /// /// /// /// returns number of elements in field RawData public int GetNumRawData() { return GetNumFieldValues(3, Fit.SubfieldIndexMainField); } /// /// Retrieves the RawData field /// Comment: Raw parameter data /// 0 based index of RawData element to retrieve /// Returns nullable byte representing the RawData field public byte? GetRawData(int index) { return (byte?)GetFieldValue(3, index, Fit.SubfieldIndexMainField); } /// /// Set RawData field /// Comment: Raw parameter data /// 0 based index of raw_data /// Nullable field value to be set public void SetRawData(int index, byte? rawData_) { SetFieldValue(3, index, rawData_, Fit.SubfieldIndexMainField); } /// /// /// /// returns number of elements in field PidDataSize public int GetNumPidDataSize() { return GetNumFieldValues(4, Fit.SubfieldIndexMainField); } /// /// Retrieves the PidDataSize field /// Comment: Optional, data size of PID[i]. If not specified refer to SAE J1979. /// 0 based index of PidDataSize element to retrieve /// Returns nullable byte representing the PidDataSize field public byte? GetPidDataSize(int index) { return (byte?)GetFieldValue(4, index, Fit.SubfieldIndexMainField); } /// /// Set PidDataSize field /// Comment: Optional, data size of PID[i]. If not specified refer to SAE J1979. /// 0 based index of pid_data_size /// Nullable field value to be set public void SetPidDataSize(int index, byte? pidDataSize_) { SetFieldValue(4, index, pidDataSize_, Fit.SubfieldIndexMainField); } /// /// /// /// returns number of elements in field SystemTime public int GetNumSystemTime() { return GetNumFieldValues(5, Fit.SubfieldIndexMainField); } /// /// 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. /// 0 based index of SystemTime element to retrieve /// Returns nullable uint representing the SystemTime field public uint? GetSystemTime(int index) { return (uint?)GetFieldValue(5, index, Fit.SubfieldIndexMainField); } /// /// 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. /// 0 based index of system_time /// Nullable field value to be set public void SetSystemTime(int index, uint? systemTime_) { SetFieldValue(5, index, systemTime_, Fit.SubfieldIndexMainField); } /// /// Retrieves the StartTimestamp field /// Comment: Timestamp of first sample recorded in the message. Used with time_offset to generate time of each sample /// Returns DateTime representing the StartTimestamp field public DateTime GetStartTimestamp() { return TimestampToDateTime((uint?)GetFieldValue(6, 0, Fit.SubfieldIndexMainField)); } /// /// Set StartTimestamp field /// Comment: Timestamp of first sample recorded in the message. Used with time_offset to generate time of each sample /// Nullable field value to be set public void SetStartTimestamp(DateTime startTimestamp_) { SetFieldValue(6, 0, startTimestamp_.GetTimeStamp(), Fit.SubfieldIndexMainField); } /// /// Retrieves the StartTimestampMs field /// Units: ms /// Comment: Fractional part of start_timestamp /// Returns nullable ushort representing the StartTimestampMs field public ushort? GetStartTimestampMs() { return (ushort?)GetFieldValue(7, 0, Fit.SubfieldIndexMainField); } /// /// Set StartTimestampMs field /// Units: ms /// Comment: Fractional part of start_timestamp /// Nullable field value to be set public void SetStartTimestampMs(ushort? startTimestampMs_) { SetFieldValue(7, 0, startTimestampMs_, Fit.SubfieldIndexMainField); } #endregion // Methods } // Class } // namespace