AuboCaps  0.4.1
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  OutputSelectionType getOutputSelectionType();
155 
156  /**
157  *
158  * @return the expression whose evaluation will be applied to the output.
159  */
160  ExpressionPtr getExpression();
161  void setExpression(ExpressionPtr expression);
162 
163  /**
164  * The output selected can be an analog output, a digital output, a MODBUS
165  * output or a register output.
166  *
167  * @return the output to which the result of the evaluation of the
168  * expression will be applied.
169  */
170  IoPtr getOutput();
171  void setOutput(IoPtr io);
172 
173  /**
174  * Depending on the type of output this is interpreted in different ways.
175  * For digital output and MODBUS output,
176  * <code>true</code> means the output will be set to HIGH,
177  * </code>false</code> means the output will be set to LOW. For boolean
178  * register the value is interpreted literally.
179  *
180  * @return the output value.
181  */
182  bool getBoolValueToSet();
183  void setBoolValueToSet(bool value);
184 
185  /**
186  *
187  * @return the voltage value/level to be applied to the output
188  */
189  double getVoltage();
190  void setVoltage(double voltage);
191 
192  /**
193  *
194  * @return the electric current value/level to be applied to the output.
195  */
196  double getCurrent();
197  void setCurrent(double curr);
198 
199 private:
200  friend class DataSwitch;
201  SetNode();
202  void *d_{ nullptr };
203 };
204 
205 } // namespace aubo_scope
206 } // namespace arcs
207 #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