AuboStudio SDK 0.6.3

application_api.h
浏览该文件的文档.
1 #ifndef AUBO_SCOPE_APPLICATION_API_H
2 #define AUBO_SCOPE_APPLICATION_API_H
3
4 #include <aubo_caps/domain/io/io_model.h>
5 #include <aubo_caps/domain/device/device_manager.h>
6 #include <aubo_caps/domain/feature/feature_model.h>
7 #include <aubo_caps/domain/payload/payload_model.h>
8 #include <aubo_caps/domain/tcp/tcp_model.h>
9 #include <aubo_caps/domain/variable/variable_model.h>
10 #include <aubo_caps/domain/value/value_factory_provider.h>
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 * @defgroup ApplicationApi ApplicationApi
24 * Provides access to functionality and services which are relevant for various
25 * different applications and contexts. This includes what is available from
26 * within AuboScope, as well as creating additional model elements to be used
27 * within AuboScope.
28 */
29 class ARCS_ABI_EXPORT ApplicationApi
30 {
31 public:
32 ApplicationApi(ApplicationApi &f);
33 ApplicationApi(ApplicationApi &&f);
34 virtual ~ApplicationApi();
35
36 /**
37 * @ingroup ApplicationApi
38 * @return An interface for working with the inputs and outputs of the robot
39 */
40 IoModelPtr getIoModel();
41
42 /**
43 * @ingroup ApplicationApi
44 * @return An interface for working with the features of the current
45 * installation
46 */
47 FeatureModelPtr getFeatureModel();
48
49 /**
50 * @ingroup ApplicationApi
51 * @return An interface for accessing the TCPs of the current installation
52 */
53 TcpModelPtr getTcpModel();
54
55 /**
56 * @ingroup ApplicationApi
57 * Gets an interface which provides access the payloads in the current
58 * AuboScope installation.
59 *
60 * @return An interface for accessing the payloads in the current AuboScope
61 * installation
62 */
63 PayloadModelPtr getPayloadModel();
64
65 /**
66 * @ingroup ApplicationApi
67 * @return An interface for working with variables
68 */
69 VariableModelPtr getVariableModel();
70
71 /**
72 * @ingroup ApplicationApi
73 * @return An interface for accessing various factories capable of creating
74 * value objects.
75 */
76 ValueFactoryPtr getValueFactory();
77
78 // /**
79 // * @return An interface with access to various queryable-only system
80 // resources
81 // */
82 // ResourceModel getResourceModel();
83
84 /**
85 * This method can be used to get a specific {@link
86 * InstallationNodeContribution} instance
87 *
88 * @param installationType The class of the installation node
89 * contribution to return
90 * @param <T> The generic for specifying the {@link
91 * InstallationNodeContribution}
92 * @return The installation node instance
93 */
94 template <typename T>
95 std::shared_ptr<T> getInstallationNode()
96 {
97 return std::dynamic_pointer_cast<T>(
98 getInstallationNode(typeid(T).name()));
99 }
100 InstallationNodeContributionPtr getInstallationNode(
101 const char *typeidOfClass);
102
103 /**
104 * @ingroup ApplicationApi
105 * This method can be used to get a specific {@link DeviceManager}
106 * instance
107 *
108 * @param deviceManagerClass The class for the device manager to return
109 * @param <T> The generic type of class to return
110 * @return An interface for registering and working with a specific
111 * device
112 */
113 DeviceManagerPtr getDeviceManager();
114
115 /**
116 * @brief getRobotProxy
117 * @return
118 */
119 aubo_sdk::RobotProxyPtr getRobotProxy();
120
121 protected:
122 ApplicationApi();
123
124 private:
125 friend class DataSwitch;
126 void *d_{ nullptr };
127 };
128
129 } // namespace aubo_scope
130 } // namespace arcs
131
132 #endif // AUBO_SCOPE_APPLICATION_API_H
ARCS_ABI_EXPORT
#define ARCS_ABI_EXPORT
Definition: class_forward.h:16
arcs::aubo_scope::ApplicationApi
Definition: application_api.h:30
arcs::aubo_scope::ApplicationApi::ApplicationApi
ApplicationApi(ApplicationApi &f)
arcs::aubo_scope::ApplicationApi::getInstallationNode
InstallationNodeContributionPtr getInstallationNode(const char *typeidOfClass)
arcs::aubo_scope::ApplicationApi::getRobotProxy
aubo_sdk::RobotProxyPtr getRobotProxy()
getRobotProxy
arcs::aubo_scope::ApplicationApi::getInstallationNode
std::shared_ptr< T > getInstallationNode()
This method can be used to get a specific {} instance
Definition: application_api.h:95
arcs::aubo_scope::ApplicationApi::ApplicationApi
ApplicationApi()
arcs::aubo_scope::ApplicationApi::~ApplicationApi
virtual ~ApplicationApi()
arcs::aubo_scope::ApplicationApi::ApplicationApi
ApplicationApi(ApplicationApi &&f)
arcs::aubo_scope::InstallationNodeContribution
API for installation node contributions.
Definition: installation_node_contribution.h:14
device_manager.h
feature_model.h
arcs::aubo_scope::ApplicationApi::getPayloadModel
PayloadModelPtr getPayloadModel()
Gets an interface which provides access the payloads in the current AuboScope installation.
arcs::aubo_scope::ApplicationApi::getDeviceManager
DeviceManagerPtr getDeviceManager()
This method can be used to get a specific DeviceManager instance
arcs::aubo_scope::ApplicationApi::getFeatureModel
FeatureModelPtr getFeatureModel()
arcs::aubo_scope::ApplicationApi::getTcpModel
TcpModelPtr getTcpModel()
arcs::aubo_scope::ApplicationApi::getValueFactory
ValueFactoryPtr getValueFactory()
arcs::aubo_scope::ApplicationApi::getIoModel
IoModelPtr getIoModel()
arcs::aubo_scope::ApplicationApi::getVariableModel
VariableModelPtr getVariableModel()
io_model.h
arcs::aubo_scope::ARCS_CLASS_FORWARD
ARCS_CLASS_FORWARD(GripForceCapability)
arcs::aubo_sdk::ARCS_CLASS_FORWARD
ARCS_CLASS_FORWARD(RobotProxy)
arcs
Definition: contribution_provider.h:7
payload_model.h
tcp_model.h
value_factory_provider.h
variable_model.h