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

Initial addition of reflector #868

Merged
merged 1 commit into from
Jul 9, 2024
Merged

Initial addition of reflector #868

merged 1 commit into from
Jul 9, 2024

Conversation

JosephParsons
Copy link
Contributor

No description provided.

@JosephParsons JosephParsons self-assigned this Jun 7, 2024
@JosephParsons JosephParsons requested a review from couger01 June 7, 2024 20:25
Copy link
Contributor

@couger01 couger01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is missing some major pieces for ts_xml.

  • Need to add a Reflector in sal_interfaces/SALSubsystems.xml
  • Need to add the Reflector section towncrier.toml
  • Need to add Reflector into testutils.py

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be under interface_changes and renamed to DM-43456.reflector.rst.

Comment on lines 10 to 21
<SALEvent>
<Subsystem>Reflector</Subsystem>
<EFDB_Topic>Reflector_logevent_reflectorState</EFDB_Topic>
<Description>Reflector state change</Description>
<item>
<EFDB_Name>reflectorState</EFDB_Name>
<Description>Reflector state; a ReflectorState enum.</Description>
<IDL_Type>int</IDL_Type>
<Units>unitless</Units>
<Count>1</Count>
</item>
</SALEvent>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this event should be replaced with two events that indicate that the reflector is on or off. The error state that is here should be superceded by the fault state since there isn't a second discrete device that also indicates state.

Comment on lines 4 to 14
<SALCommand>
<Subsystem>Reflector</Subsystem>
<EFDB_Topic>Reflector_command_switchOn</EFDB_Topic>
<Description>Switch on reflector.</Description>
</SALCommand>
<SALCommand>
<Subsystem>Reflector</Subsystem>
<EFDB_Topic>Reflector_command_switchOff</EFDB_Topic>
<Description>Switch off reflector.</Description>
</SALCommand>
</SALCommandSet>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<SALCommand>
<Subsystem>Reflector</Subsystem>
<EFDB_Topic>Reflector_command_switchOn</EFDB_Topic>
<Description>Switch on reflector.</Description>
</SALCommand>
<SALCommand>
<Subsystem>Reflector</Subsystem>
<EFDB_Topic>Reflector_command_switchOff</EFDB_Topic>
<Description>Switch off reflector.</Description>
</SALCommand>
</SALCommandSet>
<SALCommand>
<Subsystem>Reflector</Subsystem>
<EFDB_Topic>Reflector_command_switch</EFDB_Topic>
<Description>Switch on/off reflector.</Description>
<item>
<EFDB_Name>toggle</EFDB_Name>
<Description>Switch on/off the reflector</Description>
<IDL_Type>bool</IDL_Type>
<Count>1</Count>
</item>
</SALCommand>
</SALCommandSet>

I think this could just be one command with a boolean toggle value for switching on the reflector and and switching off the reflector.

Copy link
Member

@tribeiro tribeiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please create one command to open and one command to close the reflector.

<SALCommandSet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://lsst-sal.tuc.noao.edu/schema/SALCommandSet.xsd">
<SALCommand>
<Subsystem>MTReflector</Subsystem>
<EFDB_Topic>MTReflector_command_toggle</EFDB_Topic>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, create an open and a close command instead of a toggle command.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the toggle command.

Copy link
Contributor

@couger01 couger01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be two more states added if possible for opening and closing.

Copy link
Contributor

@couger01 couger01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Remove the toggle command, it's not necessary with the open and close commands.
  • Add two states for opening and closing if possible.

<SALCommandSet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://lsst-sal.tuc.noao.edu/schema/SALCommandSet.xsd">
<SALCommand>
<Subsystem>MTReflector</Subsystem>
<EFDB_Topic>MTReflector_command_toggle</EFDB_Topic>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the toggle command.

MTReflectorStatus_Connected=0,
MTReflectorStatus_Disconnected=1,
MTReflectorStatus_Unknown=2,
MTReflectorStatus_Connection_Error=3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add states for opening and closing.

CONNECTED = 0
DISCONNECTED = 1
UNKNOWN = 2
CONNECTION_ERROR = 3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add states for opening and closing.

Copy link
Member

@tribeiro tribeiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a couple more comments to this PR.

</SALEvent>
<SALEvent>
<Subsystem>MTReflector</Subsystem>
<EFDB_Topic>MTReflector_logevent_reflectorOpen</EFDB_Topic>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really don't think having different events for open and close is a good idea. You already have an event that indicates the status, so that is probably good enough. Please, remove these 2 events.


Attributes
----------

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can remove this empty line here.

Copy link
Member

@tribeiro tribeiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Copy link
Contributor

@couger01 couger01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@JosephParsons JosephParsons merged commit e2a97b8 into develop Jul 9, 2024
5 of 6 checks passed
@JosephParsons JosephParsons deleted the tickets/DM-43456 branch July 9, 2024 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants