RobotHealthDummy.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 RobotAPI::ArmarXObjects::RobotHealthDummy
17 * @author Simon Ottenhaus ( simon dot ottenhaus at kit dot edu )
18 * @date 2018
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22
23#pragma once
24
25
29
30#include <RobotAPI/interface/components/RobotHealthInterface.h>
31
32namespace armarx
33{
34 /**
35 * @class RobotHealthDummyPropertyDefinitions
36 * @brief
37 */
39 {
40 public:
43 {
45 "RobotHealthTopicName", "RobotHealthTopic", "Name of the RobotHealth topic");
47 "SleepMode",
48 "nanosleep",
49 "Which sleep function to use: nanosleep, sleepwait, yieldwait, busywait");
50
51 //defineRequiredProperty<std::string>("PropertyName", "Description");
52 //defineOptionalProperty<std::string>("PropertyName", "DefaultValue", "Description");
53 }
54 };
55
56 /**
57 * @defgroup Component-RobotHealthDummy RobotHealthDummy
58 * @ingroup RobotAPI-Components
59 * A description of the component RobotHealthDummy.
60 *
61 * @class RobotHealthDummy
62 * @ingroup Component-RobotHealthDummy
63 * @brief Brief description of class RobotHealthDummy.
64 *
65 * Detailed description of class RobotHealthDummy.
66 */
67 class RobotHealthDummy : virtual public armarx::Component
68 {
69 public:
70 /**
71 * @see armarx::ManagedIceObject::getDefaultName()
72 */
73 std::string
74 getDefaultName() const override
75 {
76 return "RobotHealthDummy";
77 }
78
79 int NanoSleep(long nanosec);
80 void yieldwait(long microseconds);
81 void busywait(long microseconds);
82 void sleepwait(long microseconds);
83
84 protected:
85 /**
86 * @see armarx::ManagedIceObject::onInitComponent()
87 */
88 void onInitComponent() override;
89
90 /**
91 * @see armarx::ManagedIceObject::onConnectComponent()
92 */
93 void onConnectComponent() override;
94
95 /**
96 * @see armarx::ManagedIceObject::onDisconnectComponent()
97 */
98 void onDisconnectComponent() override;
99
100 /**
101 * @see armarx::ManagedIceObject::onExitComponent()
102 */
103 void onExitComponent() override;
104
105 /**
106 * @see PropertyUser::createPropertyDefinitions()
107 */
109
110 void runTask();
111
112 RobotHealthInterfacePrx robotHealthTopicPrx;
114
115 std::string sleepmode;
116 };
117} // 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)
Brief description of class RobotHealthDummy.
void yieldwait(long microseconds)
void onDisconnectComponent() override
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
RunningTask< RobotHealthDummy >::pointer_type dummyTask
void onConnectComponent() override
RobotHealthInterfacePrx robotHealthTopicPrx
void sleepwait(long microseconds)
void busywait(long microseconds)
std::string getDefaultName() const override
IceUtil::Handle< RunningTask< T > > pointer_type
Shared pointer type for convenience.
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.