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 
36 namespace armarx
37 {
38  /**
39  * \class HapticUnitPropertyDefinitions
40  * \brief
41  */
43  {
44  public:
46  {
47  defineOptionalProperty<std::string>(
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
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:45
armarx::HapticUnit::hapticTopicPrx
HapticUnitListenerPrx hapticTopicPrx
Definition: HapticUnit.h:82
armarx::HapticUnit::createPropertyDefinitions
PropertyDefinitionsPtr createPropertyDefinitions() override
Definition: HapticUnit.cpp:51
armarx::HapticUnit::onInitComponent
void onInitComponent() override
Pure virtual hook for the subclass.
Definition: HapticUnit.cpp:30
Properties.h
armarx::PropertyDefinitionContainer::prefix
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
Definition: PropertyDefinitionContainer.h:345
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:37
Component.h
armarx::ComponentPropertyDefinitions
Default component property definition container.
Definition: Component.h:69
IceUtil::Handle
Definition: forward_declarations.h:30
armarx::HapticUnit::onInitHapticUnit
virtual void onInitHapticUnit()=0
armarx::SensorActorUnit
Base Class for SensorActorUnits.
Definition: SensorActorUnit.h:43
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:27
armarx::HapticUnit::getDefaultName
std::string getDefaultName() const override
Retrieve default name of component.
Definition: HapticUnit.h:66
ImportExportComponent.h