YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
yarp::proto::framegrabber::FrameGrabberControls_Forwarder Class Reference

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

#include <messages/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.
 
bool hasFeature (int feature, bool *hasFeature) override
 Check if camera has the requested feature (saturation, brightness ... )
 
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 setFeature (int feature, double value1, double value2) override
 Set the requested feature to a value using 2 params (like white balance)
 
bool getFeature (int feature, double *value1, double *value2) override
 Get the current value for the requested feature.
 
bool hasOnOff (int feature, bool *HasOnOff) override
 Check if the camera has the ability to turn on/off the requested feature.
 
bool setActive (int feature, bool onoff) override
 Set the requested feature on or off.
 
bool getActive (int feature, bool *isActive) override
 Get the current status of the feature, on or off.
 
bool hasAuto (int feature, bool *hasAuto) override
 Check if the requested feature has the 'auto' mode.
 
bool hasManual (int feature, bool *hasManual) override
 Check if the requested feature has the 'manual' mode.
 
bool hasOnePush (int feature, bool *hasOnePush) override
 Check if the requested feature has the 'onePush' mode.
 
bool setMode (int feature, FeatureMode mode) override
 Set the requested mode for the feature.
 
bool getMode (int feature, FeatureMode *mode) override
 Get the current mode for the feature.
 
bool setOnePush (int feature) override
 Set the requested feature to a value (saturation, brightness ... )
 
- Public Member Functions inherited from yarp::dev::IFrameGrabberControls
virtual ~IFrameGrabberControls ()
 Destructor.
 
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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.


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