Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-46165: adding optical configuration to TunableLaser XML #904

Merged
merged 6 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/news/interface_changes/DM-46165.tunablelaser.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Adding in Optical Configuration enum for TunableLaser
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
<SALCommand>
<Subsystem>TunableLaser</Subsystem>
<EFDB_Topic>TunableLaser_command_setOpticalConfiguration</EFDB_Topic>
<Description>Set the optical configuration.</Description>
<Description>Set the optical configuration; an OpticalConfiguration enum.</Description>
<item>
<EFDB_Name>configuration</EFDB_Name>
<Description>Optical alignment configuration to be set.</Description>
<Description>Optical alignment configuration to be set; an OpticalConfiguration enum.</Description>
<IDL_Type>string</IDL_Type>
<IDL_Size>1</IDL_Size>
<Units>unitless</Units>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ LaserErrorCode_ASCII_ERROR = 7301,
LaserErrorCode_GENERAL_ERROR = 7302,
LaserErrorCode_TIMEOUT_ERROR = 7303,
LaserErrorCode_HW_CPU_ERROR = 7304
</Enumeration>
<Enumeration>
OpticalConfiguration_SCU,
OpticalConfiguration_F1_SCU,
OpticalConfiguration_F2_SCU,
OpticalConfiguration_NO_SCU,
OpticalConfiguration_F1_NO_SCU,
OpticalConfiguration_F2_NO_SCU
</Enumeration>
<SALEvent>
<Subsystem>TunableLaser</Subsystem>
Expand Down Expand Up @@ -40,10 +48,10 @@ LaserErrorCode_HW_CPU_ERROR = 7304
<SALEvent>
<Subsystem>TunableLaser</Subsystem>
<EFDB_Topic>TunableLaser_logevent_opticalConfiguration</EFDB_Topic>
<Description>The optical configuration.</Description>
<Description>The optical configuration; an OpticalConfiguration enum.</Description>
<item>
<EFDB_Name>configuration</EFDB_Name>
<Description>The new optical alignment configuration.</Description>
<Description>The optical alignment configuration; a OpticalConfiguration enum.</Description>
<IDL_Type>string</IDL_Type>
<IDL_Size>1</IDL_Size>
<Units>unitless</Units>
Expand Down
31 changes: 30 additions & 1 deletion python/lsst/ts/xml/enums/TunableLaser.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__all__ = ["LaserDetailedState", "LaserErrorCode"]
__all__ = ["LaserDetailedState", "OpticalConfiguration", "LaserErrorCode"]
import enum


Expand Down Expand Up @@ -29,6 +29,35 @@ class LaserDetailedState(enum.IntEnum):
PROPAGATING_BURST_MODE = 4


class OpticalConfiguration(enum.StrEnum):
"""Configuration of the optical output

Attributes
----------

SCU: `str`
Pass the beam straight-through the SCU.
F1_SCU: `str`
Direct the beam through the F1 after passing through the SCU.
F2_SCU: `str`
Direct the beam through the F2 after passing through the SCU.
NO_SCU: `str`
Pass the beam straight-through.
F1_NO_SCU: `str`
Pass the beam to F1 output.
F2_NO_SCU: `str`
Pass the beam to F2 output.

"""

SCU = "SCU"
F1_SCU = "F1 SCU"
F2_SCU = "F2 SCU"
NO_SCU = "No SCU"
F1_NO_SCU = "F1 No SCU"
F2_NO_SCU = "F2 No SCU"


class LaserErrorCode(enum.IntEnum):
"""Laser error codes"""

Expand Down
Loading