iCub-main
Loading...
Searching...
No Matches
dc1394thread.h
Go to the documentation of this file.
1#ifndef DC1394THREAD_H
2#define DC1394THREAD_H
3
4#include <QThread>
5#include <yarp/dev/IFrameGrabberControls.h>
6#include <yarp/dev/IFrameGrabberControlsDC1394.h>
7#include <yarp/dev/PolyDriver.h>
8#include <QMutex>
9#include <QWaitCondition>
10#include <QSize>
11#include <QQueue>
12#include <QVariant>
13
42
43class DC1394Thread : public QThread
44{
45 Q_OBJECT
46
47
48
49public:
50 explicit DC1394Thread(char *loc, char *rem, QObject *parent = 0);
51 void stop();
52 void initFormatTab();
53 void init();
54 void reload();
55 void reset();
56 void loadDefualt();
57 void setTransmissionDC1394(QVariantList arg);
58 void setPowerDC1394(QVariantList arg);
59 void setFormat7WindowDC1394(QVariantList arg);
60 void setVideoModeDC1394(QVariantList arg);
61 void setColorCodingDC1394(QVariantList arg);
62 void setFPSDC1394(QVariantList arg);
63 void setISOSpeedDC1394(QVariantList);
64 void setBytesPerPacketDC1394(QVariantList arg);
65 void setOperationModeDC1394(QVariantList arg);
66
67 /*** Sliders ***/
68 void sliderRefresh(QVariantList arg);
69 void sliderWBRefresh(QVariantList arg);
70 void sliderPropagate(QVariantList arg);
71 void sliderWBPropagate(QVariantList arg);
72 void sliderSetFeatureDC1394(QVariantList arg);
73 void sliderWBSetFeatureDC1394(QVariantList arg);
74 void sliderOnePush(QVariantList arg);
75 void sliderWBOnePush(QVariantList arg);
76 void sliderRadioAuto(QVariantList arg);
77 void sliderPower(QVariantList arg);
78 void sliderHasFeature(QVariantList arg);
79 bool getCameraDescription(CameraDescriptor *camera);
80
81private:
82 yarp::dev::PolyDriver *grabberControl;
83 yarp::dev::IFrameGrabberControls *fgControl;
84 yarp::dev::IFrameGrabberControlsDC1394 *DC1394Control;
85
86 QMutex semaphore;
87
88 QMutex mutex;
89 QMutex mutex1;
90 QWaitCondition waitCond;
91 bool keepRunning;
92
93 QString rem;
94 QString loc;
95
96
97 QQueue <QVariantList> taskList;
98
99 int opCounter;
100
101protected:
102 void run();
103// void initDC1394();
104
105signals:
106 void done();
107 void initFormatTabDone(uint,uint,uint);
108 void initDone(uint,uint,uint,
109 bool, uint, QSize, QSize, QSize,
110 QSize,QSize,uint,bool);
111 void reloadDone(uint,uint,QSize, QSize, QSize,
112 QSize,QSize,uint,uint,uint,uint,uint);
113
114 void resetDone(uint,uint,bool);
115 void loadDefaultDone(uint,uint,bool);
125 void sliderRefreshDone(QObject*,bool,bool,bool,bool,bool,bool,double);
126 void sliderWBRefreshDone(QObject*,bool,bool,bool,bool,bool,bool,double,double);
129 void sliderSetFeatureDC1394Done(QObject*,double);
130 void sliderWBSetFeatureDC1394Done(QObject*,double,double);
131 void sliderOnePushDone(QObject*,double);
132 void sliderWBOnePushDone(QObject*,double,double);
133 void sliderRadioAutoDone(QObject*,bool,bool);
134 void sliderPowerDone(QObject*,bool,bool,bool,bool);
135 void sliderHasFeatureDone(QObject*,bool);
136
139
140public slots:
142 void doTask(threadFunction, QVariantList args);
143
144};
145
146#endif // DC1394THREAD_H
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)
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)
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)
bool getCameraDescription(CameraDescriptor *camera)
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)
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