[Ovmsdev] Addition to OVMS Developer Guide

Michael Balzer dexter at expeedo.de
Mon Jan 4 16:24:26 HKT 2021


Steve,

Am 04.01.21 um 08:32 schrieb Stephen Casner:
>> technically may send "*" as an event, it isn't meant to be used that way, just
>> gets added to the map because of the "any event" listeners.
> I see.  If raising event "*" should be avoided, though, the
> event_raise() function should check for that.

That's an option for later, but not actually necessary, as it does no 
harm. But if users see "*" in the suggestions (!) of the command, they 
will interpret that as a defined feature.

> For someone writing new code who wants to listen for an event but does
> not know exactly how the event is written, the answer is not easy to
> find.  I added "event list" to help with that, but based on what you
> say here that's not really valid or complete, either.

"event list" has been more of an internal system/debug utility for me, 
and it does exactly what it's description says, so that's totally valid 
for me. Events should stay light weight, as in Javascript. Adding a 
registry for all possible event names would add a lot of complexity 
without much benefit. For example, the location framework would need to 
take care to deregister events for deleted or renamed locations etc.

For someone new to the event system, this is the place to start and the 
reference for defined standard framework events:

  * https://docs.openvehicles.com/en/latest/userguide/events.html

Framework events added by vehicles shall be documented on the respective 
vehicle page, e.g.:

  * https://docs.openvehicles.com/en/latest/components/vehicle_renaulttwizy/docs/events.html

And custom events added by plugins shall be documented on the respective 
plugin page, e.g.:

  * https://docs.openvehicles.com/en/latest/plugin/edimax/README.html#events


Regards,
Michael

-- 
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/20210104/7cb54fbe/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 203 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20210104/7cb54fbe/attachment.sig>


More information about the OvmsDev mailing list