[
  {
    "path": ".gitattributes",
    "content": "###############################################################################\n# Set default behavior to automatically normalize line endings.\n###############################################################################\n* text=auto\n\n###############################################################################\n# Set default behavior for command prompt diff.\n#\n# This is need for earlier builds of msysgit that does not have it on by\n# default for csharp files.\n# Note: This is only used by command line\n###############################################################################\n#*.cs     diff=csharp\n\n###############################################################################\n# Set the merge driver for project and solution files\n#\n# Merging from the command prompt will add diff markers to the files if there\n# are conflicts (Merging from VS is not affected by the settings below, in VS\n# the diff markers are never inserted). Diff markers may cause the following \n# file extensions to fail to load in VS. An alternative would be to treat\n# these files as binary and thus will always conflict and require user\n# intervention with every merge. To do so, just uncomment the entries below\n###############################################################################\n#*.sln       merge=binary\n#*.csproj    merge=binary\n#*.vbproj    merge=binary\n#*.vcxproj   merge=binary\n#*.vcproj    merge=binary\n#*.dbproj    merge=binary\n#*.fsproj    merge=binary\n#*.lsproj    merge=binary\n#*.wixproj   merge=binary\n#*.modelproj merge=binary\n#*.sqlproj   merge=binary\n#*.wwaproj   merge=binary\n\n###############################################################################\n# behavior for image files\n#\n# image files are treated as binary by default.\n###############################################################################\n#*.jpg   binary\n#*.png   binary\n#*.gif   binary\n\n###############################################################################\n# diff behavior for common document formats\n# \n# Convert binary document formats to text before diffing them. This feature\n# is only available from the command line. Turn it on by uncommenting the \n# entries below.\n###############################################################################\n#*.doc   diff=astextplain\n#*.DOC   diff=astextplain\n#*.docx  diff=astextplain\n#*.DOCX  diff=astextplain\n#*.dot   diff=astextplain\n#*.DOT   diff=astextplain\n#*.pdf   diff=astextplain\n#*.PDF   diff=astextplain\n#*.rtf   diff=astextplain\n#*.RTF   diff=astextplain\n"
  },
  {
    "path": ".gitignore",
    "content": "## Ignore Visual Studio temporary files, build results, and\n## files generated by popular Visual Studio add-ons.\n\n# User-specific files\n*.suo\n*.user\n*.userosscache\n*.sln.docstates\n\n# User-specific files (MonoDevelop/Xamarin Studio)\n*.userprefs\n\n# Build results\n[Dd]ebug/\n[Dd]ebugPublic/\n[Rr]elease/\n[Rr]eleases/\nx64/\nx86/\nbld/\n[Bb]in/\n[Oo]bj/\n\n# Visual Studio 2015 cache/options directory\n.vs/\n# Uncomment if you have tasks that create the project's static files in wwwroot\n#wwwroot/\n\n# MSTest test Results\n[Tt]est[Rr]esult*/\n[Bb]uild[Ll]og.*\n\n# NUNIT\n*.VisualState.xml\nTestResult.xml\n\n# Build Results of an ATL Project\n[Dd]ebugPS/\n[Rr]eleasePS/\ndlldata.c\n\n# DNX\nproject.lock.json\nartifacts/\n\n*_i.c\n*_p.c\n*_i.h\n*.ilk\n*.meta\n*.obj\n*.pch\n*.pdb\n*.pgc\n*.pgd\n*.rsp\n*.sbr\n*.tlb\n*.tli\n*.tlh\n*.tmp\n*.tmp_proj\n*.log\n*.vspscc\n*.vssscc\n.builds\n*.pidb\n*.svclog\n*.scc\n\n# Chutzpah Test files\n_Chutzpah*\n\n# Visual C++ cache files\nipch/\n*.aps\n*.ncb\n*.opendb\n*.opensdf\n*.sdf\n*.cachefile\n\n# Visual Studio profiler\n*.psess\n*.vsp\n*.vspx\n*.sap\n\n# TFS 2012 Local Workspace\n$tf/\n\n# Guidance Automation Toolkit\n*.gpState\n\n# ReSharper is a .NET coding add-in\n_ReSharper*/\n*.[Rr]e[Ss]harper\n*.DotSettings.user\n\n# JustCode is a .NET coding add-in\n.JustCode\n\n# TeamCity is a build add-in\n_TeamCity*\n\n# DotCover is a Code Coverage Tool\n*.dotCover\n\n# NCrunch\n_NCrunch_*\n.*crunch*.local.xml\nnCrunchTemp_*\n\n# MightyMoose\n*.mm.*\nAutoTest.Net/\n\n# Web workbench (sass)\n.sass-cache/\n\n# Installshield output folder\n[Ee]xpress/\n\n# DocProject is a documentation generator add-in\nDocProject/buildhelp/\nDocProject/Help/*.HxT\nDocProject/Help/*.HxC\nDocProject/Help/*.hhc\nDocProject/Help/*.hhk\nDocProject/Help/*.hhp\nDocProject/Help/Html2\nDocProject/Help/html\n\n# Click-Once directory\npublish/\n\n# Publish Web Output\n*.[Pp]ublish.xml\n*.azurePubxml\n# TODO: Comment the next line if you want to checkin your web deploy settings \n# but database connection strings (with potential passwords) will be unencrypted\n*.pubxml\n*.publishproj\n\n# NuGet Packages\n*.nupkg\n# The packages folder can be ignored because of Package Restore\n**/packages/*\n# except build/, which is used as an MSBuild target.\n!**/packages/build/\n# Uncomment if necessary however generally it will be regenerated when needed\n#!**/packages/repositories.config\n# NuGet v3's project.json files produces more ignoreable files\n*.nuget.props\n*.nuget.targets\n\n# Microsoft Azure Build Output\ncsx/\n*.build.csdef\n\n# Microsoft Azure Emulator\necf/\nrcf/\n\n# Microsoft Azure ApplicationInsights config file\nApplicationInsights.config\n\n# Windows Store app package directory\nAppPackages/\nBundleArtifacts/\n\n# Visual Studio cache files\n# files ending in .cache can be ignored\n*.[Cc]ache\n# but keep track of directories ending in .cache\n!*.[Cc]ache/\n\n# Others\nClientBin/\n~$*\n*~\n*.dbmdl\n*.dbproj.schemaview\n*.pfx\n*.publishsettings\nnode_modules/\norleans.codegen.cs\n\n# RIA/Silverlight projects\nGenerated_Code/\n\n# Backup & report files from converting an old project file\n# to a newer Visual Studio version. Backup files are not needed,\n# because we have git ;-)\n_UpgradeReport_Files/\nBackup*/\nUpgradeLog*.XML\nUpgradeLog*.htm\n\n# SQL Server files\n*.mdf\n*.ldf\n\n# Business Intelligence projects\n*.rdl.data\n*.bim.layout\n*.bim_*.settings\n\n# Microsoft Fakes\nFakesAssemblies/\n\n# GhostDoc plugin setting file\n*.GhostDoc.xml\n\n# Node.js Tools for Visual Studio\n.ntvs_analysis.dat\n\n# Visual Studio 6 build log\n*.plg\n\n# Visual Studio 6 workspace options file\n*.opt\n\n# Visual Studio LightSwitch build output\n**/*.HTMLClient/GeneratedArtifacts\n**/*.DesktopClient/GeneratedArtifacts\n**/*.DesktopClient/ModelManifest.xml\n**/*.Server/GeneratedArtifacts\n**/*.Server/ModelManifest.xml\n_Pvt_Extensions\n\n# Paket dependency manager\n.paket/paket.exe\n\n# FAKE - F# Make\n.fake/\n.DS_Store\nOBD.NET/.idea\n"
  },
  {
    "path": "LICENSE",
    "content": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 2, June 1991\n\n Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>\n 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The licenses for most software are designed to take away your\nfreedom to share and change it.  By contrast, the GNU General Public\nLicense is intended to guarantee your freedom to share and change free\nsoftware--to make sure the software is free for all its users.  This\nGeneral Public License applies to most of the Free Software\nFoundation's software and to any other program whose authors commit to\nusing it.  (Some other Free Software Foundation software is covered by\nthe GNU Lesser General Public License instead.)  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthis service if you wish), that you receive source code or can get it\nif you want it, that you can change the software or use pieces of it\nin new free programs; and that you know you can do these things.\n\n  To protect your rights, we need to make restrictions that forbid\nanyone to deny you these rights or to ask you to surrender the rights.\nThese restrictions translate to certain responsibilities for you if you\ndistribute copies of the software, or if you modify it.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must give the recipients all the rights that\nyou have.  You must make sure that they, too, receive or can get the\nsource code.  And you must show them these terms so they know their\nrights.\n\n  We protect your rights with two steps: (1) copyright the software, and\n(2) offer you this license which gives you legal permission to copy,\ndistribute and/or modify the software.\n\n  Also, for each author's protection and ours, we want to make certain\nthat everyone understands that there is no warranty for this free\nsoftware.  If the software is modified by someone else and passed on, we\nwant its recipients to know that what they have is not the original, so\nthat any problems introduced by others will not reflect on the original\nauthors' reputations.\n\n  Finally, any free program is threatened constantly by software\npatents.  We wish to avoid the danger that redistributors of a free\nprogram will individually obtain patent licenses, in effect making the\nprogram proprietary.  To prevent this, we have made it clear that any\npatent must be licensed for everyone's free use or not licensed at all.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                    GNU GENERAL PUBLIC LICENSE\n   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n  0. This License applies to any program or other work which contains\na notice placed by the copyright holder saying it may be distributed\nunder the terms of this General Public License.  The \"Program\", below,\nrefers to any such program or work, and a \"work based on the Program\"\nmeans either the Program or any derivative work under copyright law:\nthat is to say, a work containing the Program or a portion of it,\neither verbatim or with modifications and/or translated into another\nlanguage.  (Hereinafter, translation is included without limitation in\nthe term \"modification\".)  Each licensee is addressed as \"you\".\n\nActivities other than copying, distribution and modification are not\ncovered by this License; they are outside its scope.  The act of\nrunning the Program is not restricted, and the output from the Program\nis covered only if its contents constitute a work based on the\nProgram (independent of having been made by running the Program).\nWhether that is true depends on what the Program does.\n\n  1. You may copy and distribute verbatim copies of the Program's\nsource code as you receive it, in any medium, provided that you\nconspicuously and appropriately publish on each copy an appropriate\ncopyright notice and disclaimer of warranty; keep intact all the\nnotices that refer to this License and to the absence of any warranty;\nand give any other recipients of the Program a copy of this License\nalong with the Program.\n\nYou may charge a fee for the physical act of transferring a copy, and\nyou may at your option offer warranty protection in exchange for a fee.\n\n  2. You may modify your copy or copies of the Program or any portion\nof it, thus forming a work based on the Program, and copy and\ndistribute such modifications or work under the terms of Section 1\nabove, provided that you also meet all of these conditions:\n\n    a) You must cause the modified files to carry prominent notices\n    stating that you changed the files and the date of any change.\n\n    b) You must cause any work that you distribute or publish, that in\n    whole or in part contains or is derived from the Program or any\n    part thereof, to be licensed as a whole at no charge to all third\n    parties under the terms of this License.\n\n    c) If the modified program normally reads commands interactively\n    when run, you must cause it, when started running for such\n    interactive use in the most ordinary way, to print or display an\n    announcement including an appropriate copyright notice and a\n    notice that there is no warranty (or else, saying that you provide\n    a warranty) and that users may redistribute the program under\n    these conditions, and telling the user how to view a copy of this\n    License.  (Exception: if the Program itself is interactive but\n    does not normally print such an announcement, your work based on\n    the Program is not required to print an announcement.)\n\nThese requirements apply to the modified work as a whole.  If\nidentifiable sections of that work are not derived from the Program,\nand can be reasonably considered independent and separate works in\nthemselves, then this License, and its terms, do not apply to those\nsections when you distribute them as separate works.  But when you\ndistribute the same sections as part of a whole which is a work based\non the Program, the distribution of the whole must be on the terms of\nthis License, whose permissions for other licensees extend to the\nentire whole, and thus to each and every part regardless of who wrote it.\n\nThus, it is not the intent of this section to claim rights or contest\nyour rights to work written entirely by you; rather, the intent is to\nexercise the right to control the distribution of derivative or\ncollective works based on the Program.\n\nIn addition, mere aggregation of another work not based on the Program\nwith the Program (or with a work based on the Program) on a volume of\na storage or distribution medium does not bring the other work under\nthe scope of this License.\n\n  3. You may copy and distribute the Program (or a work based on it,\nunder Section 2) in object code or executable form under the terms of\nSections 1 and 2 above provided that you also do one of the following:\n\n    a) Accompany it with the complete corresponding machine-readable\n    source code, which must be distributed under the terms of Sections\n    1 and 2 above on a medium customarily used for software interchange; or,\n\n    b) Accompany it with a written offer, valid for at least three\n    years, to give any third party, for a charge no more than your\n    cost of physically performing source distribution, a complete\n    machine-readable copy of the corresponding source code, to be\n    distributed under the terms of Sections 1 and 2 above on a medium\n    customarily used for software interchange; or,\n\n    c) Accompany it with the information you received as to the offer\n    to distribute corresponding source code.  (This alternative is\n    allowed only for noncommercial distribution and only if you\n    received the program in object code or executable form with such\n    an offer, in accord with Subsection b above.)\n\nThe source code for a work means the preferred form of the work for\nmaking modifications to it.  For an executable work, complete source\ncode means all the source code for all modules it contains, plus any\nassociated interface definition files, plus the scripts used to\ncontrol compilation and installation of the executable.  However, as a\nspecial exception, the source code distributed need not include\nanything that is normally distributed (in either source or binary\nform) with the major components (compiler, kernel, and so on) of the\noperating system on which the executable runs, unless that component\nitself accompanies the executable.\n\nIf distribution of executable or object code is made by offering\naccess to copy from a designated place, then offering equivalent\naccess to copy the source code from the same place counts as\ndistribution of the source code, even though third parties are not\ncompelled to copy the source along with the object code.\n\n  4. You may not copy, modify, sublicense, or distribute the Program\nexcept as expressly provided under this License.  Any attempt\notherwise to copy, modify, sublicense or distribute the Program is\nvoid, and will automatically terminate your rights under this License.\nHowever, parties who have received copies, or rights, from you under\nthis License will not have their licenses terminated so long as such\nparties remain in full compliance.\n\n  5. You are not required to accept this License, since you have not\nsigned it.  However, nothing else grants you permission to modify or\ndistribute the Program or its derivative works.  These actions are\nprohibited by law if you do not accept this License.  Therefore, by\nmodifying or distributing the Program (or any work based on the\nProgram), you indicate your acceptance of this License to do so, and\nall its terms and conditions for copying, distributing or modifying\nthe Program or works based on it.\n\n  6. Each time you redistribute the Program (or any work based on the\nProgram), the recipient automatically receives a license from the\noriginal licensor to copy, distribute or modify the Program subject to\nthese terms and conditions.  You may not impose any further\nrestrictions on the recipients' exercise of the rights granted herein.\nYou are not responsible for enforcing compliance by third parties to\nthis License.\n\n  7. If, as a consequence of a court judgment or allegation of patent\ninfringement or for any other reason (not limited to patent issues),\nconditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot\ndistribute so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you\nmay not distribute the Program at all.  For example, if a patent\nlicense would not permit royalty-free redistribution of the Program by\nall those who receive copies directly or indirectly through you, then\nthe only way you could satisfy both it and this License would be to\nrefrain entirely from distribution of the Program.\n\nIf any portion of this section is held invalid or unenforceable under\nany particular circumstance, the balance of the section is intended to\napply and the section as a whole is intended to apply in other\ncircumstances.\n\nIt is not the purpose of this section to induce you to infringe any\npatents or other property right claims or to contest validity of any\nsuch claims; this section has the sole purpose of protecting the\nintegrity of the free software distribution system, which is\nimplemented by public license practices.  Many people have made\ngenerous contributions to the wide range of software distributed\nthrough that system in reliance on consistent application of that\nsystem; it is up to the author/donor to decide if he or she is willing\nto distribute software through any other system and a licensee cannot\nimpose that choice.\n\nThis section is intended to make thoroughly clear what is believed to\nbe a consequence of the rest of this License.\n\n  8. If the distribution and/or use of the Program is restricted in\ncertain countries either by patents or by copyrighted interfaces, the\noriginal copyright holder who places the Program under this License\nmay add an explicit geographical distribution limitation excluding\nthose countries, so that distribution is permitted only in or among\ncountries not thus excluded.  In such case, this License incorporates\nthe limitation as if written in the body of this License.\n\n  9. The Free Software Foundation may publish revised and/or new versions\nof the General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\nEach version is given a distinguishing version number.  If the Program\nspecifies a version number of this License which applies to it and \"any\nlater version\", you have the option of following the terms and conditions\neither of that version or of any later version published by the Free\nSoftware Foundation.  If the Program does not specify a version number of\nthis License, you may choose any version ever published by the Free Software\nFoundation.\n\n  10. If you wish to incorporate parts of the Program into other free\nprograms whose distribution conditions are different, write to the author\nto ask for permission.  For software which is copyrighted by the Free\nSoftware Foundation, write to the Free Software Foundation; we sometimes\nmake exceptions for this.  Our decision will be guided by the two goals\nof preserving the free status of all derivatives of our free software and\nof promoting the sharing and reuse of software generally.\n\n                            NO WARRANTY\n\n  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY\nFOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN\nOTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES\nPROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED\nOR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS\nTO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE\nPROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,\nREPAIR OR CORRECTION.\n\n  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR\nREDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,\nINCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING\nOUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED\nTO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY\nYOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER\nPROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGES.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nconvey the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    {description}\n    Copyright (C) {year}  {fullname}\n\n    This program is free software; you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation; either version 2 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License along\n    with this program; if not, write to the Free Software Foundation, Inc.,\n    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n\nAlso add information on how to contact you by electronic and paper mail.\n\nIf the program is interactive, make it output a short notice like this\nwhen it starts in an interactive mode:\n\n    Gnomovision version 69, Copyright (C) year name of author\n    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License.  Of course, the commands you use may\nbe called something other than `show w' and `show c'; they could even be\nmouse-clicks or menu items--whatever suits your program.\n\nYou should also get your employer (if you work as a programmer) or your\nschool, if any, to sign a \"copyright disclaimer\" for the program, if\nnecessary.  Here is a sample; alter the names:\n\n  Yoyodyne, Inc., hereby disclaims all copyright interest in the program\n  `Gnomovision' (which makes passes at compilers) written by James Hacker.\n\n  {signature of Ty Coon}, 1 April 1989\n  Ty Coon, President of Vice\n\nThis General Public License does not permit incorporating your program into\nproprietary programs.  If your program is a subroutine library, you may\nconsider it more useful to permit linking proprietary applications with the\nlibrary.  If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License.\n"
  },
  {
    "path": "OBD.NET/ConsoleClient/ConsoleClient.csproj",
    "content": "﻿<Project Sdk=\"Microsoft.NET.Sdk\">\n\n    <PropertyGroup>\n        <OutputType>Exe</OutputType>\n        <TargetFramework>net4.8</TargetFramework>\n        <Nullable>enable</Nullable>\n        <LangVersion>latest</LangVersion>\n    </PropertyGroup>\n\n    <ItemGroup>\n      <ProjectReference Include=\"..\\OBD.NET\\OBD.NET.csproj\" />\n    </ItemGroup>\n\n</Project>\n"
  },
  {
    "path": "OBD.NET/ConsoleClient/Program.cs",
    "content": "﻿using System;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing OBD.NET.Communication;\nusing OBD.NET.Devices;\nusing OBD.NET.Extensions;\nusing OBD.NET.Logging;\nusing OBD.NET.OBDData;\n\nnamespace ConsoleClient;\n\npublic class Program\n{\n    public static void Main(string[] args)\n    {\n        //if (args.Length < 1)\n        //{\n        //    Console.WriteLine(\"Parameter ComPort needed.\");\n\n        //    IEnumerable<string> availablePorts = SerialConnection.GetAvailablePorts();\n\n        //    Console.WriteLine(\"\\nAvailable ports:\");\n\n        //    foreach (string port in availablePorts)\n        //        Console.WriteLine(port);\n\n        //    return;\n        //}\n\n        string comPort = args[0];\n\n        using SerialConnection connection = new(comPort);\n        using ELM327 dev = new(connection, new OBDConsoleLogger(OBDLogLevel.Debug));\n\n        dev.SubscribeDataReceived<EngineRPM>((_, data) => Console.WriteLine(\"EngineRPM: \" + data.Data.Rpm));\n        dev.SubscribeDataReceived<VehicleSpeed>((_, data) => Console.WriteLine(\"VehicleSpeed: \" + data.Data));\n\n        dev.SubscribeDataReceived<IOBDData>((_, data) => Console.WriteLine($\"PID {data.Data.PID.ToHexString()}: {data.Data}\"));\n\n        dev.Initialize();\n        dev.RequestData<FuelType>();\n\n        for (int i = 0; i < 5; i++)\n        {\n            dev.RequestData<EngineRPM>();\n            dev.RequestData<VehicleSpeed>();\n            Thread.Sleep(1000);\n        }\n\n        Console.ReadLine();\n\n        //Async example\n        // MainAsync(comPort).Wait();\n\n        //Console.ReadLine();\n    }\n\n    /// <summary>\n    /// Async example using new RequestDataAsync\n    /// </summary>\n    /// <param name=\"comPort\">The COM port.</param>\n    /// <returns></returns>\n    public static async Task MainAsync(string comPort)\n    {\n        using SerialConnection connection = new(comPort);\n        using ELM327 dev = new(connection, new OBDConsoleLogger(OBDLogLevel.Debug));\n\n        await dev.InitializeAsync();\n\n        EngineRPM? engineRpm = await dev.RequestDataAsync<EngineRPM>();\n        Console.WriteLine(\"Data: \" + (engineRpm?.Rpm.ToString() ?? \"-\"));\n\n        engineRpm = await dev.RequestDataAsync<EngineRPM>();\n        Console.WriteLine(\"Data: \" + (engineRpm?.Rpm.ToString() ?? \"-\"));\n\n        VehicleSpeed? vehicleSpeed = await dev.RequestDataAsync<VehicleSpeed>();\n        Console.WriteLine(\"Data: \" + (vehicleSpeed?.Speed.ToString() ?? \"-\"));\n\n        engineRpm = await dev.RequestDataAsync<EngineRPM>();\n        Console.WriteLine(\"Data: \" + (engineRpm?.Rpm.ToString() ?? \"-\"));\n    }\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/Commands/ATCommand.cs",
    "content": "﻿namespace OBD.NET.Commands;\n\npublic class ATCommand\n{\n    #region Commands\n    // ReSharper disable InconsistentNaming\n\n    //TODO DarthAffe 26.06.2016: Implement all commands\n\n    public static readonly ATCommand RepeatLastCommand = new(\"\\r\");\n    public static readonly ATCommand ResetDevice = new(\"ATZ\");\n    public static readonly ATCommand ReadVoltage = new(\"ATRV\");\n    public static readonly ATCommand EchoOn = new(\"ATE1\", \"^OK$\");\n    public static readonly ATCommand EchoOff = new(\"ATE0\", \"^OK$\");\n    public static readonly ATCommand HeadersOn = new(\"ATH1\", \"^OK$\");\n    public static readonly ATCommand HeadersOff = new(\"ATH0\", \"^OK$\");\n    public static readonly ATCommand PrintSpacesOn = new(\"ATS1\", \"^OK$\");\n    public static readonly ATCommand PrintSpacesOff = new(\"ATS0\", \"^OK$\");\n    public static readonly ATCommand LinefeedsOn = new(\"ATL1\", \"^OK$\");\n    public static readonly ATCommand LinefeedsOff = new(\"ATL0\", \"^OK$\");\n    public static readonly ATCommand SetProtocolAuto = new(\"ATSP0\", \"^OK$\");\n    public static readonly ATCommand PrintVersion = new(\"ATI\", \"^ELM327.*\");\n    public static readonly ATCommand CloseProtocol = new(\"ATPC\");\n\n    // ReSharper restore InconsistentNaming\n    #endregion\n\n    #region Properties & Fields\n\n    public string Command { get; }\n    public string? ExpectedResult { get; }\n\n    #endregion\n\n    #region Constructors\n\n    private ATCommand(string command, string? expectedResult = null)\n    {\n        this.Command = command;\n        this.ExpectedResult = expectedResult;\n    }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Command;\n\n    #endregion\n\n    #region Operators\n\n    public static implicit operator string(ATCommand command) => command.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/Commands/STCommand.cs",
    "content": "﻿namespace OBD.NET.Commands;\n\npublic class STCommand\n{\n    #region Values\n    // ReSharper disable InconsistentNaming\n\n    //TODO DarthAffe 19.03.2017: Implement all commands\n\n    internal static readonly STCommand AddPassFilter = new(\"STFAP\");\n    internal static readonly STCommand AddBlockFilter = new(\"STFAB\");\n    internal static readonly STCommand AddFlowControlFilter = new(\"STFAFC\");\n    internal static readonly STCommand ClearPassFilters = new(\"STFCP\");\n    internal static readonly STCommand ClearBlockFilters = new(\"STFCB\");\n    internal static readonly STCommand ClearFlowControlFilters = new(\"STFCFC\");\n    internal static readonly STCommand Monitor = new(\"STM\");\n    internal static readonly STCommand MonitorAll = new(\"STMA\");\n\n    // ReSharper restore InconsistentNaming\n    #endregion\n\n    #region Properties & Fields\n\n    public string Command { get; }\n\n    #endregion\n\n    #region Constructors\n\n    protected STCommand(string command)\n    {\n        this.Command = command;\n    }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Command;\n\n    #endregion\n\n    #region Operators\n\n    public static implicit operator string(STCommand command) => command.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/Communication/EnhancedSerialPort.cs",
    "content": "﻿#if !NET5_0_OR_GREATER\n\n// Copyright 2013 Antanas Veiverys www.veiverys.com\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//    http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nusing System;\nusing System.ComponentModel;\nusing System.IO;\nusing System.IO.Ports;\nusing System.Reflection;\nusing System.Runtime.InteropServices;\nusing System.Threading;\n\n// Source: http://antanas.veiverys.com/mono-serialport-datareceived-event-workaround-using-a-derived-class/\nnamespace OBD.NET.Communication;\n\n[DesignerCategory(\"Code\")]\npublic class EnhancedSerialPort : SerialPort\n{\n    #region Properties & Fields\n\n    // private member access via reflection\n    private int _fd;\n    private FieldInfo? _disposedFieldInfo;\n    private object? _dataReceived;\n    private Thread? _thread;\n\n    #endregion\n\n    #region DLLImports\n\n    [DllImport(\"MonoPosixHelper\", SetLastError = true)]\n    private static extern bool poll_serial(int fd, out int error, int timeout);\n\n    [DllImport(\"libc\")]\n    private static extern IntPtr strerror(int errnum);\n\n    #endregion\n\n    #region Constructors\n\n    public EnhancedSerialPort()\n        : base()\n    { }\n\n    public EnhancedSerialPort(IContainer container)\n        : base(container)\n    { }\n\n    public EnhancedSerialPort(string portName)\n        : base(portName)\n    { }\n\n    public EnhancedSerialPort(string portName, int baudRate)\n        : base(portName, baudRate)\n    { }\n\n    public EnhancedSerialPort(string portName, int baudRate, Parity parity)\n        : base(portName, baudRate, parity)\n    { }\n\n    public EnhancedSerialPort(string portName, int baudRate, Parity parity, int dataBits)\n        : base(portName, baudRate, parity, dataBits)\n    { }\n\n    public EnhancedSerialPort(string portName, int baudRate, Parity parity, int dataBits, StopBits stopBits)\n        : base(portName, baudRate, parity, dataBits, stopBits)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public new void Open()\n    {\n        base.Open();\n\n        if (!IsWindows)\n        {\n            FieldInfo? fieldInfo = BaseStream.GetType().GetField(\"fd\", BindingFlags.Instance | BindingFlags.NonPublic);\n            if (fieldInfo == null) throw new NotSupportedException(\"Unable to initialize SerialPort - 'fd'-field is missing.\");\n            _fd = (int)fieldInfo.GetValue(BaseStream)!;\n\n            _disposedFieldInfo = BaseStream.GetType().GetField(\"disposed\", BindingFlags.Instance | BindingFlags.NonPublic) ?? throw new NotSupportedException(\"Unable to initialize SerialPort - 'disposed'-field is missing.\");\n\n            fieldInfo = typeof(SerialPort).GetField(\"data_received\", BindingFlags.Instance | BindingFlags.NonPublic);\n            if (fieldInfo == null) throw new NotSupportedException(\"Unable to initialize SerialPort - 'data_received'-field is missing.\");\n            _dataReceived = fieldInfo.GetValue(this);\n\n            _thread = new Thread(EventThreadFunction);\n            _thread.Start();\n        }\n    }\n\n    private static bool IsWindows\n    {\n        get\n        {\n            PlatformID id = Environment.OSVersion.Platform;\n            return (id == PlatformID.Win32Windows) || (id == PlatformID.Win32NT); // WinCE not supported\n        }\n    }\n\n    private void EventThreadFunction()\n    {\n        do\n        {\n            try\n            {\n                Stream? stream = BaseStream;\n                if (stream == null)\n                    return;\n\n                if (Poll(stream, ReadTimeout))\n                    OnDataReceived(null!);\n            }\n            catch\n            {\n                return;\n            }\n        } while (IsOpen);\n    }\n\n    private void OnDataReceived(SerialDataReceivedEventArgs args)\n    {\n        SerialDataReceivedEventHandler? handler = Events[_dataReceived!] as SerialDataReceivedEventHandler;\n        handler?.Invoke(this, args);\n    }\n\n    private bool Poll(Stream stream, int timeout)\n    {\n        CheckDisposed(stream);\n        if (IsOpen == false)\n            throw new Exception(\"port is closed\");\n\n        bool pollResult = poll_serial(_fd, out int error, ReadTimeout);\n        if (error == -1)\n            ThrowIOException();\n\n        return pollResult;\n    }\n\n    private static void ThrowIOException()\n    {\n        int errnum = Marshal.GetLastWin32Error();\n        string errorMessage = Marshal.PtrToStringAnsi(strerror(errnum))!;\n\n        throw new IOException(errorMessage);\n    }\n\n    private void CheckDisposed(Stream stream)\n    {\n        bool disposed = (bool)_disposedFieldInfo!.GetValue(stream)!;\n        if (disposed)\n            throw new ObjectDisposedException(stream.GetType().FullName);\n    }\n\n    #endregion\n}\n\n#endif"
  },
  {
    "path": "OBD.NET/OBD.NET/Communication/EventArgs/DataReceivedEventArgs.cs",
    "content": "﻿namespace OBD.NET.Communication;\n\n/// <summary>\n/// Event args for receiving serial data\n/// </summary>\npublic class DataReceivedEventArgs : System.EventArgs\n{\n    #region Properties & Fields\n\n    /// <summary>\n    /// Count of valid data bytes in the buffer\n    /// </summary>\n    public int Count { get; }\n\n    /// <summary>\n    /// Data buffer holding the bytes\n    /// </summary>\n    public byte[] Data { get; }\n\n    #endregion\n\n    #region Constructors\n\n    /// <summary>\n    /// Initializes a new instance of the <see cref=\"DataReceivedEventArgs\"/> class.\n    /// </summary>\n    /// <param name=\"count\">The count.</param>\n    /// <param name=\"data\">The data.</param>\n    public DataReceivedEventArgs(int count, byte[] data)\n    {\n        this.Count = count;\n        this.Data = data;\n    }\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/Communication/ISerialConnection.cs",
    "content": "﻿using System;\nusing System.Threading.Tasks;\n\nnamespace OBD.NET.Communication;\n\n/// <summary>\n/// Serial connection interface\n/// </summary>\n/// <seealso cref=\"System.IDisposable\" />\npublic interface ISerialConnection : IDisposable\n{\n    /// <summary>\n    /// Gets a value indicating whether this instance is open.\n    /// </summary>\n    /// <value>\n    ///   <c>true</c> if this instance is open; otherwise, <c>false</c>.\n    /// </value>\n    bool IsOpen { get; }\n\n    /// <summary>\n    /// Gets a value indicating whether this instance uses asynchronous IO\n    /// </summary>\n    /// <remarks>\n    /// Has to be set to true if asynchronous IO is supported.\n    /// If true async methods have to be implemented\n    /// </remarks>\n    bool IsAsync { get; }\n\n    /// <summary>\n    /// Occurs when a full line was received\n    /// </summary>\n    event EventHandler<DataReceivedEventArgs> DataReceived;\n\n    /// <summary>\n    /// Connects the serial port.\n    /// </summary>\n    void Connect();\n\n    /// <summary>\n    /// Connects the serial port asynchronous\n    /// </summary>\n    /// <returns></returns>\n    Task ConnectAsync();\n\n    /// <summary>\n    /// Writes the specified data to the serial connection\n    /// </summary>\n    /// <param name=\"data\">The data.</param>\n    void Write(byte[] data);\n\n    /// <summary>\n    /// Writes the specified data to the serial connection asynchronous\n    /// </summary>\n    /// <param name=\"data\">The data.</param>\n    Task WriteAsync(byte[] data);\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/Communication/SerialConnection.cs",
    "content": "#if NET5_0_OR_GREATER\n\nusing System;\nusing System.Collections.Generic;\nusing System.IO.Ports;\nusing System.Threading.Tasks;\n\nnamespace OBD.NET.Communication;\n\npublic class SerialConnection : ISerialConnection\n{\n    #region Properties & Fields\n\n    private readonly SerialPort _serialPort;\n\n    public bool IsOpen => _serialPort.IsOpen;\n    public bool IsAsync => false;\n\n    private readonly byte[] _readBuffer = new byte[1024];\n\n    #endregion\n\n    #region Events\n\n    public event EventHandler<DataReceivedEventArgs>? DataReceived = delegate { };\n\n    #endregion\n\n    #region Constructors\n\n    public SerialConnection(string port, int baudRate = 38400, Parity parity = Parity.None, StopBits stopBits = StopBits.One,\n        Handshake handshake = Handshake.None, int timeout = 5000)\n    {\n        _serialPort = new SerialPort(port, baudRate, parity)\n        {\n            StopBits = stopBits,\n            Handshake = handshake,\n            ReadTimeout = timeout,\n            WriteTimeout = timeout\n        };\n\n        _serialPort.DataReceived += SerialPortOnDataReceived;\n    }\n\n    #endregion\n\n    #region Methods\n\n    public static IEnumerable<string> GetAvailablePorts() => SerialPort.GetPortNames();\n\n    public void Connect() => _serialPort.Open();\n\n    private void SerialPortOnDataReceived(object sender, SerialDataReceivedEventArgs serialDataReceivedEventArgs)\n    {\n        int count = _serialPort.Read(_readBuffer, 0, _serialPort.BytesToRead);\n        DataReceived?.Invoke(this, new DataReceivedEventArgs(count, _readBuffer));\n    }\n\n    public void Dispose() => _serialPort.Dispose();\n\n    public async Task ConnectAsync()\n    {\n        await Task.Yield();\n        Connect();\n    }\n\n    public async Task WriteAsync(byte[] data)\n    {\n        await Task.Yield();\n        Write(data);\n    }\n\n    public void Write(byte[] data) => _serialPort.Write(data, 0, data.Length);\n\n    #endregion\n}\n\n#else\n\nusing System;\nusing System.Collections.Generic;\nusing System.IO.Ports;\nusing System.Threading.Tasks;\n\nnamespace OBD.NET.Communication;\n\npublic class SerialConnection : ISerialConnection\n{\n    #region Properties & Fields\n\n    private readonly EnhancedSerialPort _serialPort;\n\n    public bool IsOpen => _serialPort?.IsOpen ?? false;\n    public bool IsAsync => false;\n\n    private readonly byte[] _readBuffer = new byte[1024];\n\n    #endregion\n\n    #region Events\n\n    public event EventHandler<DataReceivedEventArgs>? DataReceived;\n\n    #endregion\n\n    #region Constructors\n\n    public SerialConnection(string port, int baudRate = 38400, Parity parity = Parity.None, StopBits stopBits = StopBits.One,\n        Handshake handshake = Handshake.None, int timeout = 5000)\n    {\n        _serialPort = new EnhancedSerialPort(port, baudRate, parity)\n        {\n            StopBits = stopBits,\n            Handshake = handshake,\n            ReadTimeout = timeout,\n            WriteTimeout = timeout\n        };\n\n        _serialPort.DataReceived += SerialPortOnDataReceived;\n    }\n\n    #endregion\n\n    #region Methods\n\n    public static IEnumerable<string> GetAvailablePorts() => SerialPort.GetPortNames();\n\n    public void Connect() => _serialPort.Open();\n\n    private void SerialPortOnDataReceived(object sender, SerialDataReceivedEventArgs serialDataReceivedEventArgs)\n    {\n        int count = _serialPort.Read(_readBuffer, 0, _serialPort.BytesToRead);\n        DataReceived?.Invoke(this, new DataReceivedEventArgs(count, _readBuffer));\n    }\n\n    public void Dispose() => _serialPort.Dispose();\n    \n    public async Task ConnectAsync()\n    {\n        await Task.Yield();\n        Connect();\n    }\n\n    public async Task WriteAsync(byte[] data)\n    {\n        await Task.Yield();\n        Write(data);\n    }\n\n    public void Write(byte[] data) => _serialPort.Write(data, 0, data.Length);\n\n    #endregion\n}\n\n#endif\n"
  },
  {
    "path": "OBD.NET/OBD.NET/DataTypes/Count.cs",
    "content": "﻿namespace OBD.NET.DataTypes;\n\npublic class Count : GenericData\n{\n    #region Properties & Fields\n\n    protected override string? Unit => null;\n\n    #endregion\n\n    #region Constructors\n\n    public Count(double value, double minValue, double maxValue)\n        : base(value, minValue, maxValue)\n    { }\n\n    public Count(int value, int minValue, int maxValue)\n        : base(value, minValue, maxValue)\n    { }\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/DataTypes/Degree.cs",
    "content": "﻿namespace OBD.NET.DataTypes;\n\npublic class Degree : GenericData\n{\n    #region Properties & Fields\n\n    protected override string Unit => \"°\";\n\n    #endregion\n\n    #region Constructors\n\n    public Degree(double value, double minValue, double maxValue)\n        : base(value, minValue, maxValue)\n    { }\n\n    public Degree(int value, int minValue, int maxValue)\n        : base(value, minValue, maxValue)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => (IsFloatingPointValue ? Value.ToString(\"0.00\") : Value.ToString()) + Unit;\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/DataTypes/DegreeCelsius.cs",
    "content": "﻿namespace OBD.NET.DataTypes;\n\npublic class DegreeCelsius : GenericData\n{\n    #region Properties & Fields\n\n    protected override string Unit => \"°C\";\n\n    #endregion\n\n    #region Constructors\n\n    public DegreeCelsius(double value, double minValue, double maxValue)\n        : base(value, minValue, maxValue)\n    { }\n\n    public DegreeCelsius(int value, int minValue, int maxValue)\n        : base(value, minValue, maxValue)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => (IsFloatingPointValue ? Value.ToString(\"0.00\") : Value.ToString()) + Unit;\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/DataTypes/GenericData.cs",
    "content": "﻿using System;\n\nnamespace OBD.NET.DataTypes;\n\npublic abstract class GenericData\n{\n    #region Properties & Fields\n\n    public double Value { get; }\n    public double MinValue { get; }\n    public double MaxValue { get; }\n    public bool IsFloatingPointValue { get; }\n\n    protected abstract string? Unit { get; }\n\n    #endregion\n\n    #region Constructors\n\n    protected GenericData(double value, double minValue, double maxValue)\n    {\n        this.Value = value;\n        this.MinValue = minValue;\n        this.MaxValue = maxValue;\n\n        IsFloatingPointValue = true;\n    }\n\n    protected GenericData(int value, int minValue, int maxValue)\n    {\n        this.Value = value;\n        this.MinValue = minValue;\n        this.MaxValue = maxValue;\n\n        IsFloatingPointValue = false;\n    }\n\n    #endregion\n\n    #region Operators\n\n    public static implicit operator double(GenericData p) => p.Value;\n\n    public static implicit operator int(GenericData p) => (int)Math.Round(p.Value);\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => (IsFloatingPointValue ? Value.ToString(\"0.00\") : Value.ToString()) + (Unit == null ? string.Empty : (\" \" + Unit));\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/DataTypes/GramPerSec.cs",
    "content": "﻿namespace OBD.NET.DataTypes;\n\npublic class GramPerSec : GenericData\n{\n    #region Properties & Fields\n\n    protected override string Unit => \"g/s\";\n\n    #endregion\n\n    #region Constructors\n\n    public GramPerSec(double value, double minValue, double maxValue)\n        : base(value, minValue, maxValue)\n    { }\n\n    public GramPerSec(int value, int minValue, int maxValue)\n        : base(value, minValue, maxValue)\n    { }\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/DataTypes/Kilometre.cs",
    "content": "﻿namespace OBD.NET.DataTypes;\n\npublic class Kilometre : GenericData\n{\n    #region Properties & Fields\n\n    protected override string Unit => \"km\";\n\n    #endregion\n\n    #region Constructors\n\n    public Kilometre(double value, double minValue, double maxValue)\n        : base(value, minValue, maxValue)\n    { }\n\n    public Kilometre(int value, int minValue, int maxValue)\n        : base(value, minValue, maxValue)\n    { }\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/DataTypes/KilometrePerHour.cs",
    "content": "﻿namespace OBD.NET.DataTypes;\n\npublic class KilometrePerHour : GenericData\n{\n    #region Properties & Fields\n\n    protected override string Unit => \"km/h\";\n\n    #endregion\n\n    #region Constructors\n\n    public KilometrePerHour(double value, double minValue, double maxValue)\n        : base(value, minValue, maxValue)\n    { }\n\n    public KilometrePerHour(int value, int minValue, int maxValue)\n        : base(value, minValue, maxValue)\n    { }\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/DataTypes/Kilopascal.cs",
    "content": "﻿namespace OBD.NET.DataTypes;\n\npublic class Kilopascal : GenericData\n{\n    #region Properties & Fields\n\n    protected override string Unit => \"kPa\";\n\n    #endregion\n\n    #region Constructors\n\n    public Kilopascal(double value, double minValue, double maxValue)\n        : base(value, minValue, maxValue)\n    { }\n\n    public Kilopascal(int value, int minValue, int maxValue)\n        : base(value, minValue, maxValue)\n    { }\n\n    #endregion\n\n    #region Operators\n\n    public static explicit operator Pascal(Kilopascal pa) => new(pa.Value / 1000.0, pa.MinValue / 1000.0, pa.MaxValue / 1000.0);\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/DataTypes/LitresPerHour.cs",
    "content": "﻿namespace OBD.NET.DataTypes;\n\npublic class LitresPerHour : GenericData\n{\n    #region Properties & Fields\n\n    protected override string Unit => \"l/h\";\n\n    #endregion\n\n    #region Constructors\n\n    public LitresPerHour(double value, double minValue, double maxValue)\n        : base(value, minValue, maxValue)\n    { }\n\n    public LitresPerHour(int value, int minValue, int maxValue)\n        : base(value, minValue, maxValue)\n    { }\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/DataTypes/Milliampere.cs",
    "content": "﻿namespace OBD.NET.DataTypes;\n\npublic class Milliampere : GenericData\n{\n    #region Properties & Fields\n\n    protected override string Unit => \"mA\";\n\n    #endregion\n\n    #region Constructors\n\n    public Milliampere(double value, double minValue, double maxValue)\n        : base(value, minValue, maxValue)\n    { }\n\n    public Milliampere(int value, int minValue, int maxValue)\n        : base(value, minValue, maxValue)\n    { }\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/DataTypes/Minute.cs",
    "content": "﻿namespace OBD.NET.DataTypes;\n\npublic class Minute : GenericData\n{\n    #region Properties & Fields\n\n    protected override string Unit => \"min\";\n\n    #endregion\n\n    #region Constructors\n\n    public Minute(double value, double minValue, double maxValue)\n        : base(value, minValue, maxValue)\n    { }\n\n    public Minute(int value, int minValue, int maxValue)\n        : base(value, minValue, maxValue)\n    { }\n\n    #endregion\n\n    #region Operators\n\n    public static explicit operator Second(Minute m) => m.IsFloatingPointValue\n        ? new Second(m.Value * 60, m.MinValue * 60, m.MaxValue * 60)\n        : new Second((int)(m.Value * 60), (int)(m.MinValue * 60), (int)(m.MaxValue * 60));\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/DataTypes/NewtonMetre.cs",
    "content": "﻿namespace OBD.NET.DataTypes;\n\npublic class NewtonMetre : GenericData\n{\n    #region Properties & Fields\n\n    protected override string Unit => \"N\";\n\n    #endregion\n\n    #region Constructors\n\n    public NewtonMetre(double value, double minValue, double maxValue)\n        : base(value, minValue, maxValue)\n    { }\n\n    public NewtonMetre(int value, int minValue, int maxValue)\n        : base(value, minValue, maxValue)\n    { }\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/DataTypes/Pascal.cs",
    "content": "﻿namespace OBD.NET.DataTypes;\n\npublic class Pascal : GenericData\n{\n    #region Properties & Fields\n\n    protected override string Unit => \"Pa\";\n\n    #endregion\n\n    #region Constructors\n\n    public Pascal(double value, double minValue, double maxValue)\n        : base(value, minValue, maxValue)\n    { }\n\n    public Pascal(int value, int minValue, int maxValue)\n        : base(value, minValue, maxValue)\n    { }\n\n    #endregion\n\n    #region Operators\n\n    public static explicit operator Kilopascal(Pascal pa) => pa.IsFloatingPointValue\n        ? new Kilopascal(pa.Value * 1000, pa.MinValue * 1000, pa.MaxValue * 1000)\n        : new Kilopascal((int)(pa.Value * 1000), (int)(pa.MinValue * 1000), (int)(pa.MaxValue * 1000));\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/DataTypes/Percent.cs",
    "content": "﻿namespace OBD.NET.DataTypes;\n\npublic class Percent : GenericData\n{\n    #region Properties & Fields\n\n    protected override string Unit => \"%\";\n\n    #endregion\n\n    #region Constructors\n\n    public Percent(double value, double minValue, double maxValue)\n        : base(value, minValue, maxValue)\n    { }\n\n    public Percent(int value, int minValue, int maxValue)\n        : base(value, minValue, maxValue)\n    { }\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/DataTypes/Ratio.cs",
    "content": "﻿namespace OBD.NET.DataTypes;\n\npublic class Ratio : GenericData\n{\n    #region Properties & Fields\n\n    protected override string? Unit => null;\n\n    #endregion\n\n    #region Constructors\n\n    public Ratio(double value, double minValue, double maxValue)\n        : base(value, minValue, maxValue)\n    { }\n\n    public Ratio(int value, int minValue, int maxValue)\n        : base(value, minValue, maxValue)\n    { }\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/DataTypes/RevolutionsPerMinute.cs",
    "content": "﻿namespace OBD.NET.DataTypes;\n\npublic class RevolutionsPerMinute : GenericData\n{\n    #region Properties & Fields\n\n    protected override string Unit => \"rpm\";\n\n    #endregion\n\n    #region Constructors\n\n    public RevolutionsPerMinute(double value, double minValue, double maxValue)\n        : base(value, minValue, maxValue)\n    { }\n\n    public RevolutionsPerMinute(int value, int minValue, int maxValue)\n        : base(value, minValue, maxValue)\n    { }\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/DataTypes/Second.cs",
    "content": "﻿namespace OBD.NET.DataTypes;\n\npublic class Second : GenericData\n{\n    #region Properties & Fields\n\n    protected override string Unit => \"s\";\n\n    #endregion\n\n    #region Constructors\n\n    public Second(double value, double minValue, double maxValue)\n        : base(value, minValue, maxValue)\n    { }\n\n    public Second(int value, int minValue, int maxValue)\n        : base(value, minValue, maxValue)\n    { }\n\n    #endregion\n\n    #region Operators\n\n    public static explicit operator Minute(Second s) => new(s.Value / 60.0, s.MinValue / 60.0, s.MaxValue / 60.0);\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/DataTypes/Volt.cs",
    "content": "﻿namespace OBD.NET.DataTypes;\n\npublic class Volt : GenericData\n{\n    #region Properties & Fields\n\n    protected override string Unit => \"V\";\n\n    #endregion\n\n    #region Constructors\n\n    public Volt(double value, double minValue, double maxValue)\n        : base(value, minValue, maxValue)\n    { }\n\n    public Volt(int value, int minValue, int maxValue)\n        : base(value, minValue, maxValue)\n    { }\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/Devices/Command.cs",
    "content": "﻿namespace OBD.NET.Devices;\n\n/// <summary>\n/// Class used for queued command\n/// </summary>\npublic class QueuedCommand\n{\n    #region Properties & Fields\n\n    public string CommandText { get; }\n\n    public CommandResult CommandResult { get; }\n\n    #endregion\n\n    #region Constructors\n\n    public QueuedCommand(string commandText)\n    {\n        this.CommandText = commandText;\n\n        CommandResult = new CommandResult();\n    }\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/Devices/CommandResult.cs",
    "content": "﻿using OBD.NET.Util;\n\nnamespace OBD.NET.Devices;\n\npublic class CommandResult\n{\n    #region Properties & Fields\n\n    public object? Result { get; set; }\n    public AsyncManualResetEvent WaitHandle { get; }\n\n    #endregion\n\n    #region Constructors\n\n    public CommandResult()\n    {\n        WaitHandle = new AsyncManualResetEvent();\n    }\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/Devices/ELM327.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Reflection;\nusing System.Threading.Tasks;\nusing OBD.NET.Commands;\nusing OBD.NET.Communication;\nusing OBD.NET.Enums;\nusing OBD.NET.Events;\nusing OBD.NET.Extensions;\nusing OBD.NET.Logging;\nusing OBD.NET.OBDData;\n\nnamespace OBD.NET.Devices;\n\npublic class ELM327 : SerialDevice\n{\n    #region Properties & Fields\n\n    protected readonly Dictionary<Type, IDataEventManager> DataReceivedEventHandlers = new();\n\n    protected static Dictionary<Type, byte> PidCache { get; } = new();\n    protected static Dictionary<byte, Type> DataTypeCache { get; } = new();\n\n    protected Mode Mode { get; set; } = Mode.ShowCurrentData; //TODO DarthAffe 26.06.2016: Implement different modes\n\n    protected string MessageChunk { get; set; } = string.Empty;\n\n    #endregion\n\n    #region Events\n\n    public delegate void DataReceivedEventHandler<T>(object sender, DataReceivedEventArgs<T> args) where T : IOBDData;\n\n    public delegate void RawDataReceivedEventHandler(object sender, RawDataReceivedEventArgs args);\n    public event RawDataReceivedEventHandler? RawDataReceived;\n\n    #endregion\n\n    #region Constructors\n\n    public ELM327(ISerialConnection connection, IOBDLogger? logger = null)\n        : base(connection, logger: logger)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override async Task InitializeAsync()\n    {\n        await base.InitializeAsync();\n        InternalInitialize();\n    }\n\n    public override void Initialize()\n    {\n        base.Initialize();\n        InternalInitialize();\n    }\n\n    private void InternalInitialize()\n    {\n        Logger?.WriteLine(\"Initializing ...\", OBDLogLevel.Debug);\n\n        try\n        {\n            Logger?.WriteLine(\"Resetting Device ...\", OBDLogLevel.Debug);\n            SendCommand(ATCommand.ResetDevice);\n\n            Logger?.WriteLine(\"Turning Echo Off ...\", OBDLogLevel.Debug);\n            SendCommand(ATCommand.EchoOff);\n\n            Logger?.WriteLine(\"Turning Linefeeds Off ...\", OBDLogLevel.Debug);\n            SendCommand(ATCommand.LinefeedsOff);\n\n            Logger?.WriteLine(\"Turning Headers Off ...\", OBDLogLevel.Debug);\n            SendCommand(ATCommand.HeadersOff);\n\n            Logger?.WriteLine(\"Turning Spaced Off ...\", OBDLogLevel.Debug);\n            SendCommand(ATCommand.PrintSpacesOff);\n\n            Logger?.WriteLine(\"Setting the Protocol to 'Auto' ...\", OBDLogLevel.Debug);\n            SendCommand(ATCommand.SetProtocolAuto);\n\n            WaitQueue();\n        }\n        // DarthAffe 21.02.2017: This seems to happen sometimes, i don't know why - just retry.\n        catch\n        {\n            Logger?.WriteLine(\"Failed to initialize the device!\", OBDLogLevel.Error);\n            throw;\n        }\n    }\n\n    /// <summary>\n    /// Sends the AT command.\n    /// </summary>\n    /// <param name=\"command\">The command.</param>\n    public virtual void SendCommand(ATCommand command) => SendCommand(command.Command);\n\n    /// <summary>\n    /// Requests the data and calls the handler\n    /// </summary>\n    /// <typeparam name=\"T\"></typeparam>\n    public virtual void RequestData<T>()\n        where T : class, IOBDData, new()\n    {\n        Logger?.WriteLine(\"Requesting Type \" + typeof(T).Name + \" ...\", OBDLogLevel.Debug);\n\n        byte pid = ResolvePid<T>();\n        RequestData(pid);\n    }\n\n    /// <summary>\n    /// Request data based on a pid\n    /// </summary>\n    /// <param name=\"pid\">The pid of the requested data</param>\n    public virtual void RequestData(byte pid)\n    {\n        Logger?.WriteLine(\"Requesting PID \" + pid.ToString(\"X2\") + \" ...\", OBDLogLevel.Debug);\n        SendCommand(((byte)Mode).ToString(\"X2\") + pid.ToString(\"X2\"));\n    }\n\n    /// <summary>\n    /// Requests the data asynchronous and return the data when available\n    /// </summary>\n    /// <typeparam name=\"T\"></typeparam>\n    /// <returns></returns>\n    public virtual async Task<T?> RequestDataAsync<T>()\n        where T : class, IOBDData, new()\n    {\n        Logger?.WriteLine(\"Requesting Type \" + typeof(T).Name + \" ...\", OBDLogLevel.Debug);\n        byte pid = ResolvePid<T>();\n        return await RequestDataAsync(pid) as T;\n    }\n\n    /// <summary>\n    /// Requests the data asynchronous and return the data when available\n    /// </summary>\n    /// <returns></returns>\n    public virtual async Task<IOBDData?> RequestDataAsync(Type type)\n    {\n        Logger?.WriteLine(\"Requesting Type \" + type.Name + \" ...\", OBDLogLevel.Debug);\n        byte pid = ResolvePid(type);\n        return await RequestDataAsync(pid) as IOBDData;\n    }\n\n    /// <summary>\n    /// Request data based on a pid\n    /// </summary>\n    /// <param name=\"pid\">The pid of the requested data</param>\n    public virtual async Task<object?> RequestDataAsync(byte pid)\n    {\n        Logger?.WriteLine(\"Requesting PID \" + pid.ToString(\"X2\") + \" ...\", OBDLogLevel.Debug);\n        CommandResult result = SendCommand(((byte)Mode).ToString(\"X2\") + pid.ToString(\"X2\"));\n\n        await result.WaitHandle.WaitAsync();\n        return result.Result;\n    }\n\n    protected override object? ProcessMessage(string message)\n    {\n        DateTime timestamp = DateTime.Now;\n\n        RawDataReceived?.Invoke(this, new RawDataReceivedEventArgs(message, timestamp));\n\n        if (message.Length > 4)\n        {\n            // DarthAffe 15.08.2020: Splitted messages are prefixed with 0: (first chunk) and 1: (second chunk)\n            // DarthAffe 15.08.2020: They also seem to be always preceded by a '009'-message, but since that's to short to be processed it should be safe to ignore.\n            // DarthAffe 15.08.2020: Since that behavior isn't really documented (at least I wasn't able to find it) that's all trial and error and might not work for all pids with long results.\n            if (message[1] == ':')\n            {\n                if (message[0] == '0')\n                    MessageChunk = message.Substring(2, message.Length - 2);\n                else if (message[0] == '1')\n                {\n                    string fullMessage = MessageChunk + message.Substring(2, message.Length - 2);\n                    MessageChunk = string.Empty;\n                    return ProcessMessage(fullMessage);\n                }\n            }\n            else if (message[0] == '4')\n            {\n                byte mode = (byte)message[1].GetHexVal();\n                if (mode == (byte)Mode)\n                {\n                    byte pid = (byte)message.Substring(2, 2).GetHexVal();\n                    if (DataTypeCache.TryGetValue(pid, out Type? dataType))\n                    {\n                        IOBDData obdData = (IOBDData)Activator.CreateInstance(dataType)!;\n                        obdData.Load(message.Substring(4, message.Length - 4));\n\n                        if (DataReceivedEventHandlers.TryGetValue(dataType, out IDataEventManager? dataEventManager))\n                            dataEventManager.RaiseEvent(this, obdData, timestamp);\n\n                        if (DataReceivedEventHandlers.TryGetValue(typeof(IOBDData), out IDataEventManager? genericDataEventManager))\n                            genericDataEventManager.RaiseEvent(this, obdData, timestamp);\n\n                        return obdData;\n                    }\n                }\n            }\n        }\n        return null;\n    }\n\n    protected virtual byte ResolvePid<T>()\n        where T : class, IOBDData, new()\n        => ResolvePid(typeof(T));\n\n    protected virtual byte ResolvePid(Type type)\n    {\n        if (!PidCache.TryGetValue(type, out byte pid))\n            pid = AddToPidCache(type);\n\n        return pid;\n    }\n\n    public virtual byte AddToPidCache<T>()\n        where T : class, IOBDData, new() => AddToPidCache(typeof(T));\n\n    protected virtual byte AddToPidCache(Type obdDataType)\n    {\n        if (Activator.CreateInstance(obdDataType) is not IOBDData data) throw new ArgumentException(\"Has to implement IOBDData\", nameof(obdDataType));\n\n        byte pid = data.PID;\n\n        PidCache.Add(obdDataType, pid);\n        DataTypeCache.Add(pid, obdDataType);\n\n        return pid;\n    }\n\n    /// <summary>\n    /// YOU SHOULDN'T NEED THIS METHOD!\n    ///\n    /// You should only use this method if you're requesting data by pid instead of the <see cref=\"RequestData{T}\"/>-method.\n    ///\n    /// Initializes the PID-Cache with all IOBDData-Types contained in OBD.NET.\n    /// You can add additional ones with <see cref=\"AddToPidCache{T}\"/>.\n    /// </summary>\n    public virtual void InitializePidCache()\n    {\n        TypeInfo iobdDataInfo = typeof(IOBDData).GetTypeInfo();\n        foreach (TypeInfo obdDataType in iobdDataInfo.Assembly.DefinedTypes.Where(t => t.IsClass && !t.IsAbstract && iobdDataInfo.IsAssignableFrom(t)))\n            AddToPidCache(obdDataType.AsType());\n    }\n\n    public override void Dispose() => Dispose(true);\n\n    public void Dispose(bool sendCloseProtocol)\n    {\n        try\n        {\n            if (sendCloseProtocol)\n                SendCommand(ATCommand.CloseProtocol);\n        }\n        catch { /* Well at least we tried ... */ }\n\n        DataReceivedEventHandlers.Clear();\n\n        base.Dispose();\n    }\n\n    public void SubscribeDataReceived<T>(DataReceivedEventHandler<T> eventHandler) where T : IOBDData\n    {\n        if (!DataReceivedEventHandlers.TryGetValue(typeof(T), out IDataEventManager? eventManager))\n            DataReceivedEventHandlers.Add(typeof(T), (eventManager = new GenericDataEventManager<T>()));\n\n        ((GenericDataEventManager<T>)eventManager).DataReceived += eventHandler;\n    }\n\n    public void UnsubscribeDataReceived<T>(DataReceivedEventHandler<T> eventHandler) where T : IOBDData\n    {\n        if (DataReceivedEventHandlers.TryGetValue(typeof(T), out IDataEventManager? eventManager))\n            ((GenericDataEventManager<T>)eventManager).DataReceived -= eventHandler;\n    }\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/Devices/STN1170.cs",
    "content": "﻿using OBD.NET.Commands;\nusing OBD.NET.Communication;\nusing OBD.NET.Logging;\n\nnamespace OBD.NET.Devices;\n\npublic class STN1170 : ELM327 // Fully compatible device\n{\n    #region Constructors\n\n    public STN1170(ISerialConnection connection, IOBDLogger? logger = null)\n        : base(connection, logger)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    /// <summary>\n    /// Sends the ST command.\n    /// </summary>\n    /// <param name=\"command\">The command.</param>\n    public virtual void SendCommand(STCommand command) => SendCommand(command.Command);\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/Devices/SerialDevice.cs",
    "content": "﻿using System;\nusing System.Collections.Concurrent;\nusing System.Text;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing OBD.NET.Communication;\nusing OBD.NET.Exceptions;\nusing OBD.NET.Logging;\n\nnamespace OBD.NET.Devices;\n\n/// <summary>\n/// Base class used for communicating with the device\n/// </summary>\npublic abstract class SerialDevice : IDisposable\n{\n    #region Properties & Fields\n\n    private readonly BlockingCollection<QueuedCommand> _commandQueue = new();\n    private readonly StringBuilder _lineBuffer = new();\n    private readonly AutoResetEvent _commandFinishedEvent = new(false);\n    private Task? _commandWorkerTask;\n    private CancellationTokenSource? _commandCancellationToken;\n\n    private volatile int _queueSize = 0;\n    private readonly ManualResetEvent _queueEmptyEvent = new(true);\n\n    public int QueueSize => _queueSize;\n\n    protected QueuedCommand? CurrentCommand;\n    protected IOBDLogger? Logger { get; }\n    protected ISerialConnection Connection { get; }\n    protected char Terminator { get; set; }\n\n    #endregion\n\n    #region Constructors\n\n    /// <summary>\n    /// Initializes a new instance of the <see cref=\"SerialDevice\"/> class.\n    /// </summary>\n    /// <param name=\"connection\">connection.</param>\n    /// <param name=\"terminator\">terminator used for terminating the command message</param>\n    /// <param name=\"logger\">logger instance</param>\n    protected SerialDevice(ISerialConnection connection, char terminator = '\\r', IOBDLogger? logger = null)\n    {\n        this.Connection = connection;\n        this.Terminator = terminator;\n        this.Logger = logger;\n\n        connection.DataReceived += OnDataReceived;\n    }\n\n    #endregion\n\n    #region Methods\n\n    /// <summary>\n    /// Initializes the device\n    /// </summary>\n    public virtual void Initialize()\n    {\n        Connection.Connect();\n        CheckConnectionAndStartWorker();\n    }\n\n    /// <summary>\n    /// Initializes the device\n    /// </summary>\n    public virtual async Task InitializeAsync()\n    {\n        await Connection.ConnectAsync();\n        CheckConnectionAndStartWorker();\n    }\n\n    /// <summary>\n    /// Checks the connection and starts background worker which is sending the commands\n    /// </summary>\n    /// <exception cref=\"SerialException\">Failed to open Serial-Connection.</exception>\n    private void CheckConnectionAndStartWorker()\n    {\n        if (!Connection.IsOpen)\n        {\n            Logger?.WriteLine(\"Failed to open Serial-Connection.\", OBDLogLevel.Error);\n            throw new SerialException(\"Failed to open Serial-Connection.\");\n        }\n\n        Logger?.WriteLine(\"Opened Serial-Connection!\", OBDLogLevel.Debug);\n\n        _commandCancellationToken = new CancellationTokenSource();\n        _commandWorkerTask = Task.Factory.StartNew(CommandWorker);\n    }\n    \n    /// <summary>\n    /// Sends the command.\n    /// </summary>\n    /// <param name=\"command\">command string</param>\n    /// <exception cref=\"System.InvalidOperationException\">Not connected</exception>\n    protected virtual CommandResult SendCommand(string command)\n    {\n        if (!Connection.IsOpen)\n            throw new InvalidOperationException(\"Not connected\");\n\n        command = PrepareCommand(command);\n        Logger?.WriteLine(\"Queuing Command: '\" + command.Replace('\\r', '\\'') + \"'\", OBDLogLevel.Verbose);\n\n        QueuedCommand cmd = new(command);\n        _queueEmptyEvent.Reset();\n        Interlocked.Increment(ref _queueSize);\n        _commandQueue.Add(cmd);\n\n        return cmd.CommandResult;\n    }\n\n    /// <summary>\n    /// Prepares the command\n    /// </summary>\n    /// <param name=\"command\"></param>\n    /// <returns></returns>\n    protected virtual string PrepareCommand(string command)\n    {\n        if (command == null) throw new ArgumentNullException(nameof(command));\n\n        if (!command.EndsWith(Terminator.ToString(), StringComparison.Ordinal))\n            command += Terminator;\n\n        return command;\n    }\n\n    /// <summary>\n    /// Called when data is received from the serial device\n    /// </summary>\n    /// <param name=\"sender\">The sender.</param>\n    /// <param name=\"e\">The <see cref=\"DataReceivedEventArgs\"/> instance containing the event data.</param>\n    private void OnDataReceived(object? sender, DataReceivedEventArgs e)\n    {\n        for (int i = 0; i < e.Count; i++)\n        {\n            char c = (char)e.Data[i];\n            switch (c)\n            {\n                case '\\r':\n                    FinishLine();\n                    break;\n\n                case '>':\n                    CurrentCommand?.CommandResult.WaitHandle.Set();\n                    _commandFinishedEvent.Set();\n                    break;\n\n                case '\\n':\n                case (char)0x00:\n                    break; // ignore\n\n                default:\n                    _lineBuffer.Append(c);\n                    break;\n            }\n        }\n    }\n\n    /// <summary>\n    /// Signals a final message\n    /// </summary>\n    private void FinishLine()\n    {\n        string line = _lineBuffer.ToString().Trim();\n        _lineBuffer.Clear();\n\n        if (string.IsNullOrWhiteSpace(line)) return;\n        Logger?.WriteLine(\"Response: '\" + line + \"'\", OBDLogLevel.Verbose);\n\n        InternalProcessMessage(line);\n    }\n\n    /// <summary>\n    /// Process message and sets the result\n    /// </summary>\n    /// <param name=\"message\">The message.</param>\n    private void InternalProcessMessage(string message)\n    {\n        object? data = ProcessMessage(message);\n        if (CurrentCommand != null)\n            CurrentCommand.CommandResult.Result = data;\n    }\n\n    /// <summary>\n    /// Processes the message.\n    /// </summary>\n    /// <param name=\"message\">message received</param>\n    /// <returns>result data</returns>\n    protected abstract object? ProcessMessage(string message);\n\n    /// <summary>\n    /// Worker method for sending commands\n    /// </summary>\n    private async void CommandWorker()\n    {\n        if (_commandCancellationToken == null) return;\n\n        CancellationToken cancellationToken = _commandCancellationToken.Token;\n\n        while (!_commandCancellationToken.IsCancellationRequested)\n        {\n            CurrentCommand = null;\n\n            if (_queueSize == 0)\n                _queueEmptyEvent.Set();\n\n            try\n            {\n                if (_commandQueue.TryTake(out CurrentCommand, 10, cancellationToken))\n                {\n                    Interlocked.Decrement(ref _queueSize);\n\n                    Logger?.WriteLine(\"Writing Command: '\" + CurrentCommand.CommandText.Replace('\\r', '\\'') + \"'\", OBDLogLevel.Verbose);\n\n                    if (Connection.IsAsync)\n                        await Connection.WriteAsync(Encoding.ASCII.GetBytes(CurrentCommand.CommandText));\n                    else\n                        // ReSharper disable once MethodHasAsyncOverload\n                        Connection.Write(Encoding.ASCII.GetBytes(CurrentCommand.CommandText));\n\n                    // wait for command to finish or command canceled\n                    while (!_commandFinishedEvent.WaitOne(50))\n                        cancellationToken.ThrowIfCancellationRequested();\n                }\n            }\n            catch (OperationCanceledException)\n            {\n                CurrentCommand?.CommandResult.WaitHandle.Set();\n            }\n        }\n\n        foreach (QueuedCommand cmd in _commandQueue)\n            cmd.CommandResult.WaitHandle.Set();\n    }\n\n    public void WaitQueue() => _queueEmptyEvent.WaitOne();\n\n    public async Task WaitQueueAsync() => await Task.Run(WaitQueue);\n\n    /// <summary>\n    /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.\n    /// </summary>\n    public virtual void Dispose()\n    {\n        _commandQueue.CompleteAdding();\n        _commandCancellationToken?.Cancel();\n        _commandWorkerTask?.Wait();\n        Connection.Dispose();\n    }\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/Enums/Mode.cs",
    "content": "﻿namespace OBD.NET.Enums;\n\n/// <summary>\n/// https://en.wikipedia.org/wiki/OBD-II_PIDs#Modes\n/// </summary>\npublic enum Mode\n{\n    ShowCurrentData = 0x01,\n    ShowFreezeFrameData = 0x02,\n    ShowStoredDiagnosticTroubleCodes = 0x03,\n    ClearDiagnosticTroubleCodesAndStoredValues = 0x04,\n    TestResults_OxygenSensorMonitoring = 0x05,\n    TestResults_OtherComponentMonitoring = 0x06,\n    ShowPendingDiagnosticTroubleCodes = 0x07,\n    ControlOperationOfOnboardComponent = 0x08,\n    RequestVehicleInformation = 0x09,\n    PermanentDiagnosticTroubleCodes = 0x0A\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/Events/EventArgs/DataReceivedEventArgs.cs",
    "content": "﻿using System;\nusing OBD.NET.OBDData;\n\nnamespace OBD.NET.Events;\n\npublic class DataReceivedEventArgs<T> where T : IOBDData\n{\n    #region Properties & Fields\n\n    public T Data { get; }\n    public DateTime Timestamp { get; }\n\n    #endregion\n\n    #region Constructors\n\n    public DataReceivedEventArgs(T data, DateTime timestamp)\n    {\n        this.Data = data;\n        this.Timestamp = timestamp;\n    }\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/Events/EventArgs/RawDataReceivedEventArgs.cs",
    "content": "﻿using System;\n\nnamespace OBD.NET.Events;\n\npublic class RawDataReceivedEventArgs\n{\n    #region Properties & Fields\n        \n    public string Data { get; }\n    public DateTime Timestamp { get; }\n\n    #endregion\n\n    #region Constructors\n\n    public RawDataReceivedEventArgs(string data, DateTime timestamp)\n    {\n        this.Data = data;\n        this.Timestamp = timestamp;\n    }\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/Events/GenericDataEventManager.cs",
    "content": "﻿using System;\nusing OBD.NET.Devices;\nusing OBD.NET.OBDData;\n\nnamespace OBD.NET.Events;\n\npublic class GenericDataEventManager<T> : IDataEventManager\n    where T : IOBDData\n{\n    #region Events\n\n    internal event ELM327.DataReceivedEventHandler<T>? DataReceived;\n\n    #endregion\n\n    #region Methods\n\n    public void RaiseEvent(object sender, IOBDData data, DateTime timestamp) => DataReceived?.Invoke(sender, new DataReceivedEventArgs<T>((T)data, timestamp));\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/Events/IDataEventManager.cs",
    "content": "﻿using System;\nusing OBD.NET.OBDData;\n\nnamespace OBD.NET.Events;\n\npublic interface IDataEventManager\n{\n    void RaiseEvent(object sender, IOBDData data, DateTime timestamp);\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/Exceptions/SerialException.cs",
    "content": "﻿using System;\n\nnamespace OBD.NET.Exceptions;\n\npublic class SerialException : Exception\n{\n    #region Constructors\n\n    public SerialException()\n    { }\n\n    public SerialException(string message)\n        : base(message)\n    { }\n\n    public SerialException(string message, Exception innerException)\n        : base(message, innerException)\n    { }\n    \n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/Exceptions/UnexpectedResultException.cs",
    "content": "﻿using System;\n\nnamespace OBD.NET.Exceptions;\n\npublic class UnexpectedResultException : Exception\n{\n    #region Properties & Fields\n\n    public string Result { get; }\n    public string ExpectedResult { get; }\n\n    #endregion\n\n    #region Constructors\n\n    public UnexpectedResultException(string result, string expectedResult)\n        : this($\"Unexpected result '{result}'. Expected was '{expectedResult}'\", result, expectedResult)\n    {\n        this.Result = result;\n        this.ExpectedResult = expectedResult;\n    }\n\n    public UnexpectedResultException(string message, string result, string expectedResult)\n        : base(message)\n    {\n        this.Result = result;\n        this.ExpectedResult = expectedResult;\n    }\n\n    public UnexpectedResultException(string message, Exception innerException, string result, string expectedResult)\n        : base(message, innerException)\n    {\n        this.Result = result;\n        this.ExpectedResult = expectedResult;\n    }\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/Extensions/HexExtension.cs",
    "content": "﻿using System;\nusing System.Linq;\n\nnamespace OBD.NET.Extensions;\n\npublic static class HexExtension\n{\n    #region Methods\n\n    public static int GetHexVal(this char hex) => hex - (hex < 58 ? 48 : (hex < 97 ? 55 : 87));\n    public static int GetHexVal(this string hex)\n    {\n        if ((hex.Length % 2) == 1)\n            throw new ArgumentException(\"The binary key cannot have an odd number of digits\");\n\n        return hex.Aggregate(0, (current, c) => (current << 4) + (GetHexVal(c)));\n    }\n\n    public static string ToHexString(this byte b) => ToHexString(new[] { b });\n    public static string ToHexString(this byte[] bytes) => BitConverter.ToString(bytes).Replace(\"-\", string.Empty);\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/Logging/IOBDLogger.cs",
    "content": "﻿namespace OBD.NET.Logging;\n\npublic interface IOBDLogger\n{\n    void WriteLine(string text, OBDLogLevel level);\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/Logging/OBDConsoleLogger.cs",
    "content": "using System;\n\nnamespace OBD.NET.Logging;\n\n/// <summary>\n/// Simple console logger\n/// </summary>\n/// <seealso cref=\"IOBDLogger\" />\npublic class OBDConsoleLogger : IOBDLogger\n{\n    #region Properties & Fields\n\n    public OBDLogLevel LogLevel { get; set; }\n\n    #endregion\n\n    #region Constructors\n\n    public OBDConsoleLogger(OBDLogLevel level = OBDLogLevel.None)\n    {\n        this.LogLevel = level;\n    }\n\n    #endregion\n\n    #region Methods\n\n    public void WriteLine(string text, OBDLogLevel level)\n    {\n        if (LogLevel == OBDLogLevel.None) return;\n\n        if ((int)level <= (int)LogLevel)\n            Console.WriteLine($\"{DateTime.Now:G} -  {level} -  {text}\");\n    }\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/Logging/OBDDebugLogger.cs",
    "content": "﻿using System;\nusing System.Diagnostics;\n\nnamespace OBD.NET.Logging;\n\n/// <summary>\n/// Simple debug logger\n/// </summary>\n/// <seealso cref=\"IOBDLogger\" />\npublic class OBDDebugLogger : IOBDLogger\n{\n\n    #region Properties & Fields\n\n    public OBDLogLevel LogLevel { get; set; }\n\n    #endregion\n\n    #region Constructors\n\n    public OBDDebugLogger(OBDLogLevel level = OBDLogLevel.None)\n    {\n        this.LogLevel = level;\n    }\n\n    #endregion\n\n    #region Methods\n\n    public void WriteLine(string text, OBDLogLevel level)\n    {\n        if (LogLevel == OBDLogLevel.None) return;\n\n        if ((int)level <= (int)LogLevel)\n            Debug.WriteLine($\"{DateTime.Now:G} -  {level} -  {text}\");\n    }\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/Logging/OBDLogLevel.cs",
    "content": "﻿namespace OBD.NET.Logging;\n\npublic enum OBDLogLevel\n{\n    None,\n    Error,\n    Verbose,\n    Debug\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBD.NET.csproj",
    "content": "﻿<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <PropertyGroup>\n    <Nullable>enable</Nullable>\n    <TargetFrameworks>net6.0;net5.0;net4.8</TargetFrameworks>\n    <LangVersion>10</LangVersion>\n\n    <Authors>Darth Affe / Roman Lumetsberger</Authors>\n    <Company>-</Company>\n    <Product>OBD.NET</Product>\n    <Description>C#-Library to read/write data from/to a car through an ELM327-/STN1170-Adapter</Description>\n    <Version>1.3.0</Version>\n\n    <GeneratePackageOnBuild>True</GeneratePackageOnBuild>\n    <RepositoryType>Github</RepositoryType>\n    <RepositoryUrl>https://github.com/DarthAffe/OBD.NET</RepositoryUrl>\n    <PackageProjectUrl>https://github.com/DarthAffe/OBD.NET</PackageProjectUrl>\n    <PackageLicenseExpression>GPL-2.0-only</PackageLicenseExpression>\n\n    <OutputPath>..\\bin\\</OutputPath>\n    <GenerateDocumentationFile>true</GenerateDocumentationFile>\n    <IncludeSource>True</IncludeSource>\n    <IncludeSymbols>True</IncludeSymbols>\n    <SymbolPackageFormat>snupkg</SymbolPackageFormat>\n    <AssemblyName>OBD.NET</AssemblyName>\n    <RootNamespace>OBD.NET</RootNamespace>\n    <PackageId>OBD.NET</PackageId>\n  </PropertyGroup>\n\n\n  <PropertyGroup Condition=\"'$(TargetFramework)' == 'net5.0'\">\n    <DefineConstants>NET5_0;NETFULL</DefineConstants>\n  </PropertyGroup>\n\n  <PropertyGroup Condition=\"'$(TargetFramework)' == 'net6.0'\">\n    <DefineConstants>NET6_0;NETFULL</DefineConstants>\n  </PropertyGroup>\n\n  <PropertyGroup Condition=\"'$(TargetFramework)' == 'net4.8'\">\n    <DefineConstants>NET4_8;NETFULL</DefineConstants>\n  </PropertyGroup>\n\n  <PropertyGroup Condition=\"'$(Configuration)'=='Debug'\">\n    <DefineConstants>$(DefineConstants);TRACE;DEBUG</DefineConstants>\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n  </PropertyGroup>\n\n  <PropertyGroup Condition=\"'$(Configuration)' == 'Release'\">\n    <DefineConstants>$(DefineConstants);RELEASE</DefineConstants>\n    <DebugType>portable</DebugType>\n    <Optimize>true</Optimize>\n    <NoWarn>$(NoWarn);CS1591;CS1572;CS1573</NoWarn>\n  </PropertyGroup>\n\n  <ItemGroup Condition=\"'$(TargetFramework)' == 'net5.0'\">\n    <PackageReference Include=\"System.IO.Ports\" Version=\"5.0.1\" />\n  </ItemGroup>\n\n  <ItemGroup Condition=\"'$(TargetFramework)' == 'net6.0'\">\n    <PackageReference Include=\"System.IO.Ports\" Version=\"6.0.0\" />\n  </ItemGroup>\n\n</Project>\n"
  },
  {
    "path": "OBD.NET/OBD.NET/OBD.NET.csproj.DotSettings",
    "content": "﻿<wpf:ResourceDictionary xml:space=\"preserve\" xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" xmlns:s=\"clr-namespace:System;assembly=mscorlib\" xmlns:ss=\"urn:shemas-jetbrains-com:settings-storage-xaml\" xmlns:wpf=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\">\n\t<s:Boolean x:Key=\"/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=communication_005Ceventargs/@EntryIndexedValue\">True</s:Boolean>\n\t<s:Boolean x:Key=\"/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=events_005Ceventargs/@EntryIndexedValue\">True</s:Boolean>\n\t<s:Boolean x:Key=\"/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=obddata_005C00_002D1f/@EntryIndexedValue\">True</s:Boolean>\n\t<s:Boolean x:Key=\"/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=obddata_005C20_002D3f/@EntryIndexedValue\">True</s:Boolean>\n\t<s:Boolean x:Key=\"/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=obddata_005C40_002D5f/@EntryIndexedValue\">True</s:Boolean>\n\t<s:Boolean x:Key=\"/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=obddata_005C60_002D7f/@EntryIndexedValue\">True</s:Boolean>\n\t<s:Boolean x:Key=\"/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=obddata_005C80_002D9f/@EntryIndexedValue\">True</s:Boolean>\n\t<s:Boolean x:Key=\"/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=obddata_005Ca0_002Dbf/@EntryIndexedValue\">True</s:Boolean>\n\t<s:Boolean x:Key=\"/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=obddata_005Cc0_002Ddf/@EntryIndexedValue\">True</s:Boolean></wpf:ResourceDictionary>"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/00-1F/AuxiliaryInputStatus.cs",
    "content": "﻿namespace OBD.NET.OBDData;\n\npublic class AuxiliaryInputStatus : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public bool PowerTakeOffStatus => (A & (1 << 0)) != 0;\n\n    #endregion\n\n    #region Constructors\n\n    public AuxiliaryInputStatus()\n        : base(0x1E, 1)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => PowerTakeOffStatus.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/00-1F/CalculatedEngineLoad.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class CalculatedEngineLoad : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public new Percent Load => new(A / 2.55, 0, 100);\n\n    #endregion\n\n    #region Constructors\n\n    public CalculatedEngineLoad()\n        : base(0x04, 1)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Load.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/00-1F/CommandedSecondaryAirStatus.cs",
    "content": "﻿using System;\n\nnamespace OBD.NET.OBDData;\n\npublic class CommandedSecondaryAirStatus : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public CommandedSecondaryAirStatusValue Status => (CommandedSecondaryAirStatusValue)A;\n\n    #endregion\n\n    #region Constructors\n\n    public CommandedSecondaryAirStatus()\n        : base(0x12, 1)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Status.ToString();\n\n    #endregion\n\n    #region Enum\n\n    /// <summary>\n    /// https://en.wikipedia.org/wiki/OBD-II_PIDs#Mode_1_PID_12\n    /// </summary>\n    [Flags]\n    public enum CommandedSecondaryAirStatusValue\n    {\n        Missing = 0,\n        Upstream = 1 << 0,\n        DownstreamOfCatalyticConverter = 1 << 1,\n        FromTheOutsideAtmosphereOrOff = 1 << 2,\n        PumpCommandedOnForDiagnostics = 1 << 3\n    }\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/00-1F/EngineCoolantTemperature.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class EngineCoolantTemperature : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public DegreeCelsius Temperature => new(A - 40, -40, 215);\n\n    #endregion\n\n    #region Constructors\n\n    public EngineCoolantTemperature()\n        : base(0x05, 1)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Temperature.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/00-1F/EngineRPM.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class EngineRPM : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public RevolutionsPerMinute Rpm => new(((256 * A) + B) / 4.0, 0, 16383.75);\n\n    #endregion\n\n    #region Constructors\n\n    public EngineRPM()\n        : base(0x0C, 2)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Rpm.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/00-1F/FuelPressure.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class FuelPressure : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Kilopascal Pressure => new(3 * A, 0, 765);\n\n    #endregion\n\n    #region Constructors\n\n    public FuelPressure()\n        : base(0x0A, 1)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Pressure.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/00-1F/FuelSystemStatus.cs",
    "content": "﻿using System;\n\nnamespace OBD.NET.OBDData;\n\npublic class FuelSystemStatus : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public FuelSystemStatusValue StatusSystem1 => (FuelSystemStatusValue)A;\n    public FuelSystemStatusValue StatusSystem2 => (FuelSystemStatusValue)B;\n\n    #endregion\n\n    #region Constructors\n\n    public FuelSystemStatus()\n        : base(0x03, 2)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => StatusSystem1.ToString();\n\n    #endregion\n\n    #region Enums\n\n    /// <summary>\n    /// https://en.wikipedia.org/wiki/OBD-II_PIDs#Mode_1_PID_03\n    /// </summary>\n    [Flags]\n    public enum FuelSystemStatusValue\n    {\n        Missing = 0,\n        OpenLoopDueToInsufficientEngineTemperature = 1 << 0,\n        ClosedLoopUsingOxygenSensorFeedbackToDetermineFuelMix = 1 << 1,\n        OpenLoopDueToEngineLoadOrFuelCutDueToDeceleration = 1 << 2,\n        OpenLoopDueToSystemFailure = 1 << 3,\n        ClosedLoopUsingAtLeastOneOxygenSensorButThereIsAFaultInTheFeedbackSystem = 1 << 4\n    }\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/00-1F/IntakeAirTemperature.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class IntakeAirTemperature : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public DegreeCelsius Temperature => new(A - 40, -40, 215);\n\n    #endregion\n\n    #region Constructors\n\n    public IntakeAirTemperature()\n        : base(0x0F, 1)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Temperature.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/00-1F/IntakeManifoldAbsolutePressure.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class IntakeManifoldAbsolutePressure : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Kilopascal Pressure => new(A, 0, 255);\n\n    #endregion\n\n    #region Constructors\n\n    public IntakeManifoldAbsolutePressure()\n        : base(0x0B, 1)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Pressure.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/00-1F/LongTermFuelTrimBank1.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class LongTermFuelTrimBank1 : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Percent Trim => new((A / 1.28) - 100, -100, 99.2);\n\n    #endregion\n\n    #region Constructors\n\n    public LongTermFuelTrimBank1()\n        : base(0x07, 1)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Trim.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/00-1F/LongTermFuelTrimBank2.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class LongTermFuelTrimBank2 : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Percent Trim => new((A / 1.28) - 100, -100, 99.2);\n\n    #endregion\n\n    #region Constructors\n\n    public LongTermFuelTrimBank2()\n        : base(0x09, 1)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Trim.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/00-1F/MAFAirFlowRate.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class MAFAirFlowRate : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public GramPerSec Rate => new(((256 * A) + B) / 100.0, 0, 655.35);\n\n    #endregion\n\n    #region Constructors\n\n    public MAFAirFlowRate()\n        : base(0x10, 2)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Rate.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/00-1F/OBDStandards.cs",
    "content": "﻿namespace OBD.NET.OBDData;\n\npublic class OBDStandards : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public OBDStandard Standard => (OBDStandard)A;\n\n    #endregion\n\n    #region Constructors\n\n    public OBDStandards()\n        : base(0x1C, 1)\n    { }\n\n    #endregion\n\n    #region Enum\n\n    public enum OBDStandard\n    {\n        Missing = 0,\n        OBDII = 1,\n        OBD = 2,\n        OBD_OBDII = 3,\n        OBDI = 4,\n        NotOBDCompliant = 5,\n        EOBD = 6,\n        EOBD_OBDII = 7,\n        EOBD_OBD = 8,\n        EOBD_OBD_OBDII = 9,\n        JOBD = 10,\n        JOBD_OBDII = 11,\n        JOBD_EOBD = 12,\n        JOBD_EOBD_OBDII = 13,\n        EMD = 17,\n        EMDPlus = 18,\n        HDOBDC = 19,\n        HDOBD = 20,\n        WWHOBD = 21,\n        HDEOBDI = 23,\n        HDEOBDIN = 24,\n        HDEOBDII = 25,\n        HDEOBDIIN = 26,\n        OBDBr1 = 28,\n        OBDBr2 = 29,\n        KOBD = 30,\n        IOBDI = 31,\n        IOBDII = 32,\n        HDEOBDIV = 33\n    }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Standard.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/00-1F/OxygenSensor1FuelTrim.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class OxygenSensor1FuelTrim : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Volt Voltage => new(A / 200.0, 0, 1.275);\n    public Percent ShortTermFuelTrim => new((B / 1.28) - 100, -100, 99.2);\n    public bool IsSensorUsed => B != 0xFF;\n\n    #endregion\n\n    #region Constructors\n\n    public OxygenSensor1FuelTrim()\n        : base(0x14, 2)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => ShortTermFuelTrim.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/00-1F/OxygenSensor2FuelTrim.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class OxygenSensor2FuelTrim : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Volt Voltage => new(A / 200.0, 0, 1.275);\n    public Percent ShortTermFuelTrim => new((B / 1.28) - 100, -100, 99.2);\n    public bool IsSensorUsed => B != 0xFF;\n\n    #endregion\n\n    #region Constructors\n\n    public OxygenSensor2FuelTrim()\n        : base(0x15, 2)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => ShortTermFuelTrim.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/00-1F/OxygenSensor3FuelTrim.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class OxygenSensor3FuelTrim : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Volt Voltage => new(A / 200.0, 0, 1.275);\n    public Percent ShortTermFuelTrim => new((B / 1.28) - 100, -100, 99.2);\n    public bool IsSensorUsed => B != 0xFF;\n\n    #endregion\n\n    #region Constructors\n\n    public OxygenSensor3FuelTrim()\n        : base(0x16, 2)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => ShortTermFuelTrim.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/00-1F/OxygenSensor4FuelTrim.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class OxygenSensor4FuelTrim : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Volt Voltage => new(A / 200.0, 0, 1.275);\n    public Percent ShortTermFuelTrim => new((B / 1.28) - 100, -100, 99.2);\n    public bool IsSensorUsed => B != 0xFF;\n\n    #endregion\n\n    #region Constructors\n\n    public OxygenSensor4FuelTrim()\n        : base(0x17, 2)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => ShortTermFuelTrim.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/00-1F/OxygenSensor5FuelTrim.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class OxygenSensor5FuelTrim : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Volt Voltage => new(A / 200.0, 0, 1.275);\n    public Percent ShortTermFuelTrim => new((B / 1.28) - 100, -100, 99.2);\n    public bool IsSensorUsed => B != 0xFF;\n\n    #endregion\n\n    #region Constructors\n\n    public OxygenSensor5FuelTrim()\n        : base(0x18, 2)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => ShortTermFuelTrim.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/00-1F/OxygenSensor6FuelTrim.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class OxygenSensor6FuelTrim : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Volt Voltage => new(A / 200.0, 0, 1.275);\n    public Percent ShortTermFuelTrim => new((B / 1.28) - 100, -100, 99.2);\n    public bool IsSensorUsed => B != 0xFF;\n\n    #endregion\n\n    #region Constructors\n\n    public OxygenSensor6FuelTrim()\n        : base(0x19, 2)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => ShortTermFuelTrim.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/00-1F/OxygenSensor7FuelTrim.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class OxygenSensor7FuelTrim : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Volt Voltage => new(A / 200.0, 0, 1.275);\n    public Percent ShortTermFuelTrim => new((B / 1.28) - 100, -100, 99.2);\n    public bool IsSensorUsed => B != 0xFF;\n\n    #endregion\n\n    #region Constructors\n\n    public OxygenSensor7FuelTrim()\n        : base(0x1A, 2)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => ShortTermFuelTrim.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/00-1F/OxygenSensor8FuelTrim.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class OxygenSensor8FuelTrim : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Volt Voltage => new(A / 200.0, 0, 1.275);\n    public Percent ShortTermFuelTrim => new((B / 1.28) - 100, -100, 99.2);\n    public bool IsSensorUsed => B != 0xFF;\n\n    #endregion\n\n    #region Constructors\n\n    public OxygenSensor8FuelTrim()\n        : base(0x1B, 2)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => ShortTermFuelTrim.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/00-1F/OxygenSensorPresent.cs",
    "content": "﻿using System;\n\nnamespace OBD.NET.OBDData;\n\npublic class OxygenSensorPresent : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public bool IsSensor1Present => (A & (1 << 0)) != 0;\n    public bool IsSensor2Present => (A & (1 << 1)) != 0;\n    public bool IsSensor3Present => (A & (1 << 2)) != 0;\n    public bool IsSensor4Present => (A & (1 << 3)) != 0;\n    public bool IsSensor5Present => (A & (1 << 4)) != 0;\n    public bool IsSensor6Present => (A & (1 << 5)) != 0;\n    public bool IsSensor7Present => (A & (1 << 6)) != 0;\n    public bool IsSensor8Present => (A & (1 << 7)) != 0;\n\n    #endregion\n\n    #region Constructors\n\n    public OxygenSensorPresent()\n        : base(0x13, 1)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Convert.ToString(A, 2);\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/00-1F/OxygenSensorsPresent2.cs",
    "content": "﻿using System;\n\nnamespace OBD.NET.OBDData;\n\npublic class OxygenSensorPresent2 : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public bool IsSensor1Present => (A & (1 << 0)) != 0;\n    public bool IsSensor2Present => (A & (1 << 1)) != 0;\n    public bool IsSensor3Present => (A & (1 << 2)) != 0;\n    public bool IsSensor4Present => (A & (1 << 3)) != 0;\n    public bool IsSensor5Present => (A & (1 << 4)) != 0;\n    public bool IsSensor6Present => (A & (1 << 5)) != 0;\n    public bool IsSensor7Present => (A & (1 << 6)) != 0;\n    public bool IsSensor8Present => (A & (1 << 7)) != 0;\n\n    #endregion\n\n    #region Constructors\n\n    public OxygenSensorPresent2()\n        : base(0x1D, 1)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Convert.ToString(A, 2);\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/00-1F/PidsSupported01_20.cs",
    "content": "﻿namespace OBD.NET.OBDData;\n\npublic class PidsSupported01_20 : AbstractPidsSupported\n{\n    #region Constructors\n\n    public PidsSupported01_20()\n        : base(0x00, 4)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => string.Join(\",\", SupportedPids);\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/00-1F/RunTimeSinceEngineStart.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class RunTimeSinceEngineStart : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Second Runtime => new((256 * A) + B, 0, 65535);\n\n    #endregion\n\n    #region Constructors\n\n    public RunTimeSinceEngineStart()\n        : base(0x1F, 2)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Runtime.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/00-1F/ShortTermFuelTrimBank1.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class ShortTermFuelTrimBank1 : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Percent Trim => new((A / 1.28) - 100, -100, 99.2);\n\n    #endregion\n\n    #region Constructors\n\n    public ShortTermFuelTrimBank1()\n        : base(0x06, 1)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Trim.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/00-1F/ShortTermFuelTrimBank2.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class ShortTermFuelTrimBank2 : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Percent Trim => new((A / 1.28) - 100, -100, 99.2);\n\n    #endregion\n\n    #region Constructors\n\n    public ShortTermFuelTrimBank2()\n        : base(0x08, 1)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Trim.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/00-1F/ThrottlePosition.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class ThrottlePosition : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Percent Position => new(A / 2.55, 0, 100);\n\n    #endregion\n\n    #region Constructors\n\n    public ThrottlePosition()\n        : base(0x11, 1)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Position.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/00-1F/TimingAdvance.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class TimingAdvance : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Degree Timing => new((A / 2.0) - 64, -64, 63.5);\n\n    #endregion\n\n    #region Constructors\n\n    public TimingAdvance()\n        : base(0x0E, 1)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Timing.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/00-1F/VehicleSpeed.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class VehicleSpeed : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public KilometrePerHour Speed => new(A, 0, 255);\n\n    #endregion\n\n    #region Constructors\n\n    public VehicleSpeed()\n        : base(0x0D, 1)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Speed.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/20-3F/AbsoluteBarometricPressure.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class AbsoluteBarometricPressure : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Kilopascal Pressure => new(A, 0, 255);\n\n    #endregion\n\n    #region Constructors\n\n    public AbsoluteBarometricPressure()\n        : base(0x33, 1)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Pressure.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/20-3F/CatalystTemperatureBank1Sensor1.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class CatalystTemperatureBank1Sensor1 : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public DegreeCelsius Temperature => new((((256 * A) + B) / 10.0) - 40, -40, 6513.5);\n\n    #endregion\n\n    #region Constructors\n\n    public CatalystTemperatureBank1Sensor1()\n        : base(0x3C, 2)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Temperature.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/20-3F/CatalystTemperatureBank1Sensor2.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class CatalystTemperatureBank1Sensor2 : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public DegreeCelsius Temperature => new((((256 * A) + B) / 10.0) - 40, -40, 6513.5);\n\n    #endregion\n\n    #region Constructors\n\n    public CatalystTemperatureBank1Sensor2()\n        : base(0x3D, 2)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Temperature.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/20-3F/CatalystTemperatureBank2Sensor1.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class CatalystTemperatureBank2Sensor1 : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public DegreeCelsius Temperature => new((((256 * A) + B) / 10.0) - 40, -40, 6513.5);\n\n    #endregion\n\n    #region Constructors\n\n    public CatalystTemperatureBank2Sensor1()\n        : base(0x3E, 2)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Temperature.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/20-3F/CatalystTemperatureBank2Sensor2.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class CatalystTemperatureBank2Sensor2 : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public DegreeCelsius Temperature => new((((256 * A) + B) / 10.0) - 40, -40, 6513.5);\n\n    #endregion\n\n    #region Constructors\n\n    public CatalystTemperatureBank2Sensor2()\n        : base(0x3F, 2)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Temperature.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/20-3F/CommandedEGR.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class CommandedEGR : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Percent EGR => new(A / 2.55, 0, 100);\n\n    #endregion\n\n    #region Constructors\n\n    public CommandedEGR()\n        : base(0x2C, 1)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => EGR.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/20-3F/CommandedEvaporativePurge.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class CommandedEvaporativePurge : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Percent Purge => new(A / 2.55, 0, 100);\n\n    #endregion\n\n    #region Constructors\n\n    public CommandedEvaporativePurge()\n        : base(0x2E, 1)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Purge.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/20-3F/DistanceTraveledSinceCodesCleared.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class DistanceTraveledSinceCodesCleared : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Kilometre Distance => new((256 * A) + B, 0, 65535);\n\n    #endregion\n\n    #region Constructors\n\n    public DistanceTraveledSinceCodesCleared()\n        : base(0x31, 2)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Distance.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/20-3F/DistanceTraveledWithMILOn.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class DistanceTraveledWithMILOn : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Kilometre Distance => new((256 * A) + B, 0, 65535);\n\n    #endregion\n\n    #region Constructors\n\n    public DistanceTraveledWithMILOn()\n        : base(0x21, 2)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Distance.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/20-3F/EGRError.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class EGRError : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Percent Error => new((A / 1.28) - 100, -100, 99.2);\n\n    #endregion\n\n    #region Constructors\n\n    public EGRError()\n        : base(0x2D, 1)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Error.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/20-3F/EvapSystemVaporPressure.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class EvapSystemVaporPressure : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Pascal Pressure => new(((256 * A) + B) / 4.0, -8192, 8191.75);\n\n    #endregion\n\n    #region Constructors\n\n    public EvapSystemVaporPressure()\n        : base(0x32, 2)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Pressure.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/20-3F/FuelRailGaugePressure.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class FuelRailGaugePressure : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Kilopascal Pressure => new(10 * ((256 * A) + B), 0, 655350);\n\n    #endregion\n\n    #region Constructors\n\n    public FuelRailGaugePressure()\n        : base(0x23, 2)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Pressure.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/20-3F/FuelRailPressure.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class FuelRailPressure : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Kilopascal Pressure => new(0.079 * ((256 * A) + B), 0, 5177.265);\n\n    #endregion\n\n    #region Constructors\n\n    public FuelRailPressure()\n        : base(0x22, 2)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Pressure.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/20-3F/FuelTankLevelInput.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class FuelTankLevelInput : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Percent Level => new(A / 2.55, 0, 100);\n\n    #endregion\n\n    #region Constructors\n\n    public FuelTankLevelInput()\n        : base(0x2F, 1)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Level.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/20-3F/OxygenSensor1FuelAir.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class OxygenSensor1FuelAir : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Ratio FuelAirEquivalenceRatio => new((2.0 / 25536.0) * ((256 * A) + B), 0, 2 - double.Epsilon);\n    public Volt Voltage => new((80 / 25536.0) * ((256 * C) + D), 0, 8 - double.Epsilon);\n\n    #endregion\n\n    #region Constructors\n\n    public OxygenSensor1FuelAir()\n        : base(0x24, 4)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => FuelAirEquivalenceRatio.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/20-3F/OxygenSensor1FuelAir2.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class OxygenSensor1FuelAir2 : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Ratio FuelAirEquivalenceRatio => new((2.0 / 25536.0) * ((256 * A) + B), 0, 2 - double.Epsilon);\n    public Milliampere Current => new((C + (D / 256.0)) - 128, -128, 128 - double.Epsilon);\n\n    #endregion\n\n    #region Constructors\n\n    public OxygenSensor1FuelAir2()\n        : base(0x34, 4)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => FuelAirEquivalenceRatio.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/20-3F/OxygenSensor2FuelAir.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class OxygenSensor2FuelAir : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Ratio FuelAirEquivalenceRatio => new((2.0 / 25536.0) * ((256 * A) + B), 0, 2 - double.Epsilon);\n    public Volt Voltage => new((80 / 25536.0) * ((256 * C) + D), 0, 8 - double.Epsilon);\n\n    #endregion\n\n    #region Constructors\n\n    public OxygenSensor2FuelAir()\n        : base(0x25, 4)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => FuelAirEquivalenceRatio.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/20-3F/OxygenSensor2FuelAir2.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class OxygenSensor2FuelAir2 : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Ratio FuelAirEquivalenceRatio => new((2.0 / 25536.0) * ((256 * A) + B), 0, 2 - double.Epsilon);\n    public Milliampere Current => new((C + (D / 256.0)) - 128, -128, 128 - double.Epsilon);\n\n    #endregion\n\n    #region Constructors\n\n    public OxygenSensor2FuelAir2()\n        : base(0x35, 4)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => FuelAirEquivalenceRatio.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/20-3F/OxygenSensor3FuelAir.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class OxygenSensor3FuelAir : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Ratio FuelAirEquivalenceRatio => new((2.0 / 25536.0) * ((256 * A) + B), 0, 2 - double.Epsilon);\n    public Volt Voltage => new((80 / 25536.0) * ((256 * C) + D), 0, 8 - double.Epsilon);\n\n    #endregion\n\n    #region Constructors\n\n    public OxygenSensor3FuelAir()\n        : base(0x26, 4)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => FuelAirEquivalenceRatio.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/20-3F/OxygenSensor3FuelAir2.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class OxygenSensor3FuelAir2 : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Ratio FuelAirEquivalenceRatio => new((2.0 / 25536.0) * ((256 * A) + B), 0, 2 - double.Epsilon);\n    public Milliampere Current => new((C + (D / 256.0)) - 128, -128, 128 - double.Epsilon);\n\n    #endregion\n\n    #region Constructors\n\n    public OxygenSensor3FuelAir2()\n        : base(0x36, 4)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => FuelAirEquivalenceRatio.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/20-3F/OxygenSensor4FuelAir.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class OxygenSensor4FuelAir : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Ratio FuelAirEquivalenceRatio => new((2.0 / 25536.0) * ((256 * A) + B), 0, 2 - double.Epsilon);\n    public Volt Voltage => new((80 / 25536.0) * ((256 * C) + D), 0, 8 - double.Epsilon);\n\n    #endregion\n\n    #region Constructors\n\n    public OxygenSensor4FuelAir()\n        : base(0x27, 4)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => FuelAirEquivalenceRatio.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/20-3F/OxygenSensor4FuelAir2.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class OxygenSensor4FuelAir2 : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Ratio FuelAirEquivalenceRatio => new((2.0 / 25536.0) * ((256 * A) + B), 0, 2 - double.Epsilon);\n    public Milliampere Current => new((C + (D / 256.0)) - 128, -128, 128 - double.Epsilon);\n\n    #endregion\n\n    #region Constructors\n\n    public OxygenSensor4FuelAir2()\n        : base(0x37, 4)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => FuelAirEquivalenceRatio.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/20-3F/OxygenSensor5FuelAir.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class OxygenSensor5FuelAir : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Ratio FuelAirEquivalenceRatio => new((2.0 / 25536.0) * ((256 * A) + B), 0, 2 - double.Epsilon);\n    public Volt Voltage => new((80 / 25536.0) * ((256 * C) + D), 0, 8 - double.Epsilon);\n\n    #endregion\n\n    #region Constructors\n\n    public OxygenSensor5FuelAir()\n        : base(0x28, 4)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => FuelAirEquivalenceRatio.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/20-3F/OxygenSensor5FuelAir2.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class OxygenSensor5FuelAir2 : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Ratio FuelAirEquivalenceRatio => new((2.0 / 25536.0) * ((256 * A) + B), 0, 2 - double.Epsilon);\n    public Milliampere Current => new((C + (D / 256.0)) - 128, -128, 128 - double.Epsilon);\n\n    #endregion\n\n    #region Constructors\n\n    public OxygenSensor5FuelAir2()\n        : base(0x38, 4)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => FuelAirEquivalenceRatio.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/20-3F/OxygenSensor6FuelAir.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class OxygenSensor6FuelAir : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Ratio FuelAirEquivalenceRatio => new((2.0 / 25536.0) * ((256 * A) + B), 0, 2 - double.Epsilon);\n    public Volt Voltage => new((80 / 25536.0) * ((256 * C) + D), 0, 8 - double.Epsilon);\n\n    #endregion\n\n    #region Constructors\n\n    public OxygenSensor6FuelAir()\n        : base(0x29, 4)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => FuelAirEquivalenceRatio.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/20-3F/OxygenSensor6FuelAir2.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class OxygenSensor6FuelAir2 : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Ratio FuelAirEquivalenceRatio => new((2.0 / 25536.0) * ((256 * A) + B), 0, 2 - double.Epsilon);\n    public Milliampere Current => new((C + (D / 256.0)) - 128, -128, 128 - double.Epsilon);\n\n    #endregion\n\n    #region Constructors\n\n    public OxygenSensor6FuelAir2()\n        : base(0x39, 4)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => FuelAirEquivalenceRatio.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/20-3F/OxygenSensor7FuelAir.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class OxygenSensor7FuelAir : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Ratio FuelAirEquivalenceRatio => new((2.0 / 25536.0) * ((256 * A) + B), 0, 2 - double.Epsilon);\n    public Volt Voltage => new((80 / 25536.0) * ((256 * C) + D), 0, 8 - double.Epsilon);\n\n    #endregion\n\n    #region Constructors\n\n    public OxygenSensor7FuelAir()\n        : base(0x2A, 4)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => FuelAirEquivalenceRatio.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/20-3F/OxygenSensor7FuelAir2.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class OxygenSensor7FuelAir2 : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Ratio FuelAirEquivalenceRatio => new((2.0 / 25536.0) * ((256 * A) + B), 0, 2 - double.Epsilon);\n    public Milliampere Current => new((C + (D / 256.0)) - 128, -128, 128 - double.Epsilon);\n\n    #endregion\n\n    #region Constructors\n\n    public OxygenSensor7FuelAir2()\n        : base(0x3A, 4)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => FuelAirEquivalenceRatio.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/20-3F/OxygenSensor8FuelAir.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class OxygenSensor8FuelAir : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Ratio FuelAirEquivalenceRatio => new((2.0 / 25536.0) * ((256 * A) + B), 0, 2 - double.Epsilon);\n    public Volt Voltage => new((80 / 25536.0) * ((256 * C) + D), 0, 8 - double.Epsilon);\n\n    #endregion\n\n    #region Constructors\n\n    public OxygenSensor8FuelAir()\n        : base(0x2B, 4)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => FuelAirEquivalenceRatio.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/20-3F/OxygenSensor8FuelAir2.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class OxygenSensor8FuelAir2 : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Ratio FuelAirEquivalenceRatio => new((2.0 / 25536.0) * ((256 * A) + B), 0, 2 - double.Epsilon);\n    public Milliampere Current => new((C + (D / 256.0)) - 128, -128, 128 - double.Epsilon);\n\n    #endregion\n\n    #region Constructors\n\n    public OxygenSensor8FuelAir2()\n        : base(0x3B, 4)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => FuelAirEquivalenceRatio.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/20-3F/PidsSupported21_40.cs",
    "content": "﻿namespace OBD.NET.OBDData;\n\npublic class PidsSupported21_40 : AbstractPidsSupported\n{\n    #region Constructors\n\n    public PidsSupported21_40()\n        : base(0x20, 4)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => string.Join(\",\", SupportedPids);\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/20-3F/WarmUpsSinceCodesCleared.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class WarmUpsSinceCodesCleared : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Count WarmUps => new(A, 0, 255);\n\n    #endregion\n\n    #region Constructors\n\n    public WarmUpsSinceCodesCleared()\n        : base(0x30, 1)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => WarmUps.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/40-5F/AbsoluteEvapSystemVaporPressure.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class AbsoluteEvapSystemVaporPressure : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Kilopascal Pressure => new(((256 * A) + B) / 200.0, 0, 327.675);\n\n    #endregion\n\n    #region Constructors\n\n    public AbsoluteEvapSystemVaporPressure()\n        : base(0x53, 2)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Pressure.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/40-5F/AbsoluteLoadValue.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class AbsoluteLoadValue : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public new Percent Load => new(((256 * A) + B) / 2.55, 0, 25700);\n\n    #endregion\n\n    #region Constructors\n\n    public AbsoluteLoadValue()\n        : base(0x43, 2)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Load.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/40-5F/AbsoluteThrottlePositionB.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class AbsoluteThrottlePositionB : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Percent Position => new(A / 2.55, 0, 100);\n\n    #endregion\n\n    #region Constructors\n\n    public AbsoluteThrottlePositionB()\n        : base(0x47, 1)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Position.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/40-5F/AbsoluteThrottlePositionC.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class AbsoluteThrottlePositionC : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Percent Position => new(A / 2.55, 0, 100);\n\n    #endregion\n\n    #region Constructors\n\n    public AbsoluteThrottlePositionC()\n        : base(0x48, 1)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Position.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/40-5F/AcceleratorPedalPositionD.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class AcceleratorPedalPositionD : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Percent Position => new(A / 2.55, 0, 100);\n\n    #endregion\n\n    #region Constructors\n\n    public AcceleratorPedalPositionD()\n        : base(0x49, 1)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Position.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/40-5F/AcceleratorPedalPositionE.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class AcceleratorPedalPositionE : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Percent Position => new(A / 2.55, 0, 100);\n\n    #endregion\n\n    #region Constructors\n\n    public AcceleratorPedalPositionE()\n        : base(0x4A, 1)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Position.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/40-5F/AcceleratorPedalPositionF.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class AcceleratorPedalPositionF : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Percent Position => new(A / 2.55, 0, 100);\n\n    #endregion\n\n    #region Constructors\n\n    public AcceleratorPedalPositionF()\n        : base(0x4B, 1)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Position.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/40-5F/AmbientAirTemperature.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class AmbientAirTemperature : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public DegreeCelsius Temperature => new(A - 40, -40, 215);\n\n    #endregion\n\n    #region Constructors\n\n    public AmbientAirTemperature()\n        : base(0x46, 1)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Temperature.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/40-5F/CommandedThrottleActuator.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class CommandedThrottleActuator : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Percent Value => new(A / 2.55, 0, 100);\n\n    #endregion\n\n    #region Constructors\n\n    public CommandedThrottleActuator()\n        : base(0x4C, 1)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Value.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/40-5F/ControlModuleVoltage.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class ControlModuleVoltage : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Volt Voltage => new(((256 * A) + B) / 1000.0, 0, 65.535);\n\n    #endregion\n\n    #region Constructors\n\n    public ControlModuleVoltage()\n        : base(0x42, 2)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Voltage.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/40-5F/EngineFuelRate.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class EngineFuelRate : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public LitresPerHour FuelRate => new(((256 * A) + B) / 20.0, 0, 3212.75);\n\n    #endregion\n\n    #region Constructors\n\n    public EngineFuelRate()\n        : base(0x5E, 2)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => FuelRate.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/40-5F/EngineOilTemperature.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class EngineOilTemperature : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public DegreeCelsius Temperature => new(A - 40, -40, 210);\n\n    #endregion\n\n    #region Constructors\n\n    public EngineOilTemperature()\n        : base(0x5C, 1)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Temperature.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/40-5F/EthanolFuel.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class EthanolFuel : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Percent Value => new(A / 2.55, 0, 100);\n\n    #endregion\n\n    #region Constructors\n\n    public EthanolFuel()\n        : base(0x52, 1)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Value.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/40-5F/EvapSystemVaporPressure2.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class EvapSystemVaporPressure2 : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Pascal Pressure => new(((A * 256) + B) - 32767, -32767, 32768);\n\n    #endregion\n\n    #region Constructors\n\n    public EvapSystemVaporPressure2()\n        : base(0x54, 2)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Pressure.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/40-5F/FuelAirCommandedEquivalenceRatio.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class FuelAirCommandedEquivalenceRatio : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Ratio Ratio => new((2.0 / 65536.0) * ((256 * A) + B), 0, 2.0 - double.Epsilon);\n\n    #endregion\n\n    #region Constructors\n\n    public FuelAirCommandedEquivalenceRatio()\n        : base(0x44, 2)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Ratio.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/40-5F/FuelInjectionTiming.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class FuelInjectionTiming : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Degree Timing => new((((256 * A) + B) / 128.0) - 210, -210, 301.992);\n\n    #endregion\n\n    #region Constructors\n\n    public FuelInjectionTiming()\n        : base(0x5D, 2)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Timing.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/40-5F/FuelRailAbsolutePressure.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class FuelRailAbsolutePressure : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Kilopascal Pressure => new(10 * ((256 * A) + B), 0, 655350);\n\n    #endregion\n\n    #region Constructors\n\n    public FuelRailAbsolutePressure()\n        : base(0x59, 2)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Pressure.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/40-5F/FuelType.cs",
    "content": "﻿namespace OBD.NET.OBDData;\n\npublic class FuelType : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public FuelTypeValue Type => (FuelTypeValue)A;\n\n    #endregion\n\n    #region Constructors\n\n    public FuelType()\n        : base(0x51, 1)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Type.ToString();\n\n    #endregion\n\n    #region Enum\n\n    public enum FuelTypeValue\n    {\n        NotAvailable = 0,\n        Gasoline = 1,\n        Methanol = 2,\n        Ethanol = 3,\n        Diesel = 4,\n        LPG = 5,\n        CNG = 6,\n        Propane = 7,\n        Electric = 8,\n        BifuelGasoline = 9,\n        BifuelMethanol = 10,\n        BifuelEthanol = 11,\n        BifuelLPG = 12,\n        BifuelCNG = 13,\n        BifuelPropane = 14,\n        BifuelElectricity = 15,\n        BifuelElectricAndCombustionEngine = 16,\n        HybridGasoline = 17,\n        HybridEthanol = 18,\n        HybridDiesel = 19,\n        HybridElectric = 20,\n        HybridElectricAndCombustionEngine = 21,\n        HybridRegenerative = 22,\n        BifuelDiesel = 23\n    }\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/40-5F/HybridBatteryPackRemainingLife.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class HybridBatteryPackRemainingLife : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Percent RemainingLife => new(A / 2.55, 0, 100);\n\n    #endregion\n\n    #region Constructors\n\n    public HybridBatteryPackRemainingLife()\n        : base(0x5B, 1)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => RemainingLife.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/40-5F/LongTermSecondaryOxygenSensorTrimBank13.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class LongtTermSecondaryOxygenSensorTrimBank13 : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Percent Bank1 => new((A / 1.28) - 100, -100, 99.2);\n    public Percent Bank3 => new((B / 1.28) - 100, -100, 99.2);\n\n    #endregion\n\n    #region Constructors\n\n    public LongtTermSecondaryOxygenSensorTrimBank13()\n        : base(0x56, 2)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Bank1.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/40-5F/LongTermSecondaryOxygenSensorTrimBank24.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class LongTermSecondaryOxygenSensorTrimBank24 : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Percent Bank2 => new((A / 1.28) - 100, -100, 99.2);\n    public Percent Bank4 => new((B / 1.28) - 100, -100, 99.2);\n\n    #endregion\n\n    #region Constructors\n\n    public LongTermSecondaryOxygenSensorTrimBank24()\n        : base(0x58, 2)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Bank2.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/40-5F/MaximumValueForAirFlowRate.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class MaximumValueForAirFlowRate : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public GramPerSec Value => new(A * 10, 0, 2550);\n\n    #endregion\n\n    #region Constructors\n\n    public MaximumValueForAirFlowRate()\n        : base(0x50, 4)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Value.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/40-5F/MaximumValues.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class MaximumValues : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Ratio FuelAirEquivalenceRatio => new(A, 0, 255);\n    public Volt OxygenSensorVoltage => new(B, 0, 255);\n    public Milliampere OxygenSensorCurrent => new(C, 0, 255);\n    public Kilopascal IntakeManifoldAbsolutePressure => new(D * 10, 0, 2550);\n\n    #endregion\n\n    #region Constructors\n\n    public MaximumValues()\n        : base(0x4F, 4)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => FuelAirEquivalenceRatio.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/40-5F/MonitorStatusThisDriveCycle.cs",
    "content": "﻿namespace OBD.NET.OBDData;\n\npublic class MonitorStatusThisDriveCycle : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public bool IsComponentsTestAvailable => (B & (1 << 3)) != 0;\n    public bool IsComponentsTestComplete => (B & (1 << 7)) == 0;\n\n    public bool IsFuelSystemTestAvailable => (B & (1 << 1)) != 0;\n    public bool IsFuelSystemTestComplete => (B & (1 << 5)) == 0;\n\n    public bool IsMisfireTestAvailable => (B & (1 << 0)) != 0;\n    public bool IsMisfireTestComplete => (B & (1 << 4)) == 0;\n\n    public bool IsEGRSystemTestAvailable => (C & (1 << 7)) != 0;\n    public bool IsEGRSystemTestComplete => (D & (1 << 7)) == 0;\n\n    public bool IsOxygenSensorHeaterTestAvailable => (C & (1 << 6)) != 0;\n    public bool IsOxygenSensorHeaterTestComplete => (D & (1 << 6)) == 0;\n\n    public bool IsOxygenSensorTestAvailable => (C & (1 << 5)) != 0;\n    public bool IsOxygenSensorTestComplete => (D & (1 << 5)) == 0;\n\n    public bool IsACRefrigerantTestAvailable => (C & (1 << 4)) != 0;\n    public bool IsACRefrigerantTestComplete => (D & (1 << 4)) == 0;\n\n    public bool IsSecondaryAirSystemTestAvailable => (C & (1 << 3)) != 0;\n    public bool IsSecondaryAirSystemTestComplete => (D & (1 << 3)) == 0;\n\n    public bool IsEvaporativeSystemTestAvailable => (C & (1 << 2)) != 0;\n    public bool IsEvaporativeSystemTestComplete => (D & (1 << 2)) == 0;\n\n    public bool IsHeatedCatalystTestAvailable => (C & (1 << 1)) != 0;\n    public bool IsHeatedCatalystTestComplete => (D & (1 << 1)) == 0;\n\n    public bool IsCatalystAvailable => (C & (1 << 0)) != 0;\n    public bool IsCatalystComplete => (D & (1 << 0)) == 0;\n\n    #endregion\n\n    #region Constructors\n\n    public MonitorStatusThisDriveCycle()\n        : base(0x41, 4)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => string.Empty;\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/40-5F/PidsSupported41_60.cs",
    "content": "﻿namespace OBD.NET.OBDData;\n\npublic class PidsSupported41_60 : AbstractPidsSupported\n{\n    #region Constructors\n\n    public PidsSupported41_60()\n        : base(0x40, 4)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => string.Join(\",\", SupportedPids);\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/40-5F/RelativeAcceleratorPedalPosition.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class RelativeAcceleratorPedalPosition : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Percent PedalPosition => new(A / 2.55, 0, 100);\n\n    #endregion\n\n    #region Constructors\n\n    public RelativeAcceleratorPedalPosition()\n        : base(0x5A, 1)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => PedalPosition.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/40-5F/RelativeThrottlePosition.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class RelativeThrottlePosition : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Percent Position => new(A / 2.55, 0, 100);\n\n    #endregion\n\n    #region Constructors\n\n    public RelativeThrottlePosition()\n        : base(0x45, 1)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Position.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/40-5F/ShortTermSecondaryOxygenSensorTrimBank13.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class ShortTermSecondaryOxygenSensorTrimBank13 : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Percent Bank1 => new((A / 1.28) - 100, -100, 99.2);\n    public Percent Bank3 => new((B / 1.28) - 100, -100, 99.2);\n\n    #endregion\n\n    #region Constructors\n\n    public ShortTermSecondaryOxygenSensorTrimBank13()\n        : base(0x55, 2)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Bank1.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/40-5F/ShortTermSecondaryOxygenSensorTrimBank24.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class ShortTermSecondaryOxygenSensorTrimBank24 : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Percent Bank2 => new((A / 1.28) - 100, -100, 99.2);\n    public Percent Bank4 => new((B / 1.28) - 100, -100, 99.2);\n\n    #endregion\n\n    #region Constructors\n\n    public ShortTermSecondaryOxygenSensorTrimBank24()\n        : base(0x57, 2)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Bank2.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/40-5F/TimeRunWithMILOn.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class TimeRunWithMILOn : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Minute Time => new((256 * A) + B, 0, 65535);\n\n    #endregion\n\n    #region Constructors\n\n    public TimeRunWithMILOn()\n        : base(0x4D, 2)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Time.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/40-5F/TimeSinceTroubleCodesCleared.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class TimeSinceTroubleCodesCleared : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Minute Time => new((256 * A) + B, 0, 65535);\n\n    #endregion\n\n    #region Constructors\n\n    public TimeSinceTroubleCodesCleared()\n        : base(0x4E, 2)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Time.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/60-7F/ActualEnginePercentTorque.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class ActualEnginePercentTorque : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Percent Torque => new(A - 125, -125, 125);\n\n    #endregion\n\n    #region Constructors\n\n    public ActualEnginePercentTorque()\n        : base(0x62, 1)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Torque.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/60-7F/DriversDemandEnginePercentTorque.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class DriversDemandEnginePercentTorque : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Percent Torque => new(A - 125, -125, 125);\n\n    #endregion\n\n    #region Constructors\n\n    public DriversDemandEnginePercentTorque()\n        : base(0x61, 1)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Torque.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/60-7F/EngineCoolantTemperatureSensor.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class EngineCoolantTemperatureSensor : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public int SensorsSupported => A;\n    public DegreeCelsius Sensor1 => new(B - 40, -40, 215);\n    public DegreeCelsius Sensor2 => new(C - 40, -40, 215);\n\n    #endregion\n\n    #region Constructors\n\n    public EngineCoolantTemperatureSensor()\n        : base(0x67, 3)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Sensor1.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/60-7F/EnginePercentTorqueData.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class EnginePercentTorqueData : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public Percent Idle => new(A - 125, -125, 125);\n    public Percent EnginePoint1 => new(B - 125, -125, 125);\n    public Percent EnginePoint2 => new(C - 125, -125, 125);\n    public Percent EnginePoint3 => new(D - 125, -125, 125);\n    public Percent EnginePoint4 => new(E - 125, -125, 125);\n\n    #endregion\n\n    #region Constructors\n\n    public EnginePercentTorqueData()\n        : base(0x64, 5)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Idle.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/60-7F/EngineReferenceTorque.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class EngineReferenceTorque : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public NewtonMetre Torque => new((256 * A) + B, 0, 65535);\n\n    #endregion\n\n    #region Constructors\n\n    public EngineReferenceTorque()\n        : base(0x63, 2)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Torque.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/60-7F/IntakeAirTemperatureSensor.cs",
    "content": "﻿using OBD.NET.DataTypes;\n\nnamespace OBD.NET.OBDData;\n\npublic class IntakeAirTemperatureSensor : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public int SensorsSupported => A;\n    public DegreeCelsius Bank1Sensor1 => new(B - 40, -40, 215);\n    public DegreeCelsius Bank1Sensor2 => new(C - 40, -40, 215);\n    public DegreeCelsius Bank1Sensor3 => new(D - 40, -40, 215);\n    public DegreeCelsius Bank2Sensor1 => new(E - 40, -40, 215);\n    public DegreeCelsius Bank2Sensor2 => new(RawData[5] - 40, -40, 215);\n    public DegreeCelsius Bank2Sensor3 => new(RawData[6] - 40, -40, 215);\n\n    #endregion\n\n    #region Constructors\n\n    public IntakeAirTemperatureSensor()\n        : base(0x68, 7)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => Bank1Sensor1.ToString();\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/60-7F/PidsSupported61_80.cs",
    "content": "﻿namespace OBD.NET.OBDData;\n\npublic class PidsSupported61_80 : AbstractPidsSupported\n{\n    #region Constructors\n\n    public PidsSupported61_80()\n        : base(0x60, 4)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => string.Join(\",\", SupportedPids);\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/80-9F/PidsSupported81_A0.cs",
    "content": "﻿namespace OBD.NET.OBDData;\n\npublic class PidsSupported81_A0 : AbstractPidsSupported\n{\n    #region Constructors\n\n    public PidsSupported81_A0()\n        : base(0x80, 4)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => string.Join(\",\", SupportedPids);\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/A0-BF/PidsSupportedA1_C0.cs",
    "content": "﻿namespace OBD.NET.OBDData;\n\npublic class PidsSupportedA1_C0 : AbstractPidsSupported\n{\n    #region Constructors\n\n    public PidsSupportedA1_C0()\n        : base(0xA0, 4)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => string.Join(\",\", SupportedPids);\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/AbstractOBDData.cs",
    "content": "﻿using System;\nusing OBD.NET.Extensions;\n\nnamespace OBD.NET.OBDData;\n\npublic abstract class AbstractOBDData : IOBDData\n{\n    #region Properties & Fields\n\n    public byte PID { get; }\n    private readonly int _length;\n\n    private byte[] _rawData = Array.Empty<byte>();\n    public byte[] RawData\n    {\n        get => _rawData;\n        set\n        {\n            if (value.Length != _length)\n                throw new ArgumentException(\"The provided raw-data is not valid\", nameof(value));\n\n            _rawData = value;\n        }\n    }\n\n    public bool IsValid => RawData.Length == _length;\n\n    protected byte A => RawData.Length > 0 ? RawData[0] : default;\n    protected byte B => RawData.Length > 1 ? RawData[1] : default;\n    protected byte C => RawData.Length > 2 ? RawData[2] : default;\n    protected byte D => RawData.Length > 3 ? RawData[3] : default;\n    protected byte E => RawData.Length > 4 ? RawData[4] : default;\n\n    #endregion\n\n    #region Constructors\n\n    protected AbstractOBDData(byte pid, int length)\n    {\n        this.PID = pid;\n        this._length = length;\n    }\n\n    protected AbstractOBDData(byte pid, int length, byte[] rawData)\n        : this(pid, length)\n    {\n        this.RawData = rawData;\n    }\n\n    #endregion\n\n    #region Methods\n\n    public void Load(string data)\n    {\n        try\n        {\n            if (((data.Length % 2) != 0) || ((data.Length / 2) < _length))\n                throw new ArgumentException(\"The provided data is not valid\", nameof(data));\n\n            _rawData = new byte[_length];\n            for (int i = 0; i < _length; ++i)\n                _rawData[i] = (byte)((data[i << 1].GetHexVal() << 4) + (data[(i << 1) + 1].GetHexVal()));\n        }\n        catch\n        {\n            _rawData = Array.Empty<byte>();\n            throw;\n        }\n    }\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/AbstractPidsSupported.cs",
    "content": "﻿using System.Collections;\nusing System.Collections.Generic;\n\nnamespace OBD.NET.OBDData;\n\npublic abstract class AbstractPidsSupported : AbstractOBDData\n{\n    #region Properties & Fields\n\n    public int[] SupportedPids\n    {\n        get\n        {\n            List<int> supportedPids = new();\n            BitArray bitArray = new(new[] { D, C, B, A });\n\n            for (int i = 0x01; i <= 0x20; i++)\n                if (bitArray.Get(bitArray.Length - i))\n                    supportedPids.Add(PID + i);\n\n            return supportedPids.ToArray();\n        }\n    }\n\n    #endregion\n\n    #region Constructors\n\n    public AbstractPidsSupported(byte pid, int length) : base(pid, length)\n    { }\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/C0-DF/PidsSupportedC1_E0.cs",
    "content": "﻿namespace OBD.NET.OBDData;\n\npublic class PidsSupportedC1_E0 : AbstractPidsSupported\n{\n    #region Constructors\n\n    public PidsSupportedC1_E0()\n        : base(0xC0, 4)\n    { }\n\n    #endregion\n\n    #region Methods\n\n    public override string ToString() => string.Join(\",\", SupportedPids);\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/OBDData/IOBDData.cs",
    "content": "﻿namespace OBD.NET.OBDData;\n\npublic interface IOBDData\n{\n    byte PID { get; }\n\n    void Load(string data);\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/Properties/launchSettings.json",
    "content": "{\n  \"profiles\": {\n    \"OBD.NET\": {\n      \"commandName\": \"Project\"\n    }\n  }\n}"
  },
  {
    "path": "OBD.NET/OBD.NET/Util/AsyncManulResetEvent.cs",
    "content": "﻿using System.Threading;\nusing System.Threading.Tasks;\n\nnamespace OBD.NET.Util;\n\n/// <summary>\n/// Notifies one or more waiting awaiters that an event has occurred\n/// </summary>\npublic class AsyncManualResetEvent\n{\n    #region Properties & Fields\n\n    private volatile TaskCompletionSource<bool> _tcs = new();\n\n    #endregion\n\n    #region Methods\n\n    /// <summary>\n    /// Waits the async.\n    /// </summary>\n    /// <returns></returns>\n    public Task WaitAsync() => _tcs.Task;\n\n    //public void Set() { m_tcs.TrySetResult(true); }\n    /// <summary>\n    /// Sets the state of the event to signaled, allowing one or more waiting awaiters to proceed.\n    /// </summary>\n    public void Set()\n    {\n        TaskCompletionSource<bool> tcs = _tcs;\n        Task.Factory.StartNew(s => ((TaskCompletionSource<bool>)s!).TrySetResult(true),\n                              tcs, CancellationToken.None, TaskCreationOptions.PreferFairness, TaskScheduler.Default);\n\n        tcs.Task.Wait();\n    }\n\n    /// <summary>\n    /// Sets the state of the event to nonsignaled, causing awaiters to block.\n    /// </summary>\n    public void Reset()\n    {\n        while (true)\n        {\n            TaskCompletionSource<bool> tcs = _tcs;\n            if (!tcs.Task.IsCompleted || (Interlocked.CompareExchange(ref _tcs, new TaskCompletionSource<bool>(), tcs) == tcs))\n                return;\n        }\n    }\n\n    #endregion\n}"
  },
  {
    "path": "OBD.NET/OBD.NET.Unix.sln",
    "content": "﻿\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio Version 17\nVisualStudioVersion = 17.0.32014.148\nMinimumVisualStudioVersion = 10.0.40219.1\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"OBD.NET\", \"OBD.NET\\OBD.NET.csproj\", \"{F60052E8-1201-4A5A-ADD7-6367C5424F74}\"\nEndProject\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"ConsoleClient\", \"ConsoleClient\\ConsoleClient.csproj\", \"{8AC58110-3925-481F-9D85-4B809D7D18B9}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tDebug|ARM = Debug|ARM\n\t\tDebug|ARM64 = Debug|ARM64\n\t\tDebug|x64 = Debug|x64\n\t\tDebug|x86 = Debug|x86\n\t\tRelease|Any CPU = Release|Any CPU\n\t\tRelease|ARM = Release|ARM\n\t\tRelease|ARM64 = Release|ARM64\n\t\tRelease|x64 = Release|x64\n\t\tRelease|x86 = Release|x86\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{F60052E8-1201-4A5A-ADD7-6367C5424F74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{F60052E8-1201-4A5A-ADD7-6367C5424F74}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{F60052E8-1201-4A5A-ADD7-6367C5424F74}.Debug|ARM.ActiveCfg = Debug|Any CPU\n\t\t{F60052E8-1201-4A5A-ADD7-6367C5424F74}.Debug|ARM.Build.0 = Debug|Any CPU\n\t\t{F60052E8-1201-4A5A-ADD7-6367C5424F74}.Debug|ARM64.ActiveCfg = Debug|Any CPU\n\t\t{F60052E8-1201-4A5A-ADD7-6367C5424F74}.Debug|ARM64.Build.0 = Debug|Any CPU\n\t\t{F60052E8-1201-4A5A-ADD7-6367C5424F74}.Debug|x64.ActiveCfg = Debug|Any CPU\n\t\t{F60052E8-1201-4A5A-ADD7-6367C5424F74}.Debug|x64.Build.0 = Debug|Any CPU\n\t\t{F60052E8-1201-4A5A-ADD7-6367C5424F74}.Debug|x86.ActiveCfg = Debug|Any CPU\n\t\t{F60052E8-1201-4A5A-ADD7-6367C5424F74}.Debug|x86.Build.0 = Debug|Any CPU\n\t\t{F60052E8-1201-4A5A-ADD7-6367C5424F74}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{F60052E8-1201-4A5A-ADD7-6367C5424F74}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{F60052E8-1201-4A5A-ADD7-6367C5424F74}.Release|ARM.ActiveCfg = Release|Any CPU\n\t\t{F60052E8-1201-4A5A-ADD7-6367C5424F74}.Release|ARM.Build.0 = Release|Any CPU\n\t\t{F60052E8-1201-4A5A-ADD7-6367C5424F74}.Release|ARM64.ActiveCfg = Release|Any CPU\n\t\t{F60052E8-1201-4A5A-ADD7-6367C5424F74}.Release|ARM64.Build.0 = Release|Any CPU\n\t\t{F60052E8-1201-4A5A-ADD7-6367C5424F74}.Release|x64.ActiveCfg = Release|Any CPU\n\t\t{F60052E8-1201-4A5A-ADD7-6367C5424F74}.Release|x64.Build.0 = Release|Any CPU\n\t\t{F60052E8-1201-4A5A-ADD7-6367C5424F74}.Release|x86.ActiveCfg = Release|Any CPU\n\t\t{F60052E8-1201-4A5A-ADD7-6367C5424F74}.Release|x86.Build.0 = Release|Any CPU\n\t\t{8AC58110-3925-481F-9D85-4B809D7D18B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{8AC58110-3925-481F-9D85-4B809D7D18B9}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{8AC58110-3925-481F-9D85-4B809D7D18B9}.Debug|ARM.ActiveCfg = Debug|Any CPU\n\t\t{8AC58110-3925-481F-9D85-4B809D7D18B9}.Debug|ARM.Build.0 = Debug|Any CPU\n\t\t{8AC58110-3925-481F-9D85-4B809D7D18B9}.Debug|ARM64.ActiveCfg = Debug|Any CPU\n\t\t{8AC58110-3925-481F-9D85-4B809D7D18B9}.Debug|ARM64.Build.0 = Debug|Any CPU\n\t\t{8AC58110-3925-481F-9D85-4B809D7D18B9}.Debug|x64.ActiveCfg = Debug|Any CPU\n\t\t{8AC58110-3925-481F-9D85-4B809D7D18B9}.Debug|x64.Build.0 = Debug|Any CPU\n\t\t{8AC58110-3925-481F-9D85-4B809D7D18B9}.Debug|x86.ActiveCfg = Debug|Any CPU\n\t\t{8AC58110-3925-481F-9D85-4B809D7D18B9}.Debug|x86.Build.0 = Debug|Any CPU\n\t\t{8AC58110-3925-481F-9D85-4B809D7D18B9}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{8AC58110-3925-481F-9D85-4B809D7D18B9}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{8AC58110-3925-481F-9D85-4B809D7D18B9}.Release|ARM.ActiveCfg = Release|Any CPU\n\t\t{8AC58110-3925-481F-9D85-4B809D7D18B9}.Release|ARM.Build.0 = Release|Any CPU\n\t\t{8AC58110-3925-481F-9D85-4B809D7D18B9}.Release|ARM64.ActiveCfg = Release|Any CPU\n\t\t{8AC58110-3925-481F-9D85-4B809D7D18B9}.Release|ARM64.Build.0 = Release|Any CPU\n\t\t{8AC58110-3925-481F-9D85-4B809D7D18B9}.Release|x64.ActiveCfg = Release|Any CPU\n\t\t{8AC58110-3925-481F-9D85-4B809D7D18B9}.Release|x64.Build.0 = Release|Any CPU\n\t\t{8AC58110-3925-481F-9D85-4B809D7D18B9}.Release|x86.ActiveCfg = Release|Any CPU\n\t\t{8AC58110-3925-481F-9D85-4B809D7D18B9}.Release|x86.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\n\tGlobalSection(ExtensibilityGlobals) = postSolution\n\t\tSolutionGuid = {949E7C1D-8E95-46CF-B659-C6A15678A0D5}\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "OBD.NET/OBD.NET.sln",
    "content": "﻿\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio Version 17\nVisualStudioVersion = 17.0.32014.148\nMinimumVisualStudioVersion = 10.0.40219.1\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"OBD.NET\", \"OBD.NET\\OBD.NET.csproj\", \"{F60052E8-1201-4A5A-ADD7-6367C5424F74}\"\nEndProject\nProject(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"ConsoleClient\", \"ConsoleClient\\ConsoleClient.csproj\", \"{8AC58110-3925-481F-9D85-4B809D7D18B9}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tDebug|ARM = Debug|ARM\n\t\tDebug|ARM64 = Debug|ARM64\n\t\tDebug|x64 = Debug|x64\n\t\tDebug|x86 = Debug|x86\n\t\tRelease|Any CPU = Release|Any CPU\n\t\tRelease|ARM = Release|ARM\n\t\tRelease|ARM64 = Release|ARM64\n\t\tRelease|x64 = Release|x64\n\t\tRelease|x86 = Release|x86\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{F60052E8-1201-4A5A-ADD7-6367C5424F74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{F60052E8-1201-4A5A-ADD7-6367C5424F74}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{F60052E8-1201-4A5A-ADD7-6367C5424F74}.Debug|ARM.ActiveCfg = Debug|Any CPU\n\t\t{F60052E8-1201-4A5A-ADD7-6367C5424F74}.Debug|ARM.Build.0 = Debug|Any CPU\n\t\t{F60052E8-1201-4A5A-ADD7-6367C5424F74}.Debug|ARM64.ActiveCfg = Debug|Any CPU\n\t\t{F60052E8-1201-4A5A-ADD7-6367C5424F74}.Debug|ARM64.Build.0 = Debug|Any CPU\n\t\t{F60052E8-1201-4A5A-ADD7-6367C5424F74}.Debug|x64.ActiveCfg = Debug|Any CPU\n\t\t{F60052E8-1201-4A5A-ADD7-6367C5424F74}.Debug|x64.Build.0 = Debug|Any CPU\n\t\t{F60052E8-1201-4A5A-ADD7-6367C5424F74}.Debug|x86.ActiveCfg = Debug|Any CPU\n\t\t{F60052E8-1201-4A5A-ADD7-6367C5424F74}.Debug|x86.Build.0 = Debug|Any CPU\n\t\t{F60052E8-1201-4A5A-ADD7-6367C5424F74}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{F60052E8-1201-4A5A-ADD7-6367C5424F74}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{F60052E8-1201-4A5A-ADD7-6367C5424F74}.Release|ARM.ActiveCfg = Release|Any CPU\n\t\t{F60052E8-1201-4A5A-ADD7-6367C5424F74}.Release|ARM.Build.0 = Release|Any CPU\n\t\t{F60052E8-1201-4A5A-ADD7-6367C5424F74}.Release|ARM64.ActiveCfg = Release|Any CPU\n\t\t{F60052E8-1201-4A5A-ADD7-6367C5424F74}.Release|ARM64.Build.0 = Release|Any CPU\n\t\t{F60052E8-1201-4A5A-ADD7-6367C5424F74}.Release|x64.ActiveCfg = Release|Any CPU\n\t\t{F60052E8-1201-4A5A-ADD7-6367C5424F74}.Release|x64.Build.0 = Release|Any CPU\n\t\t{F60052E8-1201-4A5A-ADD7-6367C5424F74}.Release|x86.ActiveCfg = Release|Any CPU\n\t\t{F60052E8-1201-4A5A-ADD7-6367C5424F74}.Release|x86.Build.0 = Release|Any CPU\n\t\t{8AC58110-3925-481F-9D85-4B809D7D18B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{8AC58110-3925-481F-9D85-4B809D7D18B9}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{8AC58110-3925-481F-9D85-4B809D7D18B9}.Debug|ARM.ActiveCfg = Debug|Any CPU\n\t\t{8AC58110-3925-481F-9D85-4B809D7D18B9}.Debug|ARM.Build.0 = Debug|Any CPU\n\t\t{8AC58110-3925-481F-9D85-4B809D7D18B9}.Debug|ARM64.ActiveCfg = Debug|Any CPU\n\t\t{8AC58110-3925-481F-9D85-4B809D7D18B9}.Debug|ARM64.Build.0 = Debug|Any CPU\n\t\t{8AC58110-3925-481F-9D85-4B809D7D18B9}.Debug|x64.ActiveCfg = Debug|Any CPU\n\t\t{8AC58110-3925-481F-9D85-4B809D7D18B9}.Debug|x64.Build.0 = Debug|Any CPU\n\t\t{8AC58110-3925-481F-9D85-4B809D7D18B9}.Debug|x86.ActiveCfg = Debug|Any CPU\n\t\t{8AC58110-3925-481F-9D85-4B809D7D18B9}.Debug|x86.Build.0 = Debug|Any CPU\n\t\t{8AC58110-3925-481F-9D85-4B809D7D18B9}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{8AC58110-3925-481F-9D85-4B809D7D18B9}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{8AC58110-3925-481F-9D85-4B809D7D18B9}.Release|ARM.ActiveCfg = Release|Any CPU\n\t\t{8AC58110-3925-481F-9D85-4B809D7D18B9}.Release|ARM.Build.0 = Release|Any CPU\n\t\t{8AC58110-3925-481F-9D85-4B809D7D18B9}.Release|ARM64.ActiveCfg = Release|Any CPU\n\t\t{8AC58110-3925-481F-9D85-4B809D7D18B9}.Release|ARM64.Build.0 = Release|Any CPU\n\t\t{8AC58110-3925-481F-9D85-4B809D7D18B9}.Release|x64.ActiveCfg = Release|Any CPU\n\t\t{8AC58110-3925-481F-9D85-4B809D7D18B9}.Release|x64.Build.0 = Release|Any CPU\n\t\t{8AC58110-3925-481F-9D85-4B809D7D18B9}.Release|x86.ActiveCfg = Release|Any CPU\n\t\t{8AC58110-3925-481F-9D85-4B809D7D18B9}.Release|x86.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\n\tGlobalSection(ExtensibilityGlobals) = postSolution\n\t\tSolutionGuid = {949E7C1D-8E95-46CF-B659-C6A15678A0D5}\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "README.md",
    "content": "# OBD.NET\nC#-Library to read/write data from/to a car through an ELM327-/STN1170-Adapter\n\n## Projects\n* [OBD.NET](https://www.nuget.org/packages/OBD.NET) - OBD-II implementation in .NET 6/5 and .NET Framework 4.8\n* ConsoleClient - Example client application using SerialConnection, running with .NET 6\n\n## Usage\n* Add the `OBD.NET` package to project\n```csharp\n\npublic class Program\n{\n    public static void Main(string[] args)\n    {\n        if (args.Length < 1)\n        {\n            Console.WriteLine(\"Parameter ComPort needed.\");\n\n            IEnumerable<string> availablePorts = SerialConnection.GetAvailablePorts();\n\n            Console.WriteLine(\"\\nAvailable ports:\");\n\n            foreach (string port in availablePorts)\n            {\n                Console.WriteLine(port);\n            }\n\n            return;\n        }\n\n        string comPort = args[0];\n\n        using SerialConnection connection = new SerialConnection(comPort);\n        using ELM327 dev = new ELM327(connection, new OBDConsoleLogger(OBDLogLevel.Debug));\n\n        dev.SubscribeDataReceived<EngineRPM>((sender, data) => Console.WriteLine(\"EngineRPM: \" + data.Data.Rpm));\n        dev.SubscribeDataReceived<VehicleSpeed>((sender, data) => Console.WriteLine(\"VehicleSpeed: \" + data.Data));\n\n        dev.SubscribeDataReceived<IOBDData>((sender, data) => Console.WriteLine($\"PID {data.Data.PID.ToHexString()}: {data.Data}\"));\n\n        dev.Initialize();\n        dev.RequestData<FuelType>();\n\n        for (int i = 0; i < 5; i++)\n        {\n            dev.RequestData<EngineRPM>();\n            dev.RequestData<VehicleSpeed>();\n            Thread.Sleep(1000);\n        }\n\n        Console.ReadLine();\n\n        //Async example\n        // MainAsync(comPort).Wait();\n\n        //Console.ReadLine();\n    }\n\n    /// <summary>\n    /// Async example using new RequestDataAsync\n    /// </summary>\n    /// <param name=\"comPort\">The COM port.</param>\n    /// <returns></returns>\n    public static async Task MainAsync(string comPort)\n    {\n        using SerialConnection connection = new SerialConnection(comPort);\n        using ELM327 dev = new ELM327(connection, new OBDConsoleLogger(OBDLogLevel.Debug));\n\n        dev.Initialize();\n\n        EngineRPM engineRpm = await dev.RequestDataAsync<EngineRPM>();\n        Console.WriteLine(\"Data: \" + engineRpm.Rpm);\n\n        engineRpm = await dev.RequestDataAsync<EngineRPM>();\n        Console.WriteLine(\"Data: \" + engineRpm.Rpm);\n\n        VehicleSpeed vehicleSpeed = await dev.RequestDataAsync<VehicleSpeed>();\n        Console.WriteLine(\"Data: \" + vehicleSpeed.Speed);\n\n        engineRpm = await dev.RequestDataAsync<EngineRPM>();\n        Console.WriteLine(\"Data: \" + engineRpm.Rpm);\n    }\n}\n```\n"
  }
]