16 this->rem = rem.c_str();
17 this->loc = loc.c_str();
34 config.
put(
"device",
"frameGrabber_nwc_yarp");
35 config.
put(
"remote",rem.toLatin1().data());
36 config.
put(
"local",loc.toLatin1().data());
38 bool opened = grabberControl->
open(config);
41 yError() <<
"Cannot open frameGrabber_nwc_yarp device.";
45 grabberControl->
view(fgControl);
46 grabberControl->
view(DC1394Control);
50 yError() <<
"RemoteGrabber does not have IFrameGrabberControl interface. Cannot proceed.";
56 yWarning() <<
"RemoteGrabber does not have IFrameGrabberControlDC1394 interface, please update yarp.";
62 QVariantList list = taskList.takeFirst();
174 while(keepRunning && taskList.isEmpty()){
176 waitCond.wait(&mutex,200);
181 grabberControl->
close();
182 delete grabberControl;
190 QThread::msleep(100);
197 QVariant vaFunc = (int)func;
211 taskList.enqueue(list);
221 QVariant vaFunc = (int)func;
231 taskList.enqueue(list);
240 uint videoModeMaskDC1394;
244 uint colorCodingMaskDC1394;
258 uint videoModeDC1394;
264 bool operationModeDC1394;
266 uint colorCodingDC1394;
268 unsigned int xmax,ymax,xstep,ystep,xoffstep,yoffstep;
270 QSize max = QSize(xmax,ymax);
271 QSize step = QSize(xstep,ystep);
272 QSize offset = QSize(xoffstep,yoffstep);
274 unsigned int xdim,ydim;
277 QSize dim = QSize(xdim,ydim);
278 QSize pos = QSize(x0,y0);
280 uint bytesPerPacketDC1394;
282 bool transmissionDC1394;
295 bytesPerPacketDC1394,
306 uint videoModeDC1394;
308 uint colorCodingMaskDC1394;
311 unsigned int xmax,ymax,xstep,ystep,xoffstep,yoffstep;
313 QSize max = QSize(xmax,ymax);
314 QSize step = QSize(xstep,ystep);
315 QSize offset = QSize(xoffstep,yoffstep);
317 unsigned int xdim,ydim;
320 QSize dim = QSize(xdim,ydim);
321 QSize pos = QSize(x0,y0);
323 uint colorCodingDC1394;
325 uint bytesPerPacketDC1394;
335 colorCodingMaskDC1394,
342 bytesPerPacketDC1394,
359 uint bytesPerPacketDC1394;
361 uint colorCodingMaskDC1394;
366 bool transmissionDC1394;
369 loadDefaultDone(bytesPerPacketDC1394,colorCodingMaskDC1394,transmissionDC1394);
383 uint bytesPerPacketDC1394;
385 uint colorCodingMaskDC1394;
389 bool transmissionDC1394;
392 resetDone(bytesPerPacketDC1394,colorCodingMaskDC1394,transmissionDC1394);
401 bool value = arg.at(0).toBool();
412 bool value = arg.at(0).toBool();
422 unsigned int xdim=arg.at(0).toUInt();
423 unsigned int ydim=arg.at(1).toUInt();
424 int x0=arg.at(2).toInt();
425 int y0=arg.at(3).toInt();
437 unsigned int video_mode=arg.at(0).toUInt();
448 int value =arg.at(0).toInt();
460 int value = arg.at(0).toInt();
473 int value = arg.at(0).toInt();
485 int value = arg.at(0).toUInt();
497 int value = arg.at(0).toInt();
511 QObject *ptr = (QObject*)arg.at(0).value<
void*>();
512 int value = arg.at(1).toInt();
517 bool bON, bAuto, bHasAuto, bHasManual, bHasOnePush, bHasOnOff;
526 mode == FeatureMode::MODE_AUTO ? bAuto = true : bAuto =
false;
540 QObject *ptr = (QObject*)arg.at(0).value<
void*>();
541 int value = arg.at(1).toInt();
545 bool bON, bAuto, bHasAuto, bHasManual, bHasOnePush, bHasOnOff;
552 mode == FeatureMode::MODE_AUTO ? bAuto = true : bAuto =
false;
558 sliderWBRefreshDone(ptr,bON,bAuto,bHasOnOff,bHasAuto,bHasManual,bHasOnePush,redVal,blueVal);
569 int value = arg.at(0).toInt();
573 double val = arg.at(1).toDouble();
574 bool bRBa = arg.at(2).toBool();
575 bool bPwr = arg.at(3).toBool();
577 FeatureMode mode = bRBa ? FeatureMode::MODE_AUTO : FeatureMode::MODE_MANUAL;
594 int value = arg.at(0).toInt();
598 double redVal = arg.at(1).toDouble();
599 double blueVal = arg.at(2).toDouble();
600 bool bRBa = arg.at(3).toBool();
601 bool bPwr = arg.at(4).toBool();
605 bRBa ?
mode = FeatureMode::MODE_AUTO :
mode = FeatureMode::MODE_MANUAL;
622 QObject *ptr = (QObject*)arg.at(0).value<
void*>();
623 int value = arg.at(1).toInt();
626 double val = arg.at(2).toDouble();
636 QObject *ptr = (QObject*)arg.at(0).value<
void*>();
637 int value = arg.at(1).toInt();
640 double redVal = arg.at(2).toDouble();
641 double blueVal = arg.at(3).toDouble();
651 QObject *ptr = (QObject*)arg.at(0).value<
void*>();
652 int value = arg.at(1).toInt();
671 QObject *ptr = (QObject*)arg.at(0).value<
void*>();
672 int value = arg.at(1).toInt();
693 QObject *ptr = (QObject*)arg.at(0).value<
void*>();
694 int value = arg.at(1).toInt();
695 bool bVal = arg.at(2).toBool();
697 FeatureMode mode = bVal ? FeatureMode::MODE_AUTO : FeatureMode::MODE_MANUAL;
713 qDebug() <<
"sliderPower";
716 QObject *ptr = (QObject*)arg.at(0).value<
void*>();
717 int value = arg.at(1).toInt();
718 bool bON = arg.at(2).toBool();
739 QObject *ptr = (QObject*)arg.at(0).value<
void*>();
740 int value = arg.at(1).toInt();
void sliderPower(QVariantList arg)
void setPowerDC1394Done()
void setFormat7WindowDC1394(QVariantList arg)
void reloadDone(uint, uint, QSize, QSize, QSize, QSize, QSize, uint, uint, uint, uint, uint)
void sliderSetFeatureDC1394Done(QObject *, double)
void setTransmissionDC1394(QVariantList arg)
void sliderWBRefreshDone(QObject *, bool, bool, bool, bool, bool, bool, double, double)
void sliderOnePush(QVariantList arg)
void sliderHasFeatureDone(QObject *, bool)
void setBytesPerPacketDC1394(QVariantList arg)
void setTransmissionDC1394Done()
void setColorCodingDC1394(QVariantList arg)
void sliderWBSetFeatureDC1394Done(QObject *, double, double)
void sliderPropagate(QVariantList arg)
void sliderRefresh(QVariantList arg)
DC1394Thread(std::string loc, std::string rem, QObject *parent=0)
void setOperationModeDC1394(QVariantList arg)
void sliderRadioAuto(QVariantList arg)
void sliderSetFeatureDC1394(QVariantList arg)
void sliderOnePushDone(QObject *, double)
void setPowerDC1394(QVariantList arg)
void setISOSpeedDC1394(QVariantList)
void setISOSpeedDC1394Done()
void sliderRefreshDone(QObject *, bool, bool, bool, bool, bool, bool, double)
void doTask(threadFunction)
void sliderWBSetFeatureDC1394(QVariantList arg)
void setOperationModeDC1394Done()
void loadDefaultDone(uint, uint, bool)
bool getCameraDescription(yarp::dev::CameraDescriptor &camera)
void sliderWBOnePush(QVariantList arg)
void setColorCodingDC1394Done()
void setVideoModeDC1394Done()
void resetDone(uint, uint, bool)
void setFormat7WindowDC1394Done()
void sliderWBRefresh(QVariantList arg)
void setBytesPerPacketDC1394Done()
void initFormatTabDone(uint, uint, uint)
void sliderPowerDone(QObject *, bool, bool, bool, bool)
void sliderHasFeature(QVariantList arg)
void sliderRadioAutoDone(QObject *, bool, bool)
void sliderWBOnePushDone(QObject *, double, double)
void initDone(uint, uint, uint, bool, uint, QSize, QSize, QSize, QSize, QSize, uint, bool)
void setVideoModeDC1394(QVariantList arg)
void sliderWBPropagate(QVariantList arg)
void sliderPropagateDone()
void sliderWBPropagateDone()
void setFPSDC1394(QVariantList arg)
bool view(T *&x)
Get an interface to the device driver.
virtual yarp::dev::ReturnValue getFPSMaskDC1394(unsigned int &val)=0
virtual yarp::dev::ReturnValue setBytesPerPacketDC1394(unsigned int bpp)=0
virtual yarp::dev::ReturnValue setColorCodingDC1394(int coding)=0
virtual yarp::dev::ReturnValue getBytesPerPacketDC1394(unsigned int &bpp)=0
virtual yarp::dev::ReturnValue setOperationModeDC1394(bool b1394b)=0
virtual yarp::dev::ReturnValue getFPSDC1394(unsigned int &val)=0
virtual yarp::dev::ReturnValue getVideoModeDC1394(unsigned int &val)=0
virtual yarp::dev::ReturnValue setTransmissionDC1394(bool bTxON)=0
virtual yarp::dev::ReturnValue getColorCodingDC1394(unsigned int &val)=0
virtual yarp::dev::ReturnValue setISOSpeedDC1394(int speed)=0
virtual yarp::dev::ReturnValue getFormat7MaxWindowDC1394(unsigned int &xdim, unsigned int &ydim, unsigned int &xstep, unsigned int &ystep, unsigned int &xoffstep, unsigned int &yoffstep)=0
virtual yarp::dev::ReturnValue getOperationModeDC1394(bool &b1394)=0
virtual yarp::dev::ReturnValue getISOSpeedDC1394(unsigned int &val)=0
virtual yarp::dev::ReturnValue setFPSDC1394(int fps)=0
virtual yarp::dev::ReturnValue setResetDC1394()=0
virtual yarp::dev::ReturnValue getFormat7WindowDC1394(unsigned int &xdim, unsigned int &ydim, int &x0, int &y0)=0
virtual yarp::dev::ReturnValue setVideoModeDC1394(int video_mode)=0
virtual yarp::dev::ReturnValue setFormat7WindowDC1394(unsigned int xdim, unsigned int ydim, int x0, int y0)=0
virtual yarp::dev::ReturnValue getColorCodingMaskDC1394(unsigned int video_mode, unsigned int &val)=0
virtual yarp::dev::ReturnValue setPowerDC1394(bool onoff)=0
virtual yarp::dev::ReturnValue getTransmissionDC1394(bool &bTxON)=0
virtual yarp::dev::ReturnValue getVideoModeMaskDC1394(unsigned int &val)=0
virtual yarp::dev::ReturnValue setDefaultsDC1394()=0
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 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.
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 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.
A container for a device driver.
bool close() override
Close the DeviceDriver.
bool open(const std::string &txt)
Construct and configure a device by its common name.
A class for storing options and configuration information.
void put(const std::string &key, const std::string &value)
Associate the given key with the given string.
@ _setOperationModeDC1394
@ _setBytesPerPacketDC1394
@ _setFormat7WindowDC1394
For streams capable of holding different kinds of content, check what they actually have.