M1M3 Support System
Loading...
Searching...
No Matches
M1M3SSSubscriber.h
1/*
2 * This file is part of LSST M1M3 support system package.
3 *
4 * Developed for the Vera C. Rubin Telescope and Site System.
5 * This product includes software developed by the LSST Project
6 * (https://www.lsst.org).
7 * See the COPYRIGHT file at the top-level directory of this distribution
8 * for details of code ownership.
9 *
10 * This program is free software: you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation, either version 3 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program. If not, see <https://www.gnu.org/licenses/>.
22 */
23
24#ifndef M1M3SSSUBSCRIBER_H_
25#define M1M3SSSUBSCRIBER_H_
26
27#include <SAL_MTM1M3C.h>
28#include <SAL_MTMountC.h>
29#include <memory>
30
31class SAL_MTM1M3;
32class SAL_MTMount;
33
34namespace LSST {
35namespace M1M3 {
36namespace SS {
37
38class CommandFactory;
39class Command;
40
48public:
50
56 static M1M3SSSubscriber &get();
57
58 void setSAL(std::shared_ptr<SAL_MTM1M3> m1m3SAL, std::shared_ptr<SAL_MTMount> mtMountSAL);
59
60 Command *tryAcceptCommandSetLogLevel();
61
69 Command *tryAcceptCommandEnable();
70 Command *tryAcceptCommandDisable();
71 Command *tryAcceptCommandStandby();
72 Command *tryAcceptCommandExitControl();
73 Command *tryAcceptCommandPanic();
74 Command *tryAcceptCommandSetSlewFlag();
75 Command *tryAcceptCommandClearSlewFlag();
76 Command *tryAcceptCommandTurnAirOn();
77 Command *tryAcceptCommandTurnAirOff();
78 Command *tryAcceptCommandBoosterValveOpen();
79 Command *tryAcceptCommandBoosterValveClose();
80 Command *tryAcceptCommandApplyOffsetForces();
81 Command *tryAcceptCommandClearOffsetForces();
82 Command *tryAcceptCommandRaiseM1M3();
83 Command *tryAcceptCommandLowerM1M3();
84 Command *tryAcceptCommandPauseM1M3RaisingLowering();
85 Command *tryAcceptCommandResumeM1M3RaisingLowering();
86 Command *tryAcceptCommandApplyActiveOpticForces();
87 Command *tryAcceptCommandClearActiveOpticForces();
88 Command *tryAcceptCommandEnterEngineering();
89 Command *tryAcceptCommandExitEngineering();
90 Command *tryAcceptCommandTestHardpoint();
91 Command *tryAcceptCommandKillHardpointTest();
92 Command *tryAcceptCommandMoveHardpointActuators();
93 Command *tryAcceptCommandEnableHardpointChase();
94 Command *tryAcceptCommandDisableHardpointChase();
95 Command *tryAcceptCommandAbortRaiseM1M3();
96 Command *tryAcceptCommandTranslateM1M3();
97 Command *tryAcceptCommandStopHardpointMotion();
98 Command *tryAcceptCommandPositionM1M3();
99 Command *tryAcceptCommandTurnLightsOn();
100 Command *tryAcceptCommandTurnLightsOff();
101 Command *tryAcceptCommandTurnPowerOn();
102 Command *tryAcceptCommandTurnPowerOff();
103 Command *tryAcceptCommandEnableHardpointCorrections();
104 Command *tryAcceptCommandDisableHardpointCorrections();
105 Command *tryAcceptCommandRunMirrorForceProfile();
106 Command *tryAcceptCommandAbortProfile();
107 Command *tryAcceptCommandApplyOffsetForcesByMirrorForce();
108 Command *tryAcceptCommandUpdatePID();
109 Command *tryAcceptCommandResetPID();
110 Command *tryAcceptCommandForceActuatorBumpTest();
111 Command *tryAcceptCommandKillForceActuatorBumpTest();
112 Command *tryAcceptCommandDisableForceActuator();
113 Command *tryAcceptCommandEnableForceActuator();
114 Command *tryAcceptCommandEnableAllForceActuators();
115 Command *tryAcceptCommandEnableDisableForceComponent();
116 Command *tryAcceptCommandSetSlewControllerSettings();
117
118 Command *tryGetSampleTMAAzimuth();
119 Command *tryGetSampleTMAElevation();
120
121private:
122 M1M3SSSubscriber &operator=(const M1M3SSSubscriber &) = delete;
123 M1M3SSSubscriber(const M1M3SSSubscriber &) = delete;
124
125 std::shared_ptr<SAL_MTM1M3> _m1m3SAL;
126 std::shared_ptr<SAL_MTMount> _mtMountSAL;
127
128 MTM1M3_command_startC _startData;
129 MTM1M3_command_enableC _enableData;
130 MTM1M3_command_disableC _disableData;
131 MTM1M3_command_standbyC _standbyData;
132 MTM1M3_command_turnAirOnC _turnAirOnData;
133 MTM1M3_command_turnAirOffC _turnAirOffData;
134 MTM1M3_command_applyOffsetForcesC _applyOffsetForcesData;
135 MTM1M3_command_clearOffsetForcesC _clearOffsetForcesData;
136 MTM1M3_command_raiseM1M3C _raiseM1M3Data;
137 MTM1M3_command_lowerM1M3C _lowerM1M3Data;
138 MTM1M3_command_applyActiveOpticForcesC _applyActiveOpticForcesData;
139 MTM1M3_command_clearActiveOpticForcesC _clearActiveOpticForcesData;
140 MTM1M3_command_enterEngineeringC _enterEngineeringData;
141 MTM1M3_command_exitEngineeringC _exitEngineeringData;
142 MTM1M3_command_testHardpointC _testHardpointData;
143 MTM1M3_command_killHardpointTestC _killHardpointTestData;
144 MTM1M3_command_moveHardpointActuatorsC _moveHardpointActuatorsData;
145 MTM1M3_command_enableHardpointChaseC _enableHardpointChaseData;
146 MTM1M3_command_disableHardpointChaseC _disableHardpointChaseData;
147 MTM1M3_command_abortRaiseM1M3C _abortRaiseM1M3Data;
148 MTM1M3_command_translateM1M3C _translateM1M3Data;
149 MTM1M3_command_stopHardpointMotionC _stopHardpointMotionData;
150 MTM1M3_command_positionM1M3C _positionM1M3Data;
151 MTM1M3_command_turnLightsOnC _turnLightsOnData;
152 MTM1M3_command_turnLightsOffC _turnLightsOffData;
153 MTM1M3_command_turnPowerOnC _turnPowerOnData;
154 MTM1M3_command_turnPowerOffC _turnPowerOffData;
155 MTM1M3_command_enableHardpointCorrectionsC _enableHardpointCorrectionsData;
156 MTM1M3_command_disableHardpointCorrectionsC _disableHardpointCorrectionsData;
157 MTM1M3_command_runMirrorForceProfileC _runMirrorForceProfileData;
158 MTM1M3_command_abortProfileC _abortProfileData;
159 MTM1M3_command_applyOffsetForcesByMirrorForceC _applyOffsetForcesByMirrorForceData;
160 MTM1M3_command_updatePIDC _updatePIDData;
161 MTM1M3_command_resetPIDC _resetPIDData;
162 MTM1M3_command_forceActuatorBumpTestC _forceActuatorBumpTestData;
163 MTM1M3_command_killForceActuatorBumpTestC _killForceActuatorBumpTestData;
164 MTM1M3_command_disableForceActuatorC _disableForceActuatorData;
165 MTM1M3_command_enableForceActuatorC _enableForceActuatorData;
166 MTM1M3_command_enableDisableForceComponentC _enableDisableForceComponentData;
167 MTM1M3_command_setSlewControllerSettingsC _setSlewControllerSettingsData;
168
169 MTMount_azimuthC _tmaAzimuth;
170 MTMount_elevationC _tmaElevation;
171};
172
173} /* namespace SS */
174} /* namespace M1M3 */
175} /* namespace LSST */
176
177#endif /* M1M3SSSUBSCRIBER_H_ */
Parent class for all commands.
Definition Command.h:42
Subscriber to receive events, telemetry data and commands from SAL.
Definition M1M3SSSubscriber.h:47
static M1M3SSSubscriber & get()
Retrieves singleton instance.
Definition M1M3SSSubscriber.cpp:90
Command * tryAcceptCommandStart()
Check for a Start command.