AuboCaps  0.6.0
set_node.h
Go to the documentation of this file.
1 #ifndef AUBO_SCOPE_SET_NODE_H
2 #define AUBO_SCOPE_SET_NODE_H
3 
7 
8 namespace arcs {
9 namespace aubo_scope {
10 ARCS_CLASS_FORWARD(SetNode);
11 
13 {
14 public:
15  /**
16  * The configuration type used to determine which type of configuration this
17  * instance is.
18  */
20  {
21  /**
22  * No selection has been made. This type has no further information.
23  */
25 
26  /**
27  * No action has been selected. This type has no further information.
28  */
30 
31  /**
32  * <p>
33  * Digital output has been selected.
34  * </p>
35  *
36  * The config instance can be cast to {@link
37  * DigitalOutputSetNodeConfig}.
38  */
40 
41  /**
42  * <p>
43  * Analog output configured for electric current or no output has been
44  * selected.
45  * </p>
46  *
47  * The config instance can be cast to {@link
48  * AnalogOutputCurrentSetNodeConfig}.
49  */
51 
52  /**
53  * <p>
54  * Analog output configured for voltage has been selected.
55  * </p>
56  *
57  * The config instance can be cast to {@link
58  * AnalogOutputVoltageSetNodeConfig}.
59  */
61 
62  /**
63  * <p>
64  * Register using float type values has been selected.
65  * </p>
66  *
67  * The config instance can be cast to {@link
68  * FloatRegisterOutputSetNodeConfig}.
69  */
71 
72  /**
73  * <p>
74  * Expression output has been selected.
75  * </p>
76  *
77  * The config instance can be cast to {@link
78  * ExpressionOutputSetNodeConfig}.
79  */
81 
82  /**
83  * <p>
84  * Single digital pulse output has been selected.
85  * </p>
86  *
87  * The config instance can be cast to {@link
88  * SingleDigitalPulseSetNodeConfig}.
89  */
91 
92  /**
93  * <p>
94  * Increment variable has been selected. This type has no further
95  * information.
96  * </p>
97  *
98  * Setting this type of config will be ignored and will have no effect
99  * on the node.
100  */
102  };
103 
105  {
106 
107  /**
108  * No output is selected.
109  */
111 
112  /**
113  * The selected output is no longer available (e.g. because the end user
114  * has removed the output in the Installation or the needed Installation
115  * is not currently loaded).
116  */
118 
119  /**
120  * <p>
121  * Output is selected.
122  * </p>
123  *
124  * The Selection instance can be cast to {@link ExpressionOutput}.
125  */
126  OUTPUT
127  };
128  SetNode(SetNode &f);
129  SetNode(SetNode &&f);
130  virtual ~SetNode();
131 
132  /**
133  * This method returns the type of configuration. Cast this instance
134  * appropriately to have access to specific getters.
135  *
136  * @return the type of this config.
137  */
138  ConfigType getConfigType();
139  void setConfigType(ConfigType type);
140 
141  /**
142  * @return the time for the length of the pulse.
143  */
144  double getPulseTime();
145  void setPulseTime(double time);
146 
147  /**
148  *
149  * @return the float value to be applied to the float register output.
150  */
151  float getFloatValueToSet();
152  void setFloatValueToSet(float value);
153 
154  /**
155  * @return the analog output value.
156  */
157  double getAnalogOutput();
158  void setAnalogOutput(double value);
159 
160  OutputSelectionType getOutputSelectionType();
161 
162  /**
163  *
164  * @return the expression whose evaluation will be applied to the output.
165  */
166  ExpressionPtr getExpression();
167  void setExpression(ExpressionPtr expression);
168 
169  /**
170  * The output selected can be an analog output, a digital output, a MODBUS
171  * output or a register output.
172  *
173  * @return the output to which the result of the evaluation of the
174  * expression will be applied.
175  */
176  IoPtr getOutput();
177  void setOutput(IoPtr io);
178 
179  /**
180  * Depending on the type of output this is interpreted in different ways.
181  * For digital output and MODBUS output,
182  * <code>true</code> means the output will be set to HIGH,
183  * </code>false</code> means the output will be set to LOW. For boolean
184  * register the value is interpreted literally.
185  *
186  * @return the output value.
187  */
188  bool getBoolValueToSet();
189  void setBoolValueToSet(bool value);
190 
191  /**
192  *
193  * @return the voltage value/level to be applied to the output
194  */
195  double getVoltage();
196  void setVoltage(double voltage);
197 
198  /**
199  *
200  * @return the electric current value/level to be applied to the output.
201  */
202  double getCurrent();
203  void setCurrent(double curr);
204 
205 private:
206  friend class DataSwitch;
207  SetNode();
208  void *d_{ nullptr };
209 };
210 
211 } // namespace aubo_scope
212 } // namespace arcs
213 #endif // AUBO_SCOPE_SET_NODE_H
ARCS_CLASS_FORWARD(GripForceCapability)
No action has been selected.
Definition: set_node.h:29
ConfigType
The configuration type used to determine which type of configuration this instance is...
Definition: set_node.h:19
No output is selected.
Definition: set_node.h:110
#define ARCS_ABI_EXPORT
Definition: class_forward.h:16
No selection has been made.
Definition: set_node.h:24
The selected output is no longer available (e.g.
Definition: set_node.h:117