YARP
Yet Another Robot Platform
FrameGrabberControlImpl.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3  * All rights reserved.
4  *
5  * This software may be modified and distributed under the terms of the
6  * BSD-3-Clause license. See the accompanying LICENSE file for details.
7  */
8 
9 #ifndef YARP_DEV_FRAMEGRABBERCONTROLIMPL_H
10 #define YARP_DEV_FRAMEGRABBERCONTROLIMPL_H
11 
12 #include <string>
13 #include <yarp/os/Port.h>
14 #include <yarp/dev/DeviceDriver.h>
15 #include <yarp/dev/FrameGrabberInterfaces.h> // to include VOCAB definitions
16 
20 namespace yarp{
21  namespace dev {
22  class FrameGrabberControls_Parser;
23  class FrameGrabberControls_Sender;
24  }
25 }
26 
27 
33 {
34 private:
35  yarp::os::Port &_port;
36 
37 public:
40  bool getCameraDescription(CameraDescriptor *camera) override;
41  bool hasFeature(int feature, bool *hasFeature) override;
42  bool setFeature(int feature, double value) override;
43  bool getFeature(int feature, double *value) override;
44  bool setFeature(int feature, double value1, double value2) override;
45  bool getFeature(int feature, double *value1, double *value2) override;
46  bool hasOnOff(int feature, bool *HasOnOff) override;
47  bool setActive(int feature, bool onoff) override;
48  bool getActive(int feature, bool *isActive) override;
49  bool hasAuto(int feature, bool *hasAuto) override;
50  bool hasManual(int feature, bool *hasManual) override;
51  bool hasOnePush(int feature, bool *hasOnePush) override;
52  bool setMode(int feature, FeatureMode mode) override;
53  bool getMode(int feature, FeatureMode *mode) override;
54  bool setOnePush(int feature) override;
55 };
56 
57 
59 {
60 private:
61  IFrameGrabberControls *fgCtrl;
62 
63 public:
66 
67  bool configure(IFrameGrabberControls *interface);
68  bool respond(const yarp::os::Bottle& cmd, yarp::os::Bottle& response) override;
69 };
70 
71 
72 #endif // YARP_DEV_FRAMEGRABBERCONTROLIMPL_H
define common interfaces to discover remote camera capabilities
A cheap and cheerful framework for human readable/writable forms of messages to devices.
Definition: DeviceDriver.h:134
This classes implement a sender / parser for IFrameGrabberControls interface messages.
bool hasFeature(int feature, bool *hasFeature) override
Check if camera has the requested feature (saturation, brightness ...
bool setMode(int feature, FeatureMode mode) override
Set the requested mode for the feature.
bool setActive(int feature, bool onoff) override
Set the requested feature on or off.
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 setFeature(int feature, double value) override
Set the requested feature to a value (saturation, brightness ...
bool getFeature(int feature, double *value) override
Get the current value for the requested feature.
bool setOnePush(int feature) override
Set the requested feature to a value (saturation, brightness ...
bool hasOnOff(int feature, bool *HasOnOff) override
Check if the camera has the ability to turn on/off the requested feature.
bool hasAuto(int feature, bool *hasAuto) override
Check if the requested feature has the 'auto' mode.
bool getActive(int feature, bool *isActive) override
Get the current status of the feature, on or off.
bool getCameraDescription(CameraDescriptor *camera) override
Get a basic description of the camera hw.
bool hasOnePush(int feature, bool *hasOnePush) override
Check if the requested feature has the 'onePush' mode.
Control interface for frame grabber devices.
A simple collection of objects that can be described and transmitted in a portable way.
Definition: Bottle.h:73
A mini-server for network communication.
Definition: Port.h:50
The main, catch-all namespace for YARP.
Definition: environment.h:18
#define YARP_dev_API
Definition: api.h:19