AuboStudio SDK  0.6.3
set_node.h
浏览该文件的文档.
1#ifndef AUBO_SCOPE_SET_NODE_H
2#define AUBO_SCOPE_SET_NODE_H
3
7
8namespace arcs {
9namespace aubo_scope {
11
13{
14public:
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 */
127 };
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 */
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 */
152 void setFloatValueToSet(float value);
153
154 /**
155 * @return the analog output value.
156 */
158 void setAnalogOutput(double value);
159
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 */
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
205private:
206 friend class DataSwitch;
208 void *d_{ nullptr };
209};
210
211} // namespace aubo_scope
212} // namespace arcs
213#endif // AUBO_SCOPE_SET_NODE_H
#define ARCS_ABI_EXPORT
#define ARCS_CLASS_FORWARD(C)
Macro that forward declares a class and defines the respective smartpointers through ARCS_DECLARE_PTR...
void setCurrent(double curr)
void setVoltage(double voltage)
IoPtr getOutput()
The output selected can be an analog output, a digital output, a MODBUS output or a register output.
ConfigType
The configuration type used to determine which type of configuration this instance is.
@ NO_ACTION
No action has been selected.
@ NO_TYPE
No selection has been made.
void setConfigType(ConfigType type)
void setExpression(ExpressionPtr expression)
void setBoolValueToSet(bool value)
ExpressionPtr getExpression()
void setAnalogOutput(double value)
bool getBoolValueToSet()
Depending on the type of output this is interpreted in different ways.
void setPulseTime(double time)
OutputSelectionType getOutputSelectionType()
@ UNRESOLVED_OUTPUT
The selected output is no longer available (e.g.
@ NO_OUTPUT
No output is selected.
ConfigType getConfigType()
This method returns the type of configuration.
void setFloatValueToSet(float value)
void setOutput(IoPtr io)