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>
12
13#include <string>
14
15namespace yarp::dev {
16
17enum class BusType
18{
19 BUS_UNKNOWN = 0,
22};
23
24enum class FeatureMode
25{
26 MODE_UNKNOWN = 0,
29};
30
36
65
72{
73public:
78
79 std::string busType2String(BusType type)
80 {
81 switch (type) {
82 case BusType::BUS_FIREWIRE:
83 return "FireWire";
84 break;
85
86 case BusType::BUS_USB:
87 return "USB";
88 break;
89
90 default:
91 return "bus type undefined";
92 break;
93 }
94 }
95
96 inline FeatureMode toFeatureMode(bool _auto)
97 {
98 return _auto ? FeatureMode::MODE_AUTO : FeatureMode::MODE_MANUAL;
99 }
107
115
123
131
140 virtual yarp::dev::ReturnValue setFeature(cameraFeature_id_t feature, double value1, double value2) = 0;
141
149 virtual yarp::dev::ReturnValue getFeature(cameraFeature_id_t feature, double& value1, double& value2) = 0;
150
158
166
174
182
190
198
206
214
222};
223
224} // namespace yarp::dev
225
226#endif // YARP_DEV_IFRAMEGRABBERCONTROLS_H
CameraDescriptor camera
FeatureMode mode
Control interface for frame grabber devices.
virtual yarp::dev::ReturnValue setFeature(cameraFeature_id_t feature, double value)=0
Set the requested feature to a value (saturation, brightness ... )
virtual yarp::dev::ReturnValue hasOnOff(cameraFeature_id_t feature, bool &HasOnOff)=0
Check if the camera has the ability to turn on/off the requested feature.
virtual yarp::dev::ReturnValue getMode(cameraFeature_id_t feature, FeatureMode &mode)=0
Get the current mode for the feature.
virtual yarp::dev::ReturnValue getFeature(cameraFeature_id_t feature, double &value1, double &value2)=0
Get the current value for the requested feature.
virtual ~IFrameGrabberControls()
Destructor.
virtual yarp::dev::ReturnValue hasManual(cameraFeature_id_t feature, bool &hasManual)=0
Check if the requested feature has the 'manual' mode.
virtual yarp::dev::ReturnValue setOnePush(cameraFeature_id_t feature)=0
Set the requested feature to a value (saturation, brightness ... )
virtual yarp::dev::ReturnValue getCameraDescription(CameraDescriptor &camera)=0
Get a basic description of the camera hw.
virtual yarp::dev::ReturnValue hasOnePush(cameraFeature_id_t feature, bool &hasOnePush)=0
Check if the requested feature has the 'onePush' mode.
std::string busType2String(BusType type)
virtual yarp::dev::ReturnValue getActive(cameraFeature_id_t feature, bool &isActive)=0
Get the current status of the feature, on or off.
virtual yarp::dev::ReturnValue hasAuto(cameraFeature_id_t feature, bool &hasAuto)=0
Check if the requested feature has the 'auto' mode.
virtual yarp::dev::ReturnValue setActive(cameraFeature_id_t feature, bool onoff)=0
Set the requested feature on or off.
virtual yarp::dev::ReturnValue setMode(cameraFeature_id_t feature, FeatureMode mode)=0
Set the requested mode for the feature.
virtual yarp::dev::ReturnValue setFeature(cameraFeature_id_t feature, double value1, double value2)=0
Set the requested feature to a value using 2 params (like white balance)
virtual yarp::dev::ReturnValue hasFeature(cameraFeature_id_t, bool &hasFeature)=0
Check if camera has the requested feature (saturation, brightness ... )
virtual yarp::dev::ReturnValue getFeature(cameraFeature_id_t feature, double &value)=0
Get the current value for the requested feature.
For streams capable of holding different kinds of content, check what they actually have.
#define YARP_dev_API
Definition api.h:18