mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-24 23:30:03 +02:00
merge conflict resolved from 3.0.1
This commit is contained in:
commit
28e2ebf75a
@ -65,9 +65,6 @@ qClient::~qClient() {
|
||||
|
||||
int qClient::executeLine(int narg, char *args[]){
|
||||
|
||||
char arg[MAX_STR_LENGTH] = "";
|
||||
int iarg = -1;
|
||||
char answer[100];
|
||||
string retval = "";
|
||||
string cmd = args[0];
|
||||
string argument;
|
||||
|
@ -51,7 +51,7 @@
|
||||
<enum>QTabWidget::North</enum>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="elideMode">
|
||||
<enum>Qt::ElideLeft</enum>
|
||||
@ -142,7 +142,7 @@
|
||||
<rect>
|
||||
<x>230</x>
|
||||
<y>15</y>
|
||||
<width>226</width>
|
||||
<width>242</width>
|
||||
<height>44</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -957,8 +957,8 @@ An extension given by the modules serial number will be attached.
|
||||
<widget class="QPushButton" name="btnRxr">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>25</x>
|
||||
<y>135</y>
|
||||
<x>420</x>
|
||||
<y>143</y>
|
||||
<width>291</width>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
@ -977,7 +977,7 @@ An extension given by the modules serial number will be attached.
|
||||
<x>25</x>
|
||||
<y>25</y>
|
||||
<width>686</width>
|
||||
<height>96</height>
|
||||
<height>116</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_8">
|
||||
@ -1255,6 +1255,63 @@ An extension given by the modules serial number will be attached.
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>ZMQ Port TX:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QSpinBox" name="spinZmqPort2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>127</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Sets Receiver UDP Port
|
||||
#rx_udpport#</string>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="whatsThis">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="keyboardTracking">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>2000000000</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
@ -1264,13 +1321,42 @@ An extension given by the modules serial number will be attached.
|
||||
<x>35</x>
|
||||
<y>15</y>
|
||||
<width>686</width>
|
||||
<height>101</height>
|
||||
<height>116</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_6">
|
||||
<property name="verticalSpacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="comboDetector">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>180</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
<widget class="QComboBox" name="comboOnline">
|
||||
<property name="sizePolicy">
|
||||
@ -1436,35 +1522,6 @@ An extension given by the modules serial number will be attached.
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="comboDetector">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>180</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QSpinBox" name="spinControlPort">
|
||||
<property name="sizePolicy">
|
||||
@ -1531,6 +1588,63 @@ An extension given by the modules serial number will be attached.
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Sets Stop Port
|
||||
#stopport#</string>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="whatsThis">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="keyboardTracking">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>2000000000</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>ZMQ Port RX:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QSpinBox" name="spinZmqPort">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>180</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Sets Stop Port
|
||||
#stopport#</string>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
|
@ -119,11 +119,10 @@ private:
|
||||
int id;
|
||||
/** Default Save file path */
|
||||
string filePath;
|
||||
|
||||
/** clone 2D Plot */
|
||||
SlsQt2DPlotLayout* cloneplot2D;
|
||||
/** clone 1D Plot */
|
||||
SlsQt1DPlot* cloneplot1D;
|
||||
/** clone 2D Plot */
|
||||
SlsQt2DPlotLayout* cloneplot2D;
|
||||
/** vector of 1D hist values */
|
||||
QVector<SlsQtH1D*> cloneplot1D_hists;
|
||||
|
||||
|
@ -59,7 +59,8 @@ public:
|
||||
// output anything that is left
|
||||
if (!m_string.empty()) {
|
||||
pthread_mutex_lock(&mutex);
|
||||
QApplication::postEvent(log_window, new qStreamEvent(m_string.c_str()));
|
||||
const char* c_string = m_string.c_str();
|
||||
QApplication::postEvent(log_window, new qStreamEvent(c_string));
|
||||
pthread_mutex_unlock(&mutex);
|
||||
}
|
||||
m_stream.rdbuf(m_old_buf);
|
||||
@ -71,7 +72,8 @@ protected:
|
||||
virtual int_type overflow(int_type v){
|
||||
if (v == '\n'){
|
||||
pthread_mutex_lock(&mutex);
|
||||
QApplication::postEvent(log_window, new qStreamEvent(m_string.c_str()));
|
||||
const char* c_string = m_string.c_str();
|
||||
QApplication::postEvent(log_window, new qStreamEvent(c_string));
|
||||
m_string.erase(m_string.begin(), m_string.end());
|
||||
pthread_mutex_unlock(&mutex);
|
||||
}
|
||||
@ -87,13 +89,14 @@ protected:
|
||||
m_string.append(p, p + n);
|
||||
|
||||
//changed from uint because of 64 bit
|
||||
int pos = 0;
|
||||
size_t pos = 0;
|
||||
|
||||
while (pos != string::npos){
|
||||
pos = m_string.find('\n');
|
||||
if (pos != string::npos){
|
||||
string tmp(m_string.begin(), m_string.begin() + pos);
|
||||
QApplication::postEvent(log_window, new qStreamEvent(tmp.c_str()));
|
||||
const char* c_tmp = tmp.c_str();
|
||||
QApplication::postEvent(log_window, new qStreamEvent(c_tmp));
|
||||
m_string.erase(m_string.begin(), m_string.begin() + pos + 1);
|
||||
}
|
||||
}
|
||||
|
@ -430,7 +430,7 @@ unsigned int nPixelsX;
|
||||
/** Number of angle Pixels in X Axis */
|
||||
int nAnglePixelsX;
|
||||
/** Number of pixel bins in Y Axis */
|
||||
int nPixelsY;
|
||||
unsigned int nPixelsY;
|
||||
/** Min Pixel number for Y Axis*/
|
||||
double minPixelsY;
|
||||
/** Max Pixel number for Y Axis*/
|
||||
|
@ -133,6 +133,16 @@ private slots:
|
||||
*/
|
||||
void SetRxrUDPPort(int port);
|
||||
|
||||
/** Sets client zmq receiver port
|
||||
* @param port client zmq receiver port
|
||||
*/
|
||||
void SetCltZmqPort(int port);
|
||||
|
||||
/** Sets receiver zmq transmitting port
|
||||
* @param port receiver zmq transmitting port
|
||||
*/
|
||||
void SetRxrZmqPort(int port);
|
||||
|
||||
/** Sets receiver online
|
||||
* @param index 1 for online and 0 for offline
|
||||
*/
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
qCloneWidget::qCloneWidget(QWidget *parent,int id,QString title,QString xTitle, QString yTitle, QString zTitle,
|
||||
int numDim,string FilePath,bool displayStats, QString min, QString max, QString sum):
|
||||
QMainWindow(parent),id(id),cloneplot2D(0),cloneplot1D(0),filePath(FilePath)
|
||||
QMainWindow(parent),id(id),filePath(FilePath),cloneplot1D(0),cloneplot2D(0)
|
||||
{
|
||||
// Window title
|
||||
char winTitle[300],currTime[50];
|
||||
@ -267,12 +267,13 @@ void qCloneWidget::SavePlot(){
|
||||
cloneBox->render(&painter);
|
||||
|
||||
fName = QFileDialog::getSaveFileName(this,tr("Save Snapshot "),fName,tr("PNG Files (*.png);;XPM Files(*.xpm);;JPEG Files(*.jpg)"),0,QFileDialog::ShowDirsOnly);
|
||||
if (!fName.isEmpty())
|
||||
if (!fName.isEmpty()) {
|
||||
if((img.save(fName)))
|
||||
qDefs::Message(qDefs::INFORMATION,"The SnapShot has been successfully saved","qCloneWidget::SavePlot");
|
||||
else
|
||||
qDefs::Message(qDefs::WARNING,"Attempt to save snapshot failed.\n"
|
||||
"Formats: .png, .jpg, .xpm.","qCloneWidget::SavePlot");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -657,12 +657,12 @@ void qDetectorMain::ExecuteHelp(QAction *action){
|
||||
cout << "About: Common GUI for Mythen, Eiger, Gotthard, Jungfrau, Moench and Propix detectors" << endl;
|
||||
#endif
|
||||
char version[200];
|
||||
int64_t retval= SVNREV;
|
||||
long long unsigned int retval= SVNREV;
|
||||
retval= (retval <<32) | SVNDATE;
|
||||
sprintf(version,"%llx",retval);
|
||||
string thisGUIVersion = string(version);
|
||||
|
||||
sprintf(version,"%llx",myDet->getId(slsDetectorDefs::THIS_SOFTWARE_VERSION));
|
||||
sprintf(version,"%llx",(long long unsigned int)myDet->getId(slsDetectorDefs::THIS_SOFTWARE_VERSION));
|
||||
qDefs::checkErrorMessage(myDet,"qDetectorMain::ExecuteHelp");
|
||||
string thisClientVersion = string(version);
|
||||
|
||||
|
@ -297,7 +297,7 @@ void qDrawPlot::SetupWidgetWindow(){
|
||||
nHists = 1;
|
||||
if(histXAxis) delete [] histXAxis; histXAxis = new double [nPixelsX];
|
||||
if(histYAxis[0]) delete [] histYAxis[0];histYAxis[0] = new double [nPixelsX];
|
||||
for(unsigned int px=0;px<(int)nPixelsX;px++) {histXAxis[px] = px;histYAxis[0][px] = 0;}
|
||||
for(unsigned int px=0;px<nPixelsX;px++) {histXAxis[px] = px;histYAxis[0][px] = 0;}
|
||||
Clear1DPlot();
|
||||
plot1D->SetXTitle("X Axis");
|
||||
plot1D->SetYTitle("Y Axis");
|
||||
@ -349,8 +349,7 @@ void qDrawPlot::SetupWidgetWindow(){
|
||||
|
||||
|
||||
|
||||
//callbacks
|
||||
|
||||
// callbacks
|
||||
// Setting the callback function to get data from detector class
|
||||
myDet->registerDataCallback(&(GetDataCallBack),this);
|
||||
//Setting the callback function to alert when acquisition finished from detector class
|
||||
@ -360,6 +359,13 @@ void qDrawPlot::SetupWidgetWindow(){
|
||||
//Setting the callback function to get progress from detector class(using receivers)
|
||||
myDet->registerProgressCallback(&(GetProgressCallBack),this);
|
||||
|
||||
|
||||
// if receiver, enable data streaming from receiver and client
|
||||
if(myDet->setReceiverOnline() == slsDetectorDefs::ONLINE_FLAG) {
|
||||
myDet->enableDataStreamingFromReceiver(1);
|
||||
myDet->enableDataStreamingToClient(1);
|
||||
}
|
||||
|
||||
qDefs::checkErrorMessage(myDet,"qDrawPlot::SetupWidgetWindow");
|
||||
}
|
||||
|
||||
@ -561,7 +567,7 @@ void qDrawPlot::SetScanArgument(int scanArg){
|
||||
//get #scansets for level 0 and level 1
|
||||
int numScan0 = myDet->getScanSteps(0); numScan0 = ((numScan0==0)?1:numScan0);
|
||||
int numScan1 = myDet->getScanSteps(1); numScan1 = ((numScan1==0)?1:numScan1);
|
||||
int numPos=myDet->getPositions();
|
||||
//int numPos=myDet->getPositions();
|
||||
|
||||
number_of_exposures = number_of_frames * numScan0 * numScan1;
|
||||
if(anglePlot) number_of_exposures = numScan0 * numScan1;// * numPos;
|
||||
@ -615,9 +621,10 @@ void qDrawPlot::SetScanArgument(int scanArg){
|
||||
if(gainImageArray) delete [] gainImageArray; gainImageArray = new double[nPixelsY*nPixelsX];
|
||||
|
||||
//initializing 1d x axis
|
||||
for(unsigned int px=0;px<(int)nPixelsX;px++) histXAxis[px] = px;/*+10;*/
|
||||
for(unsigned int px=0;px<nPixelsX;px++) histXAxis[px] = px;/*+10;*/
|
||||
|
||||
//initializing 2d array
|
||||
|
||||
memset(lastImageArray,0,nPixelsY *nPixelsX * sizeof(double));
|
||||
memset(gainImageArray,0,nPixelsY *nPixelsX * sizeof(double));
|
||||
/*for(int py=0;py<(int)nPixelsY;py++)
|
||||
@ -767,17 +774,15 @@ void qDrawPlot::SetupMeasurement(){
|
||||
|
||||
|
||||
void* qDrawPlot::DataStartAcquireThread(void *this_pointer){
|
||||
//stream data from receiver to the gui
|
||||
if(((qDrawPlot*)this_pointer)->myDet->setReceiverOnline(slsDetectorDefs::GET_ONLINE_FLAG) == slsDetectorDefs::ONLINE_FLAG) {
|
||||
//if it was not on
|
||||
if ( (((qDrawPlot*)this_pointer)->myDet->getStreamingSocketsCreatedInClient() != 1)
|
||||
|| (((qDrawPlot*)this_pointer)->myDet->enableDataStreamingFromReceiver(-1)!= 1) ){
|
||||
//switch it on, if error
|
||||
// stream data from receiver to the gui
|
||||
if(((qDrawPlot*)this_pointer)->myDet->setReceiverOnline() == slsDetectorDefs::ONLINE_FLAG) {
|
||||
|
||||
// if receiver data up streaming not on, switch it on
|
||||
if (((qDrawPlot*)this_pointer)->myDet->enableDataStreamingFromReceiver() != 1)
|
||||
if (((qDrawPlot*)this_pointer)->myDet->enableDataStreamingFromReceiver(1) != 1) {
|
||||
qDefs::checkErrorMessage(((qDrawPlot*)this_pointer)->myDet,"qDrawPlot::DataStartAcquireThread");
|
||||
return this_pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
((qDrawPlot*)this_pointer)->myDet->acquire(1);
|
||||
@ -834,7 +839,7 @@ int qDrawPlot::GetData(detectorData *data,int fIndex, int subIndex){
|
||||
sprintf(temp_title,"#%d %d",fIndex,subIndex);
|
||||
}else{
|
||||
if(fileSaveEnable) strcpy(temp_title,"#%d");
|
||||
else sprintf(temp_title,"",currentFrame);
|
||||
else sprintf(temp_title,"#%d",currentFrame);
|
||||
}
|
||||
if(subIndex != -1)
|
||||
sprintf(temp_title,"#%d %d",fIndex,subIndex);
|
||||
@ -1713,12 +1718,13 @@ void qDrawPlot::SavePlot(){
|
||||
|
||||
fName = QFileDialog::getSaveFileName(0,tr("Save Image"),fName,tr("PNG Files (*.png);;XPM Files(*.xpm);;JPEG Files(*.jpg)"),0,QFileDialog::ShowDirsOnly);
|
||||
|
||||
if (!fName.isEmpty())
|
||||
if (!fName.isEmpty()) {
|
||||
if(savedImage.save(fName))
|
||||
qDefs::Message(qDefs::INFORMATION,"The Image has been successfully saved","qDrawPlot::SavePlot");
|
||||
else
|
||||
qDefs::Message(qDefs::WARNING,"Attempt to save image failed.\n"
|
||||
"Formats: .png, .jpg, .xpm.","qDrawPlot::SavePlot");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1816,7 +1822,7 @@ void qDrawPlot::DisableZoom(bool disable){
|
||||
|
||||
|
||||
int qDrawPlot::UpdateTrimbitPlot(bool fromDetector,bool Histogram){
|
||||
int ret,i,actualPixelsX;
|
||||
int ret,actualPixelsX;
|
||||
double min=0,max=0,sum=0;
|
||||
#ifdef VERBOSE
|
||||
if(fromDetector) cout << "Geting Trimbits from Detector" << endl;
|
||||
@ -1864,8 +1870,8 @@ int qDrawPlot::UpdateTrimbitPlot(bool fromDetector,bool Histogram){
|
||||
if(histXAxis) delete [] histXAxis; histXAxis = new double [nPixelsX];
|
||||
if(histYAxis[0]) delete [] histYAxis[0]; histYAxis[0]= new double [nPixelsX];
|
||||
//initializing
|
||||
for(unsigned int px=0;px<(int)nPixelsX;px++) histXAxis[px] = px;
|
||||
for(i=0;i<nPixelsX;i++) histYAxis[0][i] = 0;
|
||||
for(unsigned int px=0;px<nPixelsX;px++) histXAxis[px] = px;
|
||||
for(unsigned int i=0;i<nPixelsX;i++) histYAxis[0][i] = 0;
|
||||
|
||||
//data
|
||||
memcpy(histYAxis[0],histTrimbits,nPixelsX*sizeof(double));
|
||||
@ -1896,14 +1902,14 @@ int qDrawPlot::UpdateTrimbitPlot(bool fromDetector,bool Histogram){
|
||||
|
||||
//create intervals
|
||||
histogramSamples.resize(TRIM_HISTOGRAM_XMAX+1);
|
||||
for(i=0; i<TRIM_HISTOGRAM_XMAX+1; i++){
|
||||
for(unsigned int i=0; i<TRIM_HISTOGRAM_XMAX+1; i++){
|
||||
histogramSamples[i].interval.setInterval(i,i+1);
|
||||
histogramSamples[i].value = 0;
|
||||
}
|
||||
|
||||
//fill histogram values
|
||||
int value = 0;
|
||||
for(i=0;i<actualPixelsX;i++){
|
||||
for(int i=0;i<actualPixelsX;i++){
|
||||
if( (histTrimbits[i] <= TRIM_HISTOGRAM_XMAX) && (histTrimbits[i] >= 0)){//if(histogramSamples[j].interval.contains(data->values[i]))
|
||||
value = (int) histTrimbits[i];
|
||||
histogramSamples[value].value += 1;
|
||||
|
@ -77,6 +77,8 @@ void qTabAdvanced::SetupWidgetWindow(){
|
||||
case slsDetectorDefs::MYTHEN:
|
||||
isEnergy = true;
|
||||
isAngular = true;
|
||||
spinZmqPort->setEnabled(false);
|
||||
spinZmqPort2->setEnabled(false);
|
||||
break;
|
||||
case slsDetectorDefs::EIGER:
|
||||
isEnergy = true;
|
||||
@ -154,6 +156,8 @@ void qTabAdvanced::SetupWidgetWindow(){
|
||||
spinStopPort->setValue(det->getStopPort());
|
||||
spinTCPPort->setValue(det->getReceiverPort());
|
||||
spinUDPPort->setValue(atoi(det->getReceiverUDPPort().c_str()));
|
||||
spinZmqPort->setValue(atoi(det->getClientStreamingPort().c_str()));
|
||||
spinZmqPort2->setValue(atoi(det->getReceiverStreamingPort().c_str()));
|
||||
|
||||
cout << "Getting network information" << endl;
|
||||
dispIP->setText(det->getDetectorIP().c_str());
|
||||
@ -260,12 +264,14 @@ void qTabAdvanced::Initialization(){
|
||||
if((detType==slsDetectorDefs::GOTTHARD) ||
|
||||
(detType==slsDetectorDefs::MOENCH) ||
|
||||
(detType==slsDetectorDefs::PROPIX) ||
|
||||
(detType==slsDetectorDefs::PROPIX) ||
|
||||
(detType==slsDetectorDefs::JUNGFRAU)){
|
||||
(detType==slsDetectorDefs::JUNGFRAU) ||
|
||||
(detType==slsDetectorDefs::EIGER)){
|
||||
|
||||
//network
|
||||
connect(spinTCPPort, SIGNAL(valueChanged(int)), this, SLOT(SetRxrTCPPort(int)));
|
||||
connect(spinUDPPort, SIGNAL(valueChanged(int)), this, SLOT(SetRxrUDPPort(int)));
|
||||
connect(spinZmqPort, SIGNAL(valueChanged(int)), this, SLOT(SetCltZmqPort(int)));
|
||||
connect(spinZmqPort2, SIGNAL(valueChanged(int)), this, SLOT(SetRxrZmqPort(int)));
|
||||
connect(comboRxrOnline, SIGNAL(currentIndexChanged(int)), this, SLOT(SetReceiverOnline(int)));
|
||||
|
||||
connect(dispIP, SIGNAL(editingFinished()), this, SLOT(SetNetworkParameters()));
|
||||
@ -721,6 +727,38 @@ void qTabAdvanced::SetRxrUDPPort(int port){
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
void qTabAdvanced::SetCltZmqPort(int port){
|
||||
#ifdef VERBOSE
|
||||
cout << "Setting Receiver UDP Port:" << port << endl;
|
||||
#endif
|
||||
ostringstream ss; ss << port; string sport = ss.str();
|
||||
|
||||
disconnect(spinZmqPort, SIGNAL(valueChanged(int)), this, SLOT(SetCltZmqPort(int)));
|
||||
spinZmqPort->setValue(atoi(det->setClientStreamingPort(sport).c_str()));
|
||||
qDefs::checkErrorMessage(det,"qTabAdvanced::SetCltZmqPort");
|
||||
connect(spinZmqPort, SIGNAL(valueChanged(int)), this, SLOT(SetCltZmqPort(int)));
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
void qTabAdvanced::SetRxrZmqPort(int port){
|
||||
#ifdef VERBOSE
|
||||
cout << "Setting Receiver UDP Port:" << port << endl;
|
||||
#endif
|
||||
ostringstream ss; ss << port; string sport = ss.str();
|
||||
|
||||
disconnect(spinZmqPort2, SIGNAL(valueChanged(int)), this, SLOT(SetRxrZmqPort(int)));
|
||||
spinZmqPort2->setValue(atoi(det->setReceiverStreamingPort(sport).c_str()));
|
||||
qDefs::checkErrorMessage(det,"qTabAdvanced::SetRxrZmqPort");
|
||||
connect(spinZmqPort2, SIGNAL(valueChanged(int)), this, SLOT(SetRxrZmqPort(int)));
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
void qTabAdvanced::SetReceiverOnline(int index){
|
||||
#ifdef VERBOSE
|
||||
cout << "Setting Reciever Online to :" << index << endl;
|
||||
@ -1061,6 +1099,8 @@ void qTabAdvanced::SetDetector(int index){
|
||||
spinStopPort->setValue(det->getStopPort());
|
||||
spinTCPPort->setValue(det->getReceiverPort());
|
||||
spinUDPPort->setValue(atoi(det->getReceiverUDPPort().c_str()));
|
||||
spinZmqPort->setValue(atoi(det->getClientStreamingPort().c_str()));
|
||||
spinZmqPort2->setValue(atoi(det->getReceiverStreamingPort().c_str()));
|
||||
|
||||
dispIP->setText(det->getDetectorIP().c_str());
|
||||
dispMAC->setText(det->getDetectorMAC().c_str());
|
||||
@ -1248,6 +1288,8 @@ void qTabAdvanced::Refresh(){
|
||||
//disconnect
|
||||
disconnect(spinTCPPort, SIGNAL(valueChanged(int)), this, SLOT(SetRxrTCPPort(int)));
|
||||
disconnect(spinUDPPort, SIGNAL(valueChanged(int)), this, SLOT(SetRxrUDPPort(int)));
|
||||
disconnect(spinZmqPort, SIGNAL(valueChanged(int)), this, SLOT(SetCltZmqPort(int)));
|
||||
disconnect(spinZmqPort2, SIGNAL(valueChanged(int)), this, SLOT(SetRxrZmqPort(int)));
|
||||
disconnect(comboRxrOnline, SIGNAL(currentIndexChanged(int)), this, SLOT(SetReceiverOnline(int)));
|
||||
disconnect(dispIP, SIGNAL(editingFinished()), this, SLOT(SetNetworkParameters()));
|
||||
disconnect(dispMAC, SIGNAL(editingFinished()), this, SLOT(SetNetworkParameters()));
|
||||
@ -1266,6 +1308,8 @@ void qTabAdvanced::Refresh(){
|
||||
dispRxrHostname->setText(det->getReceiver().c_str());
|
||||
spinTCPPort->setValue(det->getReceiverPort());
|
||||
spinUDPPort->setValue(atoi(det->getReceiverUDPPort().c_str()));
|
||||
spinZmqPort->setValue(atoi(det->getClientStreamingPort().c_str()));
|
||||
spinZmqPort2->setValue(atoi(det->getReceiverStreamingPort().c_str()));
|
||||
|
||||
dispUDPIP->setText(det->getReceiverUDPIP().c_str());
|
||||
dispUDPMAC->setText(det->getReceiverUDPMAC().c_str());
|
||||
@ -1273,6 +1317,8 @@ void qTabAdvanced::Refresh(){
|
||||
//connect
|
||||
connect(spinTCPPort, SIGNAL(valueChanged(int)), this, SLOT(SetRxrTCPPort(int)));
|
||||
connect(spinUDPPort, SIGNAL(valueChanged(int)), this, SLOT(SetRxrUDPPort(int)));
|
||||
connect(spinZmqPort, SIGNAL(valueChanged(int)), this, SLOT(SetCltZmqPort(int)));
|
||||
connect(spinZmqPort2, SIGNAL(valueChanged(int)), this, SLOT(SetRxrZmqPort(int)));
|
||||
connect(comboRxrOnline, SIGNAL(currentIndexChanged(int)), this, SLOT(SetReceiverOnline(int)));
|
||||
connect(dispIP, SIGNAL(editingFinished()), this, SLOT(SetNetworkParameters()));
|
||||
connect(dispMAC, SIGNAL(editingFinished()), this, SLOT(SetNetworkParameters()));
|
||||
|
@ -404,11 +404,11 @@ void qTabDebugging::SetParameters(QTreeWidgetItem *item){
|
||||
det = myDet->getSlsDetector(i);
|
||||
qDefs::checkErrorMessage(myDet,"qTabDebugging::SetParameters");
|
||||
lblDetectorId->setText(comboDetector->itemText(i));
|
||||
sprintf(value,"%llx",det->getId(slsDetectorDefs::DETECTOR_SERIAL_NUMBER));
|
||||
sprintf(value,"%llx",(long long unsigned int)det->getId(slsDetectorDefs::DETECTOR_SERIAL_NUMBER));
|
||||
lblDetectorSerial->setText(QString(value));
|
||||
sprintf(value,"%llx",det->getId(slsDetectorDefs::DETECTOR_FIRMWARE_VERSION));
|
||||
sprintf(value,"%llx",(long long unsigned int)det->getId(slsDetectorDefs::DETECTOR_FIRMWARE_VERSION));
|
||||
lblDetectorFirmware ->setText(QString(value));
|
||||
sprintf(value,"%llx",det->getId(slsDetectorDefs::DETECTOR_SOFTWARE_VERSION));
|
||||
sprintf(value,"%llx",(long long unsigned int)det->getId(slsDetectorDefs::DETECTOR_SOFTWARE_VERSION));
|
||||
lblDetectorSoftware->setText(QString(value));
|
||||
qDefs::checkErrorMessage(det,"qTabDebugging::SetParameters");
|
||||
|
||||
@ -425,17 +425,17 @@ void qTabDebugging::SetParameters(QTreeWidgetItem *item){
|
||||
det = myDet->getSlsDetector(i);
|
||||
qDefs::checkErrorMessage(myDet,"qTabDebugging::SetParameters");
|
||||
lblDetectorId->setText(comboDetector->itemText(i));
|
||||
sprintf(value,"%llx",det->getId(slsDetectorDefs::DETECTOR_SERIAL_NUMBER));
|
||||
sprintf(value,"%llx",(long long unsigned int)det->getId(slsDetectorDefs::DETECTOR_SERIAL_NUMBER));
|
||||
lblDetectorSerial->setText(QString(value));
|
||||
sprintf(value,"%llx",det->getId(slsDetectorDefs::DETECTOR_FIRMWARE_VERSION));
|
||||
sprintf(value,"%llx",(long long unsigned int)det->getId(slsDetectorDefs::DETECTOR_FIRMWARE_VERSION));
|
||||
lblDetectorFirmware ->setText(QString(value));
|
||||
sprintf(value,"%llx",det->getId(slsDetectorDefs::DETECTOR_SOFTWARE_VERSION));
|
||||
sprintf(value,"%llx",(long long unsigned int)det->getId(slsDetectorDefs::DETECTOR_SOFTWARE_VERSION));
|
||||
lblDetectorSoftware->setText(QString(value));
|
||||
|
||||
lblModuleId->setText(QString("%1").arg(im));
|
||||
sprintf(value,"%llx",det->getId(slsDetectorDefs::MODULE_SERIAL_NUMBER,im));
|
||||
sprintf(value,"%llx",(long long unsigned int)det->getId(slsDetectorDefs::MODULE_SERIAL_NUMBER,im));
|
||||
lblModuleSerial->setText(QString(value));
|
||||
sprintf(value,"%llx",det->getId(slsDetectorDefs::MODULE_FIRMWARE_VERSION,im));
|
||||
sprintf(value,"%llx",(long long unsigned int)det->getId(slsDetectorDefs::MODULE_FIRMWARE_VERSION,im));
|
||||
lblModuleFirmware->setText(QString(value));
|
||||
|
||||
qDefs::checkErrorMessage(det,"qTabDebugging::SetParameters");
|
||||
@ -457,11 +457,11 @@ void qTabDebugging::SetParameters(QTreeWidgetItem *item){
|
||||
det = myDet->getSlsDetector(i);
|
||||
qDefs::checkErrorMessage(myDet,"qTabDebugging::SetParameters");
|
||||
lblDetectorId->setText(comboDetector->itemText(i));
|
||||
sprintf(value,"%llx",det->getId(slsDetectorDefs::DETECTOR_SERIAL_NUMBER));
|
||||
sprintf(value,"%llx",(long long unsigned int)det->getId(slsDetectorDefs::DETECTOR_SERIAL_NUMBER));
|
||||
lblDetectorSerial->setText(QString(value));
|
||||
sprintf(value,"%llx",det->getId(slsDetectorDefs::DETECTOR_FIRMWARE_VERSION));
|
||||
sprintf(value,"%llx",(long long unsigned int)det->getId(slsDetectorDefs::DETECTOR_FIRMWARE_VERSION));
|
||||
lblDetectorFirmware ->setText(QString(value));
|
||||
sprintf(value,"%llx",det->getId(slsDetectorDefs::DETECTOR_SOFTWARE_VERSION));
|
||||
sprintf(value,"%llx",(long long unsigned int)det->getId(slsDetectorDefs::DETECTOR_SOFTWARE_VERSION));
|
||||
lblDetectorSoftware->setText(QString(value));
|
||||
|
||||
qDefs::checkErrorMessage(det,"qTabDebugging::SetParameters");
|
||||
@ -481,11 +481,11 @@ void qTabDebugging::SetParameters(QTreeWidgetItem *item){
|
||||
det = myDet->getSlsDetector(i);
|
||||
qDefs::checkErrorMessage(myDet,"qTabDebugging::SetParameters");
|
||||
lblDetectorId->setText(comboDetector->itemText(i));
|
||||
sprintf(value,"%llx",det->getId(slsDetectorDefs::DETECTOR_SERIAL_NUMBER));
|
||||
sprintf(value,"%llx",(long long unsigned int)det->getId(slsDetectorDefs::DETECTOR_SERIAL_NUMBER));
|
||||
lblDetectorSerial->setText(QString(value));
|
||||
sprintf(value,"%llx",det->getId(slsDetectorDefs::DETECTOR_FIRMWARE_VERSION));
|
||||
sprintf(value,"%llx",(long long unsigned int)det->getId(slsDetectorDefs::DETECTOR_FIRMWARE_VERSION));
|
||||
lblDetectorFirmware ->setText(QString(value));
|
||||
sprintf(value,"%llx",det->getId(slsDetectorDefs::DETECTOR_SOFTWARE_VERSION));
|
||||
sprintf(value,"%llx",(long long unsigned int)det->getId(slsDetectorDefs::DETECTOR_SOFTWARE_VERSION));
|
||||
lblDetectorSoftware->setText(QString(value));
|
||||
|
||||
qDefs::checkErrorMessage(det,"qTabDebugging::SetParameters");
|
||||
|
@ -734,7 +734,6 @@ void qTabMeasurement::SetTimingMode(int mode){
|
||||
|
||||
|
||||
//Frame Period between exposures
|
||||
qDefs::timeUnit unit;
|
||||
if(lblPeriod->isEnabled())
|
||||
CheckAcqPeriodGreaterThanExp();
|
||||
else{
|
||||
|
@ -69,11 +69,12 @@ void qTabSettings::GetDynamicRange(int setvalue){
|
||||
cout << "Getting dynamic range" << endl;
|
||||
#endif
|
||||
int ret = myDet->setDynamicRange(-1);
|
||||
if(detType == slsDetectorDefs::MYTHEN)
|
||||
if(detType == slsDetectorDefs::MYTHEN) {
|
||||
if(ret==24)
|
||||
ret=32;
|
||||
else if(ret==24)
|
||||
cout<<"ret:"<<ret<<endl;
|
||||
}
|
||||
//check if the set value is equal to return value
|
||||
if((setvalue!=-1) && (setvalue!=ret)){
|
||||
qDefs::Message(qDefs::WARNING,"Dynamic Range cannot be set to this value.","qTabSettings::SetDynamicRange");
|
||||
|
Loading…
x
Reference in New Issue
Block a user