//----------------------------------------------------------------------- // // Copyright © 2012 Nils Hammar. All rights reserved. // //----------------------------------------------------------------------- /* * Software to access vehicle information via the OBD-II connector. * * Copyright © 2012 Nils Hammar * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Alternative licensing is possible, see the licensing document. * * The above text may not be removed or modified. */ namespace Protocol.OBD { using global::SharedObjects.Misc; using global::SharedObjects.Protocol.OBD; /// /// Wrapper class for presentation data. /// public class PresentationData : IPresentationData { /// /// Gets Source ECU address for the data. /// public uint sourceAddress { get; private set; } /// /// Gets Mode byte. /// public byte mode { get; private set; } /// /// Gets Pid value. /// public uint pid { get; private set; } /// /// Gets Data label. /// public string label { get; private set; } /// /// Gets Value unit string. /// public string unit { get; private set; } /// /// Gets Value string. /// public string valueStr { get; private set; } /// /// Gets Numeric value (zero if not applicable) /// public double value { get; private set; } /// /// Gets Timestamp value. /// public long t1 { get; private set; } /// /// Gets PID Item. /// public XmlClass.pidgroup.pidlist pidItem { get; private set; } /// /// Gets Sensor item. /// public XmlClass.pidgroup.pidlist.sensordata sensor { get; private set; } /// /// Gets a value indicating whether Value is potentially invalid. /// public bool naFlag { get; private set; } /// /// Initializes a new instance of the class. /// /// Source ECU address for the data. /// Mode byte. /// PID number. /// Pid data item. /// Sensor data item. /// Data label. /// Value unit string. /// Value string. /// Numeric value (zero if not applicable) /// Timestamp value. /// Value is potentially invalid. public PresentationData( uint sourceAddress, byte mode, uint pid, XmlClass.pidgroup.pidlist pidItem, XmlClass.pidgroup.pidlist.sensordata sensor, string label, string unit, string valueStr, double value, long t1, bool naFlag) { this.sourceAddress = sourceAddress; this.mode = mode; this.pid = pid; this.pidItem = pidItem; this.sensor = sensor; this.label = label; this.unit = unit; this.valueStr = valueStr; this.value = value; this.t1 = t1; this.naFlag = naFlag; } } }