YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
IFrameGrabberControls.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_DEV_IFRAMEGRABBERCONTROLS_H
8#define YARP_DEV_IFRAMEGRABBERCONTROLS_H
9
10#include <yarp/dev/api.h>
11
12#include <string>
13
14
20
26
27typedef struct {
29 std::string deviceDescription;
31
59
60namespace yarp::dev {
61
68{
69public:
74
75 std::string busType2String(BusType type)
76 {
77 switch (type) {
78 case BUS_FIREWIRE:
79 return "FireWire";
80 break;
81
82 case BUS_USB:
83 return "USB";
84 break;
85
86 default:
87 return "bus type undefined";
88 break;
89 }
90 }
91
92 inline FeatureMode toFeatureMode(bool _auto)
93 {
94 return _auto ? MODE_AUTO : MODE_MANUAL;
95 }
102 virtual bool getCameraDescription(CameraDescriptor *camera)=0;
103
110 virtual bool hasFeature(int feature, bool *hasFeature)=0;
111
118 virtual bool setFeature(int feature, double value)=0;
119
126 virtual bool getFeature(int feature, double *value)=0;
127
136 virtual bool setFeature(int feature, double value1, double value2)=0;
137
145 virtual bool getFeature(int feature, double *value1, double *value2)=0;
146
153 virtual bool hasOnOff(int feature, bool *HasOnOff)=0;
154
161 virtual bool setActive(int feature, bool onoff)=0;
162
169 virtual bool getActive(int feature, bool *isActive)=0;
170
177 virtual bool hasAuto(int feature, bool *hasAuto)=0;
178
185 virtual bool hasManual(int feature, bool *hasManual)=0;
186
193 virtual bool hasOnePush(int feature, bool *hasOnePush)=0;
194
201 virtual bool setMode(int feature, FeatureMode mode)=0;
202
209 virtual bool getMode(int feature, FeatureMode *mode)=0;
210
217 virtual bool setOnePush(int feature)=0;
218};
219
220} // namespace yarp::dev
221
222#endif // YARP_DEV_IFRAMEGRABBERCONTROLS_H
@ YARP_FEATURE_NUMBER_OF
@ YARP_FEATURE_CAPTURE_SIZE
@ YARP_FEATURE_SHARPNESS
@ YARP_FEATURE_FRAME_RATE
@ YARP_FEATURE_BRIGHTNESS
@ YARP_FEATURE_TRIGGER
@ YARP_FEATURE_HUE
@ YARP_FEATURE_WHITE_BALANCE
@ YARP_FEATURE_GAMMA
@ YARP_FEATURE_TILT
@ YARP_FEATURE_EXPOSURE
@ YARP_FEATURE_CAPTURE_QUALITY
@ YARP_FEATURE_INVALID
@ YARP_FEATURE_TRIGGER_DELAY
@ YARP_FEATURE_IRIS
@ YARP_FEATURE_MIRROR
@ YARP_FEATURE_SATURATION
@ YARP_FEATURE_WHITE_SHADING
@ YARP_FEATURE_FOCUS
@ YARP_FEATURE_SHUTTER
@ YARP_FEATURE_TEMPERATURE
@ YARP_FEATURE_GAIN
@ YARP_FEATURE_PAN
@ YARP_FEATURE_OPTICAL_FILTER
@ YARP_FEATURE_ZOOM
Control interface for frame grabber devices.
virtual bool setFeature(int feature, double value)=0
Set the requested feature to a value (saturation, brightness ... )
virtual ~IFrameGrabberControls()
Destructor.
virtual bool setOnePush(int feature)=0
Set the requested feature to a value (saturation, brightness ... )
virtual bool getFeature(int feature, double *value)=0
Get the current value for the requested feature.
virtual bool setFeature(int feature, double value1, double value2)=0
Set the requested feature to a value using 2 params (like white balance)
virtual bool hasManual(int feature, bool *hasManual)=0
Check if the requested feature has the 'manual' mode.
virtual bool setMode(int feature, FeatureMode mode)=0
Set the requested mode for the feature.
std::string busType2String(BusType type)
virtual bool hasOnOff(int feature, bool *HasOnOff)=0
Check if the camera has the ability to turn on/off the requested feature.
virtual bool hasAuto(int feature, bool *hasAuto)=0
Check if the requested feature has the 'auto' mode.
virtual bool getMode(int feature, FeatureMode *mode)=0
Get the current mode for the feature.
virtual bool getFeature(int feature, double *value1, double *value2)=0
Get the current value for the requested feature.
virtual bool getCameraDescription(CameraDescriptor *camera)=0
Get a basic description of the camera hw.
virtual bool getActive(int feature, bool *isActive)=0
Get the current status of the feature, on or off.
virtual bool setActive(int feature, bool onoff)=0
Set the requested feature on or off.
virtual bool hasFeature(int feature, bool *hasFeature)=0
Check if camera has the requested feature (saturation, brightness ... )
virtual bool hasOnePush(int feature, bool *hasOnePush)=0
Check if the requested feature has the 'onePush' mode.
For streams capable of holding different kinds of content, check what they actually have.
Definition jointData.cpp:13
#define YARP_dev_API
Definition api.h:18