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