AuboCaps
0.6.0
Main Page
Namespaces
Classes
Files
File List
File Members
include
aubo_caps
domain
feature
feature_contribution_model.h
Go to the documentation of this file.
1
#ifndef AUBO_SCOPE_FEATURE_CONTRIBUTION_MODEL_H
2
#define AUBO_SCOPE_FEATURE_CONTRIBUTION_MODEL_H
3
4
#include <
aubo_caps/domain/feature/feature.h
>
5
6
namespace
arcs
{
7
namespace
aubo_scope {
8
9
ARCS_CLASS_FORWARD
(FeatureContributionModel);
10
11
/**
12
* <p>
13
* This interface provides functionality for adding, updating and removing
14
* features in AuboScope.
15
* </p>
16
*
17
* <b>Note:</b> This interface must only be used in an installation
18
* contribution/
19
*/
20
class
ARCS_ABI_EXPORT
FeatureContributionModel
21
{
22
public
:
23
FeatureContributionModel
(
FeatureContributionModel
&f);
24
FeatureContributionModel
(
FeatureContributionModel
&&f);
25
~
FeatureContributionModel
();
26
27
/**
28
* Add a feature to the current AuboScope installation. This makes it
29
* selectable by the end user. The feature is not modifiable by the end
30
* user.
31
*
32
* @param idKey The key to identify this feature by. The key is for this
33
* AuboCap only, i.e. it only has to be unique for this AuboCap and not
34
* "globally" for other AuboCaps.
35
* @param suggestedName Suggested name for the feature. Valid names must
36
* match regex [a-zA-Z][a-zA-Z0-9_]{0,14} for a total of 15 characters. The
37
* final name can be retrieved from the returned feature instance.
38
* @param pose The pose of the feature with respect to the robot base
39
* @return The feature created and registered in AuboScope.
40
* @throws FeatureAlreadyAddedException If a feature has previously been
41
* added the same <code>idKey</code> identifier. Use {@link
42
* #getFeature(String)} to check if the feature has already been added to
43
* the current installation. Use {@link #updateFeature(String, Pose)} to
44
* update the feature.
45
* @throws IllegalFeatureNameException If the suggested name does not match
46
* required regex.
47
*/
48
FeaturePtr addFeature(
const
std::string &idKey,
49
const
std::string &suggestedName,
50
const
std::vector<double> &pose);
51
/**
52
* Returns the feature previously added by this AuboCap using the same
53
* <code>idKey</code> identifier. Use this to verify if the feature is
54
* present in the current installation.
55
*
56
* @param idKey The key to identify this feature by.
57
* @return The feature previously added by this AuboCap.
58
* Returns <code>null</code> if no feature exists in the current
59
* installation.
60
*/
61
FeaturePtr getFeature(
const
std::string &idKey);
62
63
/**
64
* Update the pose of an existing feature added by this AuboCap.
65
*
66
* @param idKey The key to identify the feature. A feature must have been
67
* added prior to this method call using the same key.
68
* @param newPose The new pose to set for the feature.
69
* @throws FeatureNotFoundException If no feature exists with the provided
70
* <code>idKey</code>.
71
*/
72
void
updateFeature(
const
std::string &idKey,
73
const
std::vector<double> &newPose);
74
void
renameFeature(
const
std::string &idKey,
const
std::string &newName);
75
76
/**
77
* Remove a feature added by this AuboCap from AuboScope. Program nodes
78
* using the feature will be become undefined because the feature is no
79
* longer resolvable.
80
*
81
* @param idKey The key used to add the feature with.
82
* @throws FeatureNotFoundException If no feature exists with the provided
83
* <code>idKey</code>.
84
*/
85
void
removeFeature(
const
std::string &idKey);
86
87
private
:
88
friend
class
DataSwitch;
89
FeatureContributionModel
();
90
void
*d_{
nullptr
};
91
};
92
93
}
// namespace aubo_scope
94
}
// namespace arcs
95
96
#endif // AUBO_SCOPE_FEATURE_CONTRIBUTION_MODEL_H
arcs::aubo_scope::ARCS_CLASS_FORWARD
ARCS_CLASS_FORWARD(GripForceCapability)
feature.h
arcs::aubo_scope::FeatureContributionModel
Definition:
feature_contribution_model.h:20
ARCS_ABI_EXPORT
#define ARCS_ABI_EXPORT
Definition:
class_forward.h:16
arcs
Definition:
contribution_provider.h:7
Generated by
1.8.11