YARP
Yet Another Robot Platform
RGBDSensorClient_StreamingMsgParser.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3  * All rights reserved.
4  *
5  * This software may be modified and distributed under the terms of the
6  * BSD-3-Clause license. See the accompanying LICENSE file for details.
7  */
8 
9 #ifndef YARP_DEV_RGBDSENSORCLIENT_RGBDSENSORCLIENT_STREAMINGMSGPARSER_H
10 #define YARP_DEV_RGBDSENSORCLIENT_RGBDSENSORCLIENT_STREAMINGMSGPARSER_H
11 
12 #include <list>
13 #include <yarp/os/Stamp.h>
14 #include <yarp/sig/Image.h>
15 #include <yarp/dev/DeviceDriver.h>
16 #include <yarp/os/PortablePair.h>
17 #include <yarp/os/LogStream.h>
18 
19 
21  public yarp::os::TypedReaderCallback<yarp::sig::FlexImage>
22 {
23 private:
24  yarp::sig::FlexImage last_rgb;
25 
26 public:
29 
31  void onRead(yarp::sig::FlexImage& datum) override;
33 };
34 
35 
37  public yarp::os::TypedReaderCallback<yarp::sig::ImageOf< yarp::sig::PixelFloat>>
38 {
39 private:
41 
42 public:
45 
49 };
50 
51 
53 {
54 private:
55  RgbImageReader_Impl read_rgb;
56  FloatImageReader_Impl read_depth;
57 
60 
61 public:
63 
64  bool readRgb(yarp::sig::FlexImage &data, yarp::os::Stamp *timeStamp = NULL);
65 
67 
68  bool read(yarp::sig::FlexImage &rgbImage, yarp::sig::ImageOf< yarp::sig::PixelFloat > &depthImage, yarp::os::Stamp *rgbStamp = NULL, yarp::os::Stamp *depthStamp = NULL);
69 
72 };
73 
74 #endif // YARP_DEV_RGBDSENSORCLIENT_RGBDSENSORCLIENT_STREAMINGMSGPARSER_H
void onRead(yarp::sig::ImageOf< yarp::sig::PixelFloat > &datum) override
yarp::sig::ImageOf< yarp::sig::PixelFloat > getImage()
bool readDepth(yarp::sig::ImageOf< yarp::sig::PixelFloat > &data, yarp::os::Stamp *timeStamp=NULL)
bool read(yarp::sig::FlexImage &rgbImage, yarp::sig::ImageOf< yarp::sig::PixelFloat > &depthImage, yarp::os::Stamp *rgbStamp=NULL, yarp::os::Stamp *depthStamp=NULL)
void attach(yarp::os::BufferedPort< yarp::sig::FlexImage > *_port_rgb, yarp::os::BufferedPort< yarp::sig::ImageOf< yarp::sig::PixelFloat >> *_port_depth)
bool readRgb(yarp::sig::FlexImage &data, yarp::os::Stamp *timeStamp=NULL)
void onRead(yarp::sig::FlexImage &datum) override
An abstraction for a time stamp and/or sequence number.
Definition: Stamp.h:25
A callback for typed data from a port.
Image class with user control of representation details.
Definition: Image.h:403