AuboStudio SDK  0.6.3
io.h
浏览该文件的文档.
1#ifndef AUBO_SCOPE_IO_H
2#define AUBO_SCOPE_IO_H
3
4#include <string>
6
7namespace arcs {
8namespace aubo_scope {
10
11/**
12 * \chinese
13 * IO 基础接口
14 * 这是表示 AuboScope 中所有可用 I/O 类型的基础接口。
15 * \endchinese
16 * \english
17 * Io
18 * This is the base interface representing all types of I/Os available in
19 * AuboScope.
20 * \endenglish
21 */
23{
24public:
44
45public:
46 Io(Io &f);
47 Io(Io &&f);
48 virtual ~Io();
49
50 /**
51 * \chinese
52 * 获取当前安装中I/O的用户自定义名称
53 * @return I/O的显示名称。
54 * \endchinese
55 * \english
56 * Returns the user defined name of the IO in the currently selected
57 * installation.
58 * @return the user defined name of the IO.
59 * \endenglish
60 */
61 std::string getDisplayName() const;
62
63 /**
64 * \chinese
65 * 获取I/O的机器人默认名称
66 * @return I/O的默认名称。
67 * \endchinese
68 * \english
69 * Returns the robot default name of the I/O.
70 * @return the robot default name of the I/O.
71 * \endenglish
72 */
73 std::string getDefaultName() const;
74
75 /**
76 * \chinese
77 * 获取I/O的当前读数值(字符串形式)
78 * @return I/O的当前读数。
79 * \endchinese
80 * \english
81 * Returns the current reading of the I/O as a string.
82 * @return get current reading of the I/O as a string.
83 * \endenglish
84 */
85 std::string getValueStr() const;
86
87 /**
88 * \chinese
89 * 获取I/O类型
90 * @return I/O类型枚举。
91 * \endchinese
92 * \english
93 * Returns the I/O type.
94 * @return the I/O type.
95 * \endenglish
96 */
97 IoType getType() const;
98
99 /**
100 * \chinese
101 * 获取此I/O所属的接口类型
102 * @return 接口类型枚举。
103 * \endchinese
104 * \english
105 * Returns the interface type this I/O belongs to.
106 * @return the interface type this I/O belongs to.
107 * \endenglish
108 */
110
111 /**
112 * \chinese
113 * 获取I/O的动作编号
114 * @return I/O的动作编号。
115 * \endchinese
116 * \english
117 * Returns the action number of the I/O.
118 * @return the action number of the I/O.
119 * \endenglish
120 */
121 int getAction() const;
122
123 /**
124 * \chinese
125 * 判断I/O是否支持读取值
126 * @return 如果I/O支持读取返回<code>true</code>,否则返回<code>false</code>。
127 * \endchinese
128 * \english
129 * Returns <code>true</code> if I/O supports reading of values and
130 * <code>false</code> otherwise.
131 * @return <code>true</code> if I/O supports reading of values.
132 * \endenglish
133 */
134 bool isInput() const;
135
136 /**
137 * \chinese
138 * 某些I/O(如MODBUS I/O和模拟工具输入)在某些情况下可能不可用。此方法用于判断
139 * I/O是否可用。
140 * @return 如果I/O可解析返回<code>true</code>,否则返回<code>false</code>。
141 * \endchinese
142 * \english
143 * Some I/Os, such as MODBUS I/Os and analog Tool inputs, are in some
144 * situations not present in AuboScope or available for use. This method can
145 * be used to determine if the I/O is available.
146 * @return <code>true</code>, if I/O can be resolved.
147 * <code>false</code> otherwise.
148 * \endenglish
149 */
150 bool isResolvable() const;
151
152 size_t hashCode();
153
154protected:
155 Io();
156
157private:
158 friend class DataSwitch;
159 void *d_{ nullptr };
160};
161
162} // namespace aubo_scope
163} // namespace arcs
164
165#endif // AUBO_SCOPE_IO_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...
\chinese IO 基础接口 这是表示 AuboScope 中所有可用 I/O 类型的基础接口。 \endchinese \english Io This is the base interface...
定义 io.h:23
std::string getDisplayName() const
\chinese 获取当前安装中I/O的用户自定义名称
std::string getValueStr() const
\chinese 获取I/O的当前读数值(字符串形式)
InterfaceType getInterfaceType() const
\chinese 获取此I/O所属的接口类型
friend class DataSwitch
定义 io.h:158
bool isResolvable() const
\chinese 某些I/O(如MODBUS I/O和模拟工具输入)在某些情况下可能不可用。此方法用于判断 I/O是否可用。
std::string getDefaultName() const
\chinese 获取I/O的机器人默认名称
IoType getType() const
\chinese 获取I/O类型
int getAction() const
\chinese 获取I/O的动作编号
bool isInput() const
\chinese 判断I/O是否支持读取值