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 
25 
26 using namespace armarx;
27 
28 
30 {
31  usingTopic("ExtractedAffordances");
32 }
33 
34 
36 {
37  news = false;
38 }
39 
40 
42 {
43 }
44 
45 
47 {
48 }
49 
51 {
54 }
55 
57 {
58  std::scoped_lock lock(affordancesMutex);
59 
60  ARMARX_INFO << "New affordances received";
61  news = true;
62 }
63 
65 {
66  std::scoped_lock lock(affordancesMutex);
67 
68  ARMARX_INFO << "Asked for new affordances: " << news;
69  bool res = news;
70  news = false;
71  return res;
72 }
73 
armarx::AffordanceUpdateListener::onDisconnectComponent
void onDisconnectComponent() override
Definition: AffordanceUpdateListener.cpp:41
c
constexpr T c
Definition: UnscentedKalmanFilterTest.cpp:43
armarx::AffordanceUpdateListener::news
bool news
Definition: AffordanceUpdateListener.h:100
armarx::AffordanceUpdateListener::createPropertyDefinitions
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
Definition: AffordanceUpdateListener.cpp:50
armarx::AffordanceUpdateListener::onInitComponent
void onInitComponent() override
Definition: AffordanceUpdateListener.cpp:29
armarx::AffordanceUpdateListener::reportNewAffordances
void reportNewAffordances(const Ice::Current &c=Ice::emptyCurrent) override
Definition: AffordanceUpdateListener.cpp:56
AffordanceUpdateListener.h
armarx::AffordanceUpdateListener::onConnectComponent
void onConnectComponent() override
Definition: AffordanceUpdateListener.cpp:35
armarx::AffordanceUpdateListener::onExitComponent
void onExitComponent() override
Definition: AffordanceUpdateListener.cpp:46
armarx::ManagedIceObject::usingTopic
void usingTopic(const std::string &name, bool orderedPublishing=false)
Registers a proxy for subscription after initialization.
Definition: ManagedIceObject.cpp:248
armarx::Component::getConfigIdentifier
std::string getConfigIdentifier()
Retrieve config identifier for this component as set in constructor.
Definition: Component.cpp:74
ARMARX_INFO
#define ARMARX_INFO
Definition: Logging.h:174
IceUtil::Handle< class PropertyDefinitionContainer >
armarx::AffordanceUpdateListener::newAffordancesAvailable
bool newAffordancesAvailable(const Ice::Current &c=Ice::emptyCurrent) override
Definition: AffordanceUpdateListener.cpp:64
armarx::AffordanceUpdateListener::affordancesMutex
std::mutex affordancesMutex
Definition: AffordanceUpdateListener.h:99
armarx::PropertyDefinitionsPtr
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
Definition: forward_declarations.h:34
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
armarx::AffordanceUpdateListenerPropertyDefinitions
Definition: AffordanceUpdateListener.h:36