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