YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
FrameGrabber_nws_yarp.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-FileCopyrightText: 2006-2010 RobotCub Consortium
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef YARP_FRAMEGRABBER_NWS_YARP_H
8#define YARP_FRAMEGRABBER_NWS_YARP_H
9
12#include <yarp/os/RpcServer.h>
13#include <yarp/os/Stamp.h>
14
22
24
26
49{
50private:
51 // Ports
52 yarp::os::RpcServer rpcPort;
54
55 // Interfaces handled
56 std::mutex m_mutex;
57 yarp::dev::IRgbVisualParams* m_iRgbVisualParams {nullptr};
58 yarp::dev::IFrameGrabberImage* m_iFrameGrabberImage {nullptr};
59 yarp::dev::IFrameGrabberImageRaw* m_iFrameGrabberImageRaw {nullptr};
60 yarp::dev::IFrameGrabberControls* m_iFrameGrabberControls {nullptr};
61 yarp::dev::IFrameGrabberControlsDC1394* m_iFrameGrabberControlsDC1394 {nullptr};
62 yarp::dev::IPreciselyTimed* m_iPreciselyTimed {nullptr};
63
64 std::unique_ptr<FrameGrabberMsgsImpl> m_RPC_FrameGrabber;
65
66 // Images
69
70 // Internal state
71 yarp::os::Stamp m_stamp;
72
73 enum Capabilities
74 {
75 COLOR,
76 RAW,
77 };
78 Capabilities m_cap {COLOR};
79
80public:
86 ~FrameGrabber_nws_yarp() override;
87
88 // DeviceDriver
89 bool close() override;
90 bool open(yarp::os::Searchable& config) override;
91
92 // IWrapper interface
93 bool attach(yarp::dev::PolyDriver* poly) override;
94 bool detach() override;
95
96 //RateThread
97 bool threadInit() override;
98 void run() override;
99
100 // PortReader
101 virtual bool read(yarp::os::ConnectionReader& connection) override;
102};
103
104#endif // YARP_FRAMEGRABBER_NWS_YARP_H
This class is the parameters parser for class FrameGrabber_nws_yarp.
frameGrabber_nws_yarp: A YARP NWS for camera devices.
FrameGrabber_nws_yarp & operator=(FrameGrabber_nws_yarp &&)=delete
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
bool detach() override
Detach the object (you must have first called attach).
bool threadInit() override
Initialization method.
FrameGrabber_nws_yarp & operator=(const FrameGrabber_nws_yarp &)=delete
virtual bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
FrameGrabber_nws_yarp(const FrameGrabber_nws_yarp &)=delete
FrameGrabber_nws_yarp(FrameGrabber_nws_yarp &&)=delete
void run() override
Loop function.
bool close() override
Close the DeviceDriver.
bool attach(yarp::dev::PolyDriver *poly) override
Attach to another object.
Interface implemented by all device drivers.
Control interface for frame grabber devices that conform to the 1394-based Digital Camera Specificati...
Control interface for frame grabber devices.
An interface for retrieving intrinsic parameter from a rgb camera.
A container for a device driver.
Definition PolyDriver.h:23
Helper interface for an object that can wrap/or "attach" to a single other device.
A mini-server for performing network communication in the background.
An interface for reading from a network connection.
An abstraction for a periodic thread.
Interface implemented by all objects that can read themselves from the network, such as Bottle object...
Definition PortReader.h:24
A port that is specialized as an RPC server.
Definition RpcServer.h:23
A base class for nested structures that can be searched.
Definition Searchable.h:31
An abstraction for a time stamp and/or sequence number.
Definition Stamp.h:21
Typed image class.
Definition Image.h:603