gmt_dos_clients_io/
gmt_m2.rs

1//! GMT secondary mirror
2
3use interface::UID;
4
5/// M2 Rigid Body Motions
6#[derive(UID)]
7#[uid(port = 57_001)]
8pub enum M2RigidBodyMotions {}
9/// M2 Positioner Forces
10#[derive(UID)]
11#[uid(port = 57_002)]
12pub enum M2PositionerForces {}
13/// M2 Positioner Nodes Displacements
14#[derive(UID)]
15#[uid(port = 57_003)]
16pub enum M2PositionerNodes {}
17/// M2 edge sensors
18#[derive(UID)]
19#[uid(port = 57_004)]
20pub enum M2EdgeSensors {}
21
22/// Fast Steering Mirror IO
23pub mod fsm {
24    use interface::UID;
25
26    use crate::Assembly;
27
28    /// M2 FSM Piezo-Stack Actuators Forces
29    #[derive(UID)]
30    #[uid(port = 58_001)]
31    pub enum M2FSMPiezoForces {}
32    impl Assembly for M2FSMPiezoForces {}
33    /// M2 FSM Piezo-Stack Actuators Node Displacements
34    #[derive(UID)]
35    #[uid(port = 58_002)]
36    pub enum M2FSMPiezoNodes {}
37    /// M2 FSM Tip-Tilt Modes
38    #[derive(UID)]
39    #[uid(port = 58_003)]
40    pub enum M2FSMFsmTipTilt {}
41    /// M2 FSM Actuator displacement command
42    #[derive(UID)]
43    #[uid(port = 58_004)]
44    pub enum M2FSMFsmCommand {}
45
46    pub mod segment {
47        use interface::UniqueIdentifier;
48        /// Piezo-Stack Actuators Forces
49        pub enum PiezoForces<const ID: u8> {}
50        impl<const ID: u8> UniqueIdentifier for PiezoForces<ID> {
51            const PORT: u16 = 58_001 + 100 * ID as u16;
52            type DataType = Vec<f64>;
53        }
54        /// Piezo-Stack Actuators Node Displacements
55        pub enum PiezoNodes<const ID: u8> {}
56        impl<const ID: u8> UniqueIdentifier for PiezoNodes<ID> {
57            const PORT: u16 = 58_002 + 100 * ID as u16;
58            type DataType = Vec<f64>;
59        }
60        /// Tip-Tilt Modes
61        pub enum FsmTipTilt<const ID: u8> {}
62        impl<const ID: u8> UniqueIdentifier for FsmTipTilt<ID> {
63            const PORT: u16 = 58_003 + 100 * ID as u16;
64            type DataType = Vec<f64>;
65        }
66        /// Actuator displacement command
67        pub enum FsmCommand<const ID: u8> {}
68        impl<const ID: u8> UniqueIdentifier for FsmCommand<ID> {
69            const PORT: u16 = 58_004 + 100 * ID as u16;
70            type DataType = Vec<f64>;
71        }
72    }
73}
74/// Adaptive Secondary Mirror IO
75pub mod asm {
76    use interface::{UID, UniqueIdentifier};
77    use std::sync::Arc;
78
79    use crate::Assembly;
80
81    /// M2 ASM Rigid Body Forces
82    #[derive(UID)]
83    #[uid(port = 59_001)]
84    pub enum M2ASMReferenceBodyForces {}
85    /// M2 ASM Cold Plate Forces
86    #[derive(UID)]
87    #[uid(port = 59_002)]
88    pub enum M2ASMColdPlateForces {}
89    /// M2 ASM Face Sheet Forces
90    #[derive(UID)]
91    #[uid(port = 59_003)]
92    pub enum M2ASMFaceSheetForces {}
93    /// M2 ASM Rigid Body Nodes
94    #[derive(UID)]
95    #[uid(port = 59_004)]
96    pub enum M2ASMReferenceBodyNodes {}
97    /// M2 ASM Cold Plate Nodes
98    #[derive(UID)]
99    #[uid(port = 59_005)]
100    pub enum M2ASMColdPlateNodes {}
101    /// M2 ASM Face Sheet Nodes
102    #[derive(UID)]
103    #[uid(port = 59_006)]
104    pub enum M2ASMFaceSheetNodes {}
105
106    /// M2 ASM voice coils forces
107    pub enum M2ASMVoiceCoilsForces {}
108    impl Assembly for M2ASMVoiceCoilsForces {}
109    impl UniqueIdentifier for M2ASMVoiceCoilsForces {
110        type DataType = Vec<Arc<Vec<f64>>>;
111        const PORT: u16 = 59_007;
112    }
113
114    /// M2 ASM voice coils displacements
115    pub enum M2ASMVoiceCoilsMotion {}
116    impl Assembly for M2ASMVoiceCoilsMotion {}
117    impl UniqueIdentifier for M2ASMVoiceCoilsMotion {
118        type DataType = Vec<Arc<Vec<f64>>>;
119        const PORT: u16 = 59_008;
120    }
121
122    /// M2 ASM fluid damping forces
123    pub enum M2ASMFluidDampingForces {}
124    impl Assembly for M2ASMFluidDampingForces {}
125    impl UniqueIdentifier for M2ASMFluidDampingForces {
126        type DataType = Vec<Arc<Vec<f64>>>;
127        const PORT: u16 = 50_009;
128    }
129
130    /// M2 ASM modal command coefficients
131    pub enum M2ASMAsmCommand {}
132    impl Assembly for M2ASMAsmCommand {}
133    impl UniqueIdentifier for M2ASMAsmCommand {
134        type DataType = Vec<f64>;
135        const PORT: u16 = 59_010;
136    }
137
138    /// M2 ASM face sheet displacements
139    pub enum M2ASMFaceSheetFigure {}
140    impl Assembly for M2ASMFaceSheetFigure {}
141    impl UniqueIdentifier for M2ASMFaceSheetFigure {
142        type DataType = Vec<Vec<f64>>;
143        const PORT: u16 = 59_011;
144    }
145
146    pub mod segment {
147        use interface::UniqueIdentifier;
148        /// Voice coils forces
149        pub enum VoiceCoilsForces<const ID: u8> {}
150        impl<const ID: u8> UniqueIdentifier for VoiceCoilsForces<ID> {
151            const PORT: u16 = 59_001 + 100 * ID as u16;
152            type DataType = Vec<f64>;
153        }
154        /// Voice coils displacements
155        pub enum VoiceCoilsMotion<const ID: u8> {}
156        impl<const ID: u8> UniqueIdentifier for VoiceCoilsMotion<ID> {
157            const PORT: u16 = 59_002 + 100 * ID as u16;
158            type DataType = Vec<f64>;
159        }
160        /// Fluid damping forces
161        pub enum FluidDampingForces<const ID: u8> {}
162        impl<const ID: u8> UniqueIdentifier for FluidDampingForces<ID> {
163            const PORT: u16 = 59_003 + 100 * ID as u16;
164            type DataType = Vec<f64>;
165        }
166        /// Modal command coefficients
167        pub enum AsmCommand<const ID: u8> {}
168        impl<const ID: u8> UniqueIdentifier for AsmCommand<ID> {
169            const PORT: u16 = 59_004 + 100 * ID as u16;
170            type DataType = Vec<f64>;
171        }
172        /// Face sheet displacements
173        pub enum FaceSheetFigure<const ID: u8> {}
174        impl<const ID: u8> UniqueIdentifier for FaceSheetFigure<ID> {
175            const PORT: u16 = 59_005 + 100 * ID as u16;
176            type DataType = Vec<f64>;
177        }
178    }
179}