M1M3 Support System
Loading...
Searching...
No Matches
PowerController.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 POWERCONTROLLER_H_
25#define POWERCONTROLLER_H_
26
27#include <IExpansionFPGA.h>
28#include <IFPGA.h>
29#include <SafetyController.h>
30#include <SupportFPGAData.h>
31#include <cRIO/DataTypes.h>
32
33struct MTM1M3_powerSupplyDataC;
34struct MTM1M3_logevent_powerStatusC;
35struct MTM1M3_logevent_powerSupplyStatusC;
36struct MTM1M3_logevent_powerWarningC;
37
38namespace LSST {
39namespace M1M3 {
40namespace SS {
41
46public:
51 PowerController(SafetyController *safetyController);
52
56 void processData();
57
62 void setBothPowerNetworks(bool on);
63
68 void setAllPowerNetworks(bool on);
73 void setPowerNetworkA(bool on);
78 void setPowerNetworkB(bool on);
83 void setPowerNetworkC(bool on);
88 void setPowerNetworkD(bool on);
89
94 void setAllAuxPowerNetworks(bool on);
99 void setAuxPowerNetworkA(bool on);
104 void setAuxPowerNetworkB(bool on);
109 void setAuxPowerNetworkC(bool on);
114 void setAuxPowerNetworkD(bool on);
115
116private:
117 SafetyController *_safetyController;
118
119 MTM1M3_powerSupplyDataC *_powerSupplyData;
120 MTM1M3_logevent_powerStatusC *_powerStatus;
121 MTM1M3_logevent_powerWarningC *_powerWarning;
122
123 uint64_t _lastPowerTimestamp;
124};
125
126} /* namespace SS */
127} /* namespace M1M3 */
128} /* namespace LSST */
129
130#endif /* POWERCONTROLLER_H_ */
Definition PowerController.h:45
void setBothPowerNetworks(bool on)
Definition PowerController.cpp:110
void setPowerNetworkC(bool on)
Definition PowerController.cpp:162
void setAuxPowerNetworkC(bool on)
Definition PowerController.cpp:208
void processData()
Definition PowerController.cpp:53
void setPowerNetworkB(bool on)
Definition PowerController.cpp:154
void setPowerNetworkD(bool on)
Definition PowerController.cpp:170
void setAllPowerNetworks(bool on)
Definition PowerController.cpp:132
void setPowerNetworkA(bool on)
Definition PowerController.cpp:146
void setAuxPowerNetworkB(bool on)
Definition PowerController.cpp:200
void setAuxPowerNetworkD(bool on)
Definition PowerController.cpp:216
void setAllAuxPowerNetworks(bool on)
Definition PowerController.cpp:178
PowerController(SafetyController *safetyController)
Definition PowerController.cpp:38
void setAuxPowerNetworkA(bool on)
Definition PowerController.cpp:192
Controls mirror safety.
Definition SafetyController.h:50