[Ovmsdev] Notifications concept draft

Michael Balzer dexter at expeedo.de
Sun Nov 5 17:39:41 HKT 2017


Some thoughts about how to implement vehicle notifications and data logging. Please check & comment.


Concept:
  - handle all unsolicited transmissions from vehicles by commands
  - vehicle module signals event if a transmission is due
  - … with event data = command line to generate output
  - listeners retrieve the transmission content by executing the command
  - queueing for async delivery is done by the listeners (i.e. through BufferedShell)

  → any shell command can be used for transmissions
  → all transmissions can also be generated on the shell / by script
  → all transmission output can be sent to any channel
  → data logging on SD can be done transparently by the system

Interactive consoles can output unsolicited transmissions by event type
according to the current log level.

Events:
  "send.info"      → send text notification
  "send.alert"     → send text alert
  "send.data"      → send data record (CSV, content part of v2 MP)

Scheme:
  MyEvents.SignalEvent("send.<type>", "command [args]");

Examples:
  MyEvents.SignalEvent("send.info", "stat");

  MyEvents.SignalEvent("send.alert", "xrt batt status");

  MyEvents.SignalEvent("send.data", "xrt log RT-BAT-C");
  → command output:
    H,RT-BAT-C,4,86400,1,1,4025,3675,4045,5,14,14,19,1


Regards,
Michael

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




More information about the OvmsDev mailing list