MetaWearIMU.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::MetaWearIMU
17 * @author Lukas Kaul ( lukas dot s dot kaul at gmail dot com )
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
25
27
28#include <RobotAPI/interface/units/MetaWearIMU.h>
29#include <RobotAPI/interface/units/MetaWearIMUInterface.h>
30
31namespace armarx
32{
33 /**
34 * @class MetaWearIMUPropertyDefinitions
35 * @brief
36 */
38 {
39 public:
42 {
43 //defineRequiredProperty<std::string>("PropertyName", "Description");
44 defineOptionalProperty<std::string>("MetaWearPythonTopicName",
45 "MetaWearPythonData",
46 "Name of the topic provided by the python driver");
48 "MetaWearTopicName", "MetaWearData", "Name of the MetaWear topic");
49 }
50 };
51
52 /**
53 * @defgroup Component-MetaWearIMU MetaWearIMU
54 * @ingroup RobotAPI-Components
55 * A description of the component MetaWearIMU.
56 *
57 * @class MetaWearIMU
58 * @ingroup Component-MetaWearIMU
59 * @brief Brief description of class MetaWearIMU.
60 *
61 * Detailed description of class MetaWearIMU.
62 */
64 virtual public armarx::Component,
65 virtual public armarx::MetaWearIMUInterface
66 {
67 public:
68 /**
69 * @see armarx::ManagedIceObject::getDefaultName()
70 */
71 std::string
72 getDefaultName() const override
73 {
74 return "MetaWearIMU";
75 }
76
77 protected:
78 /**
79 * @see armarx::ManagedIceObject::onInitComponent()
80 */
81 void onInitComponent() override;
82
83 /**
84 * @see armarx::ManagedIceObject::onConnectComponent()
85 */
86 void onConnectComponent() override;
87
88 /**
89 * @see armarx::ManagedIceObject::onDisconnectComponent()
90 */
91 void onDisconnectComponent() override;
92
93 /**
94 * @see armarx::ManagedIceObject::onExitComponent()
95 */
96 void onExitComponent() override;
97
98 /**
99 * @see PropertyUser::createPropertyDefinitions()
100 */
102
103 MetaWearIMUListenerPrx topicPrx;
104
105 // MetaWearIMUInterface interface
106 public:
107 void reportIMUValues(const std::string& name,
108 const MetaWearIMUDataExt& data_ext,
109 const Ice::Current&) override;
110 };
111} // 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
MetaWearIMUPropertyDefinitions(std::string prefix)
Definition MetaWearIMU.h:40
Brief description of class MetaWearIMU.
Definition MetaWearIMU.h:66
void onInitComponent() override
void onDisconnectComponent() override
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
void reportIMUValues(const std::string &name, const MetaWearIMUDataExt &data_ext, const Ice::Current &) override
void onConnectComponent() override
MetaWearIMUListenerPrx topicPrx
void onExitComponent() override
std::string getDefaultName() const override
Definition MetaWearIMU.h:72
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)
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.