YARP
Yet Another Robot Platform
FrameGrabberControls_Forwarder.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 YARP_FRAMEGRABBER_PROTOCOL_FRAMEGRABBERCONTROLS_FORWARDER_H
7 #define YARP_FRAMEGRABBER_PROTOCOL_FRAMEGRABBERCONTROLS_FORWARDER_H
8 
10 #include <yarp/os/Port.h>
11 
12 namespace yarp {
13 namespace proto {
14 namespace framegrabber {
15 
22 {
23 private:
24  yarp::os::Port& m_port;
25 
26 public:
28  ~FrameGrabberControls_Forwarder() override = default;
29 
30  bool getCameraDescription(CameraDescriptor* camera) override;
31  bool hasFeature(int feature, bool* hasFeature) override;
32  bool setFeature(int feature, double value) override;
33  bool getFeature(int feature, double* value) override;
34  bool setFeature(int feature, double value1, double value2) override;
35  bool getFeature(int feature, double* value1, double* value2) override;
36  bool hasOnOff(int feature, bool* HasOnOff) override;
37  bool setActive(int feature, bool onoff) override;
38  bool getActive(int feature, bool* isActive) override;
39  bool hasAuto(int feature, bool* hasAuto) override;
40  bool hasManual(int feature, bool* hasManual) override;
41  bool hasOnePush(int feature, bool* hasOnePush) override;
42  bool setMode(int feature, FeatureMode mode) override;
43  bool getMode(int feature, FeatureMode* mode) override;
44  bool setOnePush(int feature) override;
45 
46 #ifndef YARP_NO_DEPRECATED // Since YARP 3.0.0
47  bool setBrightness(double v) override;
48  double getBrightness() override;
49  bool setExposure(double v) override;
50  double getExposure() override;
51  bool setSharpness(double v) override;
52  double getSharpness() override;
53  bool setWhiteBalance(double blue, double red) override;
54  bool getWhiteBalance(double &blue, double &red) override;
55  bool setHue(double v) override;
56  double getHue() override;
57  bool setSaturation(double v) override;
58  double getSaturation() override;
59  bool setGamma(double v) override;
60  double getGamma() override;
61  bool setShutter(double v) override;
62  double getShutter() override;
63  bool setGain(double v) override;
64  double getGain() override;
65  bool setIris(double v) override;
66  double getIris() override;
67 
68 private:
69  bool setCommand(int code, double v);
70  bool setCommand(int code, double b, double r);
71  double getCommand(int code) const;
72  bool getCommand(int code, double &b, double &r) const;
73 #endif // YARP_NO_DEPRECATED
74 
75 };
76 
77 } // namespace framegrabber
78 } // namespace proto
79 } // namespace yarp
80 
81 #endif // YARP_FRAMEGRABBER_PROTOCOL_FRAMEGRABBERCONTROLS_FORWARDER_H
Control interface for frame grabber devices.
A mini-server for network communication.
Definition: Port.h:47
This classes implement a sender / parser for IFrameGrabberControls interface messages.
bool hasAuto(int feature, bool *hasAuto) override
Check if the requested feature has the 'auto' mode.
bool setActive(int feature, bool onoff) override
Set the requested feature on or off.
bool hasFeature(int feature, bool *hasFeature) override
Check if camera has the requested feature (saturation, brightness ...
bool getActive(int feature, bool *isActive) override
Get the current status of the feature, on or off.
bool setOnePush(int feature) override
Set the requested feature to a value (saturation, brightness ...
bool hasOnePush(int feature, bool *hasOnePush) override
Check if the requested feature has the 'onePush' mode.
bool setFeature(int feature, double value) override
Set the requested feature to a value (saturation, brightness ...
bool setShutter(double v) override
Set the shutter parameter.
bool getWhiteBalance(double &blue, double &red) override
Read the white balance parameters.
bool getFeature(int feature, double *value) override
Get the current value for the requested feature.
bool setWhiteBalance(double blue, double red) override
Set the white balance for the frame grabber.
bool hasManual(int feature, bool *hasManual) override
Check if the requested feature has the 'manual' mode.
bool getMode(int feature, FeatureMode *mode) override
Get the current mode for the feature.
bool hasOnOff(int feature, bool *HasOnOff) override
Check if the camera has the ability to turn on/off the requested feature.
bool getCameraDescription(CameraDescriptor *camera) override
Get a basic description of the camera hw.
bool setMode(int feature, FeatureMode mode) override
Set the requested mode for the feature.
The main, catch-all namespace for YARP.
Definition: dirs.h:16