LaserScannerTimestampTest.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 RobotComponents::ArmarXObjects::laser_scanner_timestamp_test
17 * @author Corvin-N ( corvin at navarro dot de )
18 * @date 2023
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22
23
24#pragma once
25
28
29#include <RobotAPI/interface/units/LaserScannerUnit.h>
30
31namespace RobotComponents
32{
33
34 class Component : virtual public armarx::Component
35 {
36 public:
37 /// @see armarx::ManagedIceObject::getDefaultName()
38 std::string getDefaultName() const override;
39
40 /// Get the component's default name.
41 static std::string GetDefaultName();
42
43
44 protected:
45 /// @see PropertyUser::createPropertyDefinitions()
47
48 /// @see armarx::ManagedIceObject::onInitComponent()
49 void onInitComponent() override;
50
51 /// @see armarx::ManagedIceObject::onConnectComponent()
52 void onConnectComponent() override;
53
54 /// @see armarx::ManagedIceObject::onDisconnectComponent()
55 void onDisconnectComponent() override;
56
57 /// @see armarx::ManagedIceObject::onExitComponent()
58 void onExitComponent() override;
59
60 private:
61 void run();
62
63 int randInRange(int min, int max);
64
65
66 private:
67 static const std::string defaultName;
68
69 struct Properties
70 {
71 std::string topicName;
72 bool useTopic;
73
74 std::string frame;
75
76 int freq;
77
78 int min;
79 int max;
80
81 int correctBatchSize;
82 int wrongBatchSize;
83 };
84
85 Properties properties;
86
87 armarx::LaserScannerUnitListenerPrx laserScanUnitListenerTopic;
88 armarx::LaserScannerUnitListenerPrx laserScanUnitListenerPrx;
90 };
91
92} // namespace RobotComponents
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
static std::string GetDefaultName()
Get the component's default name.
std::string getDefaultName() const override
Baseclass for all ArmarX ManagedIceObjects requiring properties.
Definition Component.h:94
Component()
Protected default constructor. Used for virtual inheritance. Use createManagedIceObject() instead.
Definition Component.cpp:66
IceUtil::Handle< RunningTask< T > > pointer_type
Shared pointer type for convenience.
T min(T t1, T t2)
Definition gdiam.h:44
T max(T t1, T t2)
Definition gdiam.h:51
This file is part of ArmarX.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.