iCub-main
Loading...
Searching...
No Matches
icub-main
src
tools
fakeRawDataPublisherTester
src
FakeRawDataPublisherTester.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2024 iCub Facility - Istituto Italiano di Tecnologia
3
* Author: Jacopo Losi
4
* email: jacopo.losi@iit.it
5
* Permission is granted to copy, distribute, and/or modify this program
6
* under the terms of the GNU General Public License, version 2 or any
7
* later version published by the Free Software Foundation.
8
*
9
* A copy of the license can be found at
10
* http://www.robotcub.org/icub/license/gpl.txt
11
*
12
* This program is distributed in the hope that it will be useful, but
13
* WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
15
* Public License for more details
16
*/
17
18
19
#ifndef __FAKERAWDATAPUBLISHERTESTER__
20
#define __FAKERAWDATAPUBLISHERTESTER__
21
22
// yarp includes
23
#include <yarp/os/Stamp.h>
24
#include <yarp/os/RFModule.h>
25
#include <yarp/dev/PolyDriver.h>
26
#include <yarp/os/Bottle.h>
27
#include <yarp/os/BufferedPort.h>
28
29
// Interface for the getter of the raw data
30
// It calls the rawValuesDataStruct generated w/ thrift
31
#include <
iCub/IRawValuesPublisher.h
>
32
33
class
FakeRawDataPublisherTester
:
public
yarp::os::RFModule
34
{
35
private
:
36
iCub::debugLibrary::IRawValuesPublisher
*_iravap;
37
yarp::os::BufferedPort<yarp::os::Bottle> _outputPort;
38
39
std::map<std::string, std::vector<std::int32_t>> _rawDataValuesMap;
40
yarp::os::Stamp _stamp;
41
42
std::string m_portPrefix=
"/raw_data"
;
43
double
_updatePeriod = 0.5;
//seconds
44
std::string _robotName=
"fakedevicetest"
;
45
46
yarp::dev::PolyDriver _rawDataPublisherDevice;
47
48
49
public
:
50
51
FakeRawDataPublisherTester
();
52
~FakeRawDataPublisherTester
()
override
;
53
54
FakeRawDataPublisherTester
(
const
FakeRawDataPublisherTester
&) =
default
;
55
FakeRawDataPublisherTester
(
FakeRawDataPublisherTester
&&) =
default
;
56
FakeRawDataPublisherTester
&
operator=
(
const
FakeRawDataPublisherTester
&) =
default
;
57
FakeRawDataPublisherTester
&
operator=
(
FakeRawDataPublisherTester
&&) =
default
;
58
59
bool
configure
(yarp::os::ResourceFinder &rf);
60
bool
close
();
61
double
getPeriod
();
62
bool
updateModule
();
63
};
64
65
#endif
IRawValuesPublisher.h
FakeRawDataPublisherTester
Definition
FakeRawDataPublisherTester.h:34
FakeRawDataPublisherTester::updateModule
bool updateModule()
Definition
FakeRawDataPublisherTester.cpp:96
FakeRawDataPublisherTester::close
bool close()
Definition
FakeRawDataPublisherTester.cpp:83
FakeRawDataPublisherTester::operator=
FakeRawDataPublisherTester & operator=(const FakeRawDataPublisherTester &)=default
FakeRawDataPublisherTester::operator=
FakeRawDataPublisherTester & operator=(FakeRawDataPublisherTester &&)=default
FakeRawDataPublisherTester::~FakeRawDataPublisherTester
~FakeRawDataPublisherTester() override
Definition
FakeRawDataPublisherTester.cpp:131
FakeRawDataPublisherTester::getPeriod
double getPeriod()
Definition
FakeRawDataPublisherTester.cpp:91
FakeRawDataPublisherTester::configure
bool configure(yarp::os::ResourceFinder &rf)
Definition
FakeRawDataPublisherTester.cpp:28
FakeRawDataPublisherTester::FakeRawDataPublisherTester
FakeRawDataPublisherTester(FakeRawDataPublisherTester &&)=default
FakeRawDataPublisherTester::FakeRawDataPublisherTester
FakeRawDataPublisherTester(const FakeRawDataPublisherTester &)=default
FakeRawDataPublisherTester::FakeRawDataPublisherTester
FakeRawDataPublisherTester()
Definition
FakeRawDataPublisherTester.cpp:128
iCub::debugLibrary::IRawValuesPublisher
Definition
IRawValuesPublisher.h:19
Generated on Wed Dec 18 2024 16:34:48 for iCub-main by
1.9.8