<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Forgot to mention that there is also “ODX” (<span style="color: rgb(70, 70, 70); font-family: Verdana, Arial, sans-serif; font-size: 12px; font-variant-ligatures: normal; orphans: 2; widows: 2; background-color: rgb(255, 255, 255);" class="">ISO 22901-1:2008</span>).<div class=""><br class=""></div><div class="">Regards, Mark.<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 27 Jul 2018, at 9:01 AM, Mark Webb-Johnson <<a href="mailto:mark@webb-johnson.net" class="">mark@webb-johnson.net</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Those are the same spec, and that is the best there is.<div class=""><br class=""></div><div class="">DBC is Data Base for CAN, and is really designed around documenting the CAN bus: messages (by ID), signals (on those messages), sending and receiving nodes, etc. It would document the PID request protocol, over CAN, but not the content/meaning of each PID.</div><div class=""><br class=""></div><div class="">I guess it could be used to document the PIDs themselves, using the multiplexor facility, but doesn’t seem that suited. There are some other standards for that (like ASAP2, I think). The vector site has some links, but it is all very proprietary:</div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><a href="https://vector.com/vi_asap2_toolset_en.html" class="">https://vector.com/vi_asap2_toolset_en.html</a></div></blockquote><div class=""><br class=""></div><div class="">Regards, Mark.<br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On 27 Jul 2018, at 4:57 AM, Michael Balzer <<a href="mailto:dexter@expeedo.de" class="">dexter@expeedo.de</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">
  
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" class="">
  
  <div text="#000000" bgcolor="#FFFFFF" class="">
    Mark,<br class="">
    <br class="">
    I'm not familiar with DBC. I only found partial community infos and
    examples and an 11 year old PDF that seems to be available in two
    versions -- is that the current specification?<br class="">
    <br class="">
<a class="moz-txt-link-freetext" href="https://kupdf.net/download/dbc-format-2007_59c7d97e08bbc5f7236872bc_pdf">https://kupdf.net/download/dbc-format-2007_59c7d97e08bbc5f7236872bc_pdf</a><br class="">
    <a class="moz-txt-link-freetext" href="https://wenku.baidu.com/view/41c36d25ed630b1c59eeb534">https://wenku.baidu.com/view/41c36d25ed630b1c59eeb534</a><br class="">
    <br class="">
    Is it possible to define a command/query scheme in DBC?<br class="">
    <br class="">
    Thanks,<br class="">
    Michael<br class="">
    <br class="">
    <br class="">
    <div class="moz-cite-prefix">Am 26.07.2018 um 11:13 schrieb Mark
      Webb-Johnson:<br class="">
    </div>
    <blockquote type="cite" cite="mid:3577B572-E6D8-405C-BAB7-5227BE6CF73E@webb-johnson.net" class="">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" class="">
      I’ve spent quite some time looking at the alternatives, with the
      result that no matter how much I hate the specification, how
      horrible I think the format is, how terribly designed is the
      syntax, DBC is the standard that everyone seems to want to follow.<br class="">
      <br class="">
    </blockquote>
    <blockquote type="cite" cite="mid:3577B572-E6D8-405C-BAB7-5227BE6CF73E@webb-johnson.net" class="">
      <div class="">For our holy grain of DBC signals -> OVMS
        metrics, we can use ‘attributes’ to define OVMS specific stuff
        (like signal name to OVMS metric names).</div>
      <div class=""><br class="">
      </div>
      <div class="">So, I’ve created a DBC component, and put in the
        basic structures to define the objects in a DBC file. I’ve also
        started the work to parse DBC files and load them in. The basic
        idea is:</div>
      <div class=""><br class="">
      </div>
      <div class="">
        <ul class="MailOutline">
          <li class="">There is a core MyDBC object.<br class="">
            <br class="">
          </li>
          <li class="">DBC files can be loaded into that object (either
            from VFS, or as static strings), unloaded, etc.<br class="">
            <br class="">
          </li>
          <li class="">The MyDBC object will contain functions to access
            DBC files, and maintain them.<br class="">
            <br class="">
          </li>
          <li class="">Functions will also be provided to export DBC
            files.<br class="">
            <br class="">
          </li>
          <li class="">Statically loaded (via strings) DBC objects can
            be overwritten and modified (especially during development).<br class="">
            <br class="">
          </li>
          <li class="">The vehicle base class will be extended to allow
            a DBC file to be associated with a particular CAN bus - that
            will then automatically handle metrics from DBC signals.<br class="">
            <br class="">
          </li>
          <li class="">RE TOOLS will be changed to use DBC files
            directly (in particular to use DBC modifiers, rather than
            the current unique ID approach, but also for things like DBC
            signal extraction and display).</li>
        </ul>
      </div>
      <div class=""><br class="">
      </div>
      <div class="">The overall goal is:</div>
      <div class=""><br class="">
      </div>
      <div class="">
        <ul class="MailOutline">
          <li class="">The ‘old’ (current) way of doing things is to
            write C++ code in a vehicle module to match CAN bus #1, ID
            0x102, and treat byte #3 an unsigned integer to set it as
            the SOC metric.<br class="">
            <br class="">
          </li>
          <li class="">The DBC way is to instead create a DBC file
            describe CAN bus #2, message ID 0x102, and a signal at byte
            #3 (16 bits in, length 8 bits) mapped to the SOC metric.
            Then, just tell the vehicle base module where that DBC file
            is and let it handle the mapping automatically. No code.
            Just DBC description files.<br class="">
            <br class="">
          </li>
          <li class="">We can still have custom C++ code, for custom
            metrics.<br class="">
            <br class="">
          </li>
          <li class="">When reverse engineering, we can dynamically
            modify a loaded DBC and instantly see the metrics change. We
            can then export that DBC out, and include it in the firmware
            for others to use.</li>
        </ul>
      </div>
      <div class=""><br class="">
      </div>
      <div class="">The biggest amount of work is the DBC file handling
        itself. The changes to the vehicle base class are pretty simple.</div>
      <div class=""><br class="">
      </div>
      <div class="">Regards, Mark.<br class="">
        <div class=""><br class="">
          <blockquote type="cite" class="">
            <div class="">On 19 Apr 2018, at 11:06 AM, Mark Webb-Johnson
              <<a href="mailto:mark@webb-johnson.net" class="" moz-do-not-send="true">mark@webb-johnson.net</a>>
              wrote:</div>
            <br class="Apple-interchange-newline">
            <div class=""><span style="caret-color: rgb(0, 0, 0);
                font-family: Helvetica; font-size: 24px; font-style:
                normal; font-variant-caps: normal; font-weight: normal;
                letter-spacing: normal; text-align: start; text-indent:
                0px; text-transform: none; white-space: normal;
                word-spacing: 0px; -webkit-text-stroke-width: 0px;
                text-decoration: none; float: none; display: inline
                !important;" class="">The whole decoding/encoding thing
                (where we use DBC or whatever to say key X byte Y is
                converted to v.bat.soc using this formula) is of course
                the holy grain of this; and is built upon all the
                foundation I’m laying now. The end goal remains for
                vehicle modules with just a DBC (or whatever) and no
                actual code.</span></div>
          </blockquote>
        </div>
        <br class="">
      </div>
      <br class="">
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br class="">
      <pre wrap="" class="">_______________________________________________
OvmsDev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:OvmsDev@lists.openvehicles.com">OvmsDev@lists.openvehicles.com</a>
<a class="moz-txt-link-freetext" href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a>
</pre>
    </blockquote>
    <br class="">
    <pre class="moz-signature" cols="160">-- 
Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
</pre>
  </div>

_______________________________________________<br class="">OvmsDev mailing list<br class=""><a href="mailto:OvmsDev@lists.openvehicles.com" class="">OvmsDev@lists.openvehicles.com</a><br class=""><a href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev" class="">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a><br class=""></div></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""></div></body></html>