AuboStudio SDK 0.6.3

set_node.h
浏览该文件的文档.
1 #ifndef AUBO_SCOPE_SET_NODE_H
2 #define AUBO_SCOPE_SET_NODE_H
3
4 #include <aubo_caps/domain/program/nodes/program_node.h>
5 #include <aubo_caps/domain/value/expression/expression.h>
6 #include <aubo_caps/domain/io/io.h>
7
8 namespace arcs {
9 namespace aubo_scope {
10 ARCS_CLASS_FORWARD(SetNode);
11
12 class ARCS_ABI_EXPORT SetNode : public ProgramNode
13 {
14 public:
15 /**
16 * The configuration type used to determine which type of configuration this
17 * instance is.
18 */
19 enum ConfigType
20 {
21 /**
22 * No selection has been made. This type has no further information.
23 */
24 NO_TYPE,
25
26 /**
27 * No action has been selected. This type has no further information.
28 */
29 NO_ACTION,
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 */
39 DIGITAL_OUTPUT,
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 */
50 ANALOG_OUTPUT_CURRENT,
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 */
60 ANALOG_OUTPUT_VOLTAGE,
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 */
70 FLOAT_REGISTER_OUTPUT,
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 */
80 EXPRESSION_OUTPUT,
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 */
90 SINGLE_DIGITAL_PULSE,
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 */
101 INCREMENT_VARIABLE,
102 };
103
104 enum OutputSelectionType
105 {
106
107 /**
108 * No output is selected.
109 */
110 NO_OUTPUT,
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 */
117 UNRESOLVED_OUTPUT,
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_ABI_EXPORT
#define ARCS_ABI_EXPORT
Definition: class_forward.h:16
arcs::aubo_scope::ProgramNode
Definition: program_node.h:19
arcs::aubo_scope::SetNode
Definition: set_node.h:13
arcs::aubo_scope::SetNode::setCurrent
void setCurrent(double curr)
arcs::aubo_scope::SetNode::setVoltage
void setVoltage(double voltage)
arcs::aubo_scope::SetNode::getOutput
IoPtr getOutput()
The output selected can be an analog output, a digital output, a MODBUS output or a register output.
arcs::aubo_scope::SetNode::ConfigType
ConfigType
The configuration type used to determine which type of configuration this instance is.
Definition: set_node.h:20
arcs::aubo_scope::SetNode::EXPRESSION_OUTPUT
@ EXPRESSION_OUTPUT
Definition: set_node.h:80
arcs::aubo_scope::SetNode::FLOAT_REGISTER_OUTPUT
@ FLOAT_REGISTER_OUTPUT
Definition: set_node.h:70
arcs::aubo_scope::SetNode::SINGLE_DIGITAL_PULSE
@ SINGLE_DIGITAL_PULSE
Definition: set_node.h:90
arcs::aubo_scope::SetNode::INCREMENT_VARIABLE
@ INCREMENT_VARIABLE
Definition: set_node.h:101
arcs::aubo_scope::SetNode::DIGITAL_OUTPUT
@ DIGITAL_OUTPUT
Definition: set_node.h:39
arcs::aubo_scope::SetNode::NO_ACTION
@ NO_ACTION
No action has been selected.
Definition: set_node.h:29
arcs::aubo_scope::SetNode::ANALOG_OUTPUT_CURRENT
@ ANALOG_OUTPUT_CURRENT
Definition: set_node.h:50
arcs::aubo_scope::SetNode::ANALOG_OUTPUT_VOLTAGE
@ ANALOG_OUTPUT_VOLTAGE
Definition: set_node.h:60
arcs::aubo_scope::SetNode::NO_TYPE
@ NO_TYPE
No selection has been made.
Definition: set_node.h:24
arcs::aubo_scope::SetNode::setConfigType
void setConfigType(ConfigType type)
arcs::aubo_scope::SetNode::getCurrent
double getCurrent()
arcs::aubo_scope::SetNode::getAnalogOutput
double getAnalogOutput()
arcs::aubo_scope::SetNode::getFloatValueToSet
float getFloatValueToSet()
arcs::aubo_scope::SetNode::setExpression
void setExpression(ExpressionPtr expression)
arcs::aubo_scope::SetNode::setBoolValueToSet
void setBoolValueToSet(bool value)
arcs::aubo_scope::SetNode::getExpression
ExpressionPtr getExpression()
arcs::aubo_scope::SetNode::SetNode
SetNode(SetNode &&f)
arcs::aubo_scope::SetNode::setAnalogOutput
void setAnalogOutput(double value)
arcs::aubo_scope::SetNode::~SetNode
virtual ~SetNode()
arcs::aubo_scope::SetNode::getBoolValueToSet
bool getBoolValueToSet()
Depending on the type of output this is interpreted in different ways.
arcs::aubo_scope::SetNode::setPulseTime
void setPulseTime(double time)
arcs::aubo_scope::SetNode::getOutputSelectionType
OutputSelectionType getOutputSelectionType()
arcs::aubo_scope::SetNode::OutputSelectionType
OutputSelectionType
Definition: set_node.h:105
arcs::aubo_scope::SetNode::UNRESOLVED_OUTPUT
@ UNRESOLVED_OUTPUT
The selected output is no longer available (e.g.
Definition: set_node.h:117
arcs::aubo_scope::SetNode::NO_OUTPUT
@ NO_OUTPUT
No output is selected.
Definition: set_node.h:110
arcs::aubo_scope::SetNode::SetNode
SetNode(SetNode &f)
arcs::aubo_scope::SetNode::SetNode
SetNode()
arcs::aubo_scope::SetNode::getPulseTime
double getPulseTime()
arcs::aubo_scope::SetNode::getVoltage
double getVoltage()
arcs::aubo_scope::SetNode::getConfigType
ConfigType getConfigType()
This method returns the type of configuration.
arcs::aubo_scope::SetNode::setFloatValueToSet
void setFloatValueToSet(float value)
arcs::aubo_scope::SetNode::setOutput
void setOutput(IoPtr io)
expression.h
io.h
arcs::aubo_scope::ARCS_CLASS_FORWARD
ARCS_CLASS_FORWARD(GripForceCapability)
arcs
Definition: contribution_provider.h:7
program_node.h