AuboCaps  0.6.2
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 the action number of the I/O.
76  */
77  int getAction() const;
78 
79  /**
80  *
81  * @return <code>true</code> if I/O supports reading of values and
82  * <code>false</code> otherwise.
83  */
84  bool isInput() const;
85 
86  /**
87  * Some I/Os, such as MODBUS I/Os and analog Tool inputs, are in some
88  * situations not present in AuboScope or available for use. This method can
89  * be used to determine if the I/O is available. <br>
90  *
91  * For more details about the specific situations where certain types of
92  * I/Os can be unresolved, see the relevant interfaces extending this base
93  * interface, e.g. {@link ModbusIO#isResolvable()}.
94  *
95  * @return <code>true</code>, if I/O can be resolved.
96  * <code>false</code> otherwise.
97  */
98  bool isResolvable() const;
99 
100  size_t hashCode();
101 
102 protected:
103  Io();
104 
105 private:
106  friend class DataSwitch;
107  void *d_{ nullptr };
108 };
109 
110 } // namespace aubo_scope
111 } // namespace arcs
112 
113 #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