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 
31 
32 #include <RobotAPI/interface/units/HapticUnit.h>
33 
34 #include <string>
35 
36 namespace armarx
37 {
38  /**
39  * \class HapticUnitPropertyDefinitions
40  * \brief
41  */
43  {
44  public:
47  {
48  defineOptionalProperty<std::string>("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 :
63  virtual public HapticUnitInterface,
64  virtual public SensorActorUnit
65  {
66  public:
67  std::string getDefaultName() const override
68  {
69  return "HapticUnit";
70  }
71 
72  void onInitComponent() override;
73  void onConnectComponent() override;
74  void onExitComponent() override;
75 
76  virtual void onInitHapticUnit() = 0;
77  virtual void onStartHapticUnit() = 0;
78  virtual void onExitHapticUnit() = 0;
79 
81 
82  protected:
83  HapticUnitListenerPrx hapticTopicPrx;
84  };
85 }
armarx::HapticUnitPropertyDefinitions
Definition: HapticUnit.h:42
armarx::HapticUnit
The HapticUnit class.
Definition: HapticUnit.h:62
armarx::HapticUnit::onExitComponent
void onExitComponent() override
Hook for subclass.
Definition: HapticUnit.cpp:41
armarx::HapticUnit::hapticTopicPrx
HapticUnitListenerPrx hapticTopicPrx
Definition: HapticUnit.h:83
armarx::HapticUnit::createPropertyDefinitions
PropertyDefinitionsPtr createPropertyDefinitions() override
Definition: HapticUnit.cpp:46
armarx::HapticUnit::onInitComponent
void onInitComponent() override
Pure virtual hook for the subclass.
Definition: HapticUnit.cpp:29
Properties.h
armarx::PropertyDefinitionContainer::prefix
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
Definition: PropertyDefinitionContainer.h:333
armarx::HapticUnit::onExitHapticUnit
virtual void onExitHapticUnit()=0
armarx::HapticUnit::onStartHapticUnit
virtual void onStartHapticUnit()=0
SensorActorUnit.h
armarx::HapticUnitPropertyDefinitions::HapticUnitPropertyDefinitions
HapticUnitPropertyDefinitions(std::string prefix)
Definition: HapticUnit.h:45
armarx::HapticUnit::onConnectComponent
void onConnectComponent() override
Pure virtual hook for the subclass.
Definition: HapticUnit.cpp:35
Component.h
armarx::ComponentPropertyDefinitions
Default component property definition container.
Definition: Component.h:70
IceUtil::Handle
Definition: forward_declarations.h:29
armarx::HapticUnit::onInitHapticUnit
virtual void onInitHapticUnit()=0
armarx::SensorActorUnit
Base Class for SensorActorUnits.
Definition: SensorActorUnit.h:42
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
armarx::HapticUnit::getDefaultName
std::string getDefaultName() const override
Retrieve default name of component.
Definition: HapticUnit.h:67
ImportExportComponent.h