[Ovmsdev] Stat command

Michael Balzer dexter at expeedo.de
Sat Nov 4 17:51:43 HKT 2017


I've added a default implementation for the "stat" command.

    virtual vehicle_command_t CommandStat(int verbosity, OvmsWriter* writer);

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.

Regards,
Michael


Am 30.10.2017 um 07:06 schrieb Mark Webb-Johnson:
> I’ve implemented these standard commands in vehicle framework:
>
>     virtual vehicle_command_t CommandSetChargeMode(vehicle_mode_t mode);
>     virtual vehicle_command_t CommandSetChargeCurrent(uint16_t limit);
>     virtual vehicle_command_t CommandStartCharge();
>     virtual vehicle_command_t CommandStopCharge();
>     virtual vehicle_command_t CommandSetChargeTimer(bool timeron, uint16_t timerstart);
>     virtual vehicle_command_t CommandCooldown(bool cooldownon);
>     virtual vehicle_command_t CommandWakeup();
>     virtual vehicle_command_t CommandLock(const char* pin);
>     virtual vehicle_command_t CommandUnlock(const char* pin);
>     virtual vehicle_command_t CommandActivateValet(const char* pin);
>     virtual vehicle_command_t CommandDeactivateValet(const char* pin);
>     virtual vehicle_command_t CommandHomelink(uint8_t button);
>
>
> Also implemented most of these for the Tesla Roadster, as an example implementation.
>
> I haven’t changed ovms_server_v2 yet, to implement the standard command processor for these, but that should be trivial.
>
> Vehicle modules are able to implement handlers for these standardised commands, as well as their own custom commands (if required).
>
> Regards, Mark.

-- 
Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
Fon 02333 / 833 5735 * Handy 0176 / 206 989 26

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20171104/dbfbc7c3/attachment.htm>


More information about the OvmsDev mailing list