- Core driver that enforces protocol correctness to HAPCAN on the bus through a serial port HAPCAN module.
- Sending all HAPCAN commands.
- Fully event driven, and allows for asynchronous actions on events originating from the HAPCAN bus.
- Can flash any HAPCAN unit.
- Can read/write arbitrary memory regions on all devices.
- Fully multithreaded.
- The core driver allows all operations simultaneously to all nodes. I.e. flashing different nodes simultaneously, while still operating and monitoring all others, is supported.
- The REST API supports both HTML and JSON feedback. It is easily extensible to support any number of actions.
- The driver is built using Promises/Futures to easily support the asynchronous nature of the HAPCAN environment.
A quick rundown on the source:
- hapcanmonitor
- hapcanmonitor.pike (40 KB), the full hapcan core communication driver.
- www/x/wildcard.pike (7KB), the REST/JSON api to the core communication driver.
- SPike
- spike (55 KB), the full webserver daemon.
SPike daemon source: git://devel2.cuci.nl/spike
Pike language: http://pike.lysator.liu.se/ (Pike itself is written in C and runs on many platforms; Pike syntax is very Java/C++ like).
I'm currently running this on a PC-Engines APU2, running Debian Linux, with an installed Pike 8.1, SPike and hapcanmonitor.
If there is sufficient interest, I might be persuaded to create a Docker container with all of it running in it.