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