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 * \chinese
134 * 返回配置类型。适当转换此实例以访问特定的 getter。
135 * @return 此配置的类型
136 * \endchinese
137 * \english
138 * This method returns the type of configuration. Cast this instance
139 * appropriately to have access to specific getters.
140 * @return the type of this config.
141 * \endenglish
142 */
145
146 /**
147 * @return the time for the length of the pulse.
148 */
149 double getPulseTime();
150 void setPulseTime(double time);
151
152 /**
153 *
154 * @return the float value to be applied to the float register output.
155 */
157 void setFloatValueToSet(float value);
158
159 /**
160 * @return the analog output value.
161 */
163 void setAnalogOutput(double value);
164
166
167 /**
168 *
169 * @return the expression whose evaluation will be applied to the output.
170 */
171 ExpressionPtr getExpression();
172 void setExpression(ExpressionPtr expression);
173
174 /**
175 * The output selected can be an analog output, a digital output, a MODBUS
176 * output or a register output.
177 *
178 * @return the output to which the result of the evaluation of the
179 * expression will be applied.
180 */
181 IoPtr getOutput();
182 void setOutput(IoPtr io);
183
184 /**
185 * Depending on the type of output this is interpreted in different ways.
186 * For digital output and MODBUS output,
187 * <code>true</code> means the output will be set to HIGH,
188 * </code>false</code> means the output will be set to LOW. For boolean
189 * register the value is interpreted literally.
190 *
191 * @return the output value.
192 */
194 void setBoolValueToSet(bool value);
195
196 /**
197 *
198 * @return the voltage value/level to be applied to the output
199 */
200 double getVoltage();
201 void setVoltage(double voltage);
202
203 /**
204 *
205 * @return the electric current value/level to be applied to the output.
206 */
207 double getCurrent();
208 void setCurrent(double curr);
209
210private:
211 friend class DataSwitch;
213 void *d_{ nullptr };
214};
215
216} // namespace aubo_scope
217} // namespace arcs
218#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()
\chinese 返回配置类型。适当转换此实例以访问特定的 getter。
void setFloatValueToSet(float value)
void setOutput(IoPtr io)