AuboCaps  0.4.1
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  {
36  };
37  enum DigitalInputAction : int
38  {
46  };
48  {
53  };
54 
55  enum AnalogInputAction : int
56  {
58  };
59 
60  enum AnalogOutputAction : int
61  {
66  };
67 
68 public:
69  Io(Io &f);
70  Io(Io &&f);
71  virtual ~Io();
72 
73  /**
74  *
75  * @return the user defined name of the IO in the currently selected
76  * installation.
77  */
78  std::string getDisplayName() const;
79 
80  /**
81  *
82  * @return the robot default name of the I/O.
83  */
84  std::string getDefaultName() const;
85 
86  /**
87  *
88  * @return get current reading of the I/O as a string.
89  */
90  std::string getValueStr() const;
91 
92  /**
93  *
94  * @return the I/O type.
95  */
96  IoType getType() const;
97 
98  /**
99  *
100  * @return the interface type this I/O belongs to.
101  */
102  InterfaceType getInterfaceType() const;
103 
104  /**
105  *
106  * @return <code>true</code> if I/O supports reading of values and
107  * <code>false</code> otherwise.
108  */
109  bool isInput() const;
110 
111  /**
112  * Some I/Os, such as MODBUS I/Os and analog Tool inputs, are in some
113  * situations not present in AuboScope or available for use. This method can
114  * be used to determine if the I/O is available. <br>
115  *
116  * For more details about the specific situations where certain types of
117  * I/Os can be unresolved, see the relevant interfaces extending this base
118  * interface, e.g. {@link ModbusIO#isResolvable()}.
119  *
120  * @return <code>true</code>, if I/O can be resolved.
121  * <code>false</code> otherwise.
122  */
123  bool isResolvable() const;
124 
125 protected:
126  Io();
127 
128 private:
129  friend class DataSwitch;
130  void *d_{ nullptr };
131 };
132 
133 } // namespace aubo_scope
134 } // namespace arcs
135 
136 #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