27 yCError(FRAMEGRABBERCROPPER) <<
"x1 parameter not found";
35 yCError(FRAMEGRABBERCROPPER) <<
"y1 parameter not found";
43 yCError(FRAMEGRABBERCROPPER) <<
"x2 parameter not found";
51 yCError(FRAMEGRABBERCROPPER) <<
"y2 parameter not found";
58 if (config.
check(
"forwardRgbVisualParams",
"Forward the the IRgbVisualParams calls to the attached device")) {
59 forwardRgbVisualParams =
true;
62 if (config.
check(
"subdevice")) {
66 p.setMonitor(config.getMonitor(),
"subdevice");
71 if (!subdevice->
open(p) || !(subdevice->
isValid())) {
72 yCError(FRAMEGRABBERCROPPER,
"Could not open subdevice");
77 yCError(FRAMEGRABBERCROPPER,
"Could not attach subdevice");
81 subdeviceOwned =
true;
101 yCError(FRAMEGRABBERCROPPER) <<
"The device is not valid";
107 poly->
view(iFrameGrabberControls);
108 poly->
view(iFrameGrabberControlsDC1394);
109 poly->
view(iRgbVisualParams);
110 poly->
view(iPreciselyTimed);
113 yCError(FRAMEGRABBERCROPPER) <<
"The device does not implement the required interfaces";
124 iFrameGrabberControls =
nullptr;
125 iFrameGrabberControlsDC1394 =
nullptr;
126 iRgbVisualParams =
nullptr;
127 iPreciselyTimed =
nullptr;
133 if (device2attach.
size() != 1) {
134 yCError(FRAMEGRABBERCROPPER,
"Expected only one device to be attached");
138 return attach(device2attach[0]->poly);
yarp::sig::VectorOf< std::pair< int, int > > vertices
yarp::dev::IFrameGrabberOf< yarp::sig::ImageOf< yarp::sig::PixelRgb > > * iFrameGrabberOf
bool close() override
Close the DeviceDriver.
bool attachAll(const yarp::dev::PolyDriverList &device2attach) override
Attach to a list of objects.
bool detach() override
Detach the object (you must have first called attach).
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
bool detachAll() override
Detach the object (you must have first called attach).
~FrameGrabberCropper() override
bool attach(yarp::dev::PolyDriver *poly) override
Attach to another object.
bool view(T *&x)
Get an interface to the device driver.
A container for a device driver.
bool close() override
Close the DeviceDriver.
bool isValid() const
Check if device is valid.
bool open(const std::string &txt)
Construct and configure a device by its common name.
A class for storing options and configuration information.
void fromString(const std::string &txt, bool wipe=true)
Interprets a string as a list of properties.
void put(const std::string &key, const std::string &value)
Associate the given key with the given string.
void unput(const std::string &key)
Remove the association from the given key to a value, if present.
A base class for nested structures that can be searched.
virtual bool check(const std::string &key) const =0
Check if there exists a property of the given name.
virtual std::string toString() const =0
Return a standard text representation of the content of the object.
virtual Value & find(const std::string &key) const =0
Gets a value corresponding to a given keyword.
virtual std::int32_t asInt32() const
Get 32-bit integer value.
virtual bool isInt32() const
Checks if value is a 32-bit integer.
virtual std::string asString() const
Get string value.
#define yCError(component,...)
#define YARP_LOG_COMPONENT(name,...)