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
34namespace 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");
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 */
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
Default component property definition container.
Definition Component.h:70
ComponentPropertyDefinitions(std::string prefix, bool hasObjectNameParameter=true)
Definition Component.cpp:46
Baseclass for all ArmarX ManagedIceObjects requiring properties.
Definition Component.h:94
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
PropertyDefinition< PropertyType > & defineOptionalProperty(const std::string &name, PropertyType defaultValue, const std::string &description="", PropertyDefinitionBase::PropertyConstness constness=PropertyDefinitionBase::eConstant)
PropertyDefinition< PropertyType > & defineRequiredProperty(const std::string &name, const std::string &description="", PropertyDefinitionBase::PropertyConstness constness=PropertyDefinitionBase::eConstant)
IceUtil::Handle< RunningTask< T > > pointer_type
Shared pointer type for convenience.
Brief description of class ViconMarkerProvider.
ViconMarkerProviderListenerInterfacePrx listener
RunningTask< ViconMarkerProvider >::pointer_type publisherThread
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
ViconDataStreamSDK::CPP::Client dsClient
DebugDrawerInterfacePrx debugDrawer
virtual std::string getDefaultName() const
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
::IceInternal::ProxyHandle<::IceProxy::armarx::DebugDrawerInterface > DebugDrawerInterfacePrx