iCub-main
IRawValuesPublisher.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2006-2024 Istituto Italiano di Tecnologia (IIT)
3  * SPDX-License-Identifier: BSD-3-Clause
4  */
5 
6 #ifndef _ICUB_IRAWVALUESPUBLISHER_H_
7 #define _ICUB_IRAWVALUESPUBLISHER_H_
8 
13 
14 namespace iCub
15 {
16  namespace debugLibrary
17  {
19  {
20  public:
21  /* Fill the passed map with the raw values coming from the low level
22  * @param map for raw values
23  * @return true if the local raw value can be taken otherwise false
24  */
25  virtual bool getRawDataMap(std::map<std::string, std::vector<std::int32_t>> &map) = 0;
26 
27  /* Fill the passed vector with the raw values coming from the low level
28  * given the specific key associated to a vector of raw data
29  * @param key to be found in the local map of metadata
30  * @param data vector of raw values to be filled
31  * @return true if the key exists in the local metadata map and if the raw values can be found
32  * otherwise false
33  */
34  virtual bool getRawData(std::string key, std::vector<std::int32_t> &data) = 0;
35 
36  /* Fill the passed vector with the keys saved in the local map of metadata
37  * @param keys vector of strings which will be filled with the keys of the metadata map
38  * @return true if there's no error in pushing back the keys in the vector
39  */
40  virtual bool getKeys(std::vector<std::string> &keys) = 0;
41 
42  /* @return the number of keys, i.e. entries, saved in the local map of metadata
43  */
44  virtual int getNumberOfKeys() = 0;
45 
46  /* Copy the local map of metadata to the one passed as argument
47  * @param metamap map of metadata to be filled
48  * @return true if the local map is not empty and if the copy ends correctly
49  * otherwise return false
50  */
51  virtual bool getMetadataMap(rawValuesKeyMetadataMap &metamap) = 0;
52 
53  /* Given the key of a specific entry fill the metadata with the one
54  * present at the requested entry of the local map
55  * @param key for getting the specific entry in the local map
56  * @param meta the metadata to be filled with the data and the requested entry
57  * @return true if the find and copy ends fine otherwise false
58  */
59  virtual bool getKeyMetadata(std::string key, rawValuesKeyMetadata &meta) = 0;
60  };
61  }
62 }
63 
64 #endif //_ICUB_IRAWVALUESPUBLISHER_H_
65 
@ data
virtual bool getMetadataMap(rawValuesKeyMetadataMap &metamap)=0
virtual bool getRawDataMap(std::map< std::string, std::vector< std::int32_t >> &map)=0
virtual bool getKeyMetadata(std::string key, rawValuesKeyMetadata &meta)=0
virtual bool getKeys(std::vector< std::string > &keys)=0
virtual bool getRawData(std::string key, std::vector< std::int32_t > &data)=0
yarp::sig::Vector & map(yarp::sig::Vector &v, double(op)(double))
Performs a unary operator inplace on each element of a vector.
Definition: Math.cpp:305
This file contains the definition of unique IDs for the body parts and the skin parts of the robot.