HapticUnit.h
Go to the documentation of this file.
1/*
2 * This file is part of ArmarX.
3 *
4 * Copyright (C) 2012-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
5 *
6 * ArmarX is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * ArmarX is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 *
18 * @package ArmarXCore::units
19 * @author Peter Kaiser <peter dot kaiser at kit dot edu>
20 * @date 2014
21 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22 * GNU General Public License
23 */
24
25#pragma once
26
27#include <string>
28
32
34#include <RobotAPI/interface/units/HapticUnit.h>
35
36namespace armarx
37{
38 /**
39 * \class HapticUnitPropertyDefinitions
40 * \brief
41 */
43 {
44 public:
46 {
48 "HapticTopicName", "HapticValues", "Name of the Haptic Topic.");
49 }
50 };
51
52 /**
53 * \defgroup Component-HapticUnit HapticUnit
54 * \ingroup RobotAPI-SensorActorUnits
55 * \brief Base unit for haptic sensors.
56 */
57
58 /**
59 * @ingroup Component-HapticUnit
60 * @brief The HapticUnit class
61 */
62 class HapticUnit : virtual public HapticUnitInterface, virtual public SensorActorUnit
63 {
64 public:
65 std::string
66 getDefaultName() const override
67 {
68 return "HapticUnit";
69 }
70
71 void onInitComponent() override;
72 void onConnectComponent() override;
73 void onExitComponent() override;
74
75 virtual void onInitHapticUnit() = 0;
76 virtual void onStartHapticUnit() = 0;
77 virtual void onExitHapticUnit() = 0;
78
80
81 protected:
82 HapticUnitListenerPrx hapticTopicPrx;
83 };
84} // namespace armarx
ComponentPropertyDefinitions(std::string prefix, bool hasObjectNameParameter=true)
Definition Component.cpp:46
HapticUnitPropertyDefinitions(std::string prefix)
Definition HapticUnit.h:45
The HapticUnit class.
Definition HapticUnit.h:63
void onInitComponent() override
Pure virtual hook for the subclass.
virtual void onInitHapticUnit()=0
virtual void onStartHapticUnit()=0
void onConnectComponent() override
Pure virtual hook for the subclass.
virtual void onExitHapticUnit()=0
PropertyDefinitionsPtr createPropertyDefinitions() override
void onExitComponent() override
Hook for subclass.
HapticUnitListenerPrx hapticTopicPrx
Definition HapticUnit.h:82
std::string getDefaultName() const override
Retrieve default name of component.
Definition HapticUnit.h:66
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)
SensorActorUnit()
Constructs a SensorActorUnit.
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.