API¶
PLC¶
- class lvmecp.lights.LightsController(name, plc, modbus=None, interval=None, start=True, notifier=None)[source]¶
Bases:
PLCModuleController for the light settings.
- Parameters:
- flag¶
alias of
LightStatus
- get_code(light)[source]¶
Returns the short-form code for a light. Case-insensitive.
- Parameters:
light (str) – The light for which the code is seeked.
Examples
>>> get_code('telescope_red') 'tr' >>> get_code('telescope bright') 'tb' >>> get_code('uMa Room') 'uma'
- Raises:
ValueError – When a code cannot be found for the input light.
- Parameters:
light (str)
- get_flag(light)[source]¶
Gets the
LightStatusflag associated with a light.- Parameters:
light (str) – The light for which the
LightStatusa flag is requested. It can be specified in short form (e.g.,tr), using underscores (telescope_red), or spaces (telescope red). The light name is case-insensitive.
- class lvmecp.dome.DomeController(*args, **kwargs)[source]¶
Bases:
PLCModule[DomeStatus]Controller for the rolling dome.
- flag¶
alias of
DomeStatus