iCub-main
Loading...
Searching...
No Matches
FakeRawValuesPublisher.h
Go to the documentation of this file.
1// -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*-
2
3/*
4 * Copyright (C) 2024 iCub Facility - Istituto Italiano di Tecnologia
5 * Author: Jacopo Losi, Valentina Gaggero
6 * email: jacopo.losi@iit.it, valentina.gaggero@iit.it
7 * Permission is granted to copy, distribute, and/or modify this program
8 * under the terms of the GNU General Public License, version 2 or any
9 * later version published by the Free Software Foundation.
10 *
11 * A copy of the license can be found at
12 * http://www.robotcub.org/icub/license/gpl.txt
13 *
14 * This program is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
17 * Public License for more details
18*/
19
20// - include guard ----------------------------------------------------------------------------------------------------
21
22#ifndef _ICUB_FAKERAWVALUESPUBLISHER_H_
23#define _ICUB_FAKERAWVALUESPUBLISHER_H_
24
25// system std include
26#include <map>
27
28// yarp includes
29#include <yarp/dev/DeviceDriver.h>
30
32
33// ParamParser generated classes
35
36using namespace iCub;
39 public yarp::dev::DeviceDriver,
41{
42 public:
45
46 // IRawValuesPublisher
47 virtual bool getRawDataMap(std::map<std::string, std::vector<std::int32_t>> &map) override;
48 virtual bool getRawData(std::string key, std::vector<std::int32_t> &data) override;
49 virtual bool getKeys(std::vector<std::string> &keys) override;
50 virtual int getNumberOfKeys() override;
51 virtual bool getMetadataMap(rawValuesKeyMetadataMap &metamap) override;
52 virtual bool getKeyMetadata(std::string key, rawValuesKeyMetadata &meta) override;
53
54
55 private:
56 /* Internal methods */
57 bool getRawData_core(std::string key, std::vector<std::int32_t> &data);
58
59 /* DevideDriver methods */
60 bool open(yarp::os::Searchable& config) override;
61 bool close() override;
62
63 int m_numberOfJomos = 0;
64 int m_sawtoothThreshold = 0;
65 std::string m_rawValuesVectorTag = "";
66 std::vector<std::int32_t> m_rawDataAuxVector;
67 int m_sawthootTestVal = 0;
68
69 std::map<std::string, rawValuesKeyMetadata> m_rawValuesMetadataMap;
70};
71
72#endif //_ICUB_FAKERAWVALUESPUBLISHER_H_
73
74// - end-of-file (leave a blank line after)----------------------------------------------------------------------------
@ data
This class is the parameters parser for class FakeRawValuesPublisher.
virtual bool getKeys(std::vector< std::string > &keys) override
virtual bool getRawData(std::string key, std::vector< std::int32_t > &data) override
virtual bool getRawDataMap(std::map< std::string, std::vector< std::int32_t > > &map) override
virtual bool getKeyMetadata(std::string key, rawValuesKeyMetadata &meta) override
virtual int getNumberOfKeys() override
~FakeRawValuesPublisher()=default
virtual bool getMetadataMap(rawValuesKeyMetadataMap &metamap) override
This file contains the definition of unique IDs for the body parts and the skin parts of the robot.