iCub-main
Loading...
Searching...
No Matches
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
16using namespace iCub;
18 public yarp::os::BufferedPort<rawValuesDataVectorsMap>
19{
20public:
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.
virtual bool getKeyMetadata(std::string key, rawValuesKeyMetadata &meta) override
virtual bool getMetadataMap(rawValuesKeyMetadataMap &metamap) override
virtual bool getKeys(std::vector< std::string > &keys) override
virtual int getNumberOfKeys() override
virtual bool getRawDataMap(std::map< std::string, std::vector< std::int32_t > > &map) override
virtual bool getRawData(std::string key, std::vector< std::int32_t > &data) override
bool open(yarp::os::Searchable &config) override
void onRead(rawValuesDataVectorsMap &rawdata) override
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
This file contains the definition of unique IDs for the body parts and the skin parts of the robot.