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

Actor message format for Channels #63

Open BenediktBurger opened 8 months ago

BenediktBurger commented 8 months ago

In https://github.com/pymeasure/pyleco/issues/14 I noticed that we currently have not yet (in PR #56) defined, how to access a channel of a controlled device. (related to #20 , #29 )

I see the following options for the get/set_parameters and call_action methods:

  1. They offer a keyword argument "channel" to choose a subchannel. Advantage: It is more simple to implement a check for locked Channels.
  2. If a period is encountered in the action/parameter name, the Actor tries to follow that "instance path" (e.g. "channel_1.trace_A.property_X" will be resolved to the property_X of trace_A of channel_1 of the device).
  3. We have special methods call_action_channel...

My favorite is option 2, as that allows subchannels etc. seamlessly.