ViconMarkerProvider.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::ViconMarkerProvider
17  * @author Mirko Waechter ( mirko dot waechter at kit dot edu )
18  * @date 2017
19  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20  * GNU General Public License
21  */
22 
23 #pragma once
24 
25 #include <DataStreamClient.h>
26 
29 #include <RobotComponents/interface/components/ViconMarkerProviderInterface.h>
30 #include <RobotAPI/interface/visualization/DebugDrawerInterface.h>
31 
32 namespace armarx
33 {
34  /**
35  * @class ViconMarkerProviderPropertyDefinitions
36  * @brief
37  */
40  {
41  public:
44  {
45  defineRequiredProperty<std::string>("Hostname", "IP or hostname of the Vicon PC");
46  defineOptionalProperty<int>("Port", 801, "Port used of the Vicon SDK on the Vicon PC");
47  defineOptionalProperty<std::string>("ViconDataTopicName", "ViconDataUpdates", "Topic on which the marker data is published");
48  defineOptionalProperty<std::string>("DebugDrawerTopicName", "DebugDrawerUpdates", "Topic for debug drawer");
49  }
50  };
51 
52  /**
53  * @defgroup Component-ViconMarkerProvider ViconMarkerProvider
54  * @ingroup RobotComponents-Components
55  * A description of the component ViconMarkerProvider.
56  *
57  * @class ViconMarkerProvider
58  * @ingroup Component-ViconMarkerProvider
59  * @brief Brief description of class ViconMarkerProvider.
60  *
61  * Detailed description of class ViconMarkerProvider.
62  */
64  virtual public armarx::Component
65  {
66  public:
67  /**
68  * @see armarx::ManagedIceObject::getDefaultName()
69  */
70  virtual std::string getDefaultName() const
71  {
72  return "ViconMarkerProvider";
73  }
74 
75  protected:
76  /**
77  * @see armarx::ManagedIceObject::onInitComponent()
78  */
79  void onInitComponent() override;
80 
81  /**
82  * @see armarx::ManagedIceObject::onConnectComponent()
83  */
84  void onConnectComponent() override;
85 
86  /**
87  * @see armarx::ManagedIceObject::onDisconnectComponent()
88  */
89  void onDisconnectComponent() override;
90 
91  /**
92  * @see armarx::ManagedIceObject::onExitComponent()
93  */
94  void onExitComponent() override;
95 
96  void publish();
97 
98  /**
99  * @see PropertyUser::createPropertyDefinitions()
100  */
102 
103  ViconMarkerProviderListenerInterfacePrx listener;
105  ViconDataStreamSDK::CPP::Client dsClient;
107  };
108 }
109 
armarx::ViconMarkerProvider
Brief description of class ViconMarkerProvider.
Definition: ViconMarkerProvider.h:63
armarx::ViconMarkerProvider::publish
void publish()
Definition: ViconMarkerProvider.cpp:90
armarx::ViconMarkerProvider::getDefaultName
virtual std::string getDefaultName() const
Definition: ViconMarkerProvider.h:70
armarx::ViconMarkerProvider::onDisconnectComponent
void onDisconnectComponent() override
Definition: ViconMarkerProvider.cpp:78
armarx::PropertyDefinitionContainer::prefix
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
Definition: PropertyDefinitionContainer.h:333
armarx::ViconMarkerProvider::listener
ViconMarkerProviderListenerInterfacePrx listener
Definition: ViconMarkerProvider.h:103
armarx::ViconMarkerProvider::createPropertyDefinitions
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
Definition: ViconMarkerProvider.cpp:184
RunningTask.h
armarx::ViconMarkerProvider::dsClient
ViconDataStreamSDK::CPP::Client dsClient
Definition: ViconMarkerProvider.h:105
armarx::ViconMarkerProvider::debugDrawer
DebugDrawerInterfacePrx debugDrawer
Definition: ViconMarkerProvider.h:106
armarx::ViconMarkerProviderPropertyDefinitions
Definition: ViconMarkerProvider.h:38
Component.h
armarx::Component
Baseclass for all ArmarX ManagedIceObjects requiring properties.
Definition: Component.h:95
armarx::ViconMarkerProvider::publisherThread
RunningTask< ViconMarkerProvider >::pointer_type publisherThread
Definition: ViconMarkerProvider.h:104
armarx::ComponentPropertyDefinitions
Default component property definition container.
Definition: Component.h:70
IceUtil::Handle< class PropertyDefinitionContainer >
IceInternal::ProxyHandle<::IceProxy::armarx::DebugDrawerInterface >
armarx::ViconMarkerProvider::onInitComponent
void onInitComponent() override
Definition: ViconMarkerProvider.cpp:29
armarx::ViconMarkerProviderPropertyDefinitions::ViconMarkerProviderPropertyDefinitions
ViconMarkerProviderPropertyDefinitions(std::string prefix)
Definition: ViconMarkerProvider.h:42
armarx::ViconMarkerProvider::onConnectComponent
void onConnectComponent() override
Definition: ViconMarkerProvider.cpp:36
armarx::ViconMarkerProvider::onExitComponent
void onExitComponent() override
Definition: ViconMarkerProvider.cpp:85
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28