iCub-main
RawValuesPublisherClient.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3  * SPDX-License-Identifier: BSD-3-Clause
4  */
5 
6 #ifndef RAWVALUESPUBLISHER_NETWORKCLIENT_H
7 #define RAWVALUESPUBLISHER_NETWORKCLIENT_H
8 
9 #include <yarp/os/BufferedPort.h>
10 #include <yarp/dev/DeviceDriver.h>
12 
13 // ParamParser generated classes
15 
16 using namespace iCub;
18  public yarp::os::BufferedPort<rawValuesDataVectorsMap>
19 {
20 public:
21  std::map<std::string, std::vector<std::int32_t>> receivedRawDataMap;
22  mutable std::mutex dataMutex;
23 
24  using yarp::os::BufferedPort<rawValuesDataVectorsMap>::onRead;
25  void onRead(rawValuesDataVectorsMap &rawdata) override;
26 };
27 
29  public yarp::dev::DeviceDriver,
32 {
33  private:
34  RawValuesStreamingDataInputPort m_streamingPort;
35  yarp::os::Port m_rpcPort;
36 
37  RawValuesPublisherMetadata m_RPCInterface;
38 
39  public:
40  /* DevideDriver methods */
41  bool open(yarp::os::Searchable& config) override;
42  bool close() override;
43 
44  /* IRawValuesPublisher methods */
45  virtual bool getRawDataMap(std::map<std::string, std::vector<std::int32_t>> &map) override;
46  virtual bool getRawData(std::string key, std::vector<std::int32_t> &data) override;
47  virtual bool getKeys(std::vector<std::string> &keys) override;
48  virtual int getNumberOfKeys() override;
49  virtual bool getMetadataMap(rawValuesKeyMetadataMap &metamap) override;
50  virtual bool getKeyMetadata(std::string key, rawValuesKeyMetadata &meta) override;
51 };
52 
53 #endif
@ data
This class is the parameters parser for class RawValuesPublisherClient.
std::map< std::string, std::vector< std::int32_t > > receivedRawDataMap
rawValuesDataVectorsMap IDL struct of a map of vectors to store the raw value data sent by the device
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.