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  */
38  {
39  public:
42  {
43  defineOptionalProperty<std::string>(
44  "RobotStateComponentName",
45  "RobotStateComponent",
46  "Name of the RobotStateComponent that should be used");
47  defineOptionalProperty<std::string>(
48  "WorkingMemoryName",
49  "WorkingMemory",
50  "Name of the WorkingMemory that should be used. Leave empty to not use the working "
51  "memory and update the robotstate directly");
52  }
53  };
54 
55  /**
56  * @defgroup Component-StaticAgentReporter StaticAgentReporter
57  * @ingroup RobotComponents-Components
58  * A description of the component StaticAgentReporter.
59  *
60  * @class StaticAgentReporter
61  * @ingroup Component-StaticAgentReporter
62  * @brief Brief description of class StaticAgentReporter.
63  *
64  * Detailed description of class StaticAgentReporter.
65  */
66  class StaticAgentReporter : virtual public armarx::Component
67  {
68  public:
69  /**
70  * @see armarx::ManagedIceObject::getDefaultName()
71  */
72  std::string
73  getDefaultName() const override
74  {
75  return "StaticAgentReporter";
76  }
77 
78  protected:
79  /**
80  * @see armarx::ManagedIceObject::onInitComponent()
81  */
82  void onInitComponent() override;
83 
84  /**
85  * @see armarx::ManagedIceObject::onConnectComponent()
86  */
87  void onConnectComponent() override;
88 
89  /**
90  * @see armarx::ManagedIceObject::onDisconnectComponent()
91  */
92  void onDisconnectComponent() override;
93 
94  /**
95  * @see armarx::ManagedIceObject::onExitComponent()
96  */
97  void onExitComponent() override;
98 
99  /**
100  * @see PropertyUser::createPropertyDefinitions()
101  */
103 
104  private:
105  RobotStateComponentInterfacePrx robotStateComponent;
106 
107  memoryx::AgentInstancesSegmentBasePrx agentInstanceSegment;
108  memoryx::AgentInstancePtr robotAgent;
109 
111  };
112 } // namespace armarx
armarx::StaticAgentReporter::onExitComponent
void onExitComponent() override
Definition: StaticAgentReporter.cpp:73
armarx::PropertyDefinitionContainer::prefix
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
Definition: PropertyDefinitionContainer.h:345
armarx::StaticAgentReporter::onConnectComponent
void onConnectComponent() override
Definition: StaticAgentReporter.cpp:42
IceInternal::Handle< AgentInstance >
armarx::StaticAgentReporter::onDisconnectComponent
void onDisconnectComponent() override
Definition: StaticAgentReporter.cpp:68
armarx::StaticAgentReporter
Brief description of class StaticAgentReporter.
Definition: StaticAgentReporter.h:66
armarx::StaticAgentReporter::getDefaultName
std::string getDefaultName() const override
Definition: StaticAgentReporter.h:73
Component.h
armarx::Component
Baseclass for all ArmarX ManagedIceObjects requiring properties.
Definition: Component.h:91
armarx::ComponentPropertyDefinitions
Default component property definition container.
Definition: Component.h:69
IceUtil::Handle< class PropertyDefinitionContainer >
armarx::StaticAgentReporterPropertyDefinitions
Definition: StaticAgentReporter.h:37
armarx::StaticAgentReporterPropertyDefinitions::StaticAgentReporterPropertyDefinitions
StaticAgentReporterPropertyDefinitions(std::string prefix)
Definition: StaticAgentReporter.h:40
IceInternal::ProxyHandle<::IceProxy::armarx::RobotStateComponentInterface >
AgentInstance.h
armarx::StaticAgentReporter::createPropertyDefinitions
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
Definition: StaticAgentReporter.cpp:78
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:27
VirtualRobot::RobotPtr
std::shared_ptr< class Robot > RobotPtr
Definition: Bus.h:19
armarx::StaticAgentReporter::onInitComponent
void onInitComponent() override
Definition: StaticAgentReporter.cpp:31