[Ovmsdev] Addition to OVMS Developer Guide

Stephen Casner casner at acm.org
Mon Jan 4 15:32:21 HKT 2021


Michael,

> I've pushed the fix, but think it's still wrong to use the callback
> registration map to validate events without filtering out "*". While you
> 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.

> Regarding your question: custom events normally will not have a registered
> listener on the module. Event scripts do not register a native callback, the
> same applies to Javascript event subscriptions and events transported via the
> network to clients (e.g. web plugins or an MQTT listener). These are the main
> applications for custom events.

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.

                                                        -- Steve


More information about the OvmsDev mailing list