AuboStudio SDK  0.6.3
io.h
Go to the documentation of this file.
1 #ifndef AUBO_SCOPE_IO_H
2 #define AUBO_SCOPE_IO_H
3 
4 #include <string>
6 
7 namespace arcs {
8 namespace aubo_scope {
10 
11 /**
12  *
13  * This is the base interface representing all types of I/Os available in
14  * AuboScope.
15  */
17 {
18 public:
19  enum IoType : int
20  {
25  DOUBLE
26  };
27  enum InterfaceType : int
28  {
37  };
38 
39 public:
40  Io(Io &f);
41  Io(Io &&f);
42  virtual ~Io();
43 
44  /**
45  *
46  * @return the user defined name of the IO in the currently selected
47  * installation.
48  */
49  std::string getDisplayName() const;
50 
51  /**
52  *
53  * @return the robot default name of the I/O.
54  */
55  std::string getDefaultName() const;
56 
57  /**
58  *
59  * @return get current reading of the I/O as a string.
60  */
61  std::string getValueStr() const;
62 
63  /**
64  *
65  * @return the I/O type.
66  */
67  IoType getType() const;
68 
69  /**
70  *
71  * @return the interface type this I/O belongs to.
72  */
73  InterfaceType getInterfaceType() const;
74 
75  /**
76  *
77  * @return the action number of the I/O.
78  */
79  int getAction() const;
80 
81  /**
82  *
83  * @return <code>true</code> if I/O supports reading of values and
84  * <code>false</code> otherwise.
85  */
86  bool isInput() const;
87 
88  /**
89  * Some I/Os, such as MODBUS I/Os and analog Tool inputs, are in some
90  * situations not present in AuboScope or available for use. This method can
91  * be used to determine if the I/O is available. <br>
92  *
93  * For more details about the specific situations where certain types of
94  * I/Os can be unresolved, see the relevant interfaces extending this base
95  * interface, e.g. {@link ModbusIO#isResolvable()}.
96  *
97  * @return <code>true</code>, if I/O can be resolved.
98  * <code>false</code> otherwise.
99  */
100  bool isResolvable() const;
101 
102  size_t hashCode();
103 
104 protected:
105  Io();
106 
107 private:
108  friend class DataSwitch;
109  void *d_{ nullptr };
110 };
111 
112 } // namespace aubo_scope
113 } // namespace arcs
114 
115 #endif // AUBO_SCOPE_IO_H
ARCS_CLASS_FORWARD(GripForceCapability)
This is the base interface representing all types of I/Os available in AuboScope. ...
Definition: io.h:16
#define ARCS_ABI_EXPORT
Definition: class_forward.h:16