VirtualRobotWriterExample.h
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include <VirtualRobot/VirtualRobot.h>
5 
8 #include <ArmarXCore/interface/observers/ObserverInterface.h>
10 
12 
16 #include <RobotAPI/interface/armem/mns/MemoryNameSystemInterface.h>
17 #include <RobotAPI/interface/armem/server/MemoryInterface.h>
20 
22 {
23 
24  /**
25  * @defgroup Component-VirtualRobotWriterExample VirtualRobotWriterExample
26  * @ingroup RobotAPI-Components
27  * A description of the component VirtualRobotWriterExample.
28  *
29  * @class VirtualRobotWriterExample
30  * @ingroup Component-VirtualRobotWriterExample
31  * @brief Brief description of class VirtualRobotWriterExample.
32  *
33  * Detailed description of class VirtualRobotWriterExample.
34  */
36  virtual public armarx::Component,
38  {
39  public:
41 
42  /// @see armarx::ManagedIceObject::getDefaultName()
43  std::string getDefaultName() const override;
44 
45  protected:
47 
48  void onInitComponent() override;
49  void onConnectComponent() override;
50  void onDisconnectComponent() override;
51  void onExitComponent() override;
52 
53  void run();
54 
55  private:
56  VirtualRobot::RobotPtr loadRobot() const;
58 
59  /// Reference timestamp for object movement
60  armem::Time start;
61 
63 
65 
66  struct Properties
67  {
68  float updateFrequency{10.F};
69 
70  struct
71  {
72  std::string package;
73  std::string path;
74  } robot;
75  } p;
76  };
77 
78 } // namespace armarx::virtual_robot_writer_example
armarx::virtual_robot_writer_example
Definition: VirtualRobotWriterExample.cpp:50
armarx::armem::client::plugins::ReaderWriterPlugin
A component plugin offering client-side access to a reader or writer and manages the lifecycle,...
Definition: ReaderWriterPlugin.h:44
armarx::virtual_robot_writer_example::VirtualRobotWriterExample::run
void run()
Definition: VirtualRobotWriterExample.cpp:116
PeriodicTask.h
ReaderWriterPlugin.h
armarx::virtual_robot_writer_example::VirtualRobotWriterExample
Brief description of class VirtualRobotWriterExample.
Definition: VirtualRobotWriterExample.h:35
armarx::virtual_robot_writer_example::VirtualRobotWriterExample::onExitComponent
void onExitComponent() override
Hook for subclass.
Definition: VirtualRobotWriterExample.cpp:101
LightweightRemoteGuiComponentPlugin.h
armarx::virtual_robot_writer_example::VirtualRobotWriterExample::VirtualRobotWriterExample
VirtualRobotWriterExample()
Definition: VirtualRobotWriterExample.cpp:52
armarx::virtual_robot_writer_example::VirtualRobotWriterExample::createPropertyDefinitions
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
Definition: VirtualRobotWriterExample.cpp:58
armarx::virtual_robot_writer_example::VirtualRobotWriterExample::getDefaultName
std::string getDefaultName() const override
Definition: VirtualRobotWriterExample.cpp:73
armarx::virtual_robot_writer_example::VirtualRobotWriterExample::onInitComponent
void onInitComponent() override
Pure virtual hook for the subclass.
Definition: VirtualRobotWriterExample.cpp:79
plugins.h
tasks.h
Component.h
memory_definitions.h
armarx::Component
Baseclass for all ArmarX ManagedIceObjects requiring properties.
Definition: Component.h:95
VirtualRobotWriter.h
armarx::virtual_robot_writer_example::VirtualRobotWriterExample::onDisconnectComponent
void onDisconnectComponent() override
Hook for subclass.
Definition: VirtualRobotWriterExample.cpp:95
armarx::core::time::DateTime
Represents a point in time.
Definition: DateTime.h:24
armarx::virtual_robot_writer_example::VirtualRobotWriterExample::onConnectComponent
void onConnectComponent() override
Pure virtual hook for the subclass.
Definition: VirtualRobotWriterExample.cpp:84
IceUtil::Handle< class PropertyDefinitionContainer >
Time.h
armarx::armem::client::plugins::ListeningPluginUser
A memory name system client which listens to the memory updates topic (MemoryListenerInterface).
Definition: ListeningPluginUser.h:23
VirtualRobot::RobotPtr
std::shared_ptr< class Robot > RobotPtr
Definition: Bus.h:18