pymeasure / leco-protocol

Design notes for a generic communication protocol to control experiments and measurement hardware
https://leco-laboratory-experiment-control-protocol.readthedocs.io
MIT License
6 stars 3 forks source link

Status handling #35

Open bilderbuchi opened 1 year ago

bilderbuchi commented 1 year ago

It's important to know what state Components are in, e.g. for error handling & recorvery, communication speed back-off, enable "state" handling, information, etc.

I think we should first collect Status/error states that we want do specify for Components (all_good, connection_congested, connection_dead, device_errored,...). This is also something that could be returned on receiving a STATUS request.

Then, we should decide how to represent them (a status and an error registry (cf. SCPI)? both fused into one? Bitmask/enum to represent them efficiently?)

Then, we should discuss how much of the behaviour in the different states and the ways to transition between them we prescribe (the "Status" state machine), and howm uch we leave to implementations.

Originally posted by @bilderbuchi in https://github.com/pymeasure/leco-protocol/issues/4#issuecomment-1409883761