AuboCaps  0.6.0
application_api.h
Go to the documentation of this file.
1 #ifndef AUBO_SCOPE_APPLICATION_API_H
2 #define AUBO_SCOPE_APPLICATION_API_H
3 
11 
12 namespace arcs {
13 
14 namespace aubo_sdk {
15 ARCS_CLASS_FORWARD(RobotProxy);
16 }
17 
18 namespace aubo_scope {
19 ARCS_CLASS_FORWARD(ApplicationApi);
20 ARCS_CLASS_FORWARD(InstallationNodeContribution);
21 
22 /**
23  * Provides access to functionality and services which are relevant for various
24  * different applications and contexts. This includes what is available from
25  * within AuboScope, as well as creating additional model elements to be used
26  * within AuboScope.
27  */
29 {
30 public:
33  virtual ~ApplicationApi();
34 
35  /**
36  * @return An interface for working with the inputs and outputs of the robot
37  */
38  IoModelPtr getIoModel();
39 
40  /**
41  * @return An interface for working with the features of the current
42  * installation
43  */
44  FeatureModelPtr getFeatureModel();
45 
46  /**
47  * @return An interface for accessing the TCPs of the current installation
48  */
49  TcpModelPtr getTcpModel();
50 
51  /**
52  *
53  * Gets an interface which provides access the payloads in the current
54  * AuboScope installation.
55  *
56  * @return An interface for accessing the payloads in the current AuboScope
57  * installation
58  */
59  PayloadModelPtr getPayloadModel();
60 
61  /**
62  * @return An interface for working with variables
63  */
64  VariableModelPtr getVariableModel();
65 
66  /**
67  * @return An interface for accessing various factories capable of creating
68  * value objects.
69  */
70  ValueFactoryPtr getValueFactory();
71 
72  // /**
73  // * @return An interface with access to various queryable-only system
74  // resources
75  // */
76  // ResourceModel getResourceModel();
77 
78  /**
79  * This method can be used to get a specific {@link
80  * InstallationNodeContribution} instance
81  *
82  * @param installationType The class of the installation node
83  * contribution to return
84  * @param <T> The generic for specifying the {@link
85  * InstallationNodeContribution}
86  * @return The installation node instance
87  */
88  template <typename T>
89  std::shared_ptr<T> getInstallationNode()
90  {
91  return std::dynamic_pointer_cast<T>(
92  getInstallationNode(typeid(T).name()));
93  }
94  InstallationNodeContributionPtr getInstallationNode(
95  const char *typeidOfClass);
96 
97  /**
98  * This method can be used to get a specific {@link DeviceManager}
99  * instance
100  *
101  * @param deviceManagerClass The class for the device manager to return
102  * @param <T> The generic type of class to return
103  * @return An interface for registering and working with a specific
104  * device
105  */
106  DeviceManagerPtr getDeviceManager();
107 
108  /**
109  * @brief getRobotProxy
110  * @return
111  */
112  aubo_sdk::RobotProxyPtr getRobotProxy();
113 
114 protected:
115  ApplicationApi();
116 
117 private:
118  friend class DataSwitch;
119  void *d_{ nullptr };
120 };
121 
122 } // namespace aubo_scope
123 } // namespace arcs
124 
125 #endif // AUBO_SCOPE_APPLICATION_API_H
ARCS_CLASS_FORWARD(RobotProxy)
Provides access to functionality and services which are relevant for various different applications a...
#define ARCS_ABI_EXPORT
Definition: class_forward.h:16
std::shared_ptr< T > getInstallationNode()
This method can be used to get a specific InstallationNodeContribution instance.