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
27
29
52{
53private:
54 // Ports
55 yarp::os::RpcServer rpcPort;
57
58 // Interfaces handled
59 yarp::dev::IRgbVisualParams* iRgbVisualParams {nullptr};
60 yarp::dev::IFrameGrabberImage* iFrameGrabberImage {nullptr};
61 yarp::dev::IFrameGrabberImageRaw* iFrameGrabberImageRaw {nullptr};
62 yarp::dev::IFrameGrabberControls* iFrameGrabberControls {nullptr};
63 yarp::dev::IFrameGrabberControlsDC1394* iFrameGrabberControlsDC1394 {nullptr};
64 yarp::dev::IPreciselyTimed* iPreciselyTimed {nullptr};
65
66 // Responders
71 yarp::proto::framegrabber::FrameGrabberControlsDC1394_Responder frameGrabberControlsDC1394_Responder;
72
73 // Images
76
77 // Internal state
78 yarp::os::Stamp m_stamp;
79
80 enum Capabilities
81 {
82 COLOR,
83 RAW,
84 };
85 Capabilities m_cap {COLOR};
86
87public:
93 ~FrameGrabber_nws_yarp() override;
94
95 // DeviceDriver
96 bool close() override;
97 bool open(yarp::os::Searchable& config) override;
98
99 // IWrapper interface
100 bool attach(yarp::dev::PolyDriver* poly) override;
101 bool detach() override;
102
103 //RateThread
104 bool threadInit() override;
105 void run() override;
106
107 // DeviceResponder
108 bool respond(const yarp::os::Bottle& command, yarp::os::Bottle& reply) override;
109};
110
111#endif // YARP_FRAMEGRABBER_NWS_YARP_H
constexpr yarp::conf::vocab32_t VOCAB_FRAMEGRABBER_IMAGERAW
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
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.
bool respond(const yarp::os::Bottle &command, yarp::os::Bottle &reply) override
Respond to a message.
Interface implemented by all device drivers.
A cheap and cheerful framework for human readable/writable forms of messages to devices.
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 simple collection of objects that can be described and transmitted in a portable way.
Definition Bottle.h:64
A mini-server for performing network communication in the background.
An abstraction for a periodic thread.
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:605