Open g-kimbell opened 2 months ago
The short term plan is to expose the current "status" of any component using the DriverInterface
:
The actual implementation will then be up to the individual drivers. The rough plan is that if a task is running on the device, the task main loop handles caching the data and storing the latest "datapoint" on the instance of the component, which then gets returned by this dev_status
call; if a task is not running, the hardware can be optionally queried for a reply with fresh data.
It would be very useful for us to easily access the last datapoint from a pipeline, e.g. if we want to check that we are measuring a sensible open circuit voltage.
The first solution is to snapshot and transfer the file, but this can be extremely slow.
I implemented a solution which grabs the last json file saved, however this is still relatively slow (ssh in, check data folder, transfer latest json)
Having this accessible from the database would be nice, for example 'ketchup status -vv' also gives a column with last datapoint of every pipeline.