iCub-main
Loading...
Searching...
No Matches
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
32
33class FakeRawDataPublisherTester: public yarp::os::RFModule
34{
35private:
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
49public:
50
53
58
59 bool configure(yarp::os::ResourceFinder &rf);
60 bool close();
61 double getPeriod();
62 bool updateModule();
63};
64
65#endif
FakeRawDataPublisherTester & operator=(const FakeRawDataPublisherTester &)=default
FakeRawDataPublisherTester & operator=(FakeRawDataPublisherTester &&)=default
bool configure(yarp::os::ResourceFinder &rf)
FakeRawDataPublisherTester(FakeRawDataPublisherTester &&)=default
FakeRawDataPublisherTester(const FakeRawDataPublisherTester &)=default