<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    I've added a default implementation for the "stat" command.<br>
    <br>
    <tt>    virtual vehicle_command_t CommandStat(int verbosity,
      OvmsWriter* writer);</tt><br>
    <br>
    I thought about letting the vehicle module generate a std::string,
    but it would still need the verbosity and would always need another
    memory buffer, so I think passing the writer to vehicle methods
    generating output is better -- please correct me if there is a
    system design decision I'm breaking with this.<br>
    <br>
    Regards,<br>
    Michael<br>
    <br>
    <br>
    <div class="moz-cite-prefix">Am 30.10.2017 um 07:06 schrieb Mark
      Webb-Johnson:<br>
    </div>
    <blockquote type="cite"
      cite="mid:95054693-82AD-44D4-A22C-34798F9BDB53@webb-johnson.net">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      I’ve implemented these standard commands in vehicle framework:
      <div class=""><br class="">
      </div>
      <blockquote style="margin: 0 0 0 40px; border: none; padding:
        0px;" class="">
        <div class="">
          <div class=""><font class="" face="Andale Mono"><span
                style="font-size: 18px;" class="">virtual
                vehicle_command_t CommandSetChargeMode(vehicle_mode_t
                mode);</span></font></div>
          <div class=""><font class="" face="Andale Mono"><span
                style="font-size: 18px;" class="">virtual
                vehicle_command_t CommandSetChargeCurrent(uint16_t
                limit);</span></font></div>
          <div class=""><font class="" face="Andale Mono"><span
                style="font-size: 18px;" class="">virtual
                vehicle_command_t CommandStartCharge();</span></font></div>
          <div class=""><font class="" face="Andale Mono"><span
                style="font-size: 18px;" class="">virtual
                vehicle_command_t CommandStopCharge();</span></font></div>
          <div class=""><font class="" face="Andale Mono"><span
                style="font-size: 18px;" class="">virtual
                vehicle_command_t CommandSetChargeTimer(bool timeron,
                uint16_t timerstart);</span></font></div>
          <div class=""><font class="" face="Andale Mono"><span
                style="font-size: 18px;" class="">virtual
                vehicle_command_t CommandCooldown(bool cooldownon);</span></font></div>
          <div class=""><font class="" face="Andale Mono"><span
                style="font-size: 18px;" class="">virtual
                vehicle_command_t CommandWakeup();</span></font></div>
          <div class=""><font class="" face="Andale Mono"><span
                style="font-size: 18px;" class="">virtual
                vehicle_command_t CommandLock(const char* pin);</span></font></div>
          <div class=""><font class="" face="Andale Mono"><span
                style="font-size: 18px;" class="">virtual
                vehicle_command_t CommandUnlock(const char* pin);</span></font></div>
          <div class=""><font class="" face="Andale Mono"><span
                style="font-size: 18px;" class="">virtual
                vehicle_command_t CommandActivateValet(const char* pin);</span></font></div>
          <div class=""><font class="" face="Andale Mono"><span
                style="font-size: 18px;" class="">virtual
                vehicle_command_t CommandDeactivateValet(const char*
                pin);</span></font></div>
          <div class=""><font class="" face="Andale Mono"><span
                style="font-size: 18px;" class="">virtual
                vehicle_command_t CommandHomelink(uint8_t button);</span></font></div>
        </div>
      </blockquote>
      <div class=""><br class="">
      </div>
      <div class="">Also implemented most of these for the Tesla
        Roadster, as an example implementation.</div>
      <div class=""><br class="">
      </div>
      <div class="">I haven’t changed ovms_server_v2 yet, to implement
        the standard command processor for these, but that should be
        trivial.</div>
      <div class=""><br class="">
      </div>
      <div class="">Vehicle modules are able to implement handlers for
        these standardised commands, as well as their own custom
        commands (if required).</div>
      <div class=""><br class="">
      </div>
      <div class="">Regards, Mark.</div>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
</pre>
  </body>
</html>