YARP
Yet Another Robot Platform
yarp::proto::framegrabber::FrameGrabberControls_Forwarder Class Reference

This classes implement a sender / parser for IFrameGrabberControls interface messages. More...

#include <framegrabber_protocol/yarp/proto/framegrabber/FrameGrabberControls_Forwarder.h>

+ Inheritance diagram for yarp::proto::framegrabber::FrameGrabberControls_Forwarder:

Public Member Functions

 FrameGrabberControls_Forwarder (yarp::os::Port &port)
 
 ~FrameGrabberControls_Forwarder () override=default
 
bool getCameraDescription (CameraDescriptor *camera) override
 Get a basic description of the camera hw. More...
 
bool hasFeature (int feature, bool *hasFeature) override
 Check if camera has the requested feature (saturation, brightness ... More...
 
bool setFeature (int feature, double value) override
 Set the requested feature to a value (saturation, brightness ... More...
 
bool getFeature (int feature, double *value) override
 Get the current value for the requested feature. More...
 
bool setFeature (int feature, double value1, double value2) override
 Set the requested feature to a value using 2 params (like white balance) More...
 
bool getFeature (int feature, double *value1, double *value2) override
 Get the current value for the requested feature. More...
 
bool hasOnOff (int feature, bool *HasOnOff) override
 Check if the camera has the ability to turn on/off the requested feature. More...
 
bool setActive (int feature, bool onoff) override
 Set the requested feature on or off. More...
 
bool getActive (int feature, bool *isActive) override
 Get the current status of the feature, on or off. More...
 
bool hasAuto (int feature, bool *hasAuto) override
 Check if the requested feature has the 'auto' mode. More...
 
bool hasManual (int feature, bool *hasManual) override
 Check if the requested feature has the 'manual' mode. More...
 
bool hasOnePush (int feature, bool *hasOnePush) override
 Check if the requested feature has the 'onePush' mode. More...
 
bool setMode (int feature, FeatureMode mode) override
 Set the requested mode for the feature. More...
 
bool getMode (int feature, FeatureMode *mode) override
 Get the current mode for the feature. More...
 
bool setOnePush (int feature) override
 Set the requested feature to a value (saturation, brightness ... More...
 
bool setBrightness (double v) override
 Set the brightness. More...
 
double getBrightness () override
 Read the brightness parameter. More...
 
bool setExposure (double v) override
 Set the exposure. More...
 
double getExposure () override
 Read the exposure parameter. More...
 
bool setSharpness (double v) override
 Set the sharpness. More...
 
double getSharpness () override
 Read the sharpness parameter. More...
 
bool setWhiteBalance (double blue, double red) override
 Set the white balance for the frame grabber. More...
 
bool getWhiteBalance (double &blue, double &red) override
 Read the white balance parameters. More...
 
bool setHue (double v) override
 Set the hue. More...
 
double getHue () override
 Read the hue parameter. More...
 
bool setSaturation (double v) override
 Set the saturation. More...
 
double getSaturation () override
 Read the saturation parameter. More...
 
bool setGamma (double v) override
 Set the gamma. More...
 
double getGamma () override
 Read the gamma parameter. More...
 
bool setShutter (double v) override
 Set the shutter parameter. More...
 
double getShutter () override
 Read the shutter parameter. More...
 
bool setGain (double v) override
 Set the gain. More...
 
double getGain () override
 Read the gain parameter. More...
 
bool setIris (double v) override
 Set the iris. More...
 
double getIris () override
 Read the iris parameter. More...
 
- Public Member Functions inherited from yarp::dev::IFrameGrabberControls
virtual ~IFrameGrabberControls ()
 Destructor. More...
 
std::string busType2String (BusType type)
 
FeatureMode toFeatureMode (bool _auto)
 

Detailed Description

This classes implement a sender / parser for IFrameGrabberControls interface messages.

Definition at line 18 of file FrameGrabberControls_Forwarder.h.

Constructor & Destructor Documentation

◆ FrameGrabberControls_Forwarder()

FrameGrabberControls_Forwarder::FrameGrabberControls_Forwarder ( yarp::os::Port port)

Definition at line 14 of file FrameGrabberControls_Forwarder.cpp.

◆ ~FrameGrabberControls_Forwarder()

yarp::proto::framegrabber::FrameGrabberControls_Forwarder::~FrameGrabberControls_Forwarder ( )
overridedefault

Member Function Documentation

◆ getActive()

bool FrameGrabberControls_Forwarder::getActive ( int  feature,
bool *  isActive 
)
overridevirtual

Get the current status of the feature, on or off.

Parameters
featurethe identifier of the feature to check
isActiveflag true if the feature is active, false otherwise
Returns
returns true if success, false otherwise (e.g. the interface is not implemented)

Implements yarp::dev::IFrameGrabberControls.

Definition at line 130 of file FrameGrabberControls_Forwarder.cpp.

◆ getBrightness()

double FrameGrabberControls_Forwarder::getBrightness ( )
overridevirtual

Read the brightness parameter.

Returns
the current brightness value.

Reimplemented from yarp::dev::IFrameGrabberControls.

Reimplemented in RemoteFrameGrabber.

Definition at line 278 of file FrameGrabberControls_Forwarder.cpp.

◆ getCameraDescription()

bool FrameGrabberControls_Forwarder::getCameraDescription ( CameraDescriptor camera)
overridevirtual

Get a basic description of the camera hw.

This is mainly used to determine the HW bus type in order to choose the corresponding interface for advanced controls.

Parameters
devicereturns an identifier for the bus
Returns
returns true if success, false otherwise (e.g. the interface is not implemented)

Implements yarp::dev::IFrameGrabberControls.

Definition at line 20 of file FrameGrabberControls_Forwarder.cpp.

◆ getExposure()

double FrameGrabberControls_Forwarder::getExposure ( )
overridevirtual

Read the exposure parameter.

Returns
the current exposure value.

Reimplemented from yarp::dev::IFrameGrabberControls.

Reimplemented in RemoteFrameGrabber.

Definition at line 288 of file FrameGrabberControls_Forwarder.cpp.

◆ getFeature() [1/2]

bool FrameGrabberControls_Forwarder::getFeature ( int  feature,
double *  value 
)
overridevirtual

Get the current value for the requested feature.

Parameters
featurethe identifier of the feature to read
valuepointer to current value of the feature, from 0 to 1 expressed as a percentage
Returns
returns true on success, false on failure.

Implements yarp::dev::IFrameGrabberControls.

Definition at line 75 of file FrameGrabberControls_Forwarder.cpp.

◆ getFeature() [2/2]

bool FrameGrabberControls_Forwarder::getFeature ( int  feature,
double *  value1,
double *  value2 
)
overridevirtual

Get the current value for the requested feature.

Parameters
featurethe identifier of the feaature to read
value1returns the current value of the feature, from 0 to 1 expressed as a percentage
value2returns the current value of the feature, from 0 to 1 expressed as a percentage
Returns
returns true on success, false on failure.

Implements yarp::dev::IFrameGrabberControls.

Definition at line 89 of file FrameGrabberControls_Forwarder.cpp.

◆ getGain()

double FrameGrabberControls_Forwarder::getGain ( )
overridevirtual

Read the gain parameter.

Returns
the current gain value.

Reimplemented from yarp::dev::IFrameGrabberControls.

Reimplemented in RemoteFrameGrabber.

Definition at line 358 of file FrameGrabberControls_Forwarder.cpp.

◆ getGamma()

double FrameGrabberControls_Forwarder::getGamma ( )
overridevirtual

Read the gamma parameter.

Returns
the current gamma value.

Reimplemented from yarp::dev::IFrameGrabberControls.

Reimplemented in RemoteFrameGrabber.

Definition at line 338 of file FrameGrabberControls_Forwarder.cpp.

◆ getHue()

double FrameGrabberControls_Forwarder::getHue ( )
overridevirtual

Read the hue parameter.

Returns
the current hue value.

Reimplemented from yarp::dev::IFrameGrabberControls.

Reimplemented in RemoteFrameGrabber.

Definition at line 318 of file FrameGrabberControls_Forwarder.cpp.

◆ getIris()

double FrameGrabberControls_Forwarder::getIris ( )
overridevirtual

Read the iris parameter.

Returns
the current iris value.

Reimplemented from yarp::dev::IFrameGrabberControls.

Reimplemented in RemoteFrameGrabber.

Definition at line 368 of file FrameGrabberControls_Forwarder.cpp.

◆ getMode()

bool FrameGrabberControls_Forwarder::getMode ( int  feature,
FeatureMode mode 
)
overridevirtual

Get the current mode for the feature.

Parameters
featurethe identifier of the feature to change
hasAutoflag true if the feature is has 'auto' mode, false otherwise
Returns
returns true if success, false otherwise (e.g. the interface is not implemented)

Implements yarp::dev::IFrameGrabberControls.

Definition at line 198 of file FrameGrabberControls_Forwarder.cpp.

◆ getSaturation()

double FrameGrabberControls_Forwarder::getSaturation ( )
overridevirtual

Read the saturation parameter.

Returns
the current saturation value.

Reimplemented from yarp::dev::IFrameGrabberControls.

Reimplemented in RemoteFrameGrabber.

Definition at line 328 of file FrameGrabberControls_Forwarder.cpp.

◆ getSharpness()

double FrameGrabberControls_Forwarder::getSharpness ( )
overridevirtual

Read the sharpness parameter.

Returns
the current sharpness value.

Reimplemented from yarp::dev::IFrameGrabberControls.

Reimplemented in RemoteFrameGrabber.

Definition at line 298 of file FrameGrabberControls_Forwarder.cpp.

◆ getShutter()

double FrameGrabberControls_Forwarder::getShutter ( )
overridevirtual

Read the shutter parameter.

Returns
the current shutter value.

Reimplemented from yarp::dev::IFrameGrabberControls.

Reimplemented in RemoteFrameGrabber.

Definition at line 348 of file FrameGrabberControls_Forwarder.cpp.

◆ getWhiteBalance()

bool FrameGrabberControls_Forwarder::getWhiteBalance ( double &  blue,
double &  red 
)
overridevirtual

Read the white balance parameters.

Parameters
bluereference to return value for the red parameter.
redreference to return value for the green parameter.
Returns
true/false.

Reimplemented from yarp::dev::IFrameGrabberControls.

Reimplemented in RemoteFrameGrabber.

Definition at line 308 of file FrameGrabberControls_Forwarder.cpp.

◆ hasAuto()

bool FrameGrabberControls_Forwarder::hasAuto ( int  feature,
bool *  hasAuto 
)
overridevirtual

Check if the requested feature has the 'auto' mode.

Parameters
featurethe identifier of the feature to check
hasAutoflag true if the feature is has 'auto' mode, false otherwise
Returns
returns true if success, false otherwise (e.g. the interface is not implemented)

Implements yarp::dev::IFrameGrabberControls.

Definition at line 144 of file FrameGrabberControls_Forwarder.cpp.

◆ hasFeature()

bool FrameGrabberControls_Forwarder::hasFeature ( int  feature,
bool *  hasFeature 
)
overridevirtual

Check if camera has the requested feature (saturation, brightness ...

)

Parameters
featurethe identifier of the feature to check
hasFeatureflag value: true if the feature is present, false otherwise
Returns
returns true if success, false otherwise (e.g. the interface is not implemented)

Implements yarp::dev::IFrameGrabberControls.

Definition at line 36 of file FrameGrabberControls_Forwarder.cpp.

◆ hasManual()

bool FrameGrabberControls_Forwarder::hasManual ( int  feature,
bool *  hasManual 
)
overridevirtual

Check if the requested feature has the 'manual' mode.

Parameters
featurethe identifier of the feature to check
hasAutoflag true if the feature is has 'manual' mode, false otherwise
Returns
returns true if success, false otherwise (e.g. the interface is not implemented)

Implements yarp::dev::IFrameGrabberControls.

Definition at line 158 of file FrameGrabberControls_Forwarder.cpp.

◆ hasOnePush()

bool FrameGrabberControls_Forwarder::hasOnePush ( int  feature,
bool *  hasOnePush 
)
overridevirtual

Check if the requested feature has the 'onePush' mode.

Parameters
featurethe identifier of the feature to check
hasAutoflag true if the feature is has 'onePush' mode, false otherwise
Returns
returns true if success, false otherwise (e.g. the interface is not implemented)

Implements yarp::dev::IFrameGrabberControls.

Definition at line 172 of file FrameGrabberControls_Forwarder.cpp.

◆ hasOnOff()

bool FrameGrabberControls_Forwarder::hasOnOff ( int  feature,
bool *  HasOnOff 
)
overridevirtual

Check if the camera has the ability to turn on/off the requested feature.

Parameters
featurethe identifier of the feature to change
hasOnOffflag true if this feature can be turned on/off, false otherwise.
Returns
returns true if success, false otherwise (e.g. the interface is not implemented)

Implements yarp::dev::IFrameGrabberControls.

Definition at line 104 of file FrameGrabberControls_Forwarder.cpp.

◆ setActive()

bool FrameGrabberControls_Forwarder::setActive ( int  feature,
bool  onoff 
)
overridevirtual

Set the requested feature on or off.

Parameters
featurethe identifier of the feature to change
onofftrue to activate, off to deactivate the feature
Returns
returns true on success, false on failure.

Implements yarp::dev::IFrameGrabberControls.

Definition at line 118 of file FrameGrabberControls_Forwarder.cpp.

◆ setBrightness()

bool FrameGrabberControls_Forwarder::setBrightness ( double  v)
overridevirtual

Set the brightness.

Parameters
vnew value for parameter.
Returns
true on success.

Reimplemented from yarp::dev::IFrameGrabberControls.

Reimplemented in RemoteFrameGrabber.

Definition at line 273 of file FrameGrabberControls_Forwarder.cpp.

◆ setExposure()

bool FrameGrabberControls_Forwarder::setExposure ( double  v)
overridevirtual

Set the exposure.

Parameters
vnew value for parameter.
Returns
true on success.

Reimplemented from yarp::dev::IFrameGrabberControls.

Reimplemented in RemoteFrameGrabber.

Definition at line 283 of file FrameGrabberControls_Forwarder.cpp.

◆ setFeature() [1/2]

bool FrameGrabberControls_Forwarder::setFeature ( int  feature,
double  value 
)
overridevirtual

Set the requested feature to a value (saturation, brightness ...

)

Parameters
featurethe identifier of the feature to change
valuenew value of the feature, range from 0 to 1 expressed as a percentage
Returns
returns true if success, false otherwise (e.g. the interface is not implemented)

Implements yarp::dev::IFrameGrabberControls.

Definition at line 50 of file FrameGrabberControls_Forwarder.cpp.

◆ setFeature() [2/2]

bool FrameGrabberControls_Forwarder::setFeature ( int  feature,
double  value1,
double  value2 
)
overridevirtual

Set the requested feature to a value using 2 params (like white balance)

Parameters
featurethe identifier of the feature to change
value1first param, from 0 to 1 expressed as a percentage
value2second param, from 0 to 1 expressed as a percentage
Returns
returns true if success, false otherwise (e.g. the interface is not implemented)

Implements yarp::dev::IFrameGrabberControls.

Definition at line 62 of file FrameGrabberControls_Forwarder.cpp.

◆ setGain()

bool FrameGrabberControls_Forwarder::setGain ( double  v)
overridevirtual

Set the gain.

Parameters
vnew value for parameter.
Returns
true on success.

Reimplemented from yarp::dev::IFrameGrabberControls.

Reimplemented in RemoteFrameGrabber.

Definition at line 353 of file FrameGrabberControls_Forwarder.cpp.

◆ setGamma()

bool FrameGrabberControls_Forwarder::setGamma ( double  v)
overridevirtual

Set the gamma.

Parameters
vnew value for parameter.
Returns
true on success.

Reimplemented from yarp::dev::IFrameGrabberControls.

Reimplemented in RemoteFrameGrabber.

Definition at line 333 of file FrameGrabberControls_Forwarder.cpp.

◆ setHue()

bool FrameGrabberControls_Forwarder::setHue ( double  v)
overridevirtual

Set the hue.

Parameters
vnew value for parameter.
Returns
true on success.

Reimplemented from yarp::dev::IFrameGrabberControls.

Reimplemented in RemoteFrameGrabber.

Definition at line 313 of file FrameGrabberControls_Forwarder.cpp.

◆ setIris()

bool FrameGrabberControls_Forwarder::setIris ( double  v)
overridevirtual

Set the iris.

Parameters
vnew value for parameter.
Returns
true on success.

Reimplemented from yarp::dev::IFrameGrabberControls.

Reimplemented in RemoteFrameGrabber.

Definition at line 363 of file FrameGrabberControls_Forwarder.cpp.

◆ setMode()

bool FrameGrabberControls_Forwarder::setMode ( int  feature,
FeatureMode  mode 
)
overridevirtual

Set the requested mode for the feature.

Parameters
featurethe identifier of the feature to change
auto_onofftrue to activate 'auto' mode, false to activate 'manual' mode
Returns
returns true on success, false on failure.

Implements yarp::dev::IFrameGrabberControls.

Definition at line 186 of file FrameGrabberControls_Forwarder.cpp.

◆ setOnePush()

bool FrameGrabberControls_Forwarder::setOnePush ( int  feature)
overridevirtual

Set the requested feature to a value (saturation, brightness ...

)

Parameters
featurethe identifier of the feature to change
valuenew value of the feature, from 0 to 1 as a percentage of param range
Returns
returns true on success, false on failure.

Implements yarp::dev::IFrameGrabberControls.

Definition at line 212 of file FrameGrabberControls_Forwarder.cpp.

◆ setSaturation()

bool FrameGrabberControls_Forwarder::setSaturation ( double  v)
overridevirtual

Set the saturation.

Parameters
vnew value for parameter.
Returns
true on success.

Reimplemented from yarp::dev::IFrameGrabberControls.

Reimplemented in RemoteFrameGrabber.

Definition at line 323 of file FrameGrabberControls_Forwarder.cpp.

◆ setSharpness()

bool FrameGrabberControls_Forwarder::setSharpness ( double  v)
overridevirtual

Set the sharpness.

Parameters
vnew value for parameter.
Returns
true on success.

Reimplemented from yarp::dev::IFrameGrabberControls.

Reimplemented in RemoteFrameGrabber.

Definition at line 293 of file FrameGrabberControls_Forwarder.cpp.

◆ setShutter()

bool FrameGrabberControls_Forwarder::setShutter ( double  v)
overridevirtual

Set the shutter parameter.

Parameters
vnew value for parameter.
Returns
true on success.

Reimplemented from yarp::dev::IFrameGrabberControls.

Reimplemented in RemoteFrameGrabber.

Definition at line 343 of file FrameGrabberControls_Forwarder.cpp.

◆ setWhiteBalance()

bool FrameGrabberControls_Forwarder::setWhiteBalance ( double  blue,
double  red 
)
overridevirtual

Set the white balance for the frame grabber.

Parameters
bluecomponent gain.
redcomponent gain.
Returns
true/false if successful or not.

Reimplemented from yarp::dev::IFrameGrabberControls.

Reimplemented in RemoteFrameGrabber.

Definition at line 303 of file FrameGrabberControls_Forwarder.cpp.


The documentation for this class was generated from the following files: