AuboCaps  0.6.0
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  {
35  };
36 
37 public:
38  Io(Io &f);
39  Io(Io &&f);
40  virtual ~Io();
41 
42  /**
43  *
44  * @return the user defined name of the IO in the currently selected
45  * installation.
46  */
47  std::string getDisplayName() const;
48 
49  /**
50  *
51  * @return the robot default name of the I/O.
52  */
53  std::string getDefaultName() const;
54 
55  /**
56  *
57  * @return get current reading of the I/O as a string.
58  */
59  std::string getValueStr() const;
60 
61  /**
62  *
63  * @return the I/O type.
64  */
65  IoType getType() const;
66 
67  /**
68  *
69  * @return the interface type this I/O belongs to.
70  */
71  InterfaceType getInterfaceType() const;
72 
73  /**
74  *
75  * @return <code>true</code> if I/O supports reading of values and
76  * <code>false</code> otherwise.
77  */
78  bool isInput() const;
79 
80  /**
81  * Some I/Os, such as MODBUS I/Os and analog Tool inputs, are in some
82  * situations not present in AuboScope or available for use. This method can
83  * be used to determine if the I/O is available. <br>
84  *
85  * For more details about the specific situations where certain types of
86  * I/Os can be unresolved, see the relevant interfaces extending this base
87  * interface, e.g. {@link ModbusIO#isResolvable()}.
88  *
89  * @return <code>true</code>, if I/O can be resolved.
90  * <code>false</code> otherwise.
91  */
92  bool isResolvable() const;
93 
94  size_t hashCode();
95 
96 protected:
97  Io();
98 
99 private:
100  friend class DataSwitch;
101  void *d_{ nullptr };
102 };
103 
104 } // namespace aubo_scope
105 } // namespace arcs
106 
107 #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