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 
27 
28 #include <RobotAPI/interface/visualization/DebugDrawerInterface.h>
29 
30 #include <RobotComponents/interface/components/ViconMarkerProviderInterface.h>
31 
32 #include <DataStreamClient.h>
33 
34 namespace armarx
35 {
36  /**
37  * @class ViconMarkerProviderPropertyDefinitions
38  * @brief
39  */
41  {
42  public:
45  {
46  defineRequiredProperty<std::string>("Hostname", "IP or hostname of the Vicon PC");
47  defineOptionalProperty<int>("Port", 801, "Port used of the Vicon SDK on the Vicon PC");
48  defineOptionalProperty<std::string>("ViconDataTopicName",
49  "ViconDataUpdates",
50  "Topic on which the marker data is published");
51  defineOptionalProperty<std::string>(
52  "DebugDrawerTopicName", "DebugDrawerUpdates", "Topic for debug drawer");
53  }
54  };
55 
56  /**
57  * @defgroup Component-ViconMarkerProvider ViconMarkerProvider
58  * @ingroup RobotComponents-Components
59  * A description of the component ViconMarkerProvider.
60  *
61  * @class ViconMarkerProvider
62  * @ingroup Component-ViconMarkerProvider
63  * @brief Brief description of class ViconMarkerProvider.
64  *
65  * Detailed description of class ViconMarkerProvider.
66  */
67  class ViconMarkerProvider : virtual public armarx::Component
68  {
69  public:
70  /**
71  * @see armarx::ManagedIceObject::getDefaultName()
72  */
73  virtual std::string
75  {
76  return "ViconMarkerProvider";
77  }
78 
79  protected:
80  /**
81  * @see armarx::ManagedIceObject::onInitComponent()
82  */
83  void onInitComponent() override;
84 
85  /**
86  * @see armarx::ManagedIceObject::onConnectComponent()
87  */
88  void onConnectComponent() override;
89 
90  /**
91  * @see armarx::ManagedIceObject::onDisconnectComponent()
92  */
93  void onDisconnectComponent() override;
94 
95  /**
96  * @see armarx::ManagedIceObject::onExitComponent()
97  */
98  void onExitComponent() override;
99 
100  void publish();
101 
102  /**
103  * @see PropertyUser::createPropertyDefinitions()
104  */
106 
107  ViconMarkerProviderListenerInterfacePrx listener;
109  ViconDataStreamSDK::CPP::Client dsClient;
111  };
112 } // namespace armarx
armarx::ViconMarkerProvider
Brief description of class ViconMarkerProvider.
Definition: ViconMarkerProvider.h:67
armarx::ViconMarkerProvider::publish
void publish()
Definition: ViconMarkerProvider.cpp:94
armarx::ViconMarkerProvider::getDefaultName
virtual std::string getDefaultName() const
Definition: ViconMarkerProvider.h:74
armarx::ViconMarkerProvider::onDisconnectComponent
void onDisconnectComponent() override
Definition: ViconMarkerProvider.cpp:82
armarx::PropertyDefinitionContainer::prefix
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
Definition: PropertyDefinitionContainer.h:345
armarx::ViconMarkerProvider::listener
ViconMarkerProviderListenerInterfacePrx listener
Definition: ViconMarkerProvider.h:107
armarx::ViconMarkerProvider::createPropertyDefinitions
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
Definition: ViconMarkerProvider.cpp:192
RunningTask.h
armarx::ViconMarkerProvider::dsClient
ViconDataStreamSDK::CPP::Client dsClient
Definition: ViconMarkerProvider.h:109
armarx::ViconMarkerProvider::debugDrawer
DebugDrawerInterfacePrx debugDrawer
Definition: ViconMarkerProvider.h:110
armarx::ViconMarkerProviderPropertyDefinitions
Definition: ViconMarkerProvider.h:40
Component.h
armarx::Component
Baseclass for all ArmarX ManagedIceObjects requiring properties.
Definition: Component.h:91
armarx::ViconMarkerProvider::publisherThread
RunningTask< ViconMarkerProvider >::pointer_type publisherThread
Definition: ViconMarkerProvider.h:108
armarx::ComponentPropertyDefinitions
Default component property definition container.
Definition: Component.h:69
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:43
armarx::ViconMarkerProvider::onConnectComponent
void onConnectComponent() override
Definition: ViconMarkerProvider.cpp:36
armarx::ViconMarkerProvider::onExitComponent
void onExitComponent() override
Definition: ViconMarkerProvider.cpp:89
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:27