At the moment, the software seems to have a single OpenROVController in the node software intended for all interaction with the ROV.
I am curious on how the software designers to date are envisioning this growing.
I see value in being able to use sensors from both the arduino as well as the beaglebone. I began playing with simply reporting CPU usage from the beagle bone and adding that in with the rest of the telemetry data that the OpenROVController is exposing. In doing so I came to the conclusion I needed a way to manage the telemetry data from any source and expose it all through an abstraction as generic OpenROV telemetry.
As of this post, the telemetry is handled by listening for any data coming from the arduino with the serial.on(data) event and then simply parsing it and emitting a controller.stats(stats) event.
I like that this immediately makes telemetry data available when the arduino emits it.
But now that I want to wire in the beaglebone data as well, I get a bit stuck. I get the feeling that the system should emit each discreet bit of data as it gets it, and so that would imply events where you don't have all of the current data to fill out a complete model of all current data points. This puts me up against the current MVC binding concept that looks for all of the data to be filled out per request. So for instance, if the stats update only has the beaglebone cpu data, the values in the model for the rest of the data when initialized would be defaults and the any past telemetry updates would be wiped out. At least I think that's what would happen.
Is the thought that the OpenROVContoller would start to maintain state of all past discrete telemetry updates so that when the browser paints, it would have all of the most current? Or is the idea that telemetry becomes a stream of data that broadcasts to the potentially multiple listeners and the browser would ultimately build up the state over time by parsing the telemetry stream and updating the UI accordingly.
Finally, as it relates to the node.js controllers. Should there be an OpenROVController that interacts and abstracts both a beaglebone and an arduino controller?