Permalink
Browse files

add resolution of device ids to categories

  • Loading branch information...
antuspcm committed Jun 27, 2018
1 parent 339cf84 commit b4c6415090314eae2a2d3c378a373b2f423a2a09
Showing with 55 additions and 1 deletion.
  1. 0 .gitattributes
  2. 0 .gitignore
  3. BIN Android_Tools/LS_Droid_Elm327_V1_7.apk
  4. 0 Android_Tools/Ls_Droid_Elm_Doc
  5. 0 Apps/COPYING.txt
  6. 0 Apps/PcmApps.sln
  7. BIN Apps/PcmHammer/0411_256px.ico
  8. 0 Apps/PcmHammer/App.config
  9. 0 Apps/PcmHammer/Configuration.cs
  10. 0 Apps/PcmHammer/Devices/AvtDevice.cs
  11. 0 Apps/PcmHammer/Devices/Device.cs
  12. 0 Apps/PcmHammer/Devices/DeviceFactory.cs
  13. 0 Apps/PcmHammer/Devices/J2534Device.cs
  14. 0 Apps/PcmHammer/Devices/J2534DeviceFinder.cs
  15. 0 Apps/PcmHammer/Devices/MockDevice.cs
  16. 0 Apps/PcmHammer/Devices/ScanToolDevice.cs
  17. 0 Apps/PcmHammer/Devices/SerialDevice.cs
  18. 0 Apps/PcmHammer/DialogBoxes/DevicePicker.Designer.cs
  19. 0 Apps/PcmHammer/DialogBoxes/DevicePicker.cs
  20. 0 Apps/PcmHammer/DialogBoxes/DevicePicker.resx
  21. 0 Apps/PcmHammer/DialogBoxes/VinForm.Designer.cs
  22. 0 Apps/PcmHammer/DialogBoxes/VinForm.cs
  23. 0 Apps/PcmHammer/DialogBoxes/VinForm.resx
  24. BIN Apps/PcmHammer/J2534.dll
  25. 0 Apps/PcmHammer/MainForm.Designer.cs
  26. 0 Apps/PcmHammer/MainForm.cs
  27. 0 Apps/PcmHammer/MainForm.resx
  28. 0 Apps/PcmHammer/Messages/BlockId.cs
  29. 0 Apps/PcmHammer/Messages/Message.cs
  30. 0 Apps/PcmHammer/Messages/MessageFactory.cs
  31. 0 Apps/PcmHammer/Messages/MessageParser.cs
  32. +54 −0 Apps/PcmHammer/Messages/VPW.cs
  33. 0 Apps/PcmHammer/Misc/HttpServer.cs
  34. 0 Apps/PcmHammer/Misc/ILogger.cs
  35. 0 Apps/PcmHammer/Misc/KeyAlgorithm.cs
  36. 0 Apps/PcmHammer/Misc/MockPcm.cs
  37. 0 Apps/PcmHammer/Misc/PcmInfo.cs
  38. 0 Apps/PcmHammer/Misc/Query.cs
  39. 0 Apps/PcmHammer/Misc/Response.cs
  40. 0 Apps/PcmHammer/Misc/ToolPresentNotifier.cs
  41. 0 Apps/PcmHammer/Misc/Utility.cs
  42. +1 −1 Apps/PcmHammer/PcmHammer.csproj
  43. 0 Apps/PcmHammer/Ports/HttpPort.cs
  44. 0 Apps/PcmHammer/Ports/IPort.cs
  45. 0 Apps/PcmHammer/Ports/MockAvt852.cs
  46. 0 Apps/PcmHammer/Ports/MockPort.cs
  47. 0 Apps/PcmHammer/Ports/StandardPort.cs
  48. 0 Apps/PcmHammer/Program.cs
  49. 0 Apps/PcmHammer/Properties/AssemblyInfo.cs
  50. 0 Apps/PcmHammer/Properties/Resources.Designer.cs
  51. 0 Apps/PcmHammer/Properties/Resources.resx
  52. 0 Apps/PcmHammer/Properties/Settings.Designer.cs
  53. 0 Apps/PcmHammer/Properties/Settings.settings
  54. 0 Apps/PcmHammer/Vehicle.cs
  55. 0 Apps/PcmHammer/packages.config
  56. 0 Apps/ReadMe.md
  57. 0 Apps/Tests/AvtTests.cs
  58. 0 Apps/Tests/Properties/AssemblyInfo.cs
  59. 0 Apps/Tests/ScanToolTests.cs
  60. 0 Apps/Tests/TestLogger.cs
  61. 0 Apps/Tests/TestPort.cs
  62. 0 Apps/Tests/TestScenarios.cs
  63. 0 Apps/Tests/Tests.csproj
  64. 0 Apps/Tests/UtilityTests.cs
  65. 0 Apps/Tests/packages.config
  66. 0 Arduino/VPW_MEGA_v010_no_bootloader/A_Data.ino
  67. 0 Arduino/VPW_MEGA_v010_no_bootloader/A_Dec_prog.ino
  68. 0 Arduino/VPW_MEGA_v010_no_bootloader/A_VPW_def.ino
  69. 0 Arduino/VPW_MEGA_v010_no_bootloader/A_vpw_Dec.ino
  70. BIN Arduino/VPW_MEGA_v010_no_bootloader/Arduino_j1850vpw.png
  71. 0 Arduino/VPW_MEGA_v010_no_bootloader/B_main.ino
  72. 0 Arduino/VPW_MEGA_v010_no_bootloader/C_VPW.ino
  73. 0 Arduino/VPW_MEGA_v010_no_bootloader/C_VPW_Decode.ino
  74. 0 Arduino/VPW_MEGA_v010_no_bootloader/C_VPW_interupts.ino
  75. 0 Arduino/VPW_MEGA_v010_no_bootloader/C_VPW_recieve.ino
  76. 0 Arduino/VPW_MEGA_v010_no_bootloader/C_VPW_send.ino
  77. 0 Arduino/VPW_MEGA_v010_no_bootloader/READ ME.txt
  78. 0 Arduino/VPW_MEGA_v010_no_bootloader/VPW_MEGA_v010_no_bootloader.ino
  79. 0 DevTools/Bin2Hex/App.config
  80. 0 DevTools/Bin2Hex/Bin2Hex.csproj
  81. 0 DevTools/Bin2Hex/Program.cs
  82. 0 DevTools/Bin2Hex/Properties/AssemblyInfo.cs
  83. 0 DevTools/ByteSwap/App.config
  84. 0 DevTools/ByteSwap/ByteSwap.csproj
  85. 0 DevTools/ByteSwap/Program.cs
  86. 0 DevTools/ByteSwap/Properties/AssemblyInfo.cs
  87. 0 DevTools/COPYING.txt
  88. 0 DevTools/CaptureSerial/App.config
  89. 0 DevTools/CaptureSerial/CaptureSerial.csproj
  90. 0 DevTools/CaptureSerial/Program.cs
  91. 0 DevTools/CaptureSerial/Properties/AssemblyInfo.cs
  92. 0 DevTools/DevTools.sln
  93. 0 DevTools/FindThisInThat/App.config
  94. 0 DevTools/FindThisInThat/FindThisInThat.csproj
  95. 0 DevTools/FindThisInThat/Program.cs
  96. 0 DevTools/FindThisInThat/Properties/AssemblyInfo.cs
  97. 0 DevTools/Hex2Bin/App.config
  98. 0 DevTools/Hex2Bin/Hex2Bin.csproj
  99. 0 DevTools/Hex2Bin/Program.cs
  100. 0 DevTools/Hex2Bin/Properties/AssemblyInfo.cs
  101. 0 DevTools/Test/TestBinHex.bat
  102. 0 DevTools/Test/TestByteSwap.bat
  103. 0 DevTools/VpwDecoder/App.config
  104. 0 DevTools/VpwDecoder/Parser.cs
  105. 0 DevTools/VpwDecoder/Program.cs
  106. 0 DevTools/VpwDecoder/Properties/AssemblyInfo.cs
  107. 0 DevTools/VpwDecoder/VpwDecoder.csproj
  108. 0 Docs/ReadMe.md
  109. 0 Docs/Read_ID_Commands.txt
  110. 0 Docs/SeedAndKeyAlgorithm.txt
  111. 0 Docs/Write_ID_Commands
  112. 0 ReadMe.md
  113. 0 XDF/12587603 OS Features.txt
  114. BIN XDF/512Kb PCM OS Checksum Plugin.dll
  115. 0 XDF/OS12209203 - 512Kb PCM - 2002 model year - Version 1 - unlocked.xdf
  116. 0 XDF/OS12212156 - 512Kb PCM - 2002 model year - Version 1 - unlocked.xdf
  117. BIN XDF/TunerPro XDF and ADX Look up 1-24-2012.xls
  118. BIN XDF/TunerPro editing software - XDF usage for an LS1 type PCM.pdf
  119. BIN XDF/XDF for OS 12208322 - 2001 512Kb PCM - unlocked.xdf
  120. BIN XDF/XDF for OS 12202088 - 2001 512Kb PCM - unlocked.xdf
  121. 0 XDF/XDF for OS 12587603(BETA) - 2004 1mb PCM - unlocked.xdf
0 .gitattributes 100644 → 100755
No changes.
0 .gitignore 100644 → 100755
No changes.
No changes.
0 Android_Tools/Ls_Droid_Elm_Doc 100644 → 100755
No changes.
0 Apps/COPYING.txt 100644 → 100755
No changes.
0 Apps/PcmApps.sln 100644 → 100755
No changes.
0 Apps/PcmHammer/0411_256px.ico 100644 → 100755
No changes.
0 Apps/PcmHammer/App.config 100644 → 100755
No changes.
0 Apps/PcmHammer/Configuration.cs 100644 → 100755
No changes.
No changes.
0 Apps/PcmHammer/Devices/Device.cs 100644 → 100755
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
0 Apps/PcmHammer/J2534.dll 100644 → 100755
No changes.
No changes.
0 Apps/PcmHammer/MainForm.cs 100644 → 100755
No changes.
0 Apps/PcmHammer/MainForm.resx 100644 → 100755
No changes.
No changes.
No changes.
No changes.
No changes.
54 Apps/PcmHammer/Messages/VPW.cs 100644 → 100755
@@ -26,6 +26,60 @@ class DeviceId
/// OBD2 Device ID for a broadcast message
/// </summary>
public const byte Broadcast = 0xFE;

/// <summary>
/// Returns a string describing the module which is the target a message
/// </summary>
public string ReceiverCategory(Message message)
{
byte[] b = message.GetBytes();
if (b.Length < 3) return "invalid message";
return DeviceCategory(b[1]);
}

/// <summary>
/// Returns a string describing the module which is sending a message
/// </summary>
public string SenderCategory(Message message)
{
byte[] b = message.GetBytes();
if (b.Length < 3) return "invalid message";
return DeviceCategory(b[2]);
}

/// <summary>
/// Returns a string describing the category of a given device id
/// </summary>
public string DeviceCategory(byte DeviceId)
{
if (DeviceId >= 0x00 && DeviceId <= 0x0F) return "powertrain controller";
if (DeviceId >= 0x10 && DeviceId <= 0x17) return "engine controller";
if (DeviceId >= 0x18 && DeviceId <= 0x1F) return "transmission controller";
if (DeviceId >= 0x20 && DeviceId <= 0x27) return "chassis controller";
if (DeviceId >= 0x28 && DeviceId <= 0x2F) return "brake controller";
if (DeviceId >= 0x30 && DeviceId <= 0x37) return "steering controller";
if (DeviceId >= 0x38 && DeviceId <= 0x3F) return "suspension controller";
if (DeviceId >= 0x40 && DeviceId <= 0x47) return "body controller";
if (DeviceId >= 0x48 && DeviceId <= 0x5F) return "restraint controller";
if (DeviceId >= 0x60 && DeviceId <= 0x6F) return "driver information display";
if (DeviceId >= 0x70 && DeviceId <= 0x7F) return "lighting controller";
if (DeviceId >= 0x80 && DeviceId <= 0x8F) return "entertainment system";
if (DeviceId >= 0x90 && DeviceId <= 0x97) return "personal communications";
if (DeviceId >= 0x98 && DeviceId <= 0x9F) return "climate control (HVAC)";
if (DeviceId >= 0xA0 && DeviceId <= 0xBF) return "convinience (door/seats/window/etc)";
if (DeviceId >= 0xC0 && DeviceId <= 0xC7) return "security module";
if (DeviceId >= 0xC8 && DeviceId <= 0xCB) return "EV energy transfer system";
if (DeviceId == 0xC8) return "utility connection service";
if (DeviceId == 0xC9) return "AC to AC conversion";
if (DeviceId == 0xCA) return "AC to DC conversion";
if (DeviceId == 0xCB) return "energy storage management";
//if (DeviceId >= 0xCC && DeviceId <= 0xCF) return "future expansion";
//if (DeviceId >= 0xD0 && DeviceId <= 0xEF) return "manufacturer specific";
if (DeviceId >= 0xF0 && DeviceId <= 0xFD) return "off board tool";
if (DeviceId == 0xFE) return "broadcast message";

return "unknown";
}
}

/// <summary>
0 Apps/PcmHammer/Misc/HttpServer.cs 100644 → 100755
No changes.
0 Apps/PcmHammer/Misc/ILogger.cs 100644 → 100755
No changes.
No changes.
0 Apps/PcmHammer/Misc/MockPcm.cs 100644 → 100755
No changes.
0 Apps/PcmHammer/Misc/PcmInfo.cs 100644 → 100755
No changes.
0 Apps/PcmHammer/Misc/Query.cs 100644 → 100755
No changes.
0 Apps/PcmHammer/Misc/Response.cs 100644 → 100755
No changes.
No changes.
0 Apps/PcmHammer/Misc/Utility.cs 100644 → 100755
No changes.
2 Apps/PcmHammer/PcmHammer.csproj 100644 → 100755
@@ -32,7 +32,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<OutputPath>C:\Users\a\Desktop\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
0 Apps/PcmHammer/Ports/HttpPort.cs 100644 → 100755
No changes.
0 Apps/PcmHammer/Ports/IPort.cs 100644 → 100755
No changes.
No changes.
0 Apps/PcmHammer/Ports/MockPort.cs 100644 → 100755
No changes.
No changes.
0 Apps/PcmHammer/Program.cs 100644 → 100755
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
0 Apps/PcmHammer/Vehicle.cs 100644 → 100755
No changes.
0 Apps/PcmHammer/packages.config 100644 → 100755
No changes.
0 Apps/ReadMe.md 100644 → 100755
No changes.
0 Apps/Tests/AvtTests.cs 100644 → 100755
No changes.
No changes.
0 Apps/Tests/ScanToolTests.cs 100644 → 100755
No changes.
0 Apps/Tests/TestLogger.cs 100644 → 100755
No changes.
0 Apps/Tests/TestPort.cs 100644 → 100755
No changes.
0 Apps/Tests/TestScenarios.cs 100644 → 100755
No changes.
0 Apps/Tests/Tests.csproj 100644 → 100755
No changes.
0 Apps/Tests/UtilityTests.cs 100644 → 100755
No changes.
0 Apps/Tests/packages.config 100644 → 100755
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.
0 DevTools/Bin2Hex/App.config 100644 → 100755
No changes.
0 DevTools/Bin2Hex/Bin2Hex.csproj 100644 → 100755
No changes.
0 DevTools/Bin2Hex/Program.cs 100644 → 100755
No changes.
No changes.
0 DevTools/ByteSwap/App.config 100644 → 100755
No changes.
0 DevTools/ByteSwap/ByteSwap.csproj 100644 → 100755
No changes.
0 DevTools/ByteSwap/Program.cs 100644 → 100755
No changes.
No changes.
0 DevTools/COPYING.txt 100644 → 100755
No changes.
0 DevTools/CaptureSerial/App.config 100644 → 100755
No changes.
No changes.
0 DevTools/CaptureSerial/Program.cs 100644 → 100755
No changes.
No changes.
0 DevTools/DevTools.sln 100644 → 100755
No changes.
No changes.
No changes.
No changes.
No changes.
0 DevTools/Hex2Bin/App.config 100644 → 100755
No changes.
0 DevTools/Hex2Bin/Hex2Bin.csproj 100644 → 100755
No changes.
0 DevTools/Hex2Bin/Program.cs 100644 → 100755
No changes.
No changes.
0 DevTools/Test/TestBinHex.bat 100644 → 100755
No changes.
0 DevTools/Test/TestByteSwap.bat 100644 → 100755
No changes.
0 DevTools/VpwDecoder/App.config 100644 → 100755
No changes.
0 DevTools/VpwDecoder/Parser.cs 100644 → 100755
No changes.
0 DevTools/VpwDecoder/Program.cs 100644 → 100755
No changes.
No changes.
No changes.
0 Docs/ReadMe.md 100644 → 100755
No changes.
0 Docs/Read_ID_Commands.txt 100644 → 100755
No changes.
0 Docs/SeedAndKeyAlgorithm.txt 100644 → 100755
No changes.
0 Docs/Write_ID_Commands 100644 → 100755
No changes.
0 ReadMe.md 100644 → 100755
No changes.
0 XDF/12587603 OS Features.txt 100644 → 100755
No changes.
No changes.
No changes.
No changes.
No changes.
No changes.

0 comments on commit b4c6415

Please sign in to comment.