AffordanceUpdateListener.cpp
Go to the documentation of this file.
1/*
2 * This file is part of ArmarX.
3 *
4 * ArmarX is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * ArmarX is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * @package VisionX
17 * @author Peter Kaiser ( peter dot kaiser at kit dot edu )
18 * @date 2015
19 * @copyright http://www.gnu.org/licenses/gpl.txt
20 * GNU General Public License
21 */
22
24
26
27
28using namespace armarx;
29
30void
32{
33 usingTopic("ExtractedAffordances");
34}
35
36void
41
42void
46
47void
51
58
59void
61{
62 std::scoped_lock lock(affordancesMutex);
63
64 ARMARX_INFO << "New affordances received";
65 news = true;
66}
67
68bool
70{
71 std::scoped_lock lock(affordancesMutex);
72
73 ARMARX_INFO << "Asked for new affordances: " << news;
74 bool res = news;
75 news = false;
76 return res;
77}
78
79std::string
81{
82 return "AffordanceUpdateListener";
83}
84
85std::string
90
#define ARMARX_REGISTER_COMPONENT_EXECUTABLE(ComponentT, applicationName)
Definition Decoupled.h:29
constexpr T c
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
bool newAffordancesAvailable(const Ice::Current &c=Ice::emptyCurrent) override
std::string getDefaultName() const override
Retrieve default name of component.
void reportNewAffordances(const Ice::Current &c=Ice::emptyCurrent) override
std::string getConfigIdentifier()
Retrieve config identifier for this component as set in constructor.
Definition Component.cpp:90
void usingTopic(const std::string &name, bool orderedPublishing=false)
Registers a proxy for subscription after initialization.
#define ARMARX_INFO
The normal logging level.
Definition Logging.h:181
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.