YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
dc1394thread.cpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2025-2025 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: LGPL-2.1-or-later
4 */
5
6#include "dc1394thread.h"
7#include <QDebug>
8#include "dc1394SliderBase.h"
9#include <yarp/os/LogStream.h>
10
11using namespace yarp::dev;
12
13DC1394Thread::DC1394Thread(std::string loc, std::string rem, QObject* parent) :
14 QThread(parent)
15{
16 this->rem = rem.c_str();
17 this->loc = loc.c_str();
18
19 opCounter = 0;
20}
21
23{
24 if(fgControl)
25 return fgControl->getCameraDescription(camera);
26
27 return false;
28}
29
31{
32 grabberControl = new yarp::dev::PolyDriver;
33 yarp::os::Property config;
34 config.put("device", "frameGrabber_nwc_yarp");
35 config.put("remote",rem.toLatin1().data());
36 config.put("local",loc.toLatin1().data());
37
38 bool opened = grabberControl->open(config);
39 if(!opened)
40 {
41 yError() << "Cannot open frameGrabber_nwc_yarp device.";
42 // TODO: What to do here??
43 }
44
45 grabberControl->view(fgControl);
46 grabberControl->view(DC1394Control);
47
48 if(!fgControl)
49 {
50 yError() << "RemoteGrabber does not have IFrameGrabberControl interface. Cannot proceed.";
51 // TODO: What to do here??
52 }
53
54 if(!DC1394Control)
55 {
56 yWarning() << "RemoteGrabber does not have IFrameGrabberControlDC1394 interface, please update yarp.";
57 }
58
59 keepRunning = true;
60 while(keepRunning){
61
62 QVariantList list = taskList.takeFirst();
63
64 threadFunction func = (threadFunction)list.takeFirst().toInt();
65
66 switch(func){
67 case _unknown:{
68 done();
69 break;
70 }
71 case _initFormatTab:{
73 break;
74 }
75 case _init:{
76 init();
77 break;
78 }
79 case _reload:{
80 reload();
81 break;
82 }
83 case _reset:{
84 reset();
85 break;
86 }
87 case _loadDefault:{
89 break;
90 }
93 break;
94 }
95 case _setPowerDC1394:{
96 setPowerDC1394(list);
97 break;
98 }
101 break;
102 }
104 setVideoModeDC1394(list);
105 break;
106 }
109 break;
110 }
111 case _setFPSDC1394:{
112 setFPSDC1394(list);
113 break;
114 }
115 case _setISOSpeedDC1394:{
116 setISOSpeedDC1394(list);
117 break;
118 }
121 break;
122 }
125 break;
126 }
127 case _sliderRefresh:{
128 sliderRefresh(list);
129 break;
130 }
131 case _sliderWBRefresh:{
132 sliderWBRefresh(list);
133 break;
134 }
135 case _sliderPropagate:{
136 sliderPropagate(list);
137 break;
138 }
139 case _sliderWBPropagate:{
140 sliderWBPropagate(list);
141 break;
142 }
143 case _sliderSetFeature:{
145 break;
146 }
149 break;
150 }
151 case _sliderOnePush:{
152 sliderOnePush(list);
153 break;
154 }
155 case _sliderWBOnePush:{
156 sliderWBOnePush(list);
157 break;
158 }
159 case _sliderRadioAuto:{
160 sliderRadioAuto(list);
161 break;
162 }
163 case _sliderPower:{
164 sliderPower(list);
165 break;
166 }
167 case _sliderHasFeature:{
168 sliderHasFeature(list);
169 break;
170 }
171 }
172
173
174 while(keepRunning && taskList.isEmpty()){
175 mutex.lock();
176 waitCond.wait(&mutex,200);
177 mutex.unlock();
178 }
179 }
180
181 grabberControl->close();
182 delete grabberControl;
183}
184
186{
187 keepRunning = false;
188 waitCond.wakeAll();
189 while(isRunning()){
190 QThread::msleep(100);
191 }
192}
193
194void DC1394Thread::doTask(threadFunction func, QVariantList args)
195{
196 mutex1.lock();
197 QVariant vaFunc = (int)func;
198
199 if(func != _sliderSetFeature && func != _sliderWBSetFeature){
200 if(opCounter == 0){
201 startLoading();
202 }
203 opCounter++;
204 }
205
206 QVariantList list;
207 list.append(vaFunc);
208 list.append(args);
209
210 mutex.lock();
211 taskList.enqueue(list);
212 waitCond.wakeAll();
213 mutex.unlock();
214
215 mutex1.unlock();
216}
217
219{
220 mutex1.lock();
221 QVariant vaFunc = (int)func;
222
223 if(opCounter == 0){
224 startLoading();
225 }
226 opCounter++;
227
228 QVariantList list;
229 list.append(vaFunc);
230 mutex.lock();
231 taskList.enqueue(list);
232 waitCond.wakeAll();
233 mutex.unlock();
234
235 mutex1.unlock();
236}
237
239{
240 uint videoModeMaskDC1394;
241 DC1394Control->getVideoModeMaskDC1394(videoModeMaskDC1394);
242 uint fPSMaskDC1394;
243 DC1394Control->getFPSMaskDC1394(fPSMaskDC1394);
244 uint colorCodingMaskDC1394;
245 unsigned int vmode;
246 DC1394Control->getVideoModeDC1394(vmode);
247 DC1394Control->getColorCodingMaskDC1394(vmode, colorCodingMaskDC1394);
248 initFormatTabDone(videoModeMaskDC1394, fPSMaskDC1394, colorCodingMaskDC1394);
249
250 opCounter--;
251 if(opCounter == 0){
252 stopLoading();
253 }
254}
255
257{
258 uint videoModeDC1394;
259 DC1394Control->getVideoModeDC1394(videoModeDC1394);
260 uint fPSDC1394;
261 DC1394Control->getFPSDC1394(fPSDC1394);
262 uint iSOSpeedDC1394;
263 DC1394Control->getISOSpeedDC1394(iSOSpeedDC1394);
264 bool operationModeDC1394;
265 DC1394Control->getOperationModeDC1394(operationModeDC1394);
266 uint colorCodingDC1394;
267 DC1394Control->getColorCodingDC1394(colorCodingDC1394);
268 unsigned int xmax,ymax,xstep,ystep,xoffstep,yoffstep;
269 DC1394Control->getFormat7MaxWindowDC1394(xmax,ymax,xstep,ystep,xoffstep,yoffstep);
270 QSize max = QSize(xmax,ymax);
271 QSize step = QSize(xstep,ystep);
272 QSize offset = QSize(xoffstep,yoffstep);
273
274 unsigned int xdim,ydim;
275 int x0,y0;
276 DC1394Control->getFormat7WindowDC1394(xdim,ydim,x0,y0);
277 QSize dim = QSize(xdim,ydim);
278 QSize pos = QSize(x0,y0);
279
280 uint bytesPerPacketDC1394;
281 DC1394Control->getBytesPerPacketDC1394(bytesPerPacketDC1394);
282 bool transmissionDC1394;
283 DC1394Control->getTransmissionDC1394(transmissionDC1394);
284
285 initDone(videoModeDC1394,
286 fPSDC1394,
287 iSOSpeedDC1394,
288 operationModeDC1394,
289 colorCodingDC1394,
290 max,
291 step,
292 offset,
293 dim,
294 pos,
295 bytesPerPacketDC1394,
296 transmissionDC1394
297 );
298 opCounter--;
299 if(opCounter == 0){
300 stopLoading();
301 }
302}
303
305{
306 uint videoModeDC1394;
307 DC1394Control->getVideoModeDC1394(videoModeDC1394);
308 uint colorCodingMaskDC1394;
309 DC1394Control->getColorCodingMaskDC1394(videoModeDC1394, colorCodingMaskDC1394);
310
311 unsigned int xmax,ymax,xstep,ystep,xoffstep,yoffstep;
312 DC1394Control->getFormat7MaxWindowDC1394(xmax,ymax,xstep,ystep,xoffstep,yoffstep);
313 QSize max = QSize(xmax,ymax);
314 QSize step = QSize(xstep,ystep);
315 QSize offset = QSize(xoffstep,yoffstep);
316
317 unsigned int xdim,ydim;
318 int x0,y0;
319 DC1394Control->getFormat7WindowDC1394(xdim,ydim,x0,y0);
320 QSize dim = QSize(xdim,ydim);
321 QSize pos = QSize(x0,y0);
322
323 uint colorCodingDC1394;
324 DC1394Control->getColorCodingDC1394(colorCodingDC1394);
325 uint bytesPerPacketDC1394;
326 DC1394Control->getBytesPerPacketDC1394(bytesPerPacketDC1394);
327 uint fPSMaskDC1394;
328 DC1394Control->getFPSMaskDC1394(fPSMaskDC1394);
329 uint fPSDC1394;
330 DC1394Control->getFPSDC1394(fPSDC1394);
331 uint iSOSpeedDC1394;
332 DC1394Control->getISOSpeedDC1394(iSOSpeedDC1394);
333
334 reloadDone(videoModeDC1394,
335 colorCodingMaskDC1394,
336 max,
337 step,
338 offset,
339 dim,
340 pos,
341 colorCodingDC1394,
342 bytesPerPacketDC1394,
343 fPSMaskDC1394,
344 fPSDC1394,
345 iSOSpeedDC1394);
346
347 opCounter--;
348 if(opCounter == 0){
349 stopLoading();
350 }
351}
352
354{
355 DC1394Control->setDefaultsDC1394();
356 opCounter++;
357 reload();
358
359 uint bytesPerPacketDC1394;
360 DC1394Control->getBytesPerPacketDC1394(bytesPerPacketDC1394);
361 uint colorCodingMaskDC1394;
362 unsigned int vmode;
363 DC1394Control->getVideoModeDC1394(vmode);
364 DC1394Control->getColorCodingMaskDC1394(vmode, colorCodingMaskDC1394);
365 DC1394Control->setTransmissionDC1394(true);
366 bool transmissionDC1394;
367 DC1394Control->getTransmissionDC1394(transmissionDC1394);
368
369 loadDefaultDone(bytesPerPacketDC1394,colorCodingMaskDC1394,transmissionDC1394);
370
371 opCounter--;
372 if(opCounter == 0){
373 stopLoading();
374 }
375}
376
378{
379 DC1394Control->setResetDC1394();
380 opCounter++;
381 reload();
382
383 uint bytesPerPacketDC1394;
384 DC1394Control->getBytesPerPacketDC1394(bytesPerPacketDC1394);
385 uint colorCodingMaskDC1394;
386 unsigned int vmode;
387 DC1394Control->getVideoModeDC1394(vmode);
388 DC1394Control->getColorCodingMaskDC1394(vmode, colorCodingMaskDC1394);
389 bool transmissionDC1394;
390 DC1394Control->getTransmissionDC1394(transmissionDC1394);
391
392 resetDone(bytesPerPacketDC1394,colorCodingMaskDC1394,transmissionDC1394);
393 opCounter--;
394 if(opCounter == 0){
395 stopLoading();
396 }
397}
398
400{
401 bool value = arg.at(0).toBool();
402 DC1394Control->setTransmissionDC1394(value);
404 opCounter--;
405 if(opCounter == 0){
406 stopLoading();
407 }
408}
409
410void DC1394Thread::setPowerDC1394(QVariantList arg)
411{
412 bool value = arg.at(0).toBool();
413 DC1394Control->setPowerDC1394(value);
415 opCounter--;
416 if(opCounter == 0){
417 stopLoading();
418 }
419}
421{
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();
426
427 DC1394Control->setFormat7WindowDC1394(xdim,ydim,x0,y0);
429 opCounter--;
430 if(opCounter == 0){
431 stopLoading();
432 }
433}
434
436{
437 unsigned int video_mode=arg.at(0).toUInt();
438 DC1394Control->setVideoModeDC1394(video_mode);
440 opCounter--;
441 if(opCounter == 0){
442 stopLoading();
443 }
444}
445
447{
448 int value =arg.at(0).toInt();
449 DC1394Control->setColorCodingDC1394(value);
450
452 opCounter--;
453 if(opCounter == 0){
454 stopLoading();
455 }
456}
457
458void DC1394Thread::setFPSDC1394(QVariantList arg)
459{
460 int value = arg.at(0).toInt();
461 DC1394Control->setFPSDC1394(value);
462
464
465 opCounter--;
466 if(opCounter == 0){
467 stopLoading();
468 }
469}
470
472{
473 int value = arg.at(0).toInt();
474 DC1394Control->setISOSpeedDC1394(value);
475
477 opCounter--;
478 if(opCounter == 0){
479 stopLoading();
480 }
481}
482
484{
485 int value = arg.at(0).toUInt();
486 DC1394Control->setBytesPerPacketDC1394(value);
487
489 opCounter--;
490 if(opCounter == 0){
491 stopLoading();
492 }
493}
494
496{
497 int value = arg.at(0).toInt();
498 DC1394Control->setOperationModeDC1394(value);
499
501 opCounter--;
502 if(opCounter == 0){
503 stopLoading();
504 }
505}
506
507void DC1394Thread::sliderRefresh(QVariantList arg)
508{
510
511 QObject *ptr = (QObject*)arg.at(0).value<void*>();
512 int value = arg.at(1).toInt();
514
515
517 bool bON, bAuto, bHasAuto, bHasManual, bHasOnePush, bHasOnOff;
518 fgControl->getActive(feature, bON);
519 fgControl->getMode(feature, mode);
520 fgControl->hasOnOff(feature, bHasOnOff);
521 fgControl->hasAuto(feature, bHasAuto);
522 fgControl->hasManual(feature, bHasManual);
523 fgControl->hasOnePush(feature, bHasOnePush);
524 double val;
525 fgControl->getFeature(feature, val);
526 mode == FeatureMode::MODE_AUTO ? bAuto = true : bAuto = false;
527
528 sliderRefreshDone(ptr,bON,bAuto,bHasOnOff,bHasAuto,bHasManual,bHasOnePush,val);
529
530 opCounter--;
531 if(opCounter == 0){
532 stopLoading();
533 }
534}
535
536void DC1394Thread::sliderWBRefresh(QVariantList arg)
537{
539
540 QObject *ptr = (QObject*)arg.at(0).value<void*>();
541 int value = arg.at(1).toInt();
543
545 bool bON, bAuto, bHasAuto, bHasManual, bHasOnePush, bHasOnOff;
546 fgControl->getActive(feature, bON);
547 fgControl->getMode(feature, mode);
548 fgControl->hasOnOff(feature, bHasOnOff);
549 fgControl->hasAuto(feature, bHasAuto);
550 fgControl->hasManual(feature, bHasManual);
551 fgControl->hasOnePush(feature, bHasOnePush);
552 mode == FeatureMode::MODE_AUTO ? bAuto = true : bAuto = false;
553
554 double redVal;
555 double blueVal;
556 fgControl->getFeature(feature, blueVal, redVal);
557
558 sliderWBRefreshDone(ptr,bON,bAuto,bHasOnOff,bHasAuto,bHasManual,bHasOnePush,redVal,blueVal);
559
560 opCounter--;
561 if(opCounter == 0){
562 stopLoading();
563 }
564}
565
566void DC1394Thread::sliderPropagate(QVariantList arg)
567{
569 int value = arg.at(0).toInt();
571
572
573 double val = arg.at(1).toDouble();
574 bool bRBa = arg.at(2).toBool();
575 bool bPwr = arg.at(3).toBool();
576
577 FeatureMode mode = bRBa ? FeatureMode::MODE_AUTO : FeatureMode::MODE_MANUAL;
578
579 fgControl->setFeature(feature,val);
580 fgControl->setMode(feature,mode);
581 fgControl->setActive(feature,bPwr);
582
584
585 opCounter--;
586 if(opCounter == 0){
587 stopLoading();
588 }
589}
590
592{
594 int value = arg.at(0).toInt();
596
597
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();
602
603 fgControl->setFeature(feature, blueVal, redVal);
605 bRBa ? mode = FeatureMode::MODE_AUTO : mode = FeatureMode::MODE_MANUAL;
606
607 fgControl->setMode(feature,mode);
608 fgControl->setActive(feature,bPwr);
609
611
612 opCounter--;
613 if(opCounter == 0){
614 stopLoading();
615 }
616}
617
618
620{
622 QObject *ptr = (QObject*)arg.at(0).value<void*>();
623 int value = arg.at(1).toInt();
625
626 double val = arg.at(2).toDouble();
627
628 fgControl->setFeature(feature,val);
629
631}
632
634{
636 QObject *ptr = (QObject*)arg.at(0).value<void*>();
637 int value = arg.at(1).toInt();
639
640 double redVal = arg.at(2).toDouble();
641 double blueVal = arg.at(3).toDouble();
642
643 fgControl->setFeature(feature, blueVal,redVal);
644
645 sliderWBSetFeatureDC1394Done(ptr,redVal,blueVal);
646}
647
648void DC1394Thread::sliderOnePush(QVariantList arg)
649{
651 QObject *ptr = (QObject*)arg.at(0).value<void*>();
652 int value = arg.at(1).toInt();
654
655 fgControl->setOnePush(feature);
656
657 double val;
658 fgControl->getFeature(feature, val);
659
660 sliderOnePushDone(ptr,val);
661
662 opCounter--;
663 if(opCounter == 0){
664 stopLoading();
665 }
666}
667
668void DC1394Thread::sliderWBOnePush(QVariantList arg)
669{
671 QObject *ptr = (QObject*)arg.at(0).value<void*>();
672 int value = arg.at(1).toInt();
674
675 double redVal;
676 double blueVal;
677
678 fgControl->setOnePush(feature);
679 fgControl->getFeature(feature, blueVal, redVal);
680
681 sliderWBOnePushDone(ptr,redVal,blueVal);
682
683 opCounter--;
684 if(opCounter == 0){
685 stopLoading();
686 }
687}
688
689
690void DC1394Thread::sliderRadioAuto(QVariantList arg)
691{
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;
698
699 bool bON;
700 fgControl->getActive(feature, bON);
701 fgControl->setMode(feature, mode);
702
703 sliderRadioAutoDone(ptr,true, bVal);
704
705 opCounter--;
706 if(opCounter == 0){
707 stopLoading();
708 }
709}
710
711void DC1394Thread::sliderPower(QVariantList arg)
712{
713 qDebug() << "sliderPower";
714
716 QObject *ptr = (QObject*)arg.at(0).value<void*>();
717 int value = arg.at(1).toInt();
718 bool bON = arg.at(2).toBool();
720
721 fgControl->setActive(feature, bON);
722
724 fgControl->hasAuto(feature, hasAuto);
725 fgControl->hasManual(feature, hasManual);
726 fgControl->hasOnePush(feature, hasOnePush);
728
729 opCounter--;
730 if(opCounter == 0){
731 stopLoading();
732 }
733}
734
735
736void DC1394Thread::sliderHasFeature(QVariantList arg)
737{
739 QObject *ptr = (QObject*)arg.at(0).value<void*>();
740 int value = arg.at(1).toInt();
742
743 bool hasFeature = false;
744 fgControl->hasFeature(feature, hasFeature);
745
746 opCounter--;
747 if(opCounter == 0){
748 stopLoading();
749 }
750
752}
CameraDescriptor camera
FeatureMode mode
#define yError(...)
Definition Log.h:361
#define yWarning(...)
Definition Log.h:340
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 setFPSDC1394Done()
void startLoading()
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 stopLoading()
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.
Definition PolyDriver.h:23
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.
Definition Property.h:33
void put(const std::string &key, const std::string &value)
Associate the given key with the given string.
Definition Property.cpp:987
threadFunction
@ _setOperationModeDC1394
@ _setBytesPerPacketDC1394
@ _setFPSDC1394
@ _setPowerDC1394
@ _initFormatTab
@ _setTransmissionDC1394
@ _unknown
@ _sliderOnePush
@ _sliderSetFeature
@ _init
@ _sliderPropagate
@ _sliderWBOnePush
@ _reload
@ _sliderRadioAuto
@ _sliderRefresh
@ _sliderWBPropagate
@ _setVideoModeDC1394
@ _setISOSpeedDC1394
@ _loadDefault
@ _setFormat7WindowDC1394
@ _sliderWBRefresh
@ _sliderPower
@ _reset
@ _setColorCodingDC1394
@ _sliderWBSetFeature
@ _sliderHasFeature
For streams capable of holding different kinds of content, check what they actually have.