M1M3 Support System
Loading...
Searching...
No Matches
ILCSubnetData.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 ILCSUBNETDATA_H_
25#define ILCSUBNETDATA_H_
26
27#include <ILCDataTypes.h>
28
29namespace LSST {
30namespace M1M3 {
31namespace SS {
32
33class ForceActuatorApplicationSettings;
34class ForceActuatorSettings;
35class HardpointActuatorApplicationSettings;
36class HardpointMonitorApplicationSettings;
37
39 struct Container {
40 int32_t HPCount;
41 std::vector<ILCMap> HPIndex;
42 int32_t FACount;
43 std::vector<ILCMap> FAIndex;
44 int32_t HMCount;
45 std::vector<ILCMap> HMIndex;
46 ILCMap ILCDataFromAddress[256];
47 };
48 Container subnetData[5];
49
50public:
51 ILCSubnetData(ForceActuatorApplicationSettings *forceActuatorApplicationSettings,
52 HardpointActuatorApplicationSettings *hardpointActuatorApplicationSettings,
53 HardpointMonitorApplicationSettings *hardpointMonitorApplicationSettings);
54
55 int32_t getHPCount(int32_t subnetIndex) { return this->subnetData[subnetIndex].HPIndex.size(); }
56 ILCMap getHPIndex(int32_t subnetIndex, int32_t hpIndex) {
57 return this->subnetData[subnetIndex].HPIndex[hpIndex];
58 }
59 int32_t getFACount(int32_t subnetIndex) { return this->subnetData[subnetIndex].FAIndex.size(); }
60 ILCMap getFAIndex(int32_t subnetIndex, int32_t faIndex) {
61 return this->subnetData[subnetIndex].FAIndex[faIndex];
62 }
63 int32_t getHMCount(int32_t subnetIndex) { return this->subnetData[subnetIndex].HMIndex.size(); }
64 ILCMap getHMIndex(int32_t subnetIndex, int32_t hmIndex) {
65 return this->subnetData[subnetIndex].HMIndex[hmIndex];
66 }
67 ILCMap getILCDataFromAddress(int32_t subnetIndex, uint8_t address) {
68 return this->subnetData[subnetIndex].ILCDataFromAddress[address];
69 }
70
79 ILCMap getMap(int32_t actuatorId);
80
81 void disableFA(int32_t actuatorId);
82 void enableFA(int32_t actuatorId);
83 void enableAllFA();
84
85private:
86 ForceActuatorApplicationSettings *_forceActuatorApplicationSettings;
87};
88
89} /* namespace SS */
90} /* namespace M1M3 */
91} /* namespace LSST */
92
93#endif /* ILCSUBNETDATA_H_ */
(Almost) constant force actuator values.
Definition ForceActuatorApplicationSettings.h:87
Loads Hardpoint Settings.
Definition HardpointActuatorApplicationSettings.h:51
Definition HardpointMonitorApplicationSettings.h:40
Definition ILCSubnetData.h:38
ILCMap getMap(int32_t actuatorId)
Returns ILCMap for actuator with given ID.
Definition ILCSubnetData.cpp:98
ILC data.
Definition ILCDataTypes.h:42