StaticAgentReporter.h
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 RobotComponents::ArmarXObjects::StaticAgentReporter
17  * @author Timothee Habra ( timothee dot habra at uclouvain dot be )
18  * @date 2016
19  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20  * GNU General Public License
21  */
22 
23 #pragma once
24 
25 
27 
28 #include <MemoryX/interface/components/WorkingMemoryInterface.h>
30 
31 namespace armarx
32 {
33  /**
34  * @class StaticAgentReporterPropertyDefinitions
35  * @brief
36  */
39  {
40  public:
43  {
44  defineOptionalProperty<std::string>("RobotStateComponentName", "RobotStateComponent", "Name of the RobotStateComponent that should be used");
45  defineOptionalProperty<std::string>("WorkingMemoryName", "WorkingMemory", "Name of the WorkingMemory that should be used. Leave empty to not use the working memory and update the robotstate directly");
46 
47  }
48  };
49 
50  /**
51  * @defgroup Component-StaticAgentReporter StaticAgentReporter
52  * @ingroup RobotComponents-Components
53  * A description of the component StaticAgentReporter.
54  *
55  * @class StaticAgentReporter
56  * @ingroup Component-StaticAgentReporter
57  * @brief Brief description of class StaticAgentReporter.
58  *
59  * Detailed description of class StaticAgentReporter.
60  */
62  virtual public armarx::Component
63  {
64  public:
65  /**
66  * @see armarx::ManagedIceObject::getDefaultName()
67  */
68  std::string getDefaultName() const override
69  {
70  return "StaticAgentReporter";
71  }
72 
73  protected:
74  /**
75  * @see armarx::ManagedIceObject::onInitComponent()
76  */
77  void onInitComponent() override;
78 
79  /**
80  * @see armarx::ManagedIceObject::onConnectComponent()
81  */
82  void onConnectComponent() override;
83 
84  /**
85  * @see armarx::ManagedIceObject::onDisconnectComponent()
86  */
87  void onDisconnectComponent() override;
88 
89  /**
90  * @see armarx::ManagedIceObject::onExitComponent()
91  */
92  void onExitComponent() override;
93 
94  /**
95  * @see PropertyUser::createPropertyDefinitions()
96  */
98 
99  private:
100 
101 
102  RobotStateComponentInterfacePrx robotStateComponent;
103 
104  memoryx::AgentInstancesSegmentBasePrx agentInstanceSegment;
105  memoryx::AgentInstancePtr robotAgent;
106 
108  };
109 }
110 
armarx::StaticAgentReporter::onExitComponent
void onExitComponent() override
Definition: StaticAgentReporter.cpp:69
armarx::PropertyDefinitionContainer::prefix
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
Definition: PropertyDefinitionContainer.h:333
armarx::StaticAgentReporter::onConnectComponent
void onConnectComponent() override
Definition: StaticAgentReporter.cpp:42
IceInternal::Handle< AgentInstance >
armarx::StaticAgentReporter::onDisconnectComponent
void onDisconnectComponent() override
Definition: StaticAgentReporter.cpp:63
armarx::StaticAgentReporter
Brief description of class StaticAgentReporter.
Definition: StaticAgentReporter.h:61
armarx::StaticAgentReporter::getDefaultName
std::string getDefaultName() const override
Definition: StaticAgentReporter.h:68
Component.h
armarx::Component
Baseclass for all ArmarX ManagedIceObjects requiring properties.
Definition: Component.h:95
armarx::ComponentPropertyDefinitions
Default component property definition container.
Definition: Component.h:70
IceUtil::Handle< class PropertyDefinitionContainer >
armarx::StaticAgentReporterPropertyDefinitions
Definition: StaticAgentReporter.h:37
armarx::StaticAgentReporterPropertyDefinitions::StaticAgentReporterPropertyDefinitions
StaticAgentReporterPropertyDefinitions(std::string prefix)
Definition: StaticAgentReporter.h:41
IceInternal::ProxyHandle<::IceProxy::armarx::RobotStateComponentInterface >
AgentInstance.h
armarx::StaticAgentReporter::createPropertyDefinitions
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
Definition: StaticAgentReporter.cpp:74
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
VirtualRobot::RobotPtr
std::shared_ptr< class Robot > RobotPtr
Definition: Bus.h:18
armarx::StaticAgentReporter::onInitComponent
void onInitComponent() override
Definition: StaticAgentReporter.cpp:31