//----------------------------------------------------------------------- // // 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 ObdSimulator.Data { using System; using System.Collections.Generic; using System.Linq; using System.Text; /// /// Constants for parsing of PID. /// public static class PidParser { /* * Byte number according to J1979. * The label to number mapping will make it easier * whenever (if ever) necessary to change the offsets. */ /// /// Byte position A /// public const int BYTE_A = 0; /// /// Byte position B /// public const int BYTE_B = 1; /// /// Byte position C /// public const int BYTE_C = 2; /// /// Byte position D /// public const int BYTE_D = 3; /// /// Byte position E /// public const int BYTE_E = 4; /// /// Byte position F /// public const int BYTE_F = 5; /// /// Byte position G /// public const int BYTE_G = 6; /// /// Byte position H /// public const int BYTE_H = 7; /// /// Byte position I /// public const int BYTE_I = 8; /// /// Byte position J /// public const int BYTE_J = 9; /// /// Byte position K /// public const int BYTE_K = 10; /// /// Byte position L /// public const int BYTE_L = 11; /// /// Byte position M /// public const int BYTE_M = 12; /// /// Byte position N /// public const int BYTE_N = 13; /// /// Byte position O /// public const int BYTE_O = 14; /// /// Byte position P /// public const int BYTE_P = 15; /// /// Byte position Q /// public const int BYTE_Q = 16; /// /// Byte position R /// public const int BYTE_R = 17; /// /// Byte position S /// public const int BYTE_S = 18; /// /// Byte position T /// public const int BYTE_T = 19; /// /// Byte position U /// public const int BYTE_U = 20; /// /// Byte position V /// public const int BYTE_V = 21; /// /// Byte position W /// public const int BYTE_W = 22; /// /// Byte position X /// public const int BYTE_X = 23; /// /// Byte position Y /// public const int BYTE_Y = 24; /// /// Byte position Z /// public const int BYTE_Z = 25; } }