mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 18:17:59 +02:00
Compare commits
5 Commits
externalqw
...
ctbgatedcl
Author | SHA1 | Date | |
---|---|---|---|
d64d0b5ac1 | |||
745fca7201 | |||
9bc709b470 | |||
64d0c35474 | |||
c0eeae6d6d |
@ -83,8 +83,6 @@ endif()
|
|||||||
#Maybe have an option guarding this?
|
#Maybe have an option guarding this?
|
||||||
set(SLS_INTERNAL_RAPIDJSON_DIR ${CMAKE_CURRENT_SOURCE_DIR}/libs/rapidjson)
|
set(SLS_INTERNAL_RAPIDJSON_DIR ${CMAKE_CURRENT_SOURCE_DIR}/libs/rapidjson)
|
||||||
|
|
||||||
set(SLS_INTERNAL_QWT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/libs/qwt-6.1.5)
|
|
||||||
|
|
||||||
set(ClangFormat_EXCLUDE_PATTERNS "build/"
|
set(ClangFormat_EXCLUDE_PATTERNS "build/"
|
||||||
"libs/"
|
"libs/"
|
||||||
"slsDetectorCalibration/"
|
"slsDetectorCalibration/"
|
||||||
@ -225,7 +223,6 @@ if (SLS_USE_RECEIVER)
|
|||||||
endif (SLS_USE_RECEIVER)
|
endif (SLS_USE_RECEIVER)
|
||||||
|
|
||||||
if (SLS_USE_GUI)
|
if (SLS_USE_GUI)
|
||||||
add_subdirectory(libs/qwt)
|
|
||||||
add_subdirectory(slsDetectorGui)
|
add_subdirectory(slsDetectorGui)
|
||||||
endif (SLS_USE_GUI)
|
endif (SLS_USE_GUI)
|
||||||
|
|
||||||
|
27
RELEASE.txt
Normal file → Executable file
27
RELEASE.txt
Normal file → Executable file
@ -98,35 +98,8 @@ This document describes the differences between v7.0.0 and v6.x.x
|
|||||||
- ctb and moench Fw fixed (to work with pattern commdand) )addreess length
|
- ctb and moench Fw fixed (to work with pattern commdand) )addreess length
|
||||||
- setting rx_hostname (or udp_dstip with rx_hostname not none) will always set udp_dstmac. solves problem of chaing udp_dstip and udp_dstmac stays the same
|
- setting rx_hostname (or udp_dstip with rx_hostname not none) will always set udp_dstmac. solves problem of chaing udp_dstip and udp_dstmac stays the same
|
||||||
- jungfrau reset core and usleep removed (fix for 6.1.1 is now fixed in firmware)
|
- jungfrau reset core and usleep removed (fix for 6.1.1 is now fixed in firmware)
|
||||||
- m3 clock update, m3 clk 4 and 5 cannot be set
|
|
||||||
- g2 change clkdivs 2 3 4 to defaults for burst and cw mode.
|
- g2 change clkdivs 2 3 4 to defaults for burst and cw mode.
|
||||||
- ctb and moench: allowing 1g non blocking acquire to send data
|
- ctb and moench: allowing 1g non blocking acquire to send data
|
||||||
- m3 and g2 rr
|
|
||||||
- m3 and g2 temp
|
|
||||||
- gain plot zooming fixed (disabled, acc. to main plot)
|
|
||||||
- ctb, moench, jungfrau (pll reset at start fixed, before no defines)
|
|
||||||
- pybind built into package, no need to update submodule when previous release had different pybind version
|
|
||||||
- adcvpp moved from dac.. and api added (ctb, moench)
|
|
||||||
- qt4->qt5
|
|
||||||
- in built qt5 6.1.5 because rhel7 is not upto date with qt5, removed findqwt.cmake
|
|
||||||
- made a fix in qwt lib (qwt_plot_layout.h) to work with 5.15 and lower versions
|
|
||||||
- qt5 forms fixed, qt4 many hard coding forms switched to forms including qtabwidget, scrolls etc, fonts moved to forms
|
|
||||||
- docking option enabled by default, removed option to disable docking feature from "Mode"
|
|
||||||
- added qVersionResolve utility functions to handle compatibility before and after qt5.12
|
|
||||||
- qtplots (ian's code) takes in gain mode enable to set some settings within the class, with proper gain plot ticks
|
|
||||||
- ensure gain plots have no zooming of z axis in 2d and y axis in 1d
|
|
||||||
- fixed some error messages in server side that were empty for fail in funcs (mostly minor as if this error, major issues)
|
|
||||||
- eiger (removed feb reset in stop acquisition as it caused processing bit to randomly not go high (leads to infinite loop waiting for it to go high). This is anyway done at prepare acquisition and set trimbits.
|
|
||||||
- left AND right registers monitored for processing bit done
|
|
||||||
- febProcessinginprogress returns STATUS_IDLE and not IDLE
|
|
||||||
- In feb stop acquisition, if processing bit is running forever, checks for 1 s, then if acq done bit is high, returns ok, else throws
|
|
||||||
- feb stop acquisition returns 1 if success and fucntion in list calling it compares properly instead of STATUS_IDLE (no effect, but incorrect logic)
|
|
||||||
- chipsignals to trimquad should only monitor right fpga (not both as it will throw)
|
|
||||||
- fixed error messages of readregister inconsistent values
|
|
||||||
- setmodule and read frame was returning fail without setting error messages (leading to broken tcp connection due to no error message) )
|
|
||||||
- gui nios temperature added
|
|
||||||
- detector header change (bunchid, reserved, debug, roundRnumber) ->detSpec1 - 4
|
|
||||||
-ctb and moench (allowing all clkdivs (totaldiv was a float instead of int))
|
|
||||||
|
|
||||||
2. Resolved Issues
|
2. Resolved Issues
|
||||||
==================
|
==================
|
||||||
|
118
cmake/FindQwt.cmake
Executable file
118
cmake/FindQwt.cmake
Executable file
@ -0,0 +1,118 @@
|
|||||||
|
# Qt Widgets for Technical Applications
|
||||||
|
# available at http://www.http://qwt.sourceforge.net/
|
||||||
|
#
|
||||||
|
# The module defines the following variables:
|
||||||
|
# QWT_FOUND - the system has Qwt
|
||||||
|
# QWT_INCLUDE_DIR - where to find qwt_plot.h
|
||||||
|
# QWT_INCLUDE_DIRS - qwt includes
|
||||||
|
# QWT_LIBRARY - where to find the Qwt library
|
||||||
|
# QWT_LIBRARIES - aditional libraries
|
||||||
|
# QWT_MAJOR_VERSION - major version
|
||||||
|
# QWT_MINOR_VERSION - minor version
|
||||||
|
# QWT_PATCH_VERSION - patch version
|
||||||
|
# QWT_VERSION_STRING - version (ex. 5.2.1)
|
||||||
|
# QWT_ROOT_DIR - root dir (ex. /usr/local)
|
||||||
|
|
||||||
|
#=============================================================================
|
||||||
|
# Copyright 2010-2013, Julien Schueller
|
||||||
|
# All rights reserved.
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions are met:
|
||||||
|
#
|
||||||
|
# 1. Redistributions of source code must retain the above copyright notice, this
|
||||||
|
# list of conditions and the following disclaimer.
|
||||||
|
# 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
# this list of conditions and the following disclaimer in the documentation
|
||||||
|
# and/or other materials provided with the distribution.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
|
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
|
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
# The views and conclusions contained in the software and documentation are those
|
||||||
|
# of the authors and should not be interpreted as representing official policies,
|
||||||
|
# either expressed or implied, of the FreeBSD Project.
|
||||||
|
#=============================================================================
|
||||||
|
|
||||||
|
|
||||||
|
find_path ( QWT_INCLUDE_DIR
|
||||||
|
NAMES qwt_plot.h
|
||||||
|
HINTS $ENV{QWTDIR} $ENV{QWTDIR}/src ${QT_INCLUDE_DIR}
|
||||||
|
PATH_SUFFIXES qwt qwt-qt3 qwt-qt4 qwt-qt5
|
||||||
|
)
|
||||||
|
|
||||||
|
set ( QWT_INCLUDE_DIRS ${QWT_INCLUDE_DIR} )
|
||||||
|
|
||||||
|
# version
|
||||||
|
set ( _VERSION_FILE ${QWT_INCLUDE_DIR}/qwt_global.h )
|
||||||
|
if ( EXISTS ${_VERSION_FILE} )
|
||||||
|
file ( STRINGS ${_VERSION_FILE} _VERSION_LINE REGEX "define[ ]+QWT_VERSION_STR" )
|
||||||
|
if ( _VERSION_LINE )
|
||||||
|
string ( REGEX REPLACE ".*define[ ]+QWT_VERSION_STR[ ]+\"(.*)\".*" "\\1" QWT_VERSION_STRING "${_VERSION_LINE}" )
|
||||||
|
string ( REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1" QWT_MAJOR_VERSION "${QWT_VERSION_STRING}" )
|
||||||
|
string ( REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\2" QWT_MINOR_VERSION "${QWT_VERSION_STRING}" )
|
||||||
|
string ( REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\3" QWT_PATCH_VERSION "${QWT_VERSION_STRING}" )
|
||||||
|
endif ()
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
|
||||||
|
# check version
|
||||||
|
set ( _QWT_VERSION_MATCH TRUE )
|
||||||
|
if ( Qwt_FIND_VERSION AND QWT_VERSION_STRING )
|
||||||
|
if ( Qwt_FIND_VERSION_EXACT )
|
||||||
|
if ( NOT Qwt_FIND_VERSION VERSION_EQUAL QWT_VERSION_STRING )
|
||||||
|
set ( _QWT_VERSION_MATCH FALSE )
|
||||||
|
endif ()
|
||||||
|
else ()
|
||||||
|
if ( QWT_VERSION_STRING VERSION_LESS Qwt_FIND_VERSION )
|
||||||
|
set ( _QWT_VERSION_MATCH FALSE )
|
||||||
|
endif ()
|
||||||
|
endif ()
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
|
||||||
|
find_library ( QWT_LIBRARY
|
||||||
|
NAMES qwt qwt-qt3 qwt-qt4 qwt-qt5
|
||||||
|
HINTS $ENV{QWTDIR}/lib ${QT_LIBRARY_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
set ( QWT_LIBRARIES ${QWT_LIBRARY} )
|
||||||
|
|
||||||
|
|
||||||
|
# try to guess root dir from include dir
|
||||||
|
if ( QWT_INCLUDE_DIR )
|
||||||
|
string ( REGEX REPLACE "(.*)/include.*" "\\1" QWT_ROOT_DIR ${QWT_INCLUDE_DIR} )
|
||||||
|
# try to guess root dir from library dir
|
||||||
|
elseif ( QWT_LIBRARY )
|
||||||
|
string ( REGEX REPLACE "(.*)/lib[/|32|64].*" "\\1" QWT_ROOT_DIR ${QWT_LIBRARY} )
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
|
||||||
|
# handle the QUIETLY and REQUIRED arguments
|
||||||
|
include ( FindPackageHandleStandardArgs )
|
||||||
|
if ( CMAKE_VERSION LESS 2.8.3 )
|
||||||
|
find_package_handle_standard_args( Qwt DEFAULT_MSG QWT_LIBRARY QWT_INCLUDE_DIR _QWT_VERSION_MATCH )
|
||||||
|
else ()
|
||||||
|
find_package_handle_standard_args( Qwt REQUIRED_VARS QWT_LIBRARY QWT_INCLUDE_DIR _QWT_VERSION_MATCH VERSION_VAR QWT_VERSION_STRING )
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
|
||||||
|
mark_as_advanced (
|
||||||
|
QWT_LIBRARY
|
||||||
|
QWT_LIBRARIES
|
||||||
|
QWT_INCLUDE_DIR
|
||||||
|
QWT_INCLUDE_DIRS
|
||||||
|
QWT_MAJOR_VERSION
|
||||||
|
QWT_MINOR_VERSION
|
||||||
|
QWT_PATCH_VERSION
|
||||||
|
QWT_VERSION_STRING
|
||||||
|
QWT_ROOT_DIR
|
||||||
|
)
|
@ -988,7 +988,7 @@ sample1 (dbit0 + dbit1 +...)if (cmd == "rx_dbitlist") {
|
|||||||
ped=0;
|
ped=0;
|
||||||
aval=dataStructure->getValue(data->data,x,y);
|
aval=dataStructure->getValue(data->data,x,y);
|
||||||
//aval=dataStructure->getChannel(data->data,x,y);
|
//aval=dataStructure->getChannel(data->data,x,y);
|
||||||
// cout << x << " " <<y << " "<< aval << endl;
|
cout << x << " " <<y << " "<< aval << endl;
|
||||||
if (cbGetPedestal->IsOn()) {
|
if (cbGetPedestal->IsOn()) {
|
||||||
if (photonFinder) {
|
if (photonFinder) {
|
||||||
photonFinder->addToPedestal(aval,x,y);
|
photonFinder->addToPedestal(aval,x,y);
|
||||||
|
112
ctbGui/patternGenerator/deserializer.cpp
Normal file
112
ctbGui/patternGenerator/deserializer.cpp
Normal file
@ -0,0 +1,112 @@
|
|||||||
|
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <sys/utsname.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <math.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
|
int main(int argc, char *argv[]) {
|
||||||
|
|
||||||
|
int iarg;
|
||||||
|
char fname[10000];
|
||||||
|
uint64_t word;
|
||||||
|
int val[64];
|
||||||
|
int bit[64];
|
||||||
|
FILE *fdin;
|
||||||
|
|
||||||
|
int nb=2;
|
||||||
|
int off=0;
|
||||||
|
int ioff=0;
|
||||||
|
int dr=24;
|
||||||
|
int idr=0;
|
||||||
|
int ib=0;
|
||||||
|
int iw=0;
|
||||||
|
bit[0]=19;
|
||||||
|
bit[1]=8;
|
||||||
|
// for (iarg=0; iarg<argc; iarg++) printf("%d %s\n",iarg, argv[iarg]);
|
||||||
|
|
||||||
|
if (argc<2) printf("Error: usage is %s fname [dr off b0 b1 bn]\n");
|
||||||
|
|
||||||
|
if (argc>2) dr=atoi(argv[2]);
|
||||||
|
if (argc>3) off=atoi(argv[3]);
|
||||||
|
if (argc>4) {
|
||||||
|
for (ib=0; ib<64; ib++) {
|
||||||
|
if (argc>4+ib) {
|
||||||
|
bit[ib]=atoi(argv[4+ib]);
|
||||||
|
nb++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
idr=0;
|
||||||
|
for (ib=0; ib<nb; ib++) {
|
||||||
|
val[ib]=0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
fdin=fopen(argv[1],"rb");
|
||||||
|
if (fdin==NULL) {
|
||||||
|
printf("Cannot open input file %s for reading\n",argv[1]);
|
||||||
|
return 200;
|
||||||
|
}
|
||||||
|
|
||||||
|
while (fread((void*)&word, 8, 1, fdin)) {
|
||||||
|
// printf("%llx\n",word);
|
||||||
|
if (ioff<off) ioff++;
|
||||||
|
else {
|
||||||
|
|
||||||
|
for (ib=0; ib<nb; ib++) {
|
||||||
|
if (word&(1<<bit[ib])) val[ib]|=(1<<idr);
|
||||||
|
}
|
||||||
|
idr++;
|
||||||
|
if (idr==dr) {
|
||||||
|
idr=0;
|
||||||
|
fprintf(stdout,"%d\t",iw++);
|
||||||
|
for (ib=0; ib<nb; ib++) {
|
||||||
|
#ifdef HEX
|
||||||
|
fprintf(stdout,"%08llx\t",val[ib]);
|
||||||
|
#else
|
||||||
|
fprintf(stdout,"%lld\t",val[ib]);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
val[ib]=0;
|
||||||
|
}
|
||||||
|
fprintf(stdout,"\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
if (idr!=0) {
|
||||||
|
fprintf(stdout,"%d\t",iw++);
|
||||||
|
for (ib=0; ib<nb; ib++) {
|
||||||
|
#ifdef HEX
|
||||||
|
fprintf(stdout,"%08llx\t",val[ib]);
|
||||||
|
#else
|
||||||
|
fprintf(stdout,"%lld\t",val[ib]);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
val[ib]=0;
|
||||||
|
}
|
||||||
|
fprintf(stdout,"\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
fclose(fdin);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
179
ctbGui/patternGenerator/generator.c
Normal file
179
ctbGui/patternGenerator/generator.c
Normal file
@ -0,0 +1,179 @@
|
|||||||
|
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
|
/****************************************************************************
|
||||||
|
usage to generate a patter test.pat from test.p
|
||||||
|
|
||||||
|
gcc -DINFILE="\"test.p\"" -DOUTFILE="\"test.pat\"" -o test.exe generator.c ; ./test.exe ; rm test.exe
|
||||||
|
|
||||||
|
|
||||||
|
*************************************************************************/
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <sys/utsname.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <math.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#define MAXLOOPS 3
|
||||||
|
#define MAXTIMERS 3
|
||||||
|
#define MAXWORDS 1024
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
uint64_t pat=0;
|
||||||
|
uint64_t iopat=0;
|
||||||
|
uint64_t clkpat=0;
|
||||||
|
|
||||||
|
int iaddr=0;
|
||||||
|
int waitaddr[3]={MAXWORDS,MAXWORDS,MAXWORDS};
|
||||||
|
int startloopaddr[3]={MAXWORDS,MAXWORDS,MAXWORDS};
|
||||||
|
int stoploopaddr[3]={MAXWORDS,MAXWORDS,MAXWORDS};
|
||||||
|
int start=0, stop=0;
|
||||||
|
uint64_t waittime[3]={0,0,0};
|
||||||
|
int nloop[3]={0,0,0};
|
||||||
|
|
||||||
|
char infile[10000], outfile[10000];
|
||||||
|
|
||||||
|
FILE *fd, *fd1;
|
||||||
|
uint64_t PAT[MAXWORDS];
|
||||||
|
|
||||||
|
|
||||||
|
int i,ii,iii,j,jj,jjj,pixx,pixy,memx,memy,muxout,memclk,colclk,rowclk,muxclk,memcol,memrow,loopcounter;
|
||||||
|
|
||||||
|
void setstart() {
|
||||||
|
start=iaddr;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setstop() {
|
||||||
|
stop=iaddr;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setinput(int bit) {
|
||||||
|
uint64_t mask=1;
|
||||||
|
mask=mask<<bit;
|
||||||
|
iopat &= ~mask;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setoutput(int bit) {
|
||||||
|
uint64_t mask=1;
|
||||||
|
mask=mask<<bit;
|
||||||
|
iopat |= mask;
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
void setclk(int bit) {
|
||||||
|
uint64_t mask=1;
|
||||||
|
mask=mask<<bit;
|
||||||
|
iopat |= mask;
|
||||||
|
clkpat |= mask;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
void clearbit(int bit){
|
||||||
|
uint64_t mask=1;
|
||||||
|
mask=mask<<bit;
|
||||||
|
pat &= ~mask;
|
||||||
|
}
|
||||||
|
void setbit(int bit){
|
||||||
|
uint64_t mask=1;
|
||||||
|
mask=mask<<bit;
|
||||||
|
pat |= mask;
|
||||||
|
}
|
||||||
|
|
||||||
|
int checkbit(int bit) {
|
||||||
|
uint64_t mask=1;
|
||||||
|
mask=mask<<bit;
|
||||||
|
return (pat & mask ) >>bit;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setstartloop(int iloop) {
|
||||||
|
if (iloop>=0 && iloop<MAXLOOPS)
|
||||||
|
startloopaddr[iloop]=iaddr;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void setstoploop(int iloop) {
|
||||||
|
if (iloop>=0 && iloop<MAXLOOPS)
|
||||||
|
stoploopaddr[iloop]=iaddr;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void setnloop(int iloop, int n) {
|
||||||
|
if (iloop>=0 && iloop<MAXLOOPS)
|
||||||
|
nloop[iloop]=n;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setwaitpoint(int iloop) {
|
||||||
|
if (iloop>=0 && iloop<MAXTIMERS)
|
||||||
|
waitaddr[iloop]=iaddr;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void setwaittime(int iloop, uint64_t t) {
|
||||||
|
if (iloop>=0 && iloop<MAXTIMERS)
|
||||||
|
waittime[iloop]=t;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void pw(){
|
||||||
|
if (iaddr<MAXWORDS)
|
||||||
|
PAT[iaddr]= pat;
|
||||||
|
fprintf(fd,"patword 0x%04x 0x%016llx\n",iaddr, pat);
|
||||||
|
iaddr++;
|
||||||
|
if (iaddr>=MAXWORDS) printf("ERROR: too many word in the pattern (%d instead of %d)!",iaddr, MAXWORDS);
|
||||||
|
}
|
||||||
|
|
||||||
|
int parseCommand(int clk, int cmdbit, int cmd, int length) {
|
||||||
|
int ibit;
|
||||||
|
clearbit(clk);
|
||||||
|
for (ibit=0; ibit<length; ibit++) {
|
||||||
|
if (cmd&(1>>ibit))
|
||||||
|
setbit(cmdbit);
|
||||||
|
else
|
||||||
|
clearbit(cmdbit);
|
||||||
|
pw();
|
||||||
|
/******/
|
||||||
|
setbit(clk);
|
||||||
|
pw();
|
||||||
|
/******/
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
main(void) {
|
||||||
|
int iloop=0;
|
||||||
|
fd=fopen(OUTFILE,"w");
|
||||||
|
#include INFILE
|
||||||
|
|
||||||
|
fprintf(fd,"patioctrl 0x%016llx\n",iopat);
|
||||||
|
//fprintf(fd,"patclkctrl 0x%016llx\n",clkpat);
|
||||||
|
fprintf(fd,"patlimits 0x%04x 0x%04x\n",start, stop);
|
||||||
|
|
||||||
|
for (iloop=0; iloop<MAXLOOPS; iloop++) {
|
||||||
|
fprintf(fd,"patloop%d 0x%04x 0x%04x\n",iloop, startloopaddr[iloop], stoploopaddr[iloop]);
|
||||||
|
if ( startloopaddr[iloop]<0 || stoploopaddr[iloop]<= startloopaddr[iloop]) nloop[iloop]=0;
|
||||||
|
fprintf(fd,"patnloop%d %d\n",iloop, nloop[iloop]);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (iloop=0; iloop<MAXTIMERS; iloop++) {
|
||||||
|
fprintf(fd,"patwait%d 0x%04x\n",iloop, waitaddr[iloop]);
|
||||||
|
if (waitaddr[iloop]<0) waittime[iloop]=0;
|
||||||
|
fprintf(fd,"patwaittime%d %lld\n",iloop, waittime[iloop]);
|
||||||
|
}
|
||||||
|
|
||||||
|
close((int)fd);
|
||||||
|
fd1=fopen(OUTFILEBIN,"w");
|
||||||
|
fwrite(PAT,sizeof(uint64_t),iaddr, fd1);
|
||||||
|
close((int)fd1);
|
||||||
|
}
|
@ -55,9 +55,6 @@ set(SPHINX_SOURCE_FILES
|
|||||||
src/troubleshooting.rst
|
src/troubleshooting.rst
|
||||||
src/receivers.rst
|
src/receivers.rst
|
||||||
src/slsreceiver.rst
|
src/slsreceiver.rst
|
||||||
src/udpheader.rst
|
|
||||||
src/udpconfig.rst
|
|
||||||
src/udpdetspec.rst
|
|
||||||
)
|
)
|
||||||
|
|
||||||
foreach(filename ${SPHINX_SOURCE_FILES})
|
foreach(filename ${SPHINX_SOURCE_FILES})
|
||||||
|
@ -66,15 +66,6 @@ Welcome to slsDetectorPackage's documentation!
|
|||||||
virtualserver
|
virtualserver
|
||||||
serverdefaults
|
serverdefaults
|
||||||
|
|
||||||
|
|
||||||
.. toctree::
|
|
||||||
:caption: Detector UDP Header
|
|
||||||
:maxdepth: 2
|
|
||||||
|
|
||||||
udpheader
|
|
||||||
udpconfig
|
|
||||||
udpdetspec
|
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:caption: Receiver
|
:caption: Receiver
|
||||||
:maxdepth: 2
|
:maxdepth: 2
|
||||||
|
@ -27,18 +27,13 @@ Build from source using CMake
|
|||||||
---------------------------------
|
---------------------------------
|
||||||
|
|
||||||
Note that on some systems, for example RH7, cmake v3+ is available under the cmake3 alias.
|
Note that on some systems, for example RH7, cmake v3+ is available under the cmake3 alias.
|
||||||
It is also required to clone with the option --recursive to get the pybind11 submodules used
|
It is also required to clone with the option --recursive to get the git submodules used
|
||||||
in the package. (Only needed for older versions than v7.0.0)
|
in the package.
|
||||||
|
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
git clone --recursive https://github.com/slsdetectorgroup/slsDetectorPackage.git
|
git clone --recursive https://github.com/slsdetectorgroup/slsDetectorPackage.git
|
||||||
|
|
||||||
# if older than v7.0.0 and using python, update pybind11 submodules
|
|
||||||
cd slsDetectorPackage
|
|
||||||
git submodule update --init
|
|
||||||
|
|
||||||
mkdir build && cd build
|
mkdir build && cd build
|
||||||
cmake ../slsDetectorPackage -DCMAKE_INSTALL_PREFIX=/your/install/path
|
cmake ../slsDetectorPackage -DCMAKE_INSTALL_PREFIX=/your/install/path
|
||||||
make -j12 #or whatever number of cores you are using to build
|
make -j12 #or whatever number of cores you are using to build
|
||||||
@ -60,29 +55,27 @@ These are mainly aimed at those not familiar with using ccmake and cmake.
|
|||||||
|
|
||||||
The binaries are generated in slsDetectorPackage/build/bin directory.
|
The binaries are generated in slsDetectorPackage/build/bin directory.
|
||||||
|
|
||||||
Usage: ./cmk.sh [-b] [-c] [-d <HDF5 directory>] [e] [g] [-h] [i] [-j <Number of threads>] [-k <CMake command>] [-l <Install directory>] [m] [n] [-p] [-q <Zmq hint directory>] [r] [s] [t] [u] [z]
|
Usage: $0 [-c] [-b] [-p] [e] [t] [r] [g] [s] [u] [i] [m] [n] [-h] [z] [-d <HDF5 directory>] [-l Install directory] [-k <CMake command>] [-j <Number of threads>]
|
||||||
-[no option]: only make
|
-[no option]: only make
|
||||||
-b: Builds/Rebuilds CMake files normal mode
|
|
||||||
-c: Clean
|
-c: Clean
|
||||||
-d: HDF5 Custom Directory
|
-b: Builds/Rebuilds CMake files normal mode
|
||||||
-e: Debug mode
|
-p: Builds/Rebuilds Python API
|
||||||
-g: Build/Rebuilds only gui
|
|
||||||
-h: Builds/Rebuilds Cmake files with HDF5 package
|
-h: Builds/Rebuilds Cmake files with HDF5 package
|
||||||
-i: Builds tests
|
-d: HDF5 Custom Directory
|
||||||
-j: Number of threads to compile through
|
|
||||||
-k: CMake command
|
-k: CMake command
|
||||||
-l: Install directory
|
-l: Install directory
|
||||||
|
-t: Build/Rebuilds only text client
|
||||||
|
-r: Build/Rebuilds only receiver
|
||||||
|
-g: Build/Rebuilds only gui
|
||||||
|
-s: Simulator
|
||||||
|
-u: Chip Test Gui
|
||||||
|
-j: Number of threads to compile through
|
||||||
|
-e: Debug mode
|
||||||
|
-i: Builds tests
|
||||||
-m: Manuals
|
-m: Manuals
|
||||||
-n: Manuals without compiling doxygen (only rst)
|
-n: Manuals without compiling doxygen (only rst)
|
||||||
-p: Builds/Rebuilds Python API
|
|
||||||
-q: Zmq hint directory
|
|
||||||
-r: Build/Rebuilds only receiver
|
|
||||||
-s: Simulator
|
|
||||||
-t: Build/Rebuilds only text client
|
|
||||||
-u: Chip Test Gui
|
|
||||||
-z: Moench zmq processor
|
-z: Moench zmq processor
|
||||||
|
|
||||||
|
|
||||||
# get all options
|
# get all options
|
||||||
./cmk.sh -?
|
./cmk.sh -?
|
||||||
|
|
||||||
|
@ -17,22 +17,6 @@ environments.
|
|||||||
.. warning ::
|
.. warning ::
|
||||||
|
|
||||||
If you use conda avoid also installing packages with pip.
|
If you use conda avoid also installing packages with pip.
|
||||||
---------------------
|
|
||||||
PYBIND11
|
|
||||||
---------------------
|
|
||||||
**v7.0.0 of slsDetectorPackage:**
|
|
||||||
|
|
||||||
#. It is packaged into libs (pybind)
|
|
||||||
#. No longer a submodule of the slsDetectorPackage
|
|
||||||
|
|
||||||
**Older than v7.0.0:**
|
|
||||||
|
|
||||||
#. Submodule in libs (pybind11)
|
|
||||||
#. Switching between versions will require an update of the submodule as well using:
|
|
||||||
|
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
git submodule update --init #from the main slsDetectorPackage folder
|
|
||||||
|
|
||||||
---------------------
|
---------------------
|
||||||
PYTHONPATH
|
PYTHONPATH
|
||||||
|
@ -4,8 +4,41 @@ Receivers
|
|||||||
Receiver processes can be run on same or different machines as the client, receives the data from the detector (via UDP packets).
|
Receiver processes can be run on same or different machines as the client, receives the data from the detector (via UDP packets).
|
||||||
When using the slsReceiver/ slsMultiReceiver, they can be further configured by the client control software (via TCP/IP) to set file name, file path, progress of acquisition etc.
|
When using the slsReceiver/ slsMultiReceiver, they can be further configured by the client control software (via TCP/IP) to set file name, file path, progress of acquisition etc.
|
||||||
|
|
||||||
|
Detector UDP Header
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
| The UDP data format for the packets consist of a common header for all detectors, followed by the data for that one packet.
|
||||||
|
|
||||||
|
**The SLS Detector Header**
|
||||||
|
|
||||||
|
.. table:: <-------------------------------- 8 bytes -------------------------------->
|
||||||
|
:align: center
|
||||||
|
:widths: 30,30,30,30
|
||||||
|
|
||||||
|
+--------------------------------------------------------------------+
|
||||||
|
|frameNumber |
|
||||||
|
+---------------------------------+----------------------------------+
|
||||||
|
|expLength |packetNumber |
|
||||||
|
+---------------------------------+----------------------------------+
|
||||||
|
|bunchId |
|
||||||
|
+--------------------------------------------------------------------+
|
||||||
|
|timestamp |
|
||||||
|
+----------------+----------------+----------------+-----------------+
|
||||||
|
|modId |row |column |reserved |
|
||||||
|
+----------------+----------------+----------------+--------+--------+
|
||||||
|
|debug |roundRNumber |detType |version |
|
||||||
|
+---------------------------------+----------------+--------+--------+
|
||||||
|
|
||||||
|
UDP configuration in Config file
|
||||||
|
----------------------------------
|
||||||
|
|
||||||
|
#. UDP source port is hardcoded in detector server, starting at 32410.
|
||||||
|
#. **udp_dstport** : UDP destination port number. Port in receiver pc to listen to packets from the detector.
|
||||||
|
#. **udp_dstip** : IP address of UDP destination interface. IP address of interface in receiver pc to listen to packets from detector. If **auto** is used (only when using slsReceiver/ slsMultiReceiver), the IP of **rx_hostname** is picked up.
|
||||||
|
#. **udp_dstmac** : Mac address of UDP destination interface. MAC address of interface in receiver pc to list to packets from detector. Only required when using custom receiver, else slsReceiver/slsMultiReceiver picks it up from **udp_dstip**.
|
||||||
|
#. **udp_srcip** : IP address of UDP source interface. IP address of detector UDP interface to send packets from. Do not use for Eiger 1Gb interface (uses its hardware IP). For others, must be in the same subnet as **udp_dstip**.
|
||||||
|
#. **udp_srcmac** : MAC address of UDP source interface. MAC address of detector UDP interface to send packets from. Do not use for Eiger (uses hardware mac). For others, it is not necessary, but can help for switch and debugging to put unique values for each module.
|
||||||
|
|
||||||
To know more about detector receiver configuration, please check out :ref:`detector udp header and udp commands in the config file <detector udp header>`
|
|
||||||
|
|
||||||
Custom Receiver
|
Custom Receiver
|
||||||
----------------
|
----------------
|
||||||
|
@ -1,14 +1,5 @@
|
|||||||
Getting Started
|
Detector Servers
|
||||||
===============
|
=================
|
||||||
|
|
||||||
Detector Servers include:
|
|
||||||
* Control server [default port: 1952]
|
|
||||||
* Almost all client communication.
|
|
||||||
* Stop server [default port: 1953]
|
|
||||||
* Client requests for detector status, stop acquisition, temperature, advanced read/write registers.
|
|
||||||
|
|
||||||
When using a blocking acquire command (sls_detector_acquire or Detector::acquire), the control server is blocked until end of acquisition. However, stop server commands could be used in parallel.
|
|
||||||
|
|
||||||
|
|
||||||
Location
|
Location
|
||||||
---------
|
---------
|
||||||
@ -33,6 +24,17 @@ Arguments
|
|||||||
-s, --stopserver : Stop server. Do not use as it is created by control server
|
-s, --stopserver : Stop server. Do not use as it is created by control server
|
||||||
|
|
||||||
|
|
||||||
|
Basics
|
||||||
|
------------
|
||||||
|
|
||||||
|
Detector Servers include:
|
||||||
|
* Control server [default port: 1952]
|
||||||
|
* Almost all client communication.
|
||||||
|
* Stop server [default port: 1953]
|
||||||
|
* Client requests for detector status, stop acquisition, temperature, advanced read/write registers.
|
||||||
|
|
||||||
|
When using a blocking acquire command (sls_detector_acquire or Detector::acquire), the control server is blocked until end of acquisition. However, stop server commands could be used in parallel.
|
||||||
|
|
||||||
|
|
||||||
.. _Automatic start servers:
|
.. _Automatic start servers:
|
||||||
Automatic start
|
Automatic start
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
.. _Detector Server Upgrade:
|
.. _Detector Server Upgrade:
|
||||||
Upgrade
|
Detector Server Upgrade
|
||||||
========
|
=======================
|
||||||
|
|
||||||
|
|
||||||
**Location:** slsDetectorPackage/serverBin/ folder for every release.
|
**Location:** slsDetectorPackage/serverBin/ folder for every release.
|
||||||
@ -14,7 +14,7 @@ Upgrade
|
|||||||
Eiger requires a manual reboot. Or killall the servers and restart the new linked one. If you are in the process of updating firmware, then don't reboot yet.
|
Eiger requires a manual reboot. Or killall the servers and restart the new linked one. If you are in the process of updating firmware, then don't reboot yet.
|
||||||
|
|
||||||
|
|
||||||
6.1.1+ (no tftp required)
|
From 6.1.1 and above (no tftp required)
|
||||||
---------------------------------------
|
---------------------------------------
|
||||||
|
|
||||||
#. Program from console
|
#. Program from console
|
||||||
@ -60,7 +60,7 @@ Troubleshooting with tftp
|
|||||||
#. text file busy: You are trying to copy the same server.
|
#. text file busy: You are trying to copy the same server.
|
||||||
|
|
||||||
|
|
||||||
< 5.0.0
|
Older than 5.0.0
|
||||||
--------
|
-----------------
|
||||||
|
|
||||||
Please contact us.
|
Please contact us.
|
@ -144,30 +144,6 @@ Receiver PC Tuning Options
|
|||||||
| xth1 is example interface name.
|
| xth1 is example interface name.
|
||||||
| These settings are lost at pc reboot.
|
| These settings are lost at pc reboot.
|
||||||
|
|
||||||
#. Disable CPU frequency scaling and set system to performance
|
|
||||||
* Check current policy (default might be powersave or schedutil)
|
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
# check current active governor and range of cpu freq policy
|
|
||||||
cpupower frequency-info --policy
|
|
||||||
# list all available governors for this kernel
|
|
||||||
cpupower frequency-info --governors
|
|
||||||
|
|
||||||
* Temporarily (until shut down)
|
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
# set to performance
|
|
||||||
sudo cpupower frequency-set -g performance
|
|
||||||
|
|
||||||
|
|
||||||
* Permanently
|
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
# edit /etc/sysconfig/cpupower to preference
|
|
||||||
|
|
||||||
# enable or disable permanently
|
|
||||||
sudo systemctl enable cpupower
|
|
||||||
|
|
||||||
#. Give user speicific user scheduling privileges.
|
#. Give user speicific user scheduling privileges.
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
|
@ -1,33 +0,0 @@
|
|||||||
.. _detector udp header:
|
|
||||||
|
|
||||||
|
|
||||||
Config file
|
|
||||||
============
|
|
||||||
|
|
||||||
Commands to configure the UDP in the config file:
|
|
||||||
|
|
||||||
Source Port
|
|
||||||
-----------
|
|
||||||
Hardcoded in detector server, starting at 32410.
|
|
||||||
|
|
||||||
udp_srcip - Source IP
|
|
||||||
---------------------
|
|
||||||
IP address of detector UDP interface to send packets from. Do not use for Eiger 1Gb interface (uses its hardware IP). For others, must be in the same subnet as **udp_dstip**.
|
|
||||||
|
|
||||||
udp_srcmac - Source MAC
|
|
||||||
-----------------------
|
|
||||||
MAC address of detector UDP interface to send packets from. Do not use for Eiger (uses hardware mac). For others, it is not necessary, but can help for switch and debugging to put unique values for each module.
|
|
||||||
|
|
||||||
|
|
||||||
udp_dstport - Desintation Port
|
|
||||||
-------------------------------
|
|
||||||
Port in receiver pc to listen to packets from the detector.
|
|
||||||
|
|
||||||
udp_dstip - Destination IP
|
|
||||||
--------------------------
|
|
||||||
IP address of interface in receiver pc to listen to packets from detector. If **auto** is used (only when using slsReceiver/ slsMultiReceiver), the IP of **rx_hostname** is picked up.
|
|
||||||
|
|
||||||
udp_dstmac - Destination MAC
|
|
||||||
----------------------------
|
|
||||||
MAC address of interface in receiver pc to list to packets from detector. Only required when using custom receiver, else slsReceiver/slsMultiReceiver picks it up from **udp_dstip**.
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
|||||||
Detector Specific Fields
|
|
||||||
========================
|
|
||||||
|
|
||||||
Eiger
|
|
||||||
-----
|
|
||||||
|
|
||||||
.. table::
|
|
||||||
|
|
||||||
+----------+------------------------------+
|
|
||||||
| detSpec1 | 0x0 |
|
|
||||||
+----------+------------------------------+
|
|
||||||
| detSpec2 | 0x0 |
|
|
||||||
+----------+------------------------------+
|
|
||||||
| detSpec3 | e14a |
|
|
||||||
+----------+------------------------------+
|
|
||||||
| detSpec4 | Round Robin Interface Number |
|
|
||||||
+----------+------------------------------+
|
|
||||||
|
|
||||||
|
|
@ -1,75 +0,0 @@
|
|||||||
.. _detector udp header:
|
|
||||||
|
|
||||||
Format
|
|
||||||
=======
|
|
||||||
|
|
||||||
The UDP data format for the packets consist of a common header for all detectors, followed by the data for that one packet.
|
|
||||||
|
|
||||||
|
|
||||||
Current Version
|
|
||||||
---------------------------
|
|
||||||
|
|
||||||
**v3.0 (slsDetectorPackage v7.0.0+)**
|
|
||||||
|
|
||||||
.. table:: <---------------------------------------------------- 8 bytes ---------------------------------------------------->
|
|
||||||
:align: center
|
|
||||||
:widths: 30,30,30,15,15
|
|
||||||
|
|
||||||
+---------------------------------------------------------------+
|
|
||||||
| frameNumber |
|
|
||||||
+-------------------------------+-------------------------------+
|
|
||||||
| expLength | packetNumber |
|
|
||||||
+-------------------------------+-------------------------------+
|
|
||||||
| **detSpec1** |
|
|
||||||
+---------------------------------------------------------------+
|
|
||||||
| timestamp |
|
|
||||||
+---------------+---------------+---------------+---------------+
|
|
||||||
| modId | row | column | **detSpec2** |
|
|
||||||
+---------------+---------------+---------------+-------+-------+
|
|
||||||
| **detSpec3** | **detSpec4** |detType|version|
|
|
||||||
+-------------------------------+---------------+-------+-------+
|
|
||||||
|
|
||||||
|
|
||||||
Previous Versions
|
|
||||||
-----------------
|
|
||||||
**v2.0 (Package v4.0.0 - 6.x.x)**
|
|
||||||
|
|
||||||
.. table:: <---------------------------------------------------- 8 bytes ---------------------------------------------------->
|
|
||||||
:align: center
|
|
||||||
:widths: 30,30,30,15,15
|
|
||||||
|
|
||||||
+---------------------------------------------------------------+
|
|
||||||
| frameNumber |
|
|
||||||
+-------------------------------+-------------------------------+
|
|
||||||
| expLength | packetNumber |
|
|
||||||
+-------------------------------+-------------------------------+
|
|
||||||
| bunchid |
|
|
||||||
+---------------------------------------------------------------+
|
|
||||||
| timestamp |
|
|
||||||
+---------------+---------------+---------------+---------------+
|
|
||||||
| modId | **row** | **column** | **reserved** |
|
|
||||||
+---------------+---------------+---------------+-------+-------+
|
|
||||||
| debug | roundRNumber |detType|version|
|
|
||||||
+-------------------------------+---------------+-------+-------+
|
|
||||||
|
|
||||||
|
|
||||||
**v1.0 (Package v3.0.0 - 3.1.5)**
|
|
||||||
|
|
||||||
.. table:: <---------------------------------------------------- 8 bytes ---------------------------------------------------->
|
|
||||||
:align: center
|
|
||||||
:widths: 30,30,30,15,15
|
|
||||||
|
|
||||||
+---------------------------------------------------------------+
|
|
||||||
| frameNumber |
|
|
||||||
+-------------------------------+-------------------------------+
|
|
||||||
| expLength | packetNumber |
|
|
||||||
+-------------------------------+-------------------------------+
|
|
||||||
| bunchid |
|
|
||||||
+---------------------------------------------------------------+
|
|
||||||
| timestamp |
|
|
||||||
+---------------+---------------+---------------+---------------+
|
|
||||||
| modId | xCoord | yCoord | zCoord |
|
|
||||||
+---------------+---------------+---------------+-------+-------+
|
|
||||||
| debug | roundRNumber |detType|version|
|
|
||||||
+-------------------------------+---------------+-------+-------+
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
.. _Virtual Detector Servers:
|
.. _Virtual Detector Servers:
|
||||||
Simulators
|
Detector Simulators
|
||||||
===========
|
===================
|
||||||
|
|
||||||
Compilation
|
Compilation
|
||||||
-----------
|
-----------
|
||||||
|
24
evalVersionVariables.sh
Executable file
24
evalVersionVariables.sh
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
|
GITREPO1='git remote -v'
|
||||||
|
GITREPO2=" | grep \"fetch\" | cut -d' ' -f1"
|
||||||
|
BRANCH1='git branch -v'
|
||||||
|
BRANCH2=" | grep '*' | cut -d' ' -f2"
|
||||||
|
REPUID1='git log --pretty=format:"%H" -1'
|
||||||
|
AUTH1_1='git log --pretty=format:"%cn" -1'
|
||||||
|
AUTH1_2=" | cut -d' ' -f1"
|
||||||
|
AUTH2_1='git log --pretty=format:"%cn" -1'
|
||||||
|
AUTH2_2=" | cut -d' ' -f2"
|
||||||
|
FOLDERREV1='git log --oneline . ' #used for all the individual server folders
|
||||||
|
FOLDERREV2=" | wc -l" #used for all the individual server folders
|
||||||
|
REV1='git log --oneline '
|
||||||
|
REV2=" | wc -l"
|
||||||
|
|
||||||
|
GITREPO=`eval $GITREPO1 $GITREPO2`
|
||||||
|
BRANCH=`eval $BRANCH1 $BRANCH2`
|
||||||
|
REPUID=`eval $REPUID1`
|
||||||
|
AUTH1=`eval $AUTH1_1 $AUTH1_2`
|
||||||
|
AUTH2=`eval $AUTH2_1 $AUTH2_2`
|
||||||
|
REV=`eval $REV1 $REV2`
|
||||||
|
FOLDERREV=`eval $FOLDERREV1 $FOLDERREV2`
|
||||||
|
|
@ -3,33 +3,33 @@
|
|||||||
### edit with hostname or IP address of your detector
|
### edit with hostname or IP address of your detector
|
||||||
############################################
|
############################################
|
||||||
#hostname bchip181+
|
#hostname bchip181+
|
||||||
hostname bchip135
|
hostname bchip119.psi.ch
|
||||||
|
|
||||||
#############################################
|
#############################################
|
||||||
### edit with hostname or 1Gbs IP address of your server
|
### edit with hostname or 1Gbs IP address of your server
|
||||||
############################################
|
############################################
|
||||||
rx_hostname mpc2011
|
rx_hostname mpc2011:1777
|
||||||
|
|
||||||
#############################################
|
#############################################
|
||||||
### edit with 10 Gbs IP of your server
|
### edit with 10 Gbs IP of your server
|
||||||
############################################
|
############################################
|
||||||
udp_dstip 10.1.1.102
|
udp_dstip 10.1.2.102
|
||||||
#############################################
|
#############################################
|
||||||
### edit with any number in the subnet of your server (first 3 numbers as above)
|
### edit with any number in the subnet of your server (first 3 numbers as above)
|
||||||
############################################
|
############################################
|
||||||
udp_srcip 10.1.1.19
|
udp_srcip 10.1.2.19
|
||||||
udp_dstport 32411
|
udp_dstport 32000
|
||||||
|
|
||||||
#############################################
|
#############################################
|
||||||
### edit with 10 Gbs IP of your server
|
### edit with 10 Gbs IP of your server
|
||||||
############################################
|
############################################
|
||||||
rx_zmqip 10.1.1.102
|
rx_zmqip 10.1.2.102
|
||||||
rx_zmqport 50003
|
rx_zmqport 77000
|
||||||
#############################################
|
#############################################
|
||||||
### edit with 1 Gbs IP of PC where you will run the GUI
|
### edit with 1 Gbs IP of PC where you will run the GUI
|
||||||
############################################
|
############################################
|
||||||
zmqip 129.129.202.57
|
zmqip 129.129.202.132
|
||||||
zmqport 50001
|
zmqport 77001
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -38,7 +38,7 @@ rx_zmqstream 1
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
frames 100000
|
frames 1000
|
||||||
period 0.0006
|
period 0.0006
|
||||||
exptime 0.00035
|
exptime 0.00035
|
||||||
|
|
||||||
@ -62,3 +62,9 @@ highvoltage 90
|
|||||||
#adcreg 0x14 0x40
|
#adcreg 0x14 0x40
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
frames 10
|
||||||
|
period 0.1
|
||||||
|
rx_jsonpara subframes 1
|
||||||
|
rx_jsonpara frameMode raw
|
||||||
|
rx_jsonpara detectorMode analog
|
||||||
|
27
genVersionHeader.sh
Executable file
27
genVersionHeader.sh
Executable file
@ -0,0 +1,27 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
|
#####! /bin/awk -f
|
||||||
|
|
||||||
|
|
||||||
|
if [ $# -lt 3 ]
|
||||||
|
then
|
||||||
|
echo "wrong usage"
|
||||||
|
exit -1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
fin=$1
|
||||||
|
ftmp=$2
|
||||||
|
fout=$3
|
||||||
|
|
||||||
|
|
||||||
|
#dat=echo "date '+%Y%m%d'"
|
||||||
|
|
||||||
|
echo "Updating $fout"
|
||||||
|
#echo "in: $fin tmp: $ftmp out: $fout"
|
||||||
|
|
||||||
|
#awk 'NR==FNR {if ($3=="Date:") {l[FNR]=$4; gsub("-","",l[FNR]);} else { if (match($0,"Rev")) {l[FNR]=$(NF);} else {l[FNR]="\""$(NF)"\"";};};next} {$0=$1" "$2" "l[FNR]}1' $fin $ftmp > $fout
|
||||||
|
|
||||||
|
awk 'BEGIN {l[0]=0; "date +%Y%m%d" | getline l[1]; l[2]="\"/\""; l[3]="\"nobody\""; l[3]="\"nobody\""; l[4]="\"0000-0000-0000\"";} \
|
||||||
|
NR==FNR {if (match($0,"Rev")) {l[0]="0x"$(NF);} else if (match($0,"Date")) {l[1]="0x"$4; gsub("-","",l[1]);} else if (match($0,"URL")) {l[2]="\""$(NF)"\"";} else if (match($0,"Author")) {l[3]="\""$(NF)"\"";} else if (match($0,"UUID")) {l[4]="\""$(NF)"\"";} else if (match($0,"Branch")) {l[5]="\""$(NF)"\"";};next;}
|
||||||
|
{if (match($2,"REV")) {$0=$1" "$2" "l[0];} else if (match($2,"DATE")) {$0=$1" "$2" "l[1];} else if (match($2,"URL")) {$0=$1" "$2" "l[2];} else if (match($2,"AUTH")) {$0=$1" "$2" "l[3];} else if (match($2,"UUID")) {$0=$1" "$2" "l[4];} else if (match($2,"BRANCH")) {$0=$1" "$2" "l[5];}}1' $fin $ftmp > $fout
|
@ -50,8 +50,8 @@ TEST_CASE("Set control port then create a new object with this control port",
|
|||||||
Is this the best way to initialize the detectors
|
Is this the best way to initialize the detectors
|
||||||
Using braces to make the object go out of scope
|
Using braces to make the object go out of scope
|
||||||
*/
|
*/
|
||||||
int old_cport = DEFAULT_TCP_CNTRL_PORTNO;
|
int old_cport = DEFAULT_PORTNO;
|
||||||
int old_sport = DEFAULT_TCP_STOP_PORTNO;
|
int old_sport = DEFAULT_PORTNO + 1;
|
||||||
int new_cport = 1993;
|
int new_cport = 1993;
|
||||||
int new_sport = 2000;
|
int new_sport = 2000;
|
||||||
{
|
{
|
||||||
@ -79,7 +79,7 @@ TEST_CASE("Set control port then create a new object with this control port",
|
|||||||
|
|
||||||
Module d(test::type);
|
Module d(test::type);
|
||||||
d.setHostname(test::hostname);
|
d.setHostname(test::hostname);
|
||||||
CHECK(d.getStopPort() == DEFAULT_TCP_STOP_PORTNO);
|
CHECK(d.getStopPort() == DEFAULT_PORTNO + 1);
|
||||||
d.freeSharedMemory();
|
d.freeSharedMemory();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,57 +0,0 @@
|
|||||||
#inspired by: https://github.com/ericriff/qwt/blob/master/CMakeLists.txt
|
|
||||||
|
|
||||||
# Build a static version of qwt from tar file
|
|
||||||
cmake_minimum_required(VERSION 3.12)
|
|
||||||
project(qwt)
|
|
||||||
set(PROJECT_VERSION 6.1.5)
|
|
||||||
|
|
||||||
set(CMAKE_AUTOMOC ON)
|
|
||||||
set(CMAKE_AUTORCC ON)
|
|
||||||
|
|
||||||
# Extract qwt sources from the supplied source file
|
|
||||||
set(INTERNALQWTDIR "qwt-source/")
|
|
||||||
set(QWTBASE ${CMAKE_CURRENT_BINARY_DIR}/${INTERNALQWTDIR})
|
|
||||||
file(MAKE_DIRECTORY ${QWTBASE})
|
|
||||||
execute_process(
|
|
||||||
COMMAND tar -xf ${CMAKE_CURRENT_SOURCE_DIR}/qwt-6.1.5.tar.bz2 -C ${QWTBASE} --strip-components=1
|
|
||||||
RESULT_VARIABLE ret
|
|
||||||
)
|
|
||||||
if(ret AND NOT ret EQUAL 0)
|
|
||||||
message( FATAL_ERROR "Could not unpack qwt")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Without this define moc files are not included and linking of examples fails.
|
|
||||||
add_definitions(-DQWT_MOC_INCLUDE)
|
|
||||||
|
|
||||||
find_package(Qt5 REQUIRED
|
|
||||||
COMPONENTS
|
|
||||||
Core
|
|
||||||
Gui
|
|
||||||
Widgets
|
|
||||||
OpenGL
|
|
||||||
Concurrent
|
|
||||||
PrintSupport
|
|
||||||
Svg
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
file(GLOB QWT_SOURCES ${QWTBASE}src/*.cpp)
|
|
||||||
file(GLOB QWT_HEADERS ${QWTBASE}src/*.h)
|
|
||||||
add_library(qwt STATIC ${QWT_SOURCES} ${QWT_HEADERS} )
|
|
||||||
target_include_directories(qwt PUBLIC
|
|
||||||
$<BUILD_INTERFACE:${QWTBASE}/src>
|
|
||||||
)
|
|
||||||
|
|
||||||
target_link_libraries(qwt PUBLIC
|
|
||||||
Qt5::Core
|
|
||||||
Qt5::Gui
|
|
||||||
Qt5::Widgets
|
|
||||||
Qt5::OpenGL
|
|
||||||
Qt5::Concurrent
|
|
||||||
Qt5::PrintSupport
|
|
||||||
Qt5::Svg
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
# Disable all warnings in QWT since we don’t want to patch the library
|
|
||||||
target_compile_options(qwt PRIVATE -w)
|
|
Binary file not shown.
@ -1,110 +0,0 @@
|
|||||||
// SPDX-License-Identifier: LGPL-3.0-or-other
|
|
||||||
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
|
||||||
|
|
||||||
#include <errno.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <math.h>
|
|
||||||
#include <stdarg.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/utsname.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
int main(int argc, char *argv[]) {
|
|
||||||
|
|
||||||
int iarg;
|
|
||||||
char fname[10000];
|
|
||||||
uint64_t word;
|
|
||||||
int val[64];
|
|
||||||
int bit[64];
|
|
||||||
FILE *fdin;
|
|
||||||
|
|
||||||
int nb = 2;
|
|
||||||
int off = 0;
|
|
||||||
int ioff = 0;
|
|
||||||
int dr = 24;
|
|
||||||
int idr = 0;
|
|
||||||
int ib = 0;
|
|
||||||
int iw = 0;
|
|
||||||
bit[0] = 19;
|
|
||||||
bit[1] = 8;
|
|
||||||
// for (iarg=0; iarg<argc; iarg++) printf("%d %s\n",iarg, argv[iarg]);
|
|
||||||
|
|
||||||
if (argc < 2)
|
|
||||||
printf("Error: usage is %s fname [dr off b0 b1 bn]\n");
|
|
||||||
|
|
||||||
if (argc > 2)
|
|
||||||
dr = atoi(argv[2]);
|
|
||||||
if (argc > 3)
|
|
||||||
off = atoi(argv[3]);
|
|
||||||
if (argc > 4) {
|
|
||||||
for (ib = 0; ib < 64; ib++) {
|
|
||||||
if (argc > 4 + ib) {
|
|
||||||
bit[ib] = atoi(argv[4 + ib]);
|
|
||||||
nb++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
idr = 0;
|
|
||||||
for (ib = 0; ib < nb; ib++) {
|
|
||||||
val[ib] = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
fdin = fopen(argv[1], "rb");
|
|
||||||
if (fdin == NULL) {
|
|
||||||
printf("Cannot open input file %s for reading\n", argv[1]);
|
|
||||||
return 200;
|
|
||||||
}
|
|
||||||
|
|
||||||
while (fread((void *)&word, 8, 1, fdin)) {
|
|
||||||
// printf("%llx\n",word);
|
|
||||||
if (ioff < off)
|
|
||||||
ioff++;
|
|
||||||
else {
|
|
||||||
|
|
||||||
for (ib = 0; ib < nb; ib++) {
|
|
||||||
if (word & (1 << bit[ib]))
|
|
||||||
val[ib] |= (1 << idr);
|
|
||||||
}
|
|
||||||
idr++;
|
|
||||||
if (idr == dr) {
|
|
||||||
idr = 0;
|
|
||||||
fprintf(stdout, "%d\t", iw++);
|
|
||||||
for (ib = 0; ib < nb; ib++) {
|
|
||||||
#ifdef HEX
|
|
||||||
fprintf(stdout, "%08llx\t", val[ib]);
|
|
||||||
#else
|
|
||||||
fprintf(stdout, "%lld\t", val[ib]);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
val[ib] = 0;
|
|
||||||
}
|
|
||||||
fprintf(stdout, "\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (idr != 0) {
|
|
||||||
fprintf(stdout, "%d\t", iw++);
|
|
||||||
for (ib = 0; ib < nb; ib++) {
|
|
||||||
#ifdef HEX
|
|
||||||
fprintf(stdout, "%08llx\t", val[ib]);
|
|
||||||
#else
|
|
||||||
fprintf(stdout, "%lld\t", val[ib]);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
val[ib] = 0;
|
|
||||||
}
|
|
||||||
fprintf(stdout, "\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
fclose(fdin);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
@ -1,183 +0,0 @@
|
|||||||
// SPDX-License-Identifier: LGPL-3.0-or-other
|
|
||||||
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
|
||||||
/****************************************************************************
|
|
||||||
usage to generate a patter test.pat from test.p
|
|
||||||
|
|
||||||
gcc -DINFILE="\"test.p\"" -DOUTFILE="\"test.pat\"" -o test.exe generator.c ;
|
|
||||||
./test.exe ; rm test.exe
|
|
||||||
|
|
||||||
|
|
||||||
*************************************************************************/
|
|
||||||
|
|
||||||
#include <errno.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <math.h>
|
|
||||||
#include <stdarg.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/utsname.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
#define MAXLOOPS 6
|
|
||||||
#define MAXTIMERS 6
|
|
||||||
#define MAXWORDS 8191
|
|
||||||
|
|
||||||
uint64_t pat = 0;
|
|
||||||
uint64_t iopat = 0;
|
|
||||||
uint64_t clkpat = 0;
|
|
||||||
|
|
||||||
unsigned iaddr = 0;
|
|
||||||
unsigned waitaddr[MAXTIMERS] = {MAXWORDS, MAXWORDS, MAXWORDS,
|
|
||||||
MAXWORDS, MAXWORDS, MAXWORDS};
|
|
||||||
unsigned startloopaddr[MAXLOOPS] = {MAXWORDS, MAXWORDS, MAXWORDS,
|
|
||||||
MAXWORDS, MAXWORDS, MAXWORDS};
|
|
||||||
unsigned stoploopaddr[MAXLOOPS] = {MAXWORDS, MAXWORDS, MAXWORDS,
|
|
||||||
MAXWORDS, MAXWORDS, MAXWORDS};
|
|
||||||
unsigned start = 0, stop = 0;
|
|
||||||
uint64_t waittime[MAXTIMERS] = {0, 0, 0, 0, 0, 0};
|
|
||||||
unsigned nloop[MAXLOOPS] = {0, 0, 0, 0, 0, 0};
|
|
||||||
|
|
||||||
char infile[10000], outfile[10000];
|
|
||||||
|
|
||||||
FILE *fd, *fd1;
|
|
||||||
uint64_t PAT[MAXWORDS];
|
|
||||||
int iopat_enable = 0;
|
|
||||||
|
|
||||||
int i, ii, iii, j, jj, jjj, pixx, pixy, memx, memy, muxout, memclk, colclk,
|
|
||||||
rowclk, muxclk, memcol, memrow, loopcounter;
|
|
||||||
|
|
||||||
void setstart() { start = iaddr; }
|
|
||||||
|
|
||||||
void setstop() { stop = iaddr; }
|
|
||||||
|
|
||||||
void setinput(int bit) {
|
|
||||||
uint64_t mask = 1;
|
|
||||||
mask = mask << bit;
|
|
||||||
iopat &= ~mask;
|
|
||||||
iopat_enable = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
void setoutput(int bit) {
|
|
||||||
uint64_t mask = 1;
|
|
||||||
mask = mask << bit;
|
|
||||||
iopat |= mask;
|
|
||||||
iopat_enable = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
void clearbit(int bit) {
|
|
||||||
uint64_t mask = 1;
|
|
||||||
mask = mask << bit;
|
|
||||||
pat &= ~mask;
|
|
||||||
}
|
|
||||||
void setbit(int bit) {
|
|
||||||
uint64_t mask = 1;
|
|
||||||
mask = mask << bit;
|
|
||||||
pat |= mask;
|
|
||||||
}
|
|
||||||
|
|
||||||
int checkbit(int bit) {
|
|
||||||
uint64_t mask = 1;
|
|
||||||
mask = mask << bit;
|
|
||||||
return (pat & mask) >> bit;
|
|
||||||
}
|
|
||||||
|
|
||||||
void setstartloop(int iloop) {
|
|
||||||
if (iloop >= 0 && iloop < MAXLOOPS) {
|
|
||||||
startloopaddr[iloop] = iaddr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void setstoploop(int iloop) {
|
|
||||||
if (iloop >= 0 && iloop < MAXLOOPS) {
|
|
||||||
stoploopaddr[iloop] = iaddr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void setnloop(int iloop, int n) {
|
|
||||||
if (iloop >= 0 && iloop < MAXLOOPS) {
|
|
||||||
nloop[iloop] = n;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void setwaitpoint(int iloop) {
|
|
||||||
if (iloop >= 0 && iloop < MAXTIMERS) {
|
|
||||||
waitaddr[iloop] = iaddr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void setwaittime(int iloop, uint64_t t) {
|
|
||||||
if (iloop >= 0 && iloop < MAXTIMERS) {
|
|
||||||
waittime[iloop] = t;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void pw() {
|
|
||||||
if (iaddr < MAXWORDS) {
|
|
||||||
PAT[iaddr] = pat;
|
|
||||||
}
|
|
||||||
fprintf(fd, "patword 0x%04x 0x%016llx\n", iaddr, pat);
|
|
||||||
iaddr++;
|
|
||||||
if (iaddr >= MAXWORDS) {
|
|
||||||
printf("ERROR: too many word in the pattern (%d instead of %d)!", iaddr,
|
|
||||||
MAXWORDS);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int parseCommand(int clk, int cmdbit, int cmd, int length) {
|
|
||||||
int ibit;
|
|
||||||
clearbit(clk);
|
|
||||||
for (ibit = 0; ibit < length; ibit++) {
|
|
||||||
if (cmd & (1 >> ibit)) {
|
|
||||||
setbit(cmdbit);
|
|
||||||
} else {
|
|
||||||
clearbit(cmdbit);
|
|
||||||
}
|
|
||||||
pw();
|
|
||||||
/******/
|
|
||||||
setbit(clk);
|
|
||||||
pw();
|
|
||||||
/******/
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
int main() {
|
|
||||||
int iloop = 0;
|
|
||||||
fd = fopen(OUTFILE, "w");
|
|
||||||
#include INFILE
|
|
||||||
|
|
||||||
fprintf(fd, "patlimits 0x%04x 0x%04x\n", start, stop);
|
|
||||||
|
|
||||||
if (iopat_enable == 1) {
|
|
||||||
fprintf(fd, "patioctrl 0x%016llx\n", iopat);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (iloop = 0; iloop < MAXLOOPS; iloop++) {
|
|
||||||
if ((startloopaddr[iloop] != MAXWORDS) &&
|
|
||||||
(stoploopaddr[iloop] != MAXWORDS)) {
|
|
||||||
fprintf(fd, "patloop %d 0x%04x 0x%04x\n", iloop,
|
|
||||||
startloopaddr[iloop], stoploopaddr[iloop]);
|
|
||||||
if (stoploopaddr[iloop] <= startloopaddr[iloop]) {
|
|
||||||
nloop[iloop] = 0;
|
|
||||||
}
|
|
||||||
fprintf(fd, "patnloop %d %u\n", iloop, nloop[iloop]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (iloop = 0; iloop < MAXTIMERS; iloop++) {
|
|
||||||
if (waitaddr[iloop] != MAXWORDS) {
|
|
||||||
fprintf(fd, "patwait %d 0x%04x\n", iloop, waitaddr[iloop]);
|
|
||||||
fprintf(fd, "patwaittime %d %llu\n", iloop, waittime[iloop]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fclose(fd);
|
|
||||||
fd1 = fopen(OUTFILEBIN, "w");
|
|
||||||
fwrite(PAT, sizeof(uint64_t), iaddr, fd1);
|
|
||||||
fclose(fd1);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
@ -1,4 +0,0 @@
|
|||||||
BIT0 output0 1
|
|
||||||
BIT1 output1 1
|
|
||||||
BIT2 output2 1
|
|
||||||
BIT3 output3 1
|
|
@ -1,97 +0,0 @@
|
|||||||
//define signals and directions (Input, outputs, clocks)
|
|
||||||
|
|
||||||
|
|
||||||
#define output0 0
|
|
||||||
setoutput(output0);
|
|
||||||
|
|
||||||
#define output1 1
|
|
||||||
setoutput(output1);
|
|
||||||
|
|
||||||
#define output2 2
|
|
||||||
setoutput(output2);
|
|
||||||
|
|
||||||
#define output3 3
|
|
||||||
setoutput(output3);
|
|
||||||
|
|
||||||
#define input0 4
|
|
||||||
setinput(input0);
|
|
||||||
|
|
||||||
#define input1 5
|
|
||||||
setinput(input1);
|
|
||||||
|
|
||||||
#define input2 6
|
|
||||||
setinput(input2);
|
|
||||||
|
|
||||||
#define input3 7
|
|
||||||
setinput(input3);
|
|
||||||
|
|
||||||
|
|
||||||
#define PW pw()
|
|
||||||
#define SB(x) setbit(x)
|
|
||||||
#define CB(x) clearbit(x)
|
|
||||||
#define CLOCK clearbit(CLKBIT); pw();setbit(CLKBIT);pw()
|
|
||||||
#define LCLOCK clearbit(CLKBIT); pw();setbit(CLKBIT);pw();clearbit(CLKBIT); pw()
|
|
||||||
#define CLOCKS(x) for (i=0;i<x;i++) {clearbit(CLKBIT);pw(); setbit(CLKBIT); pw();}
|
|
||||||
#define STOP setstop();
|
|
||||||
#define START setstart();
|
|
||||||
#define REPEAT(x) for (i=0;i<(x);i++) {pw();}
|
|
||||||
#define DOFOR(x) for (j=0;j<(x);j++) {
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
#define INST0 CB(output3);CB(output2);CB(output1);CB(output0);PW;
|
|
||||||
#define INST1 CB(output3);CB(output2);CB(output1);SB(output0);PW;
|
|
||||||
#define INST2 CB(output3);CB(output2);SB(output1);CB(output0);PW;
|
|
||||||
#define INST3 CB(output3);CB(output2);SB(output1);SB(output0);PW;
|
|
||||||
#define INST4 CB(output3);SB(output2);CB(output1);CB(output0);PW;
|
|
||||||
#define INST5 CB(output3);SB(output2);CB(output1);SB(output0);PW;
|
|
||||||
#define INST6 CB(output3);SB(output2);SB(output1);CB(output0);PW;
|
|
||||||
#define INST7 CB(output3);SB(output2);SB(output1);SB(output0);PW;
|
|
||||||
#define INST8 SB(output3);CB(output2);CB(output1);CB(output0);PW;
|
|
||||||
#define INST9 SB(output3);CB(output2);CB(output1);SB(output0);PW;
|
|
||||||
#define INST10 SB(output3);CB(output2);SB(output1);CB(output0);PW;
|
|
||||||
#define INST11 SB(output3);CB(output2);SB(output1);SB(output0);PW;
|
|
||||||
#define INST12 SB(output3);SB(output2);CB(output1);CB(output0);PW;
|
|
||||||
|
|
||||||
START;
|
|
||||||
INST0;
|
|
||||||
|
|
||||||
setwaitpoint(0);
|
|
||||||
setwaittime(0,5);
|
|
||||||
INST1;
|
|
||||||
|
|
||||||
setstartloop(5);
|
|
||||||
setnloop(5,2);
|
|
||||||
INST2;
|
|
||||||
|
|
||||||
setstartloop(0);
|
|
||||||
setnloop(0,2);
|
|
||||||
INST3;
|
|
||||||
|
|
||||||
INST4;
|
|
||||||
|
|
||||||
setstoploop(0);
|
|
||||||
setstoploop(5);
|
|
||||||
INST5;
|
|
||||||
|
|
||||||
INST6;
|
|
||||||
|
|
||||||
setwaitpoint(4);
|
|
||||||
setwaittime(1,0);
|
|
||||||
INST7;
|
|
||||||
|
|
||||||
INST8;
|
|
||||||
|
|
||||||
setstartloop(2);
|
|
||||||
setnloop(2,0);
|
|
||||||
INST9;
|
|
||||||
|
|
||||||
INST10;
|
|
||||||
|
|
||||||
setstoploop(2);
|
|
||||||
INST11;
|
|
||||||
|
|
||||||
STOP;
|
|
||||||
INST12;
|
|
||||||
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
|||||||
patword 0x0000 0x0000000000000000
|
|
||||||
patword 0x0001 0x0000000000000001
|
|
||||||
patword 0x0002 0x0000000000000002
|
|
||||||
patword 0x0003 0x0000000000000003
|
|
||||||
patword 0x0004 0x0000000000000004
|
|
||||||
patword 0x0005 0x0000000000000005
|
|
||||||
patword 0x0006 0x0000000000000006
|
|
||||||
patword 0x0007 0x0000000000000007
|
|
||||||
patword 0x0008 0x0000000000000008
|
|
||||||
patword 0x0009 0x0000000000000009
|
|
||||||
patword 0x000a 0x000000000000000a
|
|
||||||
patword 0x000b 0x000000000000000b
|
|
||||||
patword 0x000c 0x000000000000000c
|
|
||||||
patlimits 0x0000 0x000c
|
|
||||||
patioctrl 0x000000000000000f
|
|
||||||
patloop 0 0x0003 0x0005
|
|
||||||
patnloop 0 2
|
|
||||||
patloop 2 0x0009 0x000b
|
|
||||||
patnloop 2 0
|
|
||||||
patloop 5 0x0002 0x0005
|
|
||||||
patnloop 5 2
|
|
||||||
patwait 0 0x0001
|
|
||||||
patwaittime 0 5
|
|
||||||
patwait 4 0x0007
|
|
||||||
patwaittime 4 0
|
|
Binary file not shown.
Before Width: | Height: | Size: 334 KiB |
@ -1,584 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
"""
|
|
||||||
Created on Wed May 24 09:44:53 2017
|
|
||||||
|
|
||||||
Plot the pattern for New Chip Test Box (.pat)
|
|
||||||
|
|
||||||
Changes:
|
|
||||||
- 2017-11-21 Adapt it to python-3
|
|
||||||
- 2017-09-25 All can be plotted
|
|
||||||
- 2017-09-22 Can be plotted but the loop and wait not work yet
|
|
||||||
|
|
||||||
@author: zhang_j1
|
|
||||||
"""
|
|
||||||
import matplotlib.pyplot as plt
|
|
||||||
from numpy import *
|
|
||||||
from matplotlib.pyplot import *
|
|
||||||
from matplotlib.patches import Rectangle
|
|
||||||
import os
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# Input the folder of the pattern file
|
|
||||||
Folder = "./patterns/"
|
|
||||||
# Prefix name of the .pat and .alias file
|
|
||||||
File_pat = "test_v2"
|
|
||||||
|
|
||||||
# COLORS AND LINE STYLES
|
|
||||||
# alternating colors of the plots (2 needed)
|
|
||||||
colors_plot = ['tab:blue', 'tab:orange']
|
|
||||||
|
|
||||||
# Wait colors and line styles (6 needed from 0 to 5)
|
|
||||||
colors_wait = ['b', 'g', 'r', 'c', 'm', 'y']
|
|
||||||
linestyles_wait = ['--', '--', '--', '--', '--', '--']
|
|
||||||
alpha_wait = [0.5, 0.5, 0.5, 0.5, 0.5, 0.5]
|
|
||||||
alpha_wait_rect = [0.2, 0.2, 0.2, 0.2, 0.2, 0.2]
|
|
||||||
|
|
||||||
# Loop colors and line styles (6 needed from 0 to 5)
|
|
||||||
colors_loop = ['tab:green', 'tab:red', 'tab:purple', 'tab:brown', 'tab:ping', 'tab:grey']
|
|
||||||
linestyles_loop = ['-.', '-.', '-.', '-.', '-.', '-.']
|
|
||||||
alpha_loop = [0.5, 0.5, 0.5, 0.5, 0.5, 0.5]
|
|
||||||
alpha_loop_rect = [0.2, 0.2, 0.2, 0.2, 0.2, 0.2]
|
|
||||||
|
|
||||||
# Display the count of clocks
|
|
||||||
clock_vertical_lines_spacing = 1
|
|
||||||
show_clocks_number = True
|
|
||||||
|
|
||||||
# Verbosity
|
|
||||||
verbose = False
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
|
|
||||||
# Define a hex to binary function
|
|
||||||
# global definition
|
|
||||||
# base = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F]
|
|
||||||
base = [str(x) for x in range(10)] + [chr(x) for x in range(ord('A'), ord('A')+6)]
|
|
||||||
# dec2bin
|
|
||||||
|
|
||||||
|
|
||||||
def dec2bin(string_num):
|
|
||||||
num = int(string_num)
|
|
||||||
mid = []
|
|
||||||
while True:
|
|
||||||
if num == 0:
|
|
||||||
break
|
|
||||||
num, rem = divmod(num, 2)
|
|
||||||
mid.append(base[rem])
|
|
||||||
|
|
||||||
return ''.join([str(x) for x in mid[::-1]])
|
|
||||||
|
|
||||||
|
|
||||||
# dec2binary: better than dec2bin
|
|
||||||
def dec2binary(dec_num, width=None):
|
|
||||||
return binary_repr(int(dec_num), width=width)
|
|
||||||
|
|
||||||
|
|
||||||
# hex2dec
|
|
||||||
def hex2dec(string_num):
|
|
||||||
return str(int(string_num.upper(), 16))
|
|
||||||
|
|
||||||
|
|
||||||
# hex2bin
|
|
||||||
def hex2bin(string_num):
|
|
||||||
return dec2bin(hex2dec(string_num.upper()))
|
|
||||||
|
|
||||||
|
|
||||||
# hex2bin
|
|
||||||
def hex2binary(string_num, width=None):
|
|
||||||
return dec2binary(hex2dec(string_num.upper()), width=width)
|
|
||||||
|
|
||||||
|
|
||||||
# Look at the alias file and generate the lookup table for pin names
|
|
||||||
# Create a 64 bit look up table
|
|
||||||
table = []
|
|
||||||
for i in range(64):
|
|
||||||
# for special bit
|
|
||||||
if i+1 == 59:
|
|
||||||
table.append([str(i+1), "external_trigger"])
|
|
||||||
elif i+1 == 63:
|
|
||||||
table.append([str(i+1), "adc_enable"])
|
|
||||||
elif i+1 == 62:
|
|
||||||
table.append([str(i+1), "dbit_enable"])
|
|
||||||
else:
|
|
||||||
table.append([str(i+1), ""])
|
|
||||||
|
|
||||||
# Loop all lines
|
|
||||||
with open(Folder+"/" + File_pat + ".alias") as f:
|
|
||||||
lines = f.readlines()
|
|
||||||
f.close()
|
|
||||||
|
|
||||||
nlines = len(lines)
|
|
||||||
for i in range(nlines):
|
|
||||||
# whether the line is bit definition
|
|
||||||
if lines[i][0:3] == "BIT":
|
|
||||||
# split words
|
|
||||||
words = lines[i].split()
|
|
||||||
bit_num = int(words[0][3:])
|
|
||||||
table[bit_num][0] = words[0][3:]
|
|
||||||
table[bit_num][1] = words[1]
|
|
||||||
if verbose:
|
|
||||||
print(table)
|
|
||||||
|
|
||||||
|
|
||||||
# Load the pattern and get all lines
|
|
||||||
# Loop all lines
|
|
||||||
with open(Folder+"/"+File_pat+".pat") as f_pat:
|
|
||||||
lines_pat = f_pat.readlines()
|
|
||||||
f_pat.close()
|
|
||||||
|
|
||||||
# number of lines for pattern file
|
|
||||||
nlines_pat = len(lines_pat)
|
|
||||||
# a counter
|
|
||||||
cnt = 0
|
|
||||||
if verbose:
|
|
||||||
print("The total number of lines of pattern:", nlines_pat)
|
|
||||||
# Loop all lines of pattern
|
|
||||||
waittime0 = None
|
|
||||||
waittime1 = None
|
|
||||||
waittime2 = None
|
|
||||||
waittime3 = None
|
|
||||||
waittime4 = None
|
|
||||||
waittime5 = None
|
|
||||||
|
|
||||||
nloop0 = None
|
|
||||||
nloop1 = None
|
|
||||||
nloop2 = None
|
|
||||||
nloop3 = None
|
|
||||||
nloop4 = None
|
|
||||||
nloop5 = None
|
|
||||||
|
|
||||||
for k in range(nlines_pat):
|
|
||||||
# content of line
|
|
||||||
words_line = lines_pat[k].split()
|
|
||||||
if words_line[0] == "patword":
|
|
||||||
# print words_line from b0 to b63
|
|
||||||
bits = hex2binary(words_line[-1], 64)[::-1]
|
|
||||||
if verbose:
|
|
||||||
print("The bits for line-", k+1, "is:", bits)
|
|
||||||
# convert string bits to decimal array
|
|
||||||
num_bits = array(list(map(str, bits)), dtype="uint16")
|
|
||||||
if cnt == 0:
|
|
||||||
mat_pat = num_bits
|
|
||||||
else:
|
|
||||||
# add bits to matrix
|
|
||||||
mat_pat = concatenate((mat_pat, num_bits), axis=0)
|
|
||||||
cnt = cnt + 1
|
|
||||||
# print("The matrix of pattern:", mat_pat.reshape(int(cnt), int(len(num_bits))))
|
|
||||||
|
|
||||||
# Look at the io: 0 for sending to ASIC, 1 for reading from ASIC
|
|
||||||
if words_line[0] == "patioctrl":
|
|
||||||
# print words_line
|
|
||||||
if verbose:
|
|
||||||
print(words_line[-1])
|
|
||||||
bits = hex2binary(words_line[-1], 64)[::-1]
|
|
||||||
if verbose:
|
|
||||||
print(bits)
|
|
||||||
# convert string bits to decimal array
|
|
||||||
out_bits = array(list(map(str, bits)), dtype="uint16")
|
|
||||||
|
|
||||||
if verbose:
|
|
||||||
print(words_line)
|
|
||||||
# Deal with waiting point
|
|
||||||
|
|
||||||
# ====== WAIT ======
|
|
||||||
if words_line[0] == "patwait" and words_line[1] == "0":
|
|
||||||
wait0 = int(hex2dec(words_line[2]))
|
|
||||||
if verbose:
|
|
||||||
print("wait 0 at:", wait0)
|
|
||||||
if words_line[0] == "patwaittime" and words_line[1] == "0":
|
|
||||||
waittime0 = int(words_line[2])
|
|
||||||
if verbose:
|
|
||||||
print("wait 0 for:", waittime0)
|
|
||||||
|
|
||||||
if words_line[0] == "patwait" and words_line[1] == "1":
|
|
||||||
wait1 = int(hex2dec(words_line[2]))
|
|
||||||
if verbose:
|
|
||||||
print("wait 1 at:", wait1)
|
|
||||||
if words_line[0] == "patwaittime" and words_line[1] == "1":
|
|
||||||
waittime1 = int(words_line[2])
|
|
||||||
if verbose:
|
|
||||||
print("wait 1 for:", waittime1)
|
|
||||||
|
|
||||||
if words_line[0] == "patwait" and words_line[1] == "2":
|
|
||||||
wait2 = int(hex2dec(words_line[2]))
|
|
||||||
if verbose:
|
|
||||||
print("wait 2 at:", wait2)
|
|
||||||
if words_line[0] == "patwaittime" and words_line[1] == "2":
|
|
||||||
waittime2 = int(words_line[2])
|
|
||||||
if verbose:
|
|
||||||
print("wait 2 for:", waittime2)
|
|
||||||
|
|
||||||
if words_line[0] == "patwait" and words_line[1] == "3":
|
|
||||||
wait3 = int(hex2dec(words_line[2]))
|
|
||||||
if verbose:
|
|
||||||
print("wait 0 at:", wait3)
|
|
||||||
if words_line[0] == "patwaittime" and words_line[1] == "3":
|
|
||||||
waittime3 = int(words_line[2])
|
|
||||||
if verbose:
|
|
||||||
print("wait 0 for:", waittime3)
|
|
||||||
|
|
||||||
if words_line[0] == "patwait" and words_line[1] == "4":
|
|
||||||
wait4 = int(hex2dec(words_line[2]))
|
|
||||||
if verbose:
|
|
||||||
print("wait 1 at:", wait4)
|
|
||||||
if words_line[0] == "patwaittime" and words_line[1] == "4":
|
|
||||||
waittime4 = int(words_line[2])
|
|
||||||
if verbose:
|
|
||||||
print("wait 1 for:", waittime4)
|
|
||||||
|
|
||||||
if words_line[0] == "patwait" and words_line[1] == "5":
|
|
||||||
wait5 = int(hex2dec(words_line[2]))
|
|
||||||
if verbose:
|
|
||||||
print("wait 2 at:", wait5)
|
|
||||||
if words_line[0] == "patwaittime" and words_line[1] == "5":
|
|
||||||
waittime5 = int(words_line[2])
|
|
||||||
if verbose:
|
|
||||||
print("wait 2 for:", waittime5)
|
|
||||||
|
|
||||||
# ====== LOOPS ======
|
|
||||||
if words_line[0] == "patloop" and words_line[1] == "0":
|
|
||||||
loop0_start = int(hex2dec(words_line[2]))
|
|
||||||
loop0_end = int(hex2dec(words_line[3]))
|
|
||||||
if verbose:
|
|
||||||
print("loop 0 start:", loop0_start, ", end:", loop0_end)
|
|
||||||
if words_line[0] == "patnloop" and words_line[1] == "0":
|
|
||||||
nloop0 = int(words_line[2])
|
|
||||||
if verbose:
|
|
||||||
print("loop 0 times:", nloop0)
|
|
||||||
|
|
||||||
if words_line[0] == "patloop" and words_line[1] == "1":
|
|
||||||
loop1_start = int(hex2dec(words_line[2]))
|
|
||||||
loop1_end = int(hex2dec(words_line[3]))
|
|
||||||
if verbose:
|
|
||||||
print("loop 1 start:", loop1_start, ", end:", loop1_end)
|
|
||||||
if words_line[0] == "patnloop" and words_line[1] == "1":
|
|
||||||
nloop1 = int(words_line[2])
|
|
||||||
if verbose:
|
|
||||||
print("loop 1 times:", nloop1)
|
|
||||||
|
|
||||||
if words_line[0] == "patloop" and words_line[1] == "2":
|
|
||||||
loop2_start = int(hex2dec(words_line[2]))
|
|
||||||
loop2_end = int(hex2dec(words_line[3]))
|
|
||||||
if verbose:
|
|
||||||
print("loop 2 start:", loop2_start, ", end:", loop2_end)
|
|
||||||
if words_line[0] == "patnloop" and words_line[1] == "2":
|
|
||||||
nloop2 = int(words_line[2])
|
|
||||||
if verbose:
|
|
||||||
print("loop 2 times:", nloop2)
|
|
||||||
|
|
||||||
if words_line[0] == "patloop" and words_line[1] == "3":
|
|
||||||
loop3_start = int(hex2dec(words_line[2]))
|
|
||||||
loop3_end = int(hex2dec(words_line[3]))
|
|
||||||
if verbose:
|
|
||||||
print("loop 3 start:", loop3_start, ", end:", loop3_end)
|
|
||||||
if words_line[0] == "patnloop" and words_line[1] == "3":
|
|
||||||
nloop3 = int(words_line[2])
|
|
||||||
if verbose:
|
|
||||||
print("loop 3 times:", nloop3)
|
|
||||||
|
|
||||||
if words_line[0] == "patloop" and words_line[1] == "4":
|
|
||||||
loop4_start = int(hex2dec(words_line[2]))
|
|
||||||
loop4_end = int(hex2dec(words_line[3]))
|
|
||||||
if verbose:
|
|
||||||
print("loop 4 start:", loop4_start, ", end:", loop4_end)
|
|
||||||
if words_line[0] == "patnloop" and words_line[1] == "4":
|
|
||||||
nloop4 = int(words_line[2])
|
|
||||||
if verbose:
|
|
||||||
print("loop 4 times:", nloop4)
|
|
||||||
|
|
||||||
if words_line[0] == "patloop" and words_line[1] == "5":
|
|
||||||
loop5_start = int(hex2dec(words_line[2]))
|
|
||||||
loop5_end = int(hex2dec(words_line[3]))
|
|
||||||
if verbose:
|
|
||||||
print("loop 5 start:", loop5_start, ", end:", loop5_end)
|
|
||||||
if words_line[0] == "patnloop" and words_line[1] == "5":
|
|
||||||
nloop5 = int(words_line[2])
|
|
||||||
if verbose:
|
|
||||||
print("loop 5 times:", nloop5)
|
|
||||||
# print(out_bits)
|
|
||||||
|
|
||||||
# internal counter
|
|
||||||
avail_index = []
|
|
||||||
avail_name = []
|
|
||||||
# Remove non-used bits
|
|
||||||
for i in range(64):
|
|
||||||
# if out_bits[0][i] == 1:
|
|
||||||
if out_bits[i] == 1:
|
|
||||||
avail_index.append(i)
|
|
||||||
avail_name.append(table[i][1])
|
|
||||||
if verbose:
|
|
||||||
print(avail_index)
|
|
||||||
print(avail_name)
|
|
||||||
|
|
||||||
# number of effective used bits
|
|
||||||
nbiteff = len(avail_name)
|
|
||||||
|
|
||||||
# subMat = mat_ext[:,index]
|
|
||||||
# print(mat_pat.shape)
|
|
||||||
subMat = mat_pat.reshape(int(cnt), int(len(num_bits)))[0:, avail_index]
|
|
||||||
# subMat = mat_pat[avail_index]
|
|
||||||
timing = linspace(0, subMat.shape[0]-1, subMat.shape[0])
|
|
||||||
rcParams['figure.figsize'] = 15, 5
|
|
||||||
|
|
||||||
|
|
||||||
# ============= PLOTTING =============
|
|
||||||
|
|
||||||
rcParams["font.weight"] = "bold"
|
|
||||||
rcParams["axes.labelweight"] = "bold"
|
|
||||||
fig2, axs2 = subplots(nbiteff, sharex='all')
|
|
||||||
subplots_adjust(wspace=0, hspace=0)
|
|
||||||
# axs2[nbiteff - 1].set(xlabel='Timing [clk]')
|
|
||||||
for idx, i in enumerate(range(nbiteff)):
|
|
||||||
|
|
||||||
axs2[idx].plot(subMat.T[i], "-", drawstyle="steps-post", linewidth=2.0, color=colors_plot[idx % 2])
|
|
||||||
x_additional = range(len(subMat.T[i]) - 1, len(subMat.T[i]) + 2)
|
|
||||||
additional_stuff = [subMat.T[i][-1]] * 3
|
|
||||||
|
|
||||||
axs2[idx].plot(x_additional, additional_stuff,
|
|
||||||
"--", drawstyle="steps-post", linewidth=2.0, color=colors_plot[idx % 2], alpha=0.5)
|
|
||||||
axs2[idx].yaxis.set_ticks([0.5], minor=False)
|
|
||||||
axs2[idx].xaxis.set_ticks(arange(0, len(subMat.T[i]) + 10, clock_vertical_lines_spacing))
|
|
||||||
|
|
||||||
axs2[idx].yaxis.set_ticklabels([avail_name[i]])
|
|
||||||
axs2[idx].get_yticklabels()[0].set_color(colors_plot[idx % 2])
|
|
||||||
|
|
||||||
axs2[idx].grid(1, 'both', 'both', alpha=0.5)
|
|
||||||
axs2[idx].yaxis.grid(which="both", color=colors_plot[idx % 2], alpha=0.2)
|
|
||||||
if idx != nbiteff - 1:
|
|
||||||
if not show_clocks_number:
|
|
||||||
axs2[idx].xaxis.set_ticklabels([])
|
|
||||||
axs2[idx].set(xlabel=' ', ylim=(-0.2, 1.2))
|
|
||||||
else:
|
|
||||||
axs2[idx].set(xlabel='Timing [clk]', ylim=(-0.2, 1.2))
|
|
||||||
# axs2[idx].set_xlim(left=0)
|
|
||||||
axs2[idx].set_xlim(left=0, right=len(subMat.T[i]) + 1)
|
|
||||||
axs2[idx].spines['top'].set_visible(False)
|
|
||||||
axs2[idx].spines['right'].set_alpha(0.2)
|
|
||||||
axs2[idx].spines['right'].set_visible(True)
|
|
||||||
axs2[idx].spines['bottom'].set_visible(False)
|
|
||||||
axs2[idx].spines['left'].set_visible(False)
|
|
||||||
|
|
||||||
# =====================================================================================================
|
|
||||||
# Plot the wait lines
|
|
||||||
# Wait 0
|
|
||||||
if waittime0 is not None:
|
|
||||||
if waittime0 == 0:
|
|
||||||
axs2[idx].plot([wait0, wait0], [-10, 10],
|
|
||||||
linestyle=linestyles_wait[0], color=colors_wait[0], alpha=alpha_wait[0], linewidth=2.0)
|
|
||||||
axs2[idx].plot([wait0 + 1, wait0 + 1], [-10, 10],
|
|
||||||
linestyle=linestyles_wait[0], color=colors_wait[0], linewidth=2.0, alpha=alpha_wait[0])
|
|
||||||
axs2[idx].add_patch(Rectangle((wait0, -10), 1, 20,
|
|
||||||
label="wait 0: skipped" if idx == 0 else "",
|
|
||||||
facecolor=colors_wait[0], alpha=alpha_wait_rect[0], hatch='\\\\'))
|
|
||||||
else:
|
|
||||||
axs2[idx].plot([wait0, wait0], [-10, 10],
|
|
||||||
linestyle=linestyles_wait[0], color=colors_wait[0],
|
|
||||||
label="wait 0: " + str(waittime0) + " clk" if idx == 0 else "",
|
|
||||||
linewidth=2.0, alpha=alpha_wait[0])
|
|
||||||
|
|
||||||
# Wait 1
|
|
||||||
if waittime1 is not None:
|
|
||||||
if waittime1 == 0:
|
|
||||||
axs2[idx].plot([wait1, wait1], [-10, 10],
|
|
||||||
linestyle=linestyles_wait[1], color=colors_wait[1], alpha=alpha_wait[1], linewidth=2.0)
|
|
||||||
axs2[idx].plot([wait1 + 1, wait1 + 1], [-10, 10],
|
|
||||||
linestyle=linestyles_wait[1], color=colors_wait[1], linewidth=2.0, alpha=alpha_wait[1])
|
|
||||||
axs2[idx].add_patch(Rectangle((wait1, -10), 1, 20,
|
|
||||||
label="wait 1: skipped" if idx == 0 else "",
|
|
||||||
facecolor=colors_wait[1], alpha=alpha_wait_rect[1], hatch='\\\\'))
|
|
||||||
else:
|
|
||||||
axs2[idx].plot([wait1, wait1], [-10, 10],
|
|
||||||
linestyle=linestyles_wait[1], color=colors_wait[1],
|
|
||||||
label="wait 1: " + str(waittime1) + " clk" if idx == 0 else "",
|
|
||||||
linewidth=2.0, alpha=alpha_wait[1])
|
|
||||||
|
|
||||||
# Wait 2
|
|
||||||
if waittime2 is not None:
|
|
||||||
if waittime2 == 0:
|
|
||||||
axs2[idx].plot([wait2, wait2], [-10, 10],
|
|
||||||
linestyle=linestyles_wait[2], color=colors_wait[2], alpha=alpha_wait[2], linewidth=2.0)
|
|
||||||
axs2[idx].plot([wait2 + 1, wait2 + 1], [-10, 10],
|
|
||||||
linestyle=linestyles_wait[2], color=colors_wait[2], linewidth=2.0, alpha=alpha_wait[2])
|
|
||||||
axs2[idx].add_patch(Rectangle((wait2, -10), 1, 20,
|
|
||||||
label="wait 2: skipped" if idx == 0 else "",
|
|
||||||
facecolor=colors_wait[2], alpha=alpha_wait_rect[2], hatch='\\\\'))
|
|
||||||
else:
|
|
||||||
axs2[idx].plot([wait2, wait2], [-10, 10],
|
|
||||||
linestyle=linestyles_wait[2], color=colors_wait[2],
|
|
||||||
label="wait 2: " + str(waittime2) + " clk" if idx == 0 else "",
|
|
||||||
linewidth=2.0, alpha=alpha_wait[2])
|
|
||||||
|
|
||||||
# Wait 3
|
|
||||||
if waittime3 is not None:
|
|
||||||
if waittime3 == 0:
|
|
||||||
axs2[idx].plot([wait3, wait3], [-10, 10],
|
|
||||||
linestyle=linestyles_wait[3], color=colors_wait[3], alpha=alpha_wait[3], linewidth=2.0)
|
|
||||||
axs2[idx].plot([wait3 + 1, wait3 + 1], [-10, 10],
|
|
||||||
linestyle=linestyles_wait[3], color=colors_wait[3], linewidth=2.0, alpha=alpha_wait[3])
|
|
||||||
axs2[idx].add_patch(Rectangle((wait3, -10), 1, 20,
|
|
||||||
label="wait 3: skipped" if idx == 0 else "",
|
|
||||||
facecolor=colors_wait[3], alpha=alpha_wait_rect[3], hatch='\\\\'))
|
|
||||||
else:
|
|
||||||
axs2[idx].plot([wait3, wait3], [-10, 10],
|
|
||||||
linestyle=linestyles_wait[3], color=colors_wait[3],
|
|
||||||
label="wait 3: " + str(waittime3) + " clk" if idx == 0 else "",
|
|
||||||
linewidth=2.0, alpha=alpha_wait[3])
|
|
||||||
|
|
||||||
# Wait 4
|
|
||||||
if waittime4 is not None:
|
|
||||||
if waittime4 == 0:
|
|
||||||
axs2[idx].plot([wait4, wait4], [-10, 10],
|
|
||||||
linestyle=linestyles_wait[4], color=colors_wait[4], alpha=alpha_wait[4], linewidth=2.0)
|
|
||||||
axs2[idx].plot([wait4 + 1, wait4 + 1], [-10, 10],
|
|
||||||
linestyle=linestyles_wait[4], color=colors_wait[4], linewidth=2.0, alpha=alpha_wait[4])
|
|
||||||
axs2[idx].add_patch(Rectangle((wait4, -10), 1, 20,
|
|
||||||
label="wait 4: skipped" if idx == 0 else "",
|
|
||||||
facecolor=colors_wait[4], alpha=alpha_wait_rect[4], hatch='\\\\'))
|
|
||||||
else:
|
|
||||||
axs2[idx].plot([wait4, wait4], [-10, 10],
|
|
||||||
linestyle=linestyles_wait[4], color=colors_wait[4],
|
|
||||||
label="wait 4: " + str(waittime4) + " clk" if idx == 0 else "",
|
|
||||||
linewidth=2.0, alpha=alpha_wait[4])
|
|
||||||
|
|
||||||
# Wait 5
|
|
||||||
if waittime5 is not None:
|
|
||||||
if waittime5 == 0:
|
|
||||||
axs2[idx].plot([wait5, wait5], [-10, 10],
|
|
||||||
linestyle=linestyles_wait[5], color=colors_wait[5], alpha=alpha_wait[5], linewidth=2.0)
|
|
||||||
axs2[idx].plot([wait5 + 1, wait5 + 1], [-10, 10],
|
|
||||||
linestyle=linestyles_wait[5], color=colors_wait[5], linewidth=2.0, alpha=alpha_wait[5])
|
|
||||||
axs2[idx].add_patch(Rectangle((wait5, -10), 1, 20,
|
|
||||||
label="wait 5: skipped" if idx == 0 else "",
|
|
||||||
facecolor=colors_wait[5], alpha=alpha_wait_rect[5], hatch='\\\\'))
|
|
||||||
else:
|
|
||||||
axs2[idx].plot([wait5, wait5], [-10, 10],
|
|
||||||
linestyle=linestyles_wait[5], color=colors_wait[5],
|
|
||||||
label="wait 5: " + str(waittime5) + " clk" if idx == 0 else "",
|
|
||||||
linewidth=2.0, alpha=alpha_wait[5])
|
|
||||||
|
|
||||||
# =====================================================================================================
|
|
||||||
# Plot the loop lines
|
|
||||||
# Loop 0
|
|
||||||
if nloop0 is not None:
|
|
||||||
if nloop0 == 0:
|
|
||||||
axs2[idx].plot([loop0_start, loop0_start], [-10, 10],
|
|
||||||
linestyle=linestyles_loop[0], color=colors_loop[0],
|
|
||||||
alpha=alpha_loop[0], linewidth=2.0)
|
|
||||||
axs2[idx].plot([loop0_end + 1, loop0_end + 1], [-10, 10],
|
|
||||||
linestyle=linestyles_loop[0], color=colors_loop[0], alpha=alpha_loop[0], linewidth=2.0)
|
|
||||||
axs2[idx].add_patch(Rectangle((loop0_start, -10), loop0_end + 1 - loop0_start, 20,
|
|
||||||
label="loop 0: skipped" if idx == 0 else "",
|
|
||||||
facecolor=colors_loop[0], alpha=alpha_loop_rect[0], hatch='//'))
|
|
||||||
else:
|
|
||||||
axs2[idx].plot([loop0_start, loop0_start], [-10, 10],
|
|
||||||
linestyle=linestyles_loop[0], color=colors_loop[0], alpha=alpha_loop[0],
|
|
||||||
label="loop 0: " + str(nloop0) + " times" if idx == 0 else "", linewidth=2.0)
|
|
||||||
axs2[idx].plot([loop0_end, loop0_end], [-10, 10],
|
|
||||||
linestyle=linestyles_loop[0], color=colors_loop[0], alpha=alpha_loop[0], linewidth=2.0)
|
|
||||||
|
|
||||||
# Loop 1
|
|
||||||
if nloop1 is not None:
|
|
||||||
if nloop1 == 0:
|
|
||||||
axs2[idx].plot([loop1_start, loop1_start], [-10, 10],
|
|
||||||
linestyle=linestyles_loop[1], color=colors_loop[1],
|
|
||||||
alpha=alpha_loop[1], linewidth=2.0)
|
|
||||||
axs2[idx].plot([loop1_end + 1, loop1_end + 1], [-10, 10],
|
|
||||||
linestyle=linestyles_loop[1], color=colors_loop[1], alpha=alpha_loop[1], linewidth=2.0)
|
|
||||||
axs2[idx].add_patch(Rectangle((loop1_start, -10), loop1_end + 1 - loop1_start, 20,
|
|
||||||
label="loop 1: skipped" if idx == 0 else "",
|
|
||||||
facecolor=colors_loop[1], alpha=alpha_loop_rect[1], hatch='//'))
|
|
||||||
else:
|
|
||||||
axs2[idx].plot([loop1_start, loop1_start], [-10, 10],
|
|
||||||
linestyle=linestyles_loop[1], color=colors_loop[1], alpha=alpha_loop[1],
|
|
||||||
label="loop 1: " + str(nloop1) + " times" if idx == 0 else "", linewidth=2.0)
|
|
||||||
axs2[idx].plot([loop1_end, loop1_end], [-10, 10],
|
|
||||||
linestyle=linestyles_loop[1], color=colors_loop[1], alpha=alpha_loop[1], linewidth=2.0)
|
|
||||||
|
|
||||||
# Loop 2
|
|
||||||
if nloop2 is not None:
|
|
||||||
if nloop2 == 0:
|
|
||||||
axs2[idx].plot([loop2_start, loop2_start], [-10, 10],
|
|
||||||
linestyle=linestyles_loop[2], color=colors_loop[2],
|
|
||||||
alpha=alpha_loop[2], linewidth=2.0)
|
|
||||||
axs2[idx].plot([loop2_end + 1, loop2_end + 1], [-10, 10],
|
|
||||||
linestyle=linestyles_loop[2], color=colors_loop[2], alpha=alpha_loop[2], linewidth=2.0)
|
|
||||||
axs2[idx].add_patch(Rectangle((loop2_start, -10), loop2_end + 1 - loop2_start, 20,
|
|
||||||
label="loop 2: skipped" if idx == 0 else "",
|
|
||||||
facecolor=colors_loop[2], alpha=alpha_loop_rect[2], hatch='//'))
|
|
||||||
else:
|
|
||||||
axs2[idx].plot([loop2_start, loop2_start], [-10, 10],
|
|
||||||
linestyle=linestyles_loop[2], color=colors_loop[2], alpha=alpha_loop[2],
|
|
||||||
label="loop 2: " + str(nloop2) + " times" if idx == 0 else "", linewidth=2.0)
|
|
||||||
axs2[idx].plot([loop2_end, loop2_end], [-10, 10],
|
|
||||||
linestyle=linestyles_loop[0], color=colors_loop[0], alpha=alpha_loop[2], linewidth=2.0)
|
|
||||||
|
|
||||||
# Loop 3
|
|
||||||
if nloop3 is not None:
|
|
||||||
if nloop3 == 0:
|
|
||||||
axs2[idx].plot([loop3_start, loop3_start], [-10, 10],
|
|
||||||
linestyle=linestyles_loop[3], color=colors_loop[3],
|
|
||||||
alpha=alpha_loop[3], linewidth=2.0)
|
|
||||||
axs2[idx].plot([loop3_end + 1, loop3_end + 1], [-10, 10],
|
|
||||||
linestyle=linestyles_loop[3], color=colors_loop[3], alpha=alpha_loop[3], linewidth=2.0)
|
|
||||||
axs2[idx].add_patch(Rectangle((loop3_start, -10), loop3_end + 1 - loop3_start, 20,
|
|
||||||
label="loop 3: skipped" if idx == 0 else "",
|
|
||||||
facecolor=colors_loop[3], alpha=alpha_loop_rect[3], hatch='//'))
|
|
||||||
else:
|
|
||||||
axs2[idx].plot([loop3_start, loop3_start], [-10, 10],
|
|
||||||
linestyle=linestyles_loop[3], color=colors_loop[3], alpha=alpha_loop[3],
|
|
||||||
label="loop 3: " + str(nloop3) + " times" if idx == 0 else "", linewidth=2.0)
|
|
||||||
axs2[idx].plot([loop3_end, loop3_end], [-10, 10],
|
|
||||||
linestyle=linestyles_loop[3], color=colors_loop[3], alpha=alpha_loop[3], linewidth=2.0)
|
|
||||||
|
|
||||||
# Loop 4
|
|
||||||
if nloop4 is not None:
|
|
||||||
if nloop4 == 0:
|
|
||||||
axs2[idx].plot([loop4_start, loop4_start], [-10, 10],
|
|
||||||
linestyle=linestyles_loop[4], color=colors_loop[4],
|
|
||||||
alpha=alpha_loop[4], linewidth=2.0)
|
|
||||||
axs2[idx].plot([loop4_end + 1, loop4_end + 1], [-10, 10],
|
|
||||||
linestyle=linestyles_loop[4], color=colors_loop[4], alpha=alpha_loop[4], linewidth=2.0)
|
|
||||||
axs2[idx].add_patch(Rectangle((loop4_start, -10), loop4_end + 1 - loop4_start, 20,
|
|
||||||
label="loop 4: skipped" if idx == 0 else "",
|
|
||||||
facecolor=colors_loop[4], alpha=alpha_loop_rect[4], hatch='//'))
|
|
||||||
else:
|
|
||||||
axs2[idx].plot([loop4_start, loop4_start], [-10, 10],
|
|
||||||
linestyle=linestyles_loop[4], color=colors_loop[4], alpha=alpha_loop[4],
|
|
||||||
label="loop 4: " + str(nloop4) + " times" if idx == 0 else "", linewidth=2.0)
|
|
||||||
axs2[idx].plot([loop4_end, loop4_end], [-10, 10],
|
|
||||||
linestyle=linestyles_loop[4], color=colors_loop[4], alpha=alpha_loop[4], linewidth=2.0)
|
|
||||||
|
|
||||||
# Loop 5
|
|
||||||
if nloop5 is not None:
|
|
||||||
if nloop5 == 0:
|
|
||||||
axs2[idx].plot([loop5_start, loop5_start], [-10, 10],
|
|
||||||
linestyle=linestyles_loop[5], color=colors_loop[5],
|
|
||||||
alpha=alpha_loop[5], linewidth=2.0)
|
|
||||||
axs2[idx].plot([loop5_end + 1, loop5_end + 1], [-10, 10],
|
|
||||||
linestyle=linestyles_loop[5], color=colors_loop[5], alpha=alpha_loop[5], linewidth=2.0)
|
|
||||||
axs2[idx].add_patch(Rectangle((loop5_start, -10), loop5_end + 1 - loop5_start, 20,
|
|
||||||
label="loop 5: skipped" if idx == 0 else "",
|
|
||||||
facecolor=colors_loop[5], alpha=alpha_loop_rect[5], hatch='//'))
|
|
||||||
else:
|
|
||||||
axs2[idx].plot([loop5_start, loop5_start], [-10, 10],
|
|
||||||
linestyle=linestyles_loop[5], color=colors_loop[5], alpha=alpha_loop[5],
|
|
||||||
label="loop 5: " + str(nloop5) + " times" if idx == 0 else "", linewidth=2.0)
|
|
||||||
axs2[idx].plot([loop5_end, loop5_end], [-10, 10],
|
|
||||||
linestyle=linestyles_loop[5], color=colors_loop[5], alpha=alpha_loop[5], linewidth=2.0)
|
|
||||||
|
|
||||||
|
|
||||||
n_cols = count_nonzero([waittime0 != 0, waittime1 != 0, waittime2 != 0, waittime3 != 0, waittime4 != 0, waittime5 != 0,
|
|
||||||
nloop0 != 0, nloop1 != 0, nloop2 != 0, nloop3 != 0, nloop4 != 0, nloop5 != 0])
|
|
||||||
fig2.legend(loc="upper center", ncol=n_cols)
|
|
||||||
# manager = get_current_fig_manager()
|
|
||||||
# manager.window.showMaximized()
|
|
||||||
|
|
||||||
figure = plt.gcf() # get current figure
|
|
||||||
figure.set_size_inches(20, 10)
|
|
||||||
# when saving, specify the DPI
|
|
||||||
# tight_layout()
|
|
||||||
plt.savefig(Folder+"/"+File_pat+".png", dpi=300)
|
|
||||||
|
|
||||||
# Remove the white space around the plot -- only works on Unix (ImageMagick command)
|
|
||||||
os.system(f'mogrify -trim {Folder}/{File_pat}.png')
|
|
||||||
|
|
||||||
show()
|
|
@ -14,6 +14,7 @@ pycmd = dir(Detector)
|
|||||||
# dacs are in general not included in the python commands and we expect to
|
# dacs are in general not included in the python commands and we expect to
|
||||||
# set them from the specialized class or using an enum
|
# set them from the specialized class or using an enum
|
||||||
dacs = [
|
dacs = [
|
||||||
|
'adcvpp',
|
||||||
'iodelay',
|
'iodelay',
|
||||||
'list',
|
'list',
|
||||||
'rxb_lb',
|
'rxb_lb',
|
||||||
|
@ -2,9 +2,8 @@
|
|||||||
|
|
||||||
BIT32_MASK=0xFFFFFFFF
|
BIT32_MASK=0xFFFFFFFF
|
||||||
MAX_RX_DBIT=64
|
MAX_RX_DBIT=64
|
||||||
DEFAULT_TCP_CNTRL_PORTNO=1952
|
DEFAULT_PORTNO=1952
|
||||||
DEFAULT_TCP_STOP_PORTNO=1953
|
DEFAULT_UDP_PORTNO=50001
|
||||||
DEFAULT_TCP_RX_PORTNO=1954
|
|
||||||
DEFAULT_ZMQ_CL_PORTNO=30001
|
DEFAULT_ZMQ_CL_PORTNO=30001
|
||||||
DEFAULT_ZMQ_RX_PORTNO=30001
|
DEFAULT_ZMQ_RX_PORTNO=30001
|
||||||
DEFAULT_UDP_SRC_PORTNO=32410
|
DEFAULT_UDP_SRC_PORTNO=32410
|
||||||
|
@ -225,9 +225,9 @@ class Detector(CppDetectorApi):
|
|||||||
Example
|
Example
|
||||||
-------
|
-------
|
||||||
>>> d.detectorserverversion
|
>>> d.detectorserverversion
|
||||||
'7.0.0'
|
'0x200910'
|
||||||
"""
|
"""
|
||||||
return self.getDetectorServerVersion()
|
return ut.lhex(self.getDetectorServerVersion())
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@element
|
@element
|
||||||
@ -249,15 +249,15 @@ class Detector(CppDetectorApi):
|
|||||||
Example
|
Example
|
||||||
-------
|
-------
|
||||||
>>> d.clientversion
|
>>> d.clientversion
|
||||||
'7.0.1'
|
'0x200810'
|
||||||
"""
|
"""
|
||||||
return self.getClientVersion()
|
return hex(self.getClientVersion())
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@element
|
@element
|
||||||
def rx_version(self):
|
def rx_version(self):
|
||||||
"""Receiver version """
|
"""Receiver version in format [0xYYMMDD]."""
|
||||||
return self.getReceiverVersion()
|
return ut.lhex(self.getReceiverVersion())
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@element
|
@element
|
||||||
@ -2833,6 +2833,16 @@ class Detector(CppDetectorApi):
|
|||||||
def runclk(self, freq):
|
def runclk(self, freq):
|
||||||
ut.set_using_dict(self.setRUNClock, freq)
|
ut.set_using_dict(self.setRUNClock, freq)
|
||||||
|
|
||||||
|
@property
|
||||||
|
@element
|
||||||
|
def gatedclk(self):
|
||||||
|
"""[Ctb][Moench] Run clock in MHz."""
|
||||||
|
return self.getGatedClock()
|
||||||
|
|
||||||
|
@gatedclk.setter
|
||||||
|
def gatedclk(self, freq):
|
||||||
|
ut.set_using_dict(self.setGatedClock, freq)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@element
|
@element
|
||||||
def romode(self):
|
def romode(self):
|
||||||
|
@ -55,15 +55,14 @@ void init_det(py::module &m) {
|
|||||||
(int (Detector::*)() const) & Detector::getShmId);
|
(int (Detector::*)() const) & Detector::getShmId);
|
||||||
CppDetectorApi.def("getPackageVersion", (std::string(Detector::*)() const) &
|
CppDetectorApi.def("getPackageVersion", (std::string(Detector::*)() const) &
|
||||||
Detector::getPackageVersion);
|
Detector::getPackageVersion);
|
||||||
CppDetectorApi.def("getClientVersion", (std::string(Detector::*)() const) &
|
CppDetectorApi.def("getClientVersion", (int64_t(Detector::*)() const) &
|
||||||
Detector::getClientVersion);
|
Detector::getClientVersion);
|
||||||
CppDetectorApi.def("getFirmwareVersion",
|
CppDetectorApi.def("getFirmwareVersion",
|
||||||
(Result<int64_t>(Detector::*)(sls::Positions) const) &
|
(Result<int64_t>(Detector::*)(sls::Positions) const) &
|
||||||
Detector::getFirmwareVersion,
|
Detector::getFirmwareVersion,
|
||||||
py::arg() = Positions{});
|
py::arg() = Positions{});
|
||||||
CppDetectorApi.def(
|
CppDetectorApi.def("getDetectorServerVersion",
|
||||||
"getDetectorServerVersion",
|
(Result<int64_t>(Detector::*)(sls::Positions) const) &
|
||||||
(Result<std::string>(Detector::*)(sls::Positions) const) &
|
|
||||||
Detector::getDetectorServerVersion,
|
Detector::getDetectorServerVersion,
|
||||||
py::arg() = Positions{});
|
py::arg() = Positions{});
|
||||||
CppDetectorApi.def(
|
CppDetectorApi.def(
|
||||||
@ -79,9 +78,8 @@ void init_det(py::module &m) {
|
|||||||
(Result<int>(Detector::*)(sls::Positions) const) &
|
(Result<int>(Detector::*)(sls::Positions) const) &
|
||||||
Detector::getModuleId,
|
Detector::getModuleId,
|
||||||
py::arg() = Positions{});
|
py::arg() = Positions{});
|
||||||
CppDetectorApi.def(
|
CppDetectorApi.def("getReceiverVersion",
|
||||||
"getReceiverVersion",
|
(Result<int64_t>(Detector::*)(sls::Positions) const) &
|
||||||
(Result<std::string>(Detector::*)(sls::Positions) const) &
|
|
||||||
Detector::getReceiverVersion,
|
Detector::getReceiverVersion,
|
||||||
py::arg() = Positions{});
|
py::arg() = Positions{});
|
||||||
CppDetectorApi.def(
|
CppDetectorApi.def(
|
||||||
@ -204,16 +202,6 @@ void init_det(py::module &m) {
|
|||||||
CppDetectorApi.def(
|
CppDetectorApi.def(
|
||||||
"setSynchronization",
|
"setSynchronization",
|
||||||
(void (Detector::*)(bool)) & Detector::setSynchronization, py::arg());
|
(void (Detector::*)(bool)) & Detector::setSynchronization, py::arg());
|
||||||
CppDetectorApi.def(
|
|
||||||
"getBadChannels",
|
|
||||||
(void (Detector::*)(const std::string &, sls::Positions) const) &
|
|
||||||
Detector::getBadChannels,
|
|
||||||
py::arg(), py::arg() = Positions{});
|
|
||||||
CppDetectorApi.def(
|
|
||||||
"setBadChannels",
|
|
||||||
(void (Detector::*)(const std::string &, sls::Positions)) &
|
|
||||||
Detector::setBadChannels,
|
|
||||||
py::arg(), py::arg() = Positions{});
|
|
||||||
CppDetectorApi.def("isVirtualDetectorServer",
|
CppDetectorApi.def("isVirtualDetectorServer",
|
||||||
(Result<bool>(Detector::*)(sls::Positions) const) &
|
(Result<bool>(Detector::*)(sls::Positions) const) &
|
||||||
Detector::isVirtualDetectorServer,
|
Detector::isVirtualDetectorServer,
|
||||||
@ -1352,6 +1340,16 @@ void init_det(py::module &m) {
|
|||||||
(void (Detector::*)(const int, const int, const int, sls::Positions)) &
|
(void (Detector::*)(const int, const int, const int, sls::Positions)) &
|
||||||
Detector::setADCConfiguration,
|
Detector::setADCConfiguration,
|
||||||
py::arg(), py::arg(), py::arg(), py::arg() = Positions{});
|
py::arg(), py::arg(), py::arg(), py::arg() = Positions{});
|
||||||
|
CppDetectorApi.def(
|
||||||
|
"getBadChannels",
|
||||||
|
(void (Detector::*)(const std::string &, sls::Positions) const) &
|
||||||
|
Detector::getBadChannels,
|
||||||
|
py::arg(), py::arg() = Positions{});
|
||||||
|
CppDetectorApi.def(
|
||||||
|
"setBadChannels",
|
||||||
|
(void (Detector::*)(const std::string &, sls::Positions)) &
|
||||||
|
Detector::setBadChannels,
|
||||||
|
py::arg(), py::arg() = Positions{});
|
||||||
CppDetectorApi.def("getCounterMask",
|
CppDetectorApi.def("getCounterMask",
|
||||||
(Result<uint32_t>(Detector::*)(sls::Positions) const) &
|
(Result<uint32_t>(Detector::*)(sls::Positions) const) &
|
||||||
Detector::getCounterMask,
|
Detector::getCounterMask,
|
||||||
@ -1495,14 +1493,6 @@ void init_det(py::module &m) {
|
|||||||
(void (Detector::*)(defs::dacIndex, int, sls::Positions)) &
|
(void (Detector::*)(defs::dacIndex, int, sls::Positions)) &
|
||||||
Detector::setVoltage,
|
Detector::setVoltage,
|
||||||
py::arg(), py::arg(), py::arg() = Positions{});
|
py::arg(), py::arg(), py::arg() = Positions{});
|
||||||
CppDetectorApi.def("getADCVpp",
|
|
||||||
(Result<int>(Detector::*)(bool, sls::Positions) const) &
|
|
||||||
Detector::getADCVpp,
|
|
||||||
py::arg() = false, py::arg() = Positions{});
|
|
||||||
CppDetectorApi.def("setADCVpp",
|
|
||||||
(void (Detector::*)(int, bool, sls::Positions)) &
|
|
||||||
Detector::setADCVpp,
|
|
||||||
py::arg(), py::arg() = false, py::arg() = Positions{});
|
|
||||||
CppDetectorApi.def("getADCEnableMask",
|
CppDetectorApi.def("getADCEnableMask",
|
||||||
(Result<uint32_t>(Detector::*)(sls::Positions) const) &
|
(Result<uint32_t>(Detector::*)(sls::Positions) const) &
|
||||||
Detector::getADCEnableMask,
|
Detector::getADCEnableMask,
|
||||||
|
@ -171,19 +171,17 @@ class jungfrauHighZSingleChipData : public slsDetectorData<uint16_t> {
|
|||||||
/* return NULL; */
|
/* return NULL; */
|
||||||
/* }; */
|
/* }; */
|
||||||
|
|
||||||
// not present in base class
|
virtual char *readNextFrame(ifstream &filebin) {
|
||||||
|
int ff = -1, np = -1;
|
||||||
|
return readNextFrame(filebin, ff, np);
|
||||||
|
};
|
||||||
|
|
||||||
virtual char *readNextFrame(std::ifstream &filebin) {
|
virtual char *readNextFrame(ifstream &filebin, int &ff) {
|
||||||
int ff=-1;
|
|
||||||
return readNextFrame(filebin, ff);
|
|
||||||
}
|
|
||||||
virtual char *readNextFrame(std::ifstream &filebin, int &ff) {
|
|
||||||
int np = -1;
|
int np = -1;
|
||||||
return readNextFrame(filebin, ff, np);
|
return readNextFrame(filebin, ff, np);
|
||||||
};
|
};
|
||||||
|
|
||||||
// not present in base class
|
virtual char *readNextFrame(ifstream &filebin, int &ff, int &np) {
|
||||||
virtual char *readNextFrame(std::ifstream &filebin, int &ff, int &np) {
|
|
||||||
char *data = new char[dataSize];
|
char *data = new char[dataSize];
|
||||||
char *d = readNextFrame(filebin, ff, np, data);
|
char *d = readNextFrame(filebin, ff, np, data);
|
||||||
if (d == NULL) {
|
if (d == NULL) {
|
||||||
@ -193,10 +191,18 @@ class jungfrauHighZSingleChipData : public slsDetectorData<uint16_t> {
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
// not present in base class
|
virtual char *readNextFrame(ifstream &filebin, int &ff, int &np,
|
||||||
virtual char *readNextFrame(std::ifstream &filebin, int &ff, int &np,
|
|
||||||
char *data) {
|
char *data) {
|
||||||
|
char *retval = 0;
|
||||||
|
int nd;
|
||||||
|
int fnum = -1;
|
||||||
np = 0;
|
np = 0;
|
||||||
|
int pn;
|
||||||
|
|
||||||
|
// cout << dataSize << endl;
|
||||||
|
if (ff >= 0)
|
||||||
|
fnum = ff;
|
||||||
|
|
||||||
if (filebin.is_open()) {
|
if (filebin.is_open()) {
|
||||||
if (filebin.read(data, dataSize)) {
|
if (filebin.read(data, dataSize)) {
|
||||||
ff = getFrameNumber(data);
|
ff = getFrameNumber(data);
|
||||||
@ -204,8 +210,8 @@ class jungfrauHighZSingleChipData : public slsDetectorData<uint16_t> {
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nullptr;
|
return NULL;
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
@ -219,7 +225,7 @@ class jungfrauHighZSingleChipData : public slsDetectorData<uint16_t> {
|
|||||||
found
|
found
|
||||||
|
|
||||||
*/
|
*/
|
||||||
char *findNextFrame(char *data, int &ndata, int dsize) override {
|
virtual char *findNextFrame(char *data, int &ndata, int dsize) {
|
||||||
if (dsize < dataSize)
|
if (dsize < dataSize)
|
||||||
ndata = dsize;
|
ndata = dsize;
|
||||||
else
|
else
|
||||||
@ -227,7 +233,6 @@ class jungfrauHighZSingleChipData : public slsDetectorData<uint16_t> {
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// int getPacketNumber(int x, int y) {return dataMap[y][x]/packetSize;};
|
// int getPacketNumber(int x, int y) {return dataMap[y][x]/packetSize;};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -207,7 +207,7 @@ class jungfrauLGADStrixelsData : public slsDetectorData<uint16_t> {
|
|||||||
|
|
||||||
int getFrameNumber(char *buff) {
|
int getFrameNumber(char *buff) {
|
||||||
return ((header *)buff)->detHeader.frameNumber;
|
return ((header *)buff)->detHeader.frameNumber;
|
||||||
};
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
@ -220,10 +220,74 @@ class jungfrauLGADStrixelsData : public slsDetectorData<uint16_t> {
|
|||||||
*/
|
*/
|
||||||
int getPacketNumber(char *buff) {
|
int getPacketNumber(char *buff) {
|
||||||
return ((header *)buff)->detHeader.packetNumber;
|
return ((header *)buff)->detHeader.packetNumber;
|
||||||
};
|
}
|
||||||
|
|
||||||
|
/* int getFrameNumber(char *buff) { */
|
||||||
|
|
||||||
|
/* // return ((jf_header *)buff)->bunchNumber; */
|
||||||
|
/* }; */
|
||||||
|
|
||||||
|
/* /\** */
|
||||||
|
|
||||||
|
/* Returns the packet number for the given dataset. purely virtual func */
|
||||||
|
/* \param buff pointer to the dataset */
|
||||||
|
/* \returns packet number number */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* *\/ */
|
||||||
|
/* int getPacketNumber(char *buff) { */
|
||||||
|
/* return 0; */
|
||||||
|
/* } ; */
|
||||||
|
|
||||||
|
/* /\** */
|
||||||
|
|
||||||
|
/* Loops over a memory slot until a complete frame is found (i.e. all
|
||||||
|
* packets 0 to nPackets, same frame number). purely virtual func */
|
||||||
|
/* \param data pointer to the memory to be analyzed */
|
||||||
|
/* \param ndata reference to the amount of data found for the frame, in
|
||||||
|
* case the frame is incomplete at the end of the memory slot */
|
||||||
|
/* \param dsize size of the memory slot to be analyzed */
|
||||||
|
/* \returns pointer to the beginning of the last good frame (might be
|
||||||
|
* incomplete if ndata smaller than dataSize), or NULL if no frame is found
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* *\/ */
|
||||||
|
/* virtual char *findNextFrame(char *data, int &ndata, int
|
||||||
|
* dsize){ndata=dsize; setDataSize(dsize); return data;}; */
|
||||||
|
|
||||||
|
/* /\** */
|
||||||
|
|
||||||
|
/* Loops over a file stream until a complete frame is found (i.e. all
|
||||||
|
* packets 0 to nPackets, same frame number). Can be overloaded for
|
||||||
|
* different kind of detectors! */
|
||||||
|
/* \param filebin input file stream (binary) */
|
||||||
|
/* \returns pointer to the begin of the last good frame, NULL if no
|
||||||
|
* frame is found or last frame is incomplete */
|
||||||
|
|
||||||
|
/* */
|
||||||
|
/* char *readNextFrame(ifstream &filebin){ */
|
||||||
|
/* // int afifo_length=0; */
|
||||||
|
/* uint16_t *afifo_cont; */
|
||||||
|
/* int ib=0; */
|
||||||
|
/* if (filebin.is_open()) { */
|
||||||
|
/* afifo_cont=new uint16_t[dataSize/2]; */
|
||||||
|
/* while (filebin.read(((char*)afifo_cont)+ib,2)) { */
|
||||||
|
/* ib+=2; */
|
||||||
|
/* if (ib==dataSize) break; */
|
||||||
|
/* } */
|
||||||
|
/* if (ib>0) { */
|
||||||
|
/* iframe++; */
|
||||||
|
/* // cout << ib << "-" << endl; */
|
||||||
|
/* return (char*)afifo_cont; */
|
||||||
|
/* } else { */
|
||||||
|
/* delete [] afifo_cont; */
|
||||||
|
/* return NULL; */
|
||||||
|
/* } */
|
||||||
|
/* } */
|
||||||
|
/* return NULL; */
|
||||||
|
/* }; */
|
||||||
|
|
||||||
char *readNextFrame(ifstream &filebin) {
|
char *readNextFrame(ifstream &filebin) {
|
||||||
int ff = -1, np = -1;
|
int ff = -1, np = -1;
|
||||||
return readNextFrame(filebin, ff, np);
|
return readNextFrame(filebin, ff, np);
|
||||||
|
@ -1,177 +0,0 @@
|
|||||||
// SPDX-License-Identifier: LGPL-3.0-or-other
|
|
||||||
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
|
||||||
#ifndef JUNGFRAUMODULEDATA_H
|
|
||||||
#define JUNGFRAUMODULEDATA_H
|
|
||||||
#include "slsDetectorData.h"
|
|
||||||
|
|
||||||
//#define VERSION_V2
|
|
||||||
/**
|
|
||||||
@short structure for a Detector Packet or Image Header
|
|
||||||
@li frameNumber is the frame number
|
|
||||||
@li expLength is the subframe number (32 bit eiger) or real time exposure
|
|
||||||
time in 100ns (others)
|
|
||||||
@li packetNumber is the packet number
|
|
||||||
@li bunchId is the bunch id from beamline
|
|
||||||
@li timestamp is the time stamp with 10 MHz clock
|
|
||||||
@li modId is the unique module id (unique even for left, right, top, bottom)
|
|
||||||
@li xCoord is the x coordinate in the complete detector system
|
|
||||||
@li yCoord is the y coordinate in the complete detector system
|
|
||||||
@li zCoord is the z coordinate in the complete detector system
|
|
||||||
@li debug is for debugging purposes
|
|
||||||
@li roundRNumber is the round robin set number
|
|
||||||
@li detType is the detector type see :: detectorType
|
|
||||||
@li version is the version number of this structure format
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
uint64_t bunchNumber; /**< is the frame number */
|
|
||||||
uint64_t pre; /**< something */
|
|
||||||
|
|
||||||
} jf_header;
|
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
class jungfrauModuleData : public slsDetectorData<uint16_t> {
|
|
||||||
|
|
||||||
private:
|
|
||||||
int iframe;
|
|
||||||
|
|
||||||
public:
|
|
||||||
/**
|
|
||||||
Implements the slsReceiverData structure for the moench02 prototype read
|
|
||||||
out by a module i.e. using the slsReceiver (160x160 pixels, 40 packets
|
|
||||||
1286 large etc.) \param c crosstalk parameter for the output buffer
|
|
||||||
|
|
||||||
*/
|
|
||||||
jungfrauModuleData()
|
|
||||||
: slsDetectorData<uint16_t>(1024, 512,
|
|
||||||
1024* 512 * 2 + sizeof(jf_header)) {
|
|
||||||
|
|
||||||
for (int ix = 0; ix < 1024; ix++) {
|
|
||||||
for (int iy = 0; iy < 512; iy++) {
|
|
||||||
dataMap[iy][ix] = sizeof(jf_header) + (1024 * iy + ix) * 2;
|
|
||||||
#ifdef HIGHZ
|
|
||||||
dataMask[iy][ix] = 0x3fff;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
iframe = 0;
|
|
||||||
// cout << "data struct created" << endl;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
Returns the value of the selected channel for the given dataset as
|
|
||||||
double. \param data pointer to the dataset (including headers etc) \param
|
|
||||||
ix pixel number in the x direction \param iy pixel number in the y
|
|
||||||
direction \returns data for the selected channel, with inversion if
|
|
||||||
required as double
|
|
||||||
|
|
||||||
*/
|
|
||||||
virtual double getValue(char *data, int ix, int iy = 0) {
|
|
||||||
|
|
||||||
uint16_t val = getChannel(data, ix, iy) & 0x3fff;
|
|
||||||
/* if (ix==0 && iy==0) */
|
|
||||||
/* cout << val << endl; */
|
|
||||||
return val;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
|
|
||||||
Returns the frame number for the given dataset. Purely virtual func.
|
|
||||||
\param buff pointer to the dataset
|
|
||||||
\returns frame number
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* class jfrau_packet_header_t { */
|
|
||||||
/* public: */
|
|
||||||
/* unsigned char reserved[4]; */
|
|
||||||
/* unsigned char packetNumber[1]; */
|
|
||||||
/* unsigned char frameNumber[3]; */
|
|
||||||
/* unsigned char bunchid[8]; */
|
|
||||||
/* }; */
|
|
||||||
|
|
||||||
int getFrameNumber(char *buff) {
|
|
||||||
return ((jf_header *)buff)->bunchNumber;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
|
|
||||||
Returns the packet number for the given dataset. purely virtual func
|
|
||||||
\param buff pointer to the dataset
|
|
||||||
\returns packet number number
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*/
|
|
||||||
int getPacketNumber(char *buff) {
|
|
||||||
return 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
char *readNextFrame(ifstream &filebin) {
|
|
||||||
int ff = -1, np = -1;
|
|
||||||
return readNextFrame(filebin, ff, np);
|
|
||||||
};
|
|
||||||
|
|
||||||
char *readNextFrame(ifstream &filebin, int &ff) {
|
|
||||||
int np = -1;
|
|
||||||
return readNextFrame(filebin, ff, np);
|
|
||||||
};
|
|
||||||
|
|
||||||
char *readNextFrame(ifstream &filebin, int &ff, int &np) {
|
|
||||||
char *data = new char[dataSize];
|
|
||||||
char *d = readNextFrame(filebin, ff, np, data);
|
|
||||||
if (d == NULL) {
|
|
||||||
delete[] data;
|
|
||||||
data = NULL;
|
|
||||||
}
|
|
||||||
return data;
|
|
||||||
};
|
|
||||||
|
|
||||||
char *readNextFrame(ifstream &filebin, int &ff, int &np,char *data) {
|
|
||||||
char *retval = 0;
|
|
||||||
int nd;
|
|
||||||
int fnum = -1;
|
|
||||||
np = 0;
|
|
||||||
int pn;
|
|
||||||
|
|
||||||
// cout << dataSize << endl;
|
|
||||||
if (ff >= 0)
|
|
||||||
fnum = ff;
|
|
||||||
|
|
||||||
if (filebin.is_open()) {
|
|
||||||
if (filebin.read(data, dataSize)) {
|
|
||||||
ff = getFrameNumber(data);
|
|
||||||
np = getPacketNumber(data);
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return NULL;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
|
|
||||||
Loops over a memory slot until a complete frame is found (i.e. all
|
|
||||||
packets 0 to nPackets, same frame number). purely virtual func \param
|
|
||||||
data pointer to the memory to be analyzed \param ndata reference to the
|
|
||||||
amount of data found for the frame, in case the frame is incomplete at
|
|
||||||
the end of the memory slot \param dsize size of the memory slot to be
|
|
||||||
analyzed \returns pointer to the beginning of the last good frame (might
|
|
||||||
be incomplete if ndata smaller than dataSize), or NULL if no frame is
|
|
||||||
found
|
|
||||||
|
|
||||||
*/
|
|
||||||
virtual char *findNextFrame(char *data, int &ndata, int dsize) {
|
|
||||||
if (dsize < dataSize)
|
|
||||||
ndata = dsize;
|
|
||||||
else
|
|
||||||
ndata = dataSize;
|
|
||||||
return data;
|
|
||||||
};
|
|
||||||
|
|
||||||
// int getPacketNumber(int x, int y) {return dataMap[y][x]/packetSize;};
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
@ -2,36 +2,7 @@
|
|||||||
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
#ifndef MOENCH03T1RECDATANEW_H
|
#ifndef MOENCH03T1RECDATANEW_H
|
||||||
#define MOENCH03T1RECDATANEW_H
|
#define MOENCH03T1RECDATANEW_H
|
||||||
//#define MYROOT
|
|
||||||
|
|
||||||
#ifndef MYROOT
|
|
||||||
#include "sls/sls_detector_defs.h"
|
#include "sls/sls_detector_defs.h"
|
||||||
#endif
|
|
||||||
#ifdef MYROOT
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
uint64_t frameNumber;
|
|
||||||
uint32_t expLength;
|
|
||||||
uint32_t packetNumber;
|
|
||||||
uint64_t bunchId;
|
|
||||||
uint64_t timestamp;
|
|
||||||
uint16_t modId;
|
|
||||||
uint16_t row;
|
|
||||||
uint16_t column;
|
|
||||||
uint16_t reserved;
|
|
||||||
uint32_t debug;
|
|
||||||
uint16_t roundRNumber;
|
|
||||||
uint8_t detType;
|
|
||||||
uint8_t version;
|
|
||||||
} sls_detector_header;
|
|
||||||
#define MAX_NUM_PACKETS 512
|
|
||||||
// using sls_bitset = std::bitset<MAX_NUM_PACKETS>;
|
|
||||||
// using bitset_storage = uint8_t[MAX_NUM_PACKETS / 8];
|
|
||||||
struct sls_receiver_header {
|
|
||||||
sls_detector_header detHeader; /**< is the detector header */
|
|
||||||
uint8_t packetsMask[64]; /**< is the packets caught bit mask */
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
#include "slsDetectorData.h"
|
#include "slsDetectorData.h"
|
||||||
|
|
||||||
class moench03T1ReceiverDataNew : public slsDetectorData<uint16_t> {
|
class moench03T1ReceiverDataNew : public slsDetectorData<uint16_t> {
|
||||||
@ -46,12 +17,8 @@ class moench03T1ReceiverDataNew : public slsDetectorData<uint16_t> {
|
|||||||
double ghost[200][25];
|
double ghost[200][25];
|
||||||
|
|
||||||
// Single point of definition if we need to customize
|
// Single point of definition if we need to customize
|
||||||
#ifndef MYROOT
|
|
||||||
using header = sls::defs::sls_receiver_header;
|
using header = sls::defs::sls_receiver_header;
|
||||||
#endif
|
|
||||||
#ifdef MYROOT
|
|
||||||
sls_receiver_header header;
|
|
||||||
#endif
|
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
Implements the slsReceiverData structure for the moench02 prototype read
|
Implements the slsReceiverData structure for the moench02 prototype read
|
||||||
@ -80,7 +47,7 @@ class moench03T1ReceiverDataNew : public slsDetectorData<uint16_t> {
|
|||||||
int npackets = 40;
|
int npackets = 40;
|
||||||
int i;
|
int i;
|
||||||
int adc4(0);
|
int adc4(0);
|
||||||
int off=sizeof(header);
|
|
||||||
for (int ip = 0; ip < npackets; ip++) {
|
for (int ip = 0; ip < npackets; ip++) {
|
||||||
for (int is = 0; is < 128; is++) {
|
for (int is = 0; is < 128; is++) {
|
||||||
|
|
||||||
@ -95,13 +62,13 @@ class moench03T1ReceiverDataNew : public slsDetectorData<uint16_t> {
|
|||||||
} else {
|
} else {
|
||||||
row = 200 + i / sc_width;
|
row = 200 + i / sc_width;
|
||||||
}
|
}
|
||||||
dataMap[row][col] = off +
|
dataMap[row][col] = sizeof(header) +
|
||||||
(nadc * i + iadc) * 2; //+16*(ip+1);
|
(nadc * i + iadc) * 2; //+16*(ip+1);
|
||||||
#ifdef HIGHZ
|
#ifdef HIGHZ
|
||||||
dataMask[row][col] = 0x3fff; // invert data
|
dataMask[row][col] = 0x3fff; // invert data
|
||||||
#endif
|
#endif
|
||||||
if (dataMap[row][col] < 0 ||
|
if (dataMap[row][col] < 0 ||
|
||||||
dataMap[row][col] >= off + nSamples * 2 * 32)
|
dataMap[row][col] >= nSamples * 2 * 32)
|
||||||
std::cout << "Error: pointer " << dataMap[row][col]
|
std::cout << "Error: pointer " << dataMap[row][col]
|
||||||
<< " out of range " << std::endl;
|
<< " out of range " << std::endl;
|
||||||
}
|
}
|
||||||
@ -121,7 +88,7 @@ class moench03T1ReceiverDataNew : public slsDetectorData<uint16_t> {
|
|||||||
xmap[ibyte] = -1;
|
xmap[ibyte] = -1;
|
||||||
ymap[ibyte] = -1;
|
ymap[ibyte] = -1;
|
||||||
}
|
}
|
||||||
off = sizeof(header) / 2;
|
int off = sizeof(header) / 2;
|
||||||
for (ipacket = 0; ipacket < npackets; ipacket++) {
|
for (ipacket = 0; ipacket < npackets; ipacket++) {
|
||||||
for (ibyte = 0; ibyte < 8192 / 2; ibyte++) {
|
for (ibyte = 0; ibyte < 8192 / 2; ibyte++) {
|
||||||
i = ipacket * 8208 / 2 + ibyte;
|
i = ipacket * 8208 / 2 + ibyte;
|
||||||
@ -208,7 +175,7 @@ class moench03T1ReceiverDataNew : public slsDetectorData<uint16_t> {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
int getFrameNumber(char *buff) {
|
int getFrameNumber(char *buff) {
|
||||||
return ((sls::defs::sls_receiver_header *)buff)->detHeader.frameNumber;
|
return ((header *)buff)->detHeader.frameNumber;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -221,7 +188,7 @@ class moench03T1ReceiverDataNew : public slsDetectorData<uint16_t> {
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
int getPacketNumber(char *buff) {
|
int getPacketNumber(char *buff) {
|
||||||
return ((sls::defs::sls_receiver_header *)buff)->detHeader.packetNumber;
|
return ((header *)buff)->detHeader.packetNumber;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *readNextFrame(std::ifstream &filebin) override {
|
char *readNextFrame(std::ifstream &filebin) override {
|
||||||
|
@ -5,8 +5,6 @@
|
|||||||
#include "slsDetectorData.h"
|
#include "slsDetectorData.h"
|
||||||
#include "sls/sls_detector_defs.h"
|
#include "sls/sls_detector_defs.h"
|
||||||
|
|
||||||
#define CTB
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
class moench04CtbZmq10GbData : public slsDetectorData<uint16_t> {
|
class moench04CtbZmq10GbData : public slsDetectorData<uint16_t> {
|
||||||
|
|
||||||
@ -19,9 +17,6 @@ class moench04CtbZmq10GbData : public slsDetectorData<uint16_t> {
|
|||||||
const int dSamples;
|
const int dSamples;
|
||||||
int off;
|
int off;
|
||||||
|
|
||||||
// Single point of definition if we need to customize
|
|
||||||
using header = sls::defs::sls_receiver_header;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
Implements the slsReceiverData structure for the moench02 prototype read
|
Implements the slsReceiverData structure for the moench02 prototype read
|
||||||
@ -33,7 +28,7 @@ class moench04CtbZmq10GbData : public slsDetectorData<uint16_t> {
|
|||||||
// slsDetectorData<uint16_t>(400, 400, nas*2*32+nds*8), aSamples(nas),
|
// slsDetectorData<uint16_t>(400, 400, nas*2*32+nds*8), aSamples(nas),
|
||||||
// dSamples(nds), nadc(32), sc_width(25), sc_height(200) {
|
// dSamples(nds), nadc(32), sc_width(25), sc_height(200) {
|
||||||
|
|
||||||
moench04CtbZmq10GbData(int nas = 5000, int nds = 0, int oo = 2 * 2)
|
moench04CtbZmq10GbData(int nas = 5000, int nds = 0)
|
||||||
: slsDetectorData<uint16_t>(400, 400,
|
: slsDetectorData<uint16_t>(400, 400,
|
||||||
#ifdef RAWDATA
|
#ifdef RAWDATA
|
||||||
sizeof(slsDetectorDefs::sls_receiver_header) +
|
sizeof(slsDetectorDefs::sls_receiver_header) +
|
||||||
@ -41,7 +36,7 @@ class moench04CtbZmq10GbData : public slsDetectorData<uint16_t> {
|
|||||||
((nas > 0) && (nds > 0)
|
((nas > 0) && (nds > 0)
|
||||||
? max(nas, nds) * (32 * 2 + 8)
|
? max(nas, nds) * (32 * 2 + 8)
|
||||||
: nas * 32 * 2 + nds * 8)),
|
: nas * 32 * 2 + nds * 8)),
|
||||||
nadc(32), sc_width(25), sc_height(200), aSamples(nas), dSamples(nds), off(oo) {
|
nadc(32), sc_width(25), sc_height(200), aSamples(nas), dSamples(nds) {
|
||||||
#ifdef RAWDATA
|
#ifdef RAWDATA
|
||||||
off=sizeof(slsDetectorDefs::sls_receiver_header);
|
off=sizeof(slsDetectorDefs::sls_receiver_header);
|
||||||
#endif
|
#endif
|
||||||
@ -91,8 +86,12 @@ class moench04CtbZmq10GbData : public slsDetectorData<uint16_t> {
|
|||||||
} else {
|
} else {
|
||||||
row = 200 + i / sc_width;
|
row = 200 + i / sc_width;
|
||||||
}
|
}
|
||||||
|
if (nds > 0)
|
||||||
dataMap[row][col] =
|
dataMap[row][col] =
|
||||||
((nadc ) * i + iadc) * 2 + off;
|
((nadc + 4) * i + iadc) * 2 + off; //+16*(ip+1);
|
||||||
|
else
|
||||||
|
dataMap[row][col] =
|
||||||
|
(nadc * i + iadc) * 2 + off; //+16*(ip+1);
|
||||||
if (dataMap[row][col] < 0 ||
|
if (dataMap[row][col] < 0 ||
|
||||||
dataMap[row][col] >= aSamples * 2 * 32 + off)
|
dataMap[row][col] >= aSamples * 2 * 32 + off)
|
||||||
cout << "Error: pointer " << dataMap[row][col]
|
cout << "Error: pointer " << dataMap[row][col]
|
||||||
@ -109,7 +108,6 @@ class moench04CtbZmq10GbData : public slsDetectorData<uint16_t> {
|
|||||||
|
|
||||||
int getGain(char *data, int x, int y) {
|
int getGain(char *data, int x, int y) {
|
||||||
// int aoff=aSamples*2*32;
|
// int aoff=aSamples*2*32;
|
||||||
int aoff=off+aSamples*2*32;
|
|
||||||
int irow;
|
int irow;
|
||||||
int isc = x / sc_width;
|
int isc = x / sc_width;
|
||||||
int icol = x % sc_width;
|
int icol = x % sc_width;
|
||||||
|
@ -1,17 +1,15 @@
|
|||||||
# SPDX-License-Identifier: LGPL-3.0-or-other
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
#module add CBFlib/0.9.5
|
#module add CBFlib/0.9.5
|
||||||
INCDIR=-I. -I../ -I../interpolations -I../interpolations/etaVEL -I../dataStructures -I../../slsSupportLib/include/ -I../../slsReceiverSoftware/include/ -I../tiffio/include
|
INCDIR=-I. -I../ -I../interpolations -I../interpolations/etaVEL -I../dataStructures -I../../slsSupportLib/include/ -I../../slsReceiverSoftware/include/ -I../tiffio/include/
|
||||||
|
|
||||||
LDFLAG= ../tiffio/src/tiffIO.cpp -L/usr/lib64/ -lpthread -lm -lstdc++ -pthread -lrt -ltiff -O3 -std=c++11
|
LDFLAG= ../tiffio/src/tiffIO.cpp -L/usr/lib64/ -lpthread -lm -lstdc++ -pthread -lrt -ltiff -O3 -std=c++11
|
||||||
|
|
||||||
MAIN=jungfrauClusterFinder.cpp
|
MAIN=jungfrauClusterFinder.cpp
|
||||||
|
|
||||||
|
|
||||||
all: jungfrauRawDataProcess
|
all: jungfrauClusterFinder jungfrauMakeEta jungfrauInterpolation jungfrauNoInterpolation jungfrauPhotonCounter jungfrauAnalog
|
||||||
|
|
||||||
jungfrauRawDataProcess: jungfrauRawDataProcess.cpp $(INCS) clean
|
|
||||||
g++ -o jungfrauRawDataProcess jungfrauRawDataProcess.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DSAVE_ALL
|
|
||||||
|
|
||||||
|
|
||||||
jungfrauClusterFinder: jungfrauClusterFinder.cpp $(INCS) clean
|
jungfrauClusterFinder: jungfrauClusterFinder.cpp $(INCS) clean
|
||||||
|
@ -34,10 +34,6 @@ add_executable(moench04RawDataProcess moenchRawDataProcess.cpp)
|
|||||||
target_compile_definitions(moench04RawDataProcess PRIVATE MOENCH04)
|
target_compile_definitions(moench04RawDataProcess PRIVATE MOENCH04)
|
||||||
list(APPEND MOENCH_EXECUTABLES moench04RawDataProcess)
|
list(APPEND MOENCH_EXECUTABLES moench04RawDataProcess)
|
||||||
|
|
||||||
add_executable(moench04RawDataProcessDGS moenchRawDataProcess.cpp)
|
|
||||||
target_compile_definitions(moench04RawDataProcessDGS PRIVATE MOENCH04_DGS MOENCH04)
|
|
||||||
list(APPEND MOENCH_EXECUTABLES moench04RawDataProcessDGS)
|
|
||||||
|
|
||||||
#interpolation stuff
|
#interpolation stuff
|
||||||
|
|
||||||
add_executable(moench03MakeEta moench03Interpolation.cpp)
|
add_executable(moench03MakeEta moench03Interpolation.cpp)
|
||||||
|
@ -62,30 +62,20 @@ int main(int argc, char *argv[]) {
|
|||||||
int nped = 10000;
|
int nped = 10000;
|
||||||
|
|
||||||
int cf = 0;
|
int cf = 0;
|
||||||
int numberOfPackets=40;
|
|
||||||
#ifdef RECT
|
#ifdef RECT
|
||||||
cout << "Should be rectangular but now it will crash! No data structure defined!" << endl;
|
cout << "Should be rectangular but now it will crash! No data structure defined!" << endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef MOENCH04
|
#ifndef MOENCH04
|
||||||
moench03T1ReceiverDataNew *decoder = new moench03T1ReceiverDataNew();
|
moench03T1ReceiverDataNew *decoder = new moench03T1ReceiverDataNew();
|
||||||
cout << "MOENCH03!" << endl;
|
cout << "MOENCH03!" << endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MOENCH04
|
#ifdef MOENCH04
|
||||||
#ifndef MOENCH04_DGS
|
moench04CtbZmq10GbData *decoder = new moench04CtbZmq10GbData();
|
||||||
moench04CtbZmq10GbData *decoder = new moench04CtbZmq10GbData(5000,0);
|
|
||||||
cout << "MOENCH04!" << endl;
|
cout << "MOENCH04!" << endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MOENCH04_DGS
|
|
||||||
moench04CtbZmq10GbData *decoder = new moench04CtbZmq10GbData(5000,5000);
|
|
||||||
cout << "MOENCH04 DGS!" << endl;
|
|
||||||
numberOfPackets=45;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
int nx = 400, ny = 400;
|
int nx = 400, ny = 400;
|
||||||
|
|
||||||
@ -259,7 +249,7 @@ int main(int argc, char *argv[]) {
|
|||||||
if (filebin.is_open()) {
|
if (filebin.is_open()) {
|
||||||
ff = -1;
|
ff = -1;
|
||||||
while (decoder->readNextFrame(filebin, ff, np, buff)) {
|
while (decoder->readNextFrame(filebin, ff, np, buff)) {
|
||||||
if (np == numberOfPackets) {
|
if (np == 40) {
|
||||||
mt->pushData(buff);
|
mt->pushData(buff);
|
||||||
mt->nextThread();
|
mt->nextThread();
|
||||||
mt->popFree(buff);
|
mt->popFree(buff);
|
||||||
@ -341,7 +331,7 @@ int main(int argc, char *argv[]) {
|
|||||||
ff = -1;
|
ff = -1;
|
||||||
ifr = 0;
|
ifr = 0;
|
||||||
while (decoder->readNextFrame(filebin, ff, np, buff)) {
|
while (decoder->readNextFrame(filebin, ff, np, buff)) {
|
||||||
if (np == numberOfPackets) {
|
if (np == 40) {
|
||||||
// //push
|
// //push
|
||||||
mt->pushData(buff);
|
mt->pushData(buff);
|
||||||
// // //pop
|
// // //pop
|
||||||
@ -361,10 +351,8 @@ int main(int argc, char *argv[]) {
|
|||||||
ifile++;
|
ifile++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else
|
||||||
cout << "bp " << ifr << " " << ff << " " << np << endl;
|
cout << ifr << " " << ff << " " << np << endl;
|
||||||
//break;
|
|
||||||
}
|
|
||||||
ff = -1;
|
ff = -1;
|
||||||
}
|
}
|
||||||
cout << "--" << endl;
|
cout << "--" << endl;
|
||||||
|
@ -429,16 +429,14 @@ class singlePhotonDetector : public analogDetector<uint16_t> {
|
|||||||
for (ic = -(clusterSize / 2); ic < (clusterSize / 2) + 1;
|
for (ic = -(clusterSize / 2); ic < (clusterSize / 2) + 1;
|
||||||
ic++) {
|
ic++) {
|
||||||
|
|
||||||
if ( (iy + ir) >= 0 && (iy + ir) < ny &&
|
if ((iy + ir) >= 0 && (iy + ir) < ny &&
|
||||||
(ix + ic) >= 0 && (ix + ic) < nx) {
|
(ix + ic) >= 0 && (ix + ic) < nx) {
|
||||||
|
|
||||||
|
|
||||||
if ((iy + ir) > iy && (ix + ic) > ix ) {
|
if ((iy + ir) >= iy && (ix + ic) >= ix ) {
|
||||||
|
|
||||||
val[(iy + ir) * nx + ix + ic] =
|
val[(iy + ir) * nx + ix + ic] =
|
||||||
subtractPedestal(data, ix + ic, iy + ir, cm);
|
subtractPedestal(data, ix + ic, iy + ir, cm);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
v = &(val[(iy + ir) * nx + ix + ic]);
|
v = &(val[(iy + ir) * nx + ix + ic]);
|
||||||
tot += *v;
|
tot += *v;
|
||||||
|
@ -5,12 +5,12 @@
|
|||||||
|
|
||||||
//Write 32bit float data to tiff file
|
//Write 32bit float data to tiff file
|
||||||
//Always returns nullptr, prints message on failure
|
//Always returns nullptr, prints message on failure
|
||||||
void *WriteToTiff(float *imgData, const char *imgname, int ncol, int nrow);
|
void *WriteToTiff(float *imgData, const char *imgname, int nrow, int ncol);
|
||||||
|
|
||||||
//Read 32bit float data from tiff file, returns pointer to data and sets
|
//Read 32bit float data from tiff file, returns pointer to data and sets
|
||||||
//image dimensions in the out parameters nrow, ncol.
|
//image dimensions in the out parameters nrow, ncol.
|
||||||
//Returns nullptr on failure
|
//Returns nullptr on failure
|
||||||
//The caller is responsible to deallocate the memory that the returned
|
//The caller is responsible to deallocate the memory that the returned
|
||||||
//pointer points to.
|
//pointer points to.
|
||||||
float *ReadFromTiff(const char *imgname, uint32_t &ncol, uint32_t &nrow);
|
float *ReadFromTiff(const char *imgname, uint32_t &nrow, uint32_t &ncol);
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <tiffio.h>
|
#include <tiffio.h>
|
||||||
|
|
||||||
void *WriteToTiff(float *imgData, const char *imgname, int ncol, int nrow) {
|
void *WriteToTiff(float *imgData, const char *imgname, int nrow, int ncol) {
|
||||||
constexpr uint32_t sampleperpixel = 1;
|
constexpr uint32_t sampleperpixel = 1;
|
||||||
TIFF *tif = TIFFOpen(imgname, "w");
|
TIFF *tif = TIFFOpen(imgname, "w");
|
||||||
if (tif) {
|
if (tif) {
|
||||||
@ -30,7 +30,7 @@ void *WriteToTiff(float *imgData, const char *imgname, int ncol, int nrow) {
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
float *ReadFromTiff(const char *imgname, uint32_t &ncol, uint32_t &nrow) {
|
float *ReadFromTiff(const char *imgname, uint32_t &nrow, uint32_t &ncol) {
|
||||||
TIFF *tif = TIFFOpen(imgname, "r");
|
TIFF *tif = TIFFOpen(imgname, "r");
|
||||||
if (tif) {
|
if (tif) {
|
||||||
TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &ncol);
|
TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &ncol);
|
||||||
|
@ -1,16 +1,12 @@
|
|||||||
# SPDX-License-Identifier: LGPL-3.0-or-other
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
|
|
||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
set(CMAKE_AUTORCC ON)
|
|
||||||
|
|
||||||
|
|
||||||
find_package(Qt5 5.9 COMPONENTS Widgets Core Gui REQUIRED)
|
|
||||||
|
|
||||||
|
find_package(Qt4 REQUIRED)
|
||||||
|
find_package(Qwt 6.1 REQUIRED)
|
||||||
find_package(PNG REQUIRED)
|
find_package(PNG REQUIRED)
|
||||||
find_package(ZLIB REQUIRED)
|
find_package(ZLIB REQUIRED)
|
||||||
|
|
||||||
|
|
||||||
set(SOURCES
|
set(SOURCES
|
||||||
slsDetectorPlotting/src/SlsQt1DPlot.cpp
|
slsDetectorPlotting/src/SlsQt1DPlot.cpp
|
||||||
slsDetectorPlotting/src/SlsQt1DZoomer.cpp
|
slsDetectorPlotting/src/SlsQt1DZoomer.cpp
|
||||||
@ -28,7 +24,6 @@ set(SOURCES
|
|||||||
src/qTabDeveloper.cpp
|
src/qTabDeveloper.cpp
|
||||||
src/qTabMessages.cpp
|
src/qTabMessages.cpp
|
||||||
src/qDacWidget.cpp
|
src/qDacWidget.cpp
|
||||||
src/qVersionResolve.cpp
|
|
||||||
)
|
)
|
||||||
|
|
||||||
set(FORMS
|
set(FORMS
|
||||||
@ -46,7 +41,7 @@ set(FORMS
|
|||||||
forms/form_cloneplot.ui
|
forms/form_cloneplot.ui
|
||||||
)
|
)
|
||||||
|
|
||||||
qt5_wrap_ui(FORMS_H ${FORMS})
|
qt4_wrap_ui(FORMS_H ${FORMS})
|
||||||
|
|
||||||
set(HEADERS
|
set(HEADERS
|
||||||
slsDetectorPlotting/include/SlsQt1DPlot.h
|
slsDetectorPlotting/include/SlsQt1DPlot.h
|
||||||
@ -67,16 +62,15 @@ set(HEADERS
|
|||||||
include/qTabDeveloper.h
|
include/qTabDeveloper.h
|
||||||
include/qTabMessages.h
|
include/qTabMessages.h
|
||||||
include/qDacWidget.h
|
include/qDacWidget.h
|
||||||
include/qVersionResolve.h
|
|
||||||
)
|
)
|
||||||
set(RESOURCES
|
set(RESOURCES
|
||||||
include/icons.qrc
|
include/icons.qrc
|
||||||
)
|
)
|
||||||
qt5_add_resources(RESOURCES_SRCS ${RESOURCES})
|
qt4_add_resources(RESOURCES_SRCS ${RESOURCES})
|
||||||
|
|
||||||
|
|
||||||
add_definitions(
|
add_definitions(
|
||||||
${Qt5Widgets_DEFINITIONS} -DPRINT_LOG #-DVERBOSE
|
-DPRINT_LOG #-DVERBOSE
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(slsDetectorGui
|
add_executable(slsDetectorGui
|
||||||
@ -90,30 +84,31 @@ target_include_directories(slsDetectorGui PUBLIC
|
|||||||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
|
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
|
||||||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/slsDetectorPlotting/include>"
|
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/slsDetectorPlotting/include>"
|
||||||
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>"
|
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>"
|
||||||
"$<BUILD_INTERFACE:${QT5Widgets_INCLUDE_DIRS}>"
|
"$<BUILD_INTERFACE:${QT_INCLUDE_DIR}>"
|
||||||
"$<BUILD_INTERFACE:${SLS_INTERNAL_QWT_DIR}/include>"
|
"$<BUILD_INTERFACE:${QT_QTCORE_INCLUDE_DIR}>"
|
||||||
|
"$<BUILD_INTERFACE:${QT_QTGUI_INCLUDE_DIR}>"
|
||||||
|
"$<BUILD_INTERFACE:${QWT_INCLUDE_DIR}>"
|
||||||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>"
|
"$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>"
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(slsDetectorGui PUBLIC
|
target_link_libraries(slsDetectorGui PUBLIC
|
||||||
slsProjectOptions
|
slsProjectOptions
|
||||||
slsDetectorStatic
|
slsDetectorStatic
|
||||||
|
${QT_QTCORE_LIBRARIES}
|
||||||
|
${QT_QTGUI_LIBRARIES}
|
||||||
|
${QWT_LIBRARIES}
|
||||||
PNG::PNG
|
PNG::PNG
|
||||||
ZLIB::ZLIB
|
ZLIB::ZLIB
|
||||||
Qt5::Widgets
|
Qt4::QtOpenGL
|
||||||
Qt5::Gui
|
Qt4::QtSvg
|
||||||
Qt5::Core
|
|
||||||
expat
|
expat
|
||||||
|
|
||||||
PRIVATE
|
PRIVATE
|
||||||
slsProjectWarnings
|
slsProjectWarnings
|
||||||
qwt
|
|
||||||
)
|
)
|
||||||
|
|
||||||
set_target_properties(slsDetectorGui PROPERTIES
|
set_target_properties(slsDetectorGui PROPERTIES
|
||||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
||||||
#Instruct CMake to run moc automatically when needed
|
|
||||||
AUTOMOC ON
|
|
||||||
)
|
)
|
||||||
if((CMAKE_BUILD_TYPE STREQUAL "Release") AND SLS_LTO_AVAILABLE)
|
if((CMAKE_BUILD_TYPE STREQUAL "Release") AND SLS_LTO_AVAILABLE)
|
||||||
set_property(TARGET slsDetectorGui PROPERTY INTERPROCEDURAL_OPTIMIZATION True)
|
set_property(TARGET slsDetectorGui PROPERTY INTERPROCEDURAL_OPTIMIZATION True)
|
||||||
|
@ -16,17 +16,44 @@
|
|||||||
<height>300</height>
|
<height>300</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Carlito</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>MainWindow</string>
|
<string>MainWindow</string>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="centralwidget">
|
<widget class="QWidget" name="centralwidget">
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QGroupBox" name="boxPlot">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Sans Serif</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Sample Plot</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
<property name="flat">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="plotLayout">
|
||||||
|
<property name="margin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="spacing">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="lblCompleteImage">
|
<widget class="QLabel" name="lblCompleteImage">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -191,16 +218,7 @@
|
|||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
<property name="leftMargin">
|
<property name="margin">
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
@ -358,48 +376,6 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="0" colspan="3">
|
|
||||||
<widget class="QGroupBox" name="boxPlot">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Carlito</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string>Sample Plot</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
<property name="flat">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="plotLayout">
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="spacing">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QMenuBar" name="menubar">
|
<widget class="QMenuBar" name="menubar">
|
||||||
@ -408,7 +384,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>376</width>
|
<width>376</width>
|
||||||
<height>17</height>
|
<height>27</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QMenu" name="menuSave">
|
<widget class="QMenu" name="menuSave">
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>300</width>
|
<width>300</width>
|
||||||
<height>28</height>
|
<height>30</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -19,102 +19,25 @@
|
|||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>300</width>
|
<width>300</width>
|
||||||
<height>28</height>
|
<height>30</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>300</width>
|
<width>300</width>
|
||||||
<height>28</height>
|
<height>30</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Form</string>
|
<string>Form</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<property name="leftMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="verticalSpacing">
|
<property name="verticalSpacing">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
<property name="margin">
|
||||||
<widget class="QLabel" name="lblDac">
|
<number>0</number>
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>100</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>90</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>vref_comp_fe:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="3">
|
|
||||||
<widget class="QLabel" name="lblDacmV">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>70</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>70</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>2999 mV</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QDoubleSpinBox" name="spinDac">
|
<widget class="QDoubleSpinBox" name="spinDac">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
@ -129,18 +52,6 @@
|
|||||||
<height>25</height>
|
<height>25</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Set dac in dac units</string>
|
|
||||||
</property>
|
|
||||||
<property name="buttonSymbols">
|
|
||||||
<enum>QAbstractSpinBox::PlusMinus</enum>
|
|
||||||
</property>
|
|
||||||
<property name="keyboardTracking">
|
<property name="keyboardTracking">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
@ -150,26 +61,57 @@
|
|||||||
<property name="maximum">
|
<property name="maximum">
|
||||||
<double>10000.000000000000000</double>
|
<double>10000.000000000000000</double>
|
||||||
</property>
|
</property>
|
||||||
<property name="value">
|
</widget>
|
||||||
<double>2799.000000000000000</double>
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="lblDac">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>120</width>
|
||||||
|
<height>25</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>120</width>
|
||||||
|
<height>25</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>TextLabel</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="2">
|
<item row="0" column="2">
|
||||||
<spacer name="horizontalSpacer">
|
<widget class="QLabel" name="lblDacmV">
|
||||||
<property name="orientation">
|
<property name="sizePolicy">
|
||||||
<enum>Qt::Horizontal</enum>
|
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeType">
|
<property name="minimumSize">
|
||||||
<enum>QSizePolicy::Fixed</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
<size>
|
||||||
<width>5</width>
|
<width>60</width>
|
||||||
<height>20</height>
|
<height>25</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>60</width>
|
||||||
|
<height>25</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>---mV</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>800</width>
|
<width>800</width>
|
||||||
<height>882</height>
|
<height>906</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -139,8 +139,7 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<family>Cantarell</family>
|
<pointsize>9</pointsize>
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -150,9 +149,6 @@
|
|||||||
<iconset resource="../include/icons.qrc">
|
<iconset resource="../include/icons.qrc">
|
||||||
<normaloff>:/icons/images/mountain.png</normaloff>:/icons/images/mountain.png</iconset>
|
<normaloff>:/icons/images/mountain.png</normaloff>:/icons/images/mountain.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="inputMethodHints">
|
<property name="inputMethodHints">
|
||||||
<set>Qt::ImhNone</set>
|
<set>Qt::ImhNone</set>
|
||||||
</property>
|
</property>
|
||||||
@ -175,616 +171,84 @@
|
|||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>0</width>
|
<width>0</width>
|
||||||
<height>400</height>
|
<height>395</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>524287</width>
|
<width>524287</width>
|
||||||
<height>400</height>
|
<height>395</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="layoutTabs"/>
|
||||||
|
</widget>
|
||||||
|
<widget class="QMenuBar" name="menubar">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>800</width>
|
||||||
|
<height>25</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>25</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>25</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<family>Cantarell</family>
|
<pointsize>9</pointsize>
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="layoutTabs">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QTabWidget" name="tabs">
|
|
||||||
<property name="palette">
|
|
||||||
<palette>
|
|
||||||
<active>
|
|
||||||
<colorrole role="WindowText">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>0</red>
|
|
||||||
<green>0</green>
|
|
||||||
<blue>0</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
<colorrole role="Button">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>255</red>
|
|
||||||
<green>255</green>
|
|
||||||
<blue>255</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
<colorrole role="Text">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>0</red>
|
|
||||||
<green>0</green>
|
|
||||||
<blue>0</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
<colorrole role="ButtonText">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>0</red>
|
|
||||||
<green>0</green>
|
|
||||||
<blue>0</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
<colorrole role="Base">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>255</red>
|
|
||||||
<green>255</green>
|
|
||||||
<blue>255</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
<colorrole role="Window">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>255</red>
|
|
||||||
<green>255</green>
|
|
||||||
<blue>255</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
</active>
|
|
||||||
<inactive>
|
|
||||||
<colorrole role="WindowText">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>0</red>
|
|
||||||
<green>0</green>
|
|
||||||
<blue>0</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
<colorrole role="Button">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>255</red>
|
|
||||||
<green>255</green>
|
|
||||||
<blue>255</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
<colorrole role="Text">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>0</red>
|
|
||||||
<green>0</green>
|
|
||||||
<blue>0</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
<colorrole role="ButtonText">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>0</red>
|
|
||||||
<green>0</green>
|
|
||||||
<blue>0</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
<colorrole role="Base">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>255</red>
|
|
||||||
<green>255</green>
|
|
||||||
<blue>255</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
<colorrole role="Window">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>255</red>
|
|
||||||
<green>255</green>
|
|
||||||
<blue>255</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
</inactive>
|
|
||||||
<disabled>
|
|
||||||
<colorrole role="WindowText">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>185</red>
|
|
||||||
<green>185</green>
|
|
||||||
<blue>185</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
<colorrole role="Button">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>255</red>
|
|
||||||
<green>255</green>
|
|
||||||
<blue>255</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
<colorrole role="Text">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>185</red>
|
|
||||||
<green>185</green>
|
|
||||||
<blue>185</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
<colorrole role="ButtonText">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>185</red>
|
|
||||||
<green>185</green>
|
|
||||||
<blue>185</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
<colorrole role="Base">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>255</red>
|
|
||||||
<green>255</green>
|
|
||||||
<blue>255</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
<colorrole role="Window">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>255</red>
|
|
||||||
<green>255</green>
|
|
||||||
<blue>255</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
</disabled>
|
|
||||||
</palette>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="focusPolicy">
|
<property name="focusPolicy">
|
||||||
<enum>Qt::NoFocus</enum>
|
<enum>Qt::StrongFocus</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="defaultUp">
|
||||||
<string notr="true">background-color: rgb(255, 255, 255);</string>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="nativeMenuBar">
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<widget class="QWidget" name="tMeasurement">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<attribute name="title">
|
|
||||||
<string>Measurement</string>
|
|
||||||
</attribute>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="spacing">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QScrollArea" name="scrollMeasurement">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="focusPolicy">
|
|
||||||
<enum>Qt::NoFocus</enum>
|
|
||||||
</property>
|
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::NoFrame</enum>
|
|
||||||
</property>
|
|
||||||
<property name="widgetResizable">
|
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="scrollAreaWidgetContents">
|
<widget class="QMenu" name="menuHelp">
|
||||||
<property name="geometry">
|
<property name="title">
|
||||||
<rect>
|
<string>&Help</string>
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>778</width>
|
|
||||||
<height>351</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
</property>
|
||||||
|
<addaction name="actionAbout"/>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="QMenu" name="menuUtilities">
|
||||||
|
<property name="title">
|
||||||
|
<string>Utilities</string>
|
||||||
|
</property>
|
||||||
|
<addaction name="actionLoadConfiguration"/>
|
||||||
|
<addaction name="actionLoadTrimbits"/>
|
||||||
|
<addaction name="actionSaveTrimbits"/>
|
||||||
|
<addaction name="actionLoadParameters"/>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
<widget class="QMenu" name="menuModes">
|
||||||
</layout>
|
<property name="title">
|
||||||
|
<string>Modes</string>
|
||||||
|
</property>
|
||||||
|
<addaction name="actionDebug"/>
|
||||||
|
<addaction name="actionExpert"/>
|
||||||
|
<addaction name="actionDockable"/>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="tSettings">
|
<addaction name="menuUtilities"/>
|
||||||
<property name="font">
|
<addaction name="menuModes"/>
|
||||||
<font>
|
<addaction name="menuHelp"/>
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<attribute name="title">
|
|
||||||
<string>Settings</string>
|
|
||||||
</attribute>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_3">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QScrollArea" name="scrollSettings">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="focusPolicy">
|
|
||||||
<enum>Qt::NoFocus</enum>
|
|
||||||
</property>
|
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::NoFrame</enum>
|
|
||||||
</property>
|
|
||||||
<property name="widgetResizable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<widget class="QWidget" name="scrollAreaWidgetContents_2">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>760</width>
|
|
||||||
<height>333</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<widget class="QWidget" name="tDataOutput">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<attribute name="title">
|
|
||||||
<string>Data Output</string>
|
|
||||||
</attribute>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_4">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QScrollArea" name="scrollDataOutput">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="focusPolicy">
|
|
||||||
<enum>Qt::NoFocus</enum>
|
|
||||||
</property>
|
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::NoFrame</enum>
|
|
||||||
</property>
|
|
||||||
<property name="widgetResizable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<widget class="QWidget" name="scrollAreaWidgetContents_3">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>760</width>
|
|
||||||
<height>333</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<widget class="QWidget" name="tPlot">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<attribute name="title">
|
|
||||||
<string>Plot</string>
|
|
||||||
</attribute>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_6">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QScrollArea" name="scrollPlot">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="focusPolicy">
|
|
||||||
<enum>Qt::NoFocus</enum>
|
|
||||||
</property>
|
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::NoFrame</enum>
|
|
||||||
</property>
|
|
||||||
<property name="widgetResizable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<widget class="QWidget" name="scrollAreaWidgetContents_4">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>760</width>
|
|
||||||
<height>333</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<widget class="QWidget" name="tAdvanced">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<attribute name="title">
|
|
||||||
<string>Advanced</string>
|
|
||||||
</attribute>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_8">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QScrollArea" name="scrollAdvanced">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="focusPolicy">
|
|
||||||
<enum>Qt::NoFocus</enum>
|
|
||||||
</property>
|
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::NoFrame</enum>
|
|
||||||
</property>
|
|
||||||
<property name="widgetResizable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<widget class="QWidget" name="scrollAreaWidgetContents_5">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>760</width>
|
|
||||||
<height>333</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<widget class="QWidget" name="tDebugging">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<attribute name="title">
|
|
||||||
<string>Debugging</string>
|
|
||||||
</attribute>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_10">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QScrollArea" name="scrollDebugging">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="focusPolicy">
|
|
||||||
<enum>Qt::NoFocus</enum>
|
|
||||||
</property>
|
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::NoFrame</enum>
|
|
||||||
</property>
|
|
||||||
<property name="widgetResizable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<widget class="QWidget" name="scrollAreaWidgetContents_6">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>760</width>
|
|
||||||
<height>333</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<widget class="QWidget" name="tDeveloper">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<attribute name="title">
|
|
||||||
<string>Developer</string>
|
|
||||||
</attribute>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_12">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QScrollArea" name="scrollDeveloper">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="focusPolicy">
|
|
||||||
<enum>Qt::NoFocus</enum>
|
|
||||||
</property>
|
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::NoFrame</enum>
|
|
||||||
</property>
|
|
||||||
<property name="widgetResizable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<widget class="QWidget" name="scrollAreaWidgetContents_7">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>760</width>
|
|
||||||
<height>333</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<widget class="QWidget" name="tTerminal">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<attribute name="title">
|
|
||||||
<string>Terminal</string>
|
|
||||||
</attribute>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_14">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QScrollArea" name="scrollTerminal">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="focusPolicy">
|
|
||||||
<enum>Qt::NoFocus</enum>
|
|
||||||
</property>
|
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::NoFrame</enum>
|
|
||||||
</property>
|
|
||||||
<property name="widgetResizable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<widget class="QWidget" name="scrollAreaWidgetContents_8">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>760</width>
|
|
||||||
<height>333</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QDockWidget" name="dockWidgetPlot">
|
<widget class="QDockWidget" name="dockWidgetPlot">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
@ -798,8 +262,8 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>50</width>
|
<width>36</width>
|
||||||
<height>54</height>
|
<height>425</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
@ -810,15 +274,24 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<family>Cantarell</family>
|
<family>Sans Serif</family>
|
||||||
<pointsize>10</pointsize>
|
<pointsize>11</pointsize>
|
||||||
<weight>50</weight>
|
<weight>50</weight>
|
||||||
<bold>false</bold>
|
<bold>false</bold>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string><html><head/><body>
|
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||||
<span style=" font-family:'Sans Serif'; font-size:9pt; color:#00007f;">Left Click :zoom in</span><br><span style=" font-family:'Sans Serif'; font-size:9pt; color:#00007f;">Right Click : zoom out by 1</span><br><span style=" font-family:'Sans Serif'; font-size:9pt; color:#00007f;">Middle Click : panning</span><br><span style=" font-family:'Sans Serif'; font-size:9pt; color:#00007f;">Ctrl+Right Click : zoom out to full size</span></body></html></string>
|
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||||
|
p, li { white-space: pre-wrap; }
|
||||||
|
</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
|
||||||
|
<table border="0" style="-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;">
|
||||||
|
<tr>
|
||||||
|
<td style="border: none;">
|
||||||
|
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#00007f;">Left Click :zoom in</span></p>
|
||||||
|
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#00007f;">Righ</span><span style=" color:#00007f;">t Click </span><span style=" color:#00007f;">: zoom out by 1</span></p>
|
||||||
|
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#00007f;">Middle Click : panning</span></p>
|
||||||
|
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#00007f;">Ctrl+Right Click : zoom out to full size</span></p></td></tr></table></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="statusTip">
|
<property name="statusTip">
|
||||||
<string/>
|
<string/>
|
||||||
@ -827,7 +300,7 @@
|
|||||||
<enum>Qt::LeftToRight</enum>
|
<enum>Qt::LeftToRight</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="features">
|
<property name="features">
|
||||||
<set>QDockWidget::DockWidgetFloatable</set>
|
<set>QDockWidget::NoDockWidgetFeatures</set>
|
||||||
</property>
|
</property>
|
||||||
<property name="allowedAreas">
|
<property name="allowedAreas">
|
||||||
<set>Qt::BottomDockWidgetArea</set>
|
<set>Qt::BottomDockWidgetArea</set>
|
||||||
@ -848,7 +321,7 @@
|
|||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>0</width>
|
<width>0</width>
|
||||||
<height>0</height>
|
<height>400</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
@ -896,125 +369,27 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<family>Cantarell</family>
|
<pointsize>9</pointsize>
|
||||||
<pointsize>10</pointsize>
|
|
||||||
<weight>50</weight>
|
<weight>50</weight>
|
||||||
<bold>false</bold>
|
<bold>false</bold>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QMenuBar" name="menu">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>800</width>
|
|
||||||
<height>22</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>50</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<widget class="QMenu" name="menuUtilities">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string>Utilities</string>
|
|
||||||
</property>
|
|
||||||
<addaction name="actionLoadConfiguration"/>
|
|
||||||
<addaction name="actionLoadTrimbits"/>
|
|
||||||
<addaction name="actionSaveTrimbits"/>
|
|
||||||
<addaction name="actionLoadParameters"/>
|
|
||||||
</widget>
|
|
||||||
<widget class="QMenu" name="menuModes">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string>Modes</string>
|
|
||||||
</property>
|
|
||||||
<addaction name="actionDebug"/>
|
|
||||||
<addaction name="actionExpert"/>
|
|
||||||
</widget>
|
|
||||||
<widget class="QMenu" name="menuHelp">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string>Help</string>
|
|
||||||
</property>
|
|
||||||
<addaction name="actionAbout"/>
|
|
||||||
</widget>
|
|
||||||
<addaction name="menuUtilities"/>
|
|
||||||
<addaction name="menuModes"/>
|
|
||||||
<addaction name="menuHelp"/>
|
|
||||||
</widget>
|
|
||||||
<action name="actionLoadConfiguration">
|
<action name="actionLoadConfiguration">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Load Configuration</string>
|
<string>Load Configuration</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
</action>
|
</action>
|
||||||
<action name="actionLoadTrimbits">
|
<action name="actionLoadTrimbits">
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Load Trimbits</string>
|
<string>Load Trimbits</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
</action>
|
|
||||||
<action name="actionSaveTrimbits">
|
|
||||||
<property name="text">
|
|
||||||
<string>Save Trimbits</string>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
</action>
|
</action>
|
||||||
<action name="actionLoadParameters">
|
<action name="actionLoadParameters">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Load Parameters</string>
|
<string>Load Parameters</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
</action>
|
</action>
|
||||||
<action name="actionDebug">
|
<action name="actionDebug">
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
@ -1023,12 +398,6 @@
|
|||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Debug</string>
|
<string>Debug</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
</action>
|
</action>
|
||||||
<action name="actionExpert">
|
<action name="actionExpert">
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
@ -1037,36 +406,23 @@
|
|||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Expert</string>
|
<string>Expert</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
</action>
|
</action>
|
||||||
<action name="actionDockable">
|
<action name="actionDockable">
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Dockable</string>
|
<string>Dockable Windows</string>
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionAbout">
|
<action name="actionAbout">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>About</string>
|
<string>&About</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
</action>
|
||||||
<font>
|
<action name="actionSaveTrimbits">
|
||||||
<family>Cantarell</family>
|
<property name="text">
|
||||||
<pointsize>10</pointsize>
|
<string>Save Trimbits</string>
|
||||||
</font>
|
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
|
@ -16,12 +16,6 @@
|
|||||||
<height>425</height>
|
<height>425</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Form</string>
|
<string>Form</string>
|
||||||
</property>
|
</property>
|
||||||
@ -83,15 +77,6 @@
|
|||||||
</disabled>
|
</disabled>
|
||||||
</palette>
|
</palette>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string><html><head/><body><p>ROI enabled at Receiver level (affects only file write)</p><p>#rx_roi#</p></body></html></string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Rx Roi Enabled</string>
|
<string>Rx Roi Enabled</string>
|
||||||
</property>
|
</property>
|
||||||
@ -110,10 +95,8 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<family>Cantarell</family>
|
<family>Sans Serif</family>
|
||||||
<pointsize>10</pointsize>
|
<pointsize>10</pointsize>
|
||||||
<weight>50</weight>
|
|
||||||
<bold>false</bold>
|
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="title">
|
<property name="title">
|
||||||
@ -126,16 +109,7 @@
|
|||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="plotLayout">
|
<layout class="QGridLayout" name="plotLayout">
|
||||||
<property name="leftMargin">
|
<property name="margin">
|
||||||
<number>9</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>9</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>9</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>9</number>
|
<number>9</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
@ -164,26 +138,8 @@
|
|||||||
<height>16</height>
|
<height>16</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string><html><head/><body><p>Data Statistics</p></body></html></string>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
<property name="leftMargin">
|
<property name="margin">
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
@ -209,12 +165,6 @@
|
|||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Max: </string>
|
<string>Max: </string>
|
||||||
</property>
|
</property>
|
||||||
@ -231,12 +181,6 @@
|
|||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>-</string>
|
<string>-</string>
|
||||||
</property>
|
</property>
|
||||||
@ -275,12 +219,6 @@
|
|||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Min: </string>
|
<string>Min: </string>
|
||||||
</property>
|
</property>
|
||||||
@ -297,12 +235,6 @@
|
|||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>-</string>
|
<string>-</string>
|
||||||
</property>
|
</property>
|
||||||
@ -316,12 +248,6 @@
|
|||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>-</string>
|
<string>-</string>
|
||||||
</property>
|
</property>
|
||||||
@ -360,12 +286,6 @@
|
|||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Sum: </string>
|
<string>Sum: </string>
|
||||||
</property>
|
</property>
|
||||||
@ -447,15 +367,6 @@
|
|||||||
</disabled>
|
</disabled>
|
||||||
</palette>
|
</palette>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string><html><head/><body><p>If sub images have missing packets</p></body></html></string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Complete Image</string>
|
<string>Complete Image</string>
|
||||||
</property>
|
</property>
|
||||||
@ -521,14 +432,6 @@
|
|||||||
</disabled>
|
</disabled>
|
||||||
</palette>
|
</palette>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string><html><head/><body><p>If sub images have missing packets</p></body></html></string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Missing Packets</string>
|
<string>Missing Packets</string>
|
||||||
</property>
|
</property>
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>770</width>
|
<width>775</width>
|
||||||
<height>364</height>
|
<height>345</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -24,16 +24,10 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>770</width>
|
<width>775</width>
|
||||||
<height>370</height>
|
<height>365</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Form</string>
|
<string>Form</string>
|
||||||
</property>
|
</property>
|
||||||
@ -43,12 +37,6 @@
|
|||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>File</string>
|
<string>File</string>
|
||||||
</property>
|
</property>
|
||||||
@ -67,18 +55,6 @@
|
|||||||
<height>25</height>
|
<height>25</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>105</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string><html><head/><body><p>The file path can be different depending on the Module chosen.</p></body></html></string>
|
<string><html><head/><body><p>The file path can be different depending on the Module chosen.</p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
@ -135,14 +111,8 @@
|
|||||||
</disabled>
|
</disabled>
|
||||||
</palette>
|
</palette>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string><html><head/><body><p>Name of data file in receiver. Can be modified in Measurement tab.<br/>#fname# <br/></p></body></html></string>
|
<string><html><head/><body><p>Name of file. Can be modified in Measurement tab.<br/>#fname# <br/></p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Name Prefix: </string>
|
<string>Name Prefix: </string>
|
||||||
@ -157,20 +127,14 @@
|
|||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>16777215</width>
|
|
||||||
<height>35</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string><html><head/><body><p>Directory where one saves the data in receiver. <br/>#fpath# <br/><br/>Disabled if receiver pc is not same as client pc. </p></body></html></string>
|
<string><nobr>
|
||||||
|
Directory where one saves the data.
|
||||||
|
</nobr><br>
|
||||||
|
#outdir#
|
||||||
|
<br>
|
||||||
|
Disabled if receiver pc is not same as client pc.
|
||||||
|
</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Browse</string>
|
<string>Browse</string>
|
||||||
@ -232,14 +196,8 @@
|
|||||||
</disabled>
|
</disabled>
|
||||||
</palette>
|
</palette>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string><html><head/><body><p>File Format of data file in receiver<br/>#fformat# <br/></p></body></html></string>
|
<string><html><head/><body><p>File Format<br/>#fileformat# <br/></p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Format:</string>
|
<string>Format:</string>
|
||||||
@ -260,20 +218,8 @@
|
|||||||
<height>25</height>
|
<height>25</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>105</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string><html><head/><body><p>File Format of data file in receiver<br/>#fformat# <br/></p></body></html></string>
|
<string><html><head/><body><p>File Format<br/>#fileformat# <br/></p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -338,14 +284,13 @@
|
|||||||
</disabled>
|
</disabled>
|
||||||
</palette>
|
</palette>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string><html><head/><body><p>Directory where one saves the data in receiver. <br/>#fpath# <br/></p></body></html></string>
|
<string><nobr>
|
||||||
|
Directory where one saves the data.
|
||||||
|
</nobr><br>
|
||||||
|
#outdir#
|
||||||
|
<br>
|
||||||
|
</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Path:</string>
|
<string>Path:</string>
|
||||||
@ -369,15 +314,9 @@
|
|||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>16777215</width>
|
<width>16777215</width>
|
||||||
<height>28</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="focusPolicy">
|
<property name="focusPolicy">
|
||||||
<enum>Qt::NoFocus</enum>
|
<enum>Qt::NoFocus</enum>
|
||||||
</property>
|
</property>
|
||||||
@ -409,14 +348,9 @@
|
|||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string><html><head/><body><p>Overwrite enable of data file in receiver</p><p> #foverwrite#</p></body></html></string>
|
<string>Overwrite Enable
|
||||||
|
#overwrite#</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Overwrite</string>
|
<string>Overwrite</string>
|
||||||
@ -463,23 +397,16 @@
|
|||||||
<height>25</height>
|
<height>25</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>16777215</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="focusPolicy">
|
<property name="focusPolicy">
|
||||||
<enum>Qt::StrongFocus</enum>
|
<enum>Qt::StrongFocus</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string><html><head/><body><p>Directory where one saves the data in receiver. <br/>#fpath# <br/></p></body></html></string>
|
<string><nobr>
|
||||||
|
Directory where one saves the data.
|
||||||
|
</nobr><br>
|
||||||
|
#outdir#
|
||||||
|
<br>
|
||||||
|
</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -504,12 +431,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="QGroupBox" name="boxCorrection_2">
|
<widget class="QGroupBox" name="boxCorrection_2">
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Options</string>
|
<string>Options</string>
|
||||||
</property>
|
</property>
|
||||||
@ -527,15 +448,6 @@
|
|||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string><html><head/><body><p>Speed of Detector readout</p><p>#speed#</p></body></html></string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Clock Divider:</string>
|
<string>Clock Divider:</string>
|
||||||
</property>
|
</property>
|
||||||
@ -571,18 +483,9 @@
|
|||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>200</width>
|
<width>200</width>
|
||||||
<height>25</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string><html><head/><body><p>Speed of Detector readout</p><p>#speed#</p></body></html></string>
|
|
||||||
</property>
|
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Full Speed</string>
|
<string>Full Speed</string>
|
||||||
@ -618,25 +521,6 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0">
|
|
||||||
<widget class="QCheckBox" name="chkTenGiga">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string><html><head/><body><p>Enable 10GbE</p><p>#tengiga#</p></body></html></string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>10GbE</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<item>
|
<item>
|
||||||
@ -644,15 +528,6 @@
|
|||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string><html><head/><body><p>Enable Parallel readout</p><p>#parallel#</p></body></html></string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Parallel Readout</string>
|
<string>Parallel Readout</string>
|
||||||
</property>
|
</property>
|
||||||
@ -660,6 +535,23 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QCheckBox" name="chkTenGiga">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><nobr>
|
||||||
|
Compression using Root. Available only for Gotthard in Expert Mode.
|
||||||
|
</nobr><br><nobr>
|
||||||
|
#r_compression#
|
||||||
|
</nobr></string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>10GbE</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="3" column="0">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
<item>
|
<item>
|
||||||
@ -667,15 +559,6 @@
|
|||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string><html><head/><body><p>Enable Rate Correction</p><p>#ratecorr#</p></body></html></string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Rate:</string>
|
<string>Rate:</string>
|
||||||
</property>
|
</property>
|
||||||
@ -686,15 +569,6 @@
|
|||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string><html><head/><body><p>Default Dead Time for Rate Correction</p><p>#ratecorr#</p></body></html></string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Default Dead Time</string>
|
<string>Default Dead Time</string>
|
||||||
</property>
|
</property>
|
||||||
@ -710,7 +584,7 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>20</width>
|
<width>10</width>
|
||||||
<height>20</height>
|
<height>20</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
@ -721,15 +595,6 @@
|
|||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string><html><head/><body><p>Custom Dead Time for Rate Correction</p><p>#ratecorr#</p></body></html></string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Custom Dead Time:</string>
|
<string>Custom Dead Time:</string>
|
||||||
</property>
|
</property>
|
||||||
@ -752,21 +617,6 @@
|
|||||||
<height>25</height>
|
<height>25</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>16777215</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string><html><head/><body><p>Custom Dead Time for Rate Correction</p><p>#ratecorr#</p></body></html></string>
|
|
||||||
</property>
|
|
||||||
<property name="keyboardTracking">
|
<property name="keyboardTracking">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
@ -802,19 +652,6 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="0">
|
|
||||||
<spacer name="verticalSpacer_2">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>40</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -826,13 +663,6 @@
|
|||||||
<tabstop>btnOutputBrowse</tabstop>
|
<tabstop>btnOutputBrowse</tabstop>
|
||||||
<tabstop>comboFileFormat</tabstop>
|
<tabstop>comboFileFormat</tabstop>
|
||||||
<tabstop>chkOverwriteEnable</tabstop>
|
<tabstop>chkOverwriteEnable</tabstop>
|
||||||
<tabstop>chkParallel</tabstop>
|
|
||||||
<tabstop>comboClkDivider</tabstop>
|
|
||||||
<tabstop>chkRate</tabstop>
|
|
||||||
<tabstop>radioDefaultDeadtime</tabstop>
|
|
||||||
<tabstop>radioCustomDeadtime</tabstop>
|
|
||||||
<tabstop>spinCustomDeadTime</tabstop>
|
|
||||||
<tabstop>chkTenGiga</tabstop>
|
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../include/icons.qrc"/>
|
<include location="../include/icons.qrc"/>
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>770</width>
|
<width>775</width>
|
||||||
<height>330</height>
|
<height>345</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -24,24 +24,18 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>770</width>
|
<width>1000</width>
|
||||||
<height>330</height>
|
<height>1000</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Form</string>
|
<string>Form</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="lblDetector">
|
<widget class="QPushButton" name="btnGetInfo">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
@ -54,21 +48,28 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>200</width>
|
<width>16777215</width>
|
||||||
<height>25</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Readout :</string>
|
<string>Get ID Information </string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../include/icons.qrc">
|
||||||
|
<normaloff>:/icons/images/download.png</normaloff>:/icons/images/download.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QGroupBox" name="groupBox">
|
||||||
|
<property name="focusPolicy">
|
||||||
|
<enum>Qt::NoFocus</enum>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Tests</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<spacer name="horizontalSpacer">
|
<spacer name="horizontalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
@ -85,258 +86,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="2">
|
|
||||||
<widget class="QComboBox" name="comboDetector">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>200</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string> to read status or run tests</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="lblFirmwareVersion">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>200</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Firmware Version :</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="2">
|
|
||||||
<widget class="QLineEdit" name="dispFirmwareVersion">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>200</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string><html><head/><body><p>Sets output file name prefix</p><p>#fname#</p></body></html></string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="frame">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="readOnly">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="lblSoftwareVersion">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>200</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Detector Server Version :</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="2">
|
|
||||||
<widget class="QLineEdit" name="dispSoftwareVersion">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>200</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string><html><head/><body><p>Sets output file name prefix</p><p>#fname#</p></body></html></string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="frame">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="readOnly">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="3">
|
|
||||||
<spacer name="horizontalSpacer_2">
|
|
||||||
<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="3" column="0">
|
|
||||||
<widget class="QLabel" name="lblReceiverVersion">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>200</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Receiver Version :</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="2">
|
|
||||||
<widget class="QLineEdit" name="dispReceiverVersion">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>200</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string><html><head/><body><p>Sets output file name prefix</p><p>#fname#</p></body></html></string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="frame">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="readOnly">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="0">
|
|
||||||
<widget class="QLabel" name="lblStatusLabel">
|
<widget class="QLabel" name="lblStatusLabel">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||||
@ -344,296 +94,25 @@
|
|||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>200</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Status :</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="2">
|
|
||||||
<widget class="QLabel" name="lblStatus">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>200</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>IDLE</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="0" colspan="3">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="groupTest">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>280</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="focusPolicy">
|
|
||||||
<enum>Qt::NoFocus</enum>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string>Tests</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
|
||||||
<item row="1" column="0">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="chkDetectorBus">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>150</width>
|
<width>150</width>
|
||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="focusPolicy">
|
|
||||||
<enum>Qt::NoFocus</enum>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Module Bus</string>
|
<string>Status:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="5" column="0">
|
||||||
<widget class="QLabel" name="lblBusTestFail">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>200</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="palette">
|
|
||||||
<palette>
|
|
||||||
<active>
|
|
||||||
<colorrole role="WindowText">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>204</red>
|
|
||||||
<green>0</green>
|
|
||||||
<blue>0</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
</active>
|
|
||||||
<inactive>
|
|
||||||
<colorrole role="WindowText">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>204</red>
|
|
||||||
<green>0</green>
|
|
||||||
<blue>0</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
</inactive>
|
|
||||||
<disabled>
|
|
||||||
<colorrole role="WindowText">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>190</red>
|
|
||||||
<green>190</green>
|
|
||||||
<blue>190</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
</disabled>
|
|
||||||
</palette>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>FAIL</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="lblBusTestOk">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>200</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="palette">
|
|
||||||
<palette>
|
|
||||||
<active>
|
|
||||||
<colorrole role="WindowText">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>78</red>
|
|
||||||
<green>154</green>
|
|
||||||
<blue>6</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
</active>
|
|
||||||
<inactive>
|
|
||||||
<colorrole role="WindowText">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>78</red>
|
|
||||||
<green>154</green>
|
|
||||||
<blue>6</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
</inactive>
|
|
||||||
<disabled>
|
|
||||||
<colorrole role="WindowText">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>190</red>
|
|
||||||
<green>190</green>
|
|
||||||
<blue>190</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
</disabled>
|
|
||||||
</palette>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>OK</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer_4">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="btnTest">
|
<widget class="QPushButton" name="btnTest">
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>35</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>16777215</width>
|
|
||||||
<height>35</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Run Test </string>
|
<string>Run Test </string>
|
||||||
</property>
|
</property>
|
||||||
@ -643,12 +122,24 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
<item row="3" column="0">
|
||||||
|
<widget class="QCheckBox" name="chkDetectorFirmware">
|
||||||
|
<property name="focusPolicy">
|
||||||
|
<enum>Qt::NoFocus</enum>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Module Firmware</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<widget class="QLabel" name="lblDetector">
|
||||||
<item>
|
<property name="sizePolicy">
|
||||||
<widget class="QCheckBox" name="chkDetectorFirmware">
|
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>0</width>
|
<width>0</width>
|
||||||
@ -661,165 +152,68 @@
|
|||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="text">
|
||||||
<font>
|
<string>Module:</string>
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QCheckBox" name="chkDetectorBus">
|
||||||
<property name="focusPolicy">
|
<property name="focusPolicy">
|
||||||
<enum>Qt::NoFocus</enum>
|
<enum>Qt::NoFocus</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Module Firmware</string>
|
<string>Module Bus</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="1" column="2" colspan="2">
|
||||||
<widget class="QLabel" name="lblFwTestFail">
|
<widget class="QLabel" name="lblStatus">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>200</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="palette">
|
|
||||||
<palette>
|
|
||||||
<active>
|
|
||||||
<colorrole role="WindowText">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>204</red>
|
|
||||||
<green>0</green>
|
|
||||||
<blue>0</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
</active>
|
|
||||||
<inactive>
|
|
||||||
<colorrole role="WindowText">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>204</red>
|
|
||||||
<green>0</green>
|
|
||||||
<blue>0</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
</inactive>
|
|
||||||
<disabled>
|
|
||||||
<colorrole role="WindowText">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>190</red>
|
|
||||||
<green>190</green>
|
|
||||||
<blue>190</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
</disabled>
|
|
||||||
</palette>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>FAIL</string>
|
<string>IDLE</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="0" column="2" colspan="2">
|
||||||
<widget class="QLabel" name="lblFwTestOk">
|
<widget class="QComboBox" name="comboDetector">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>200</width>
|
<width>16777215</width>
|
||||||
<height>25</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="palette">
|
|
||||||
<palette>
|
|
||||||
<active>
|
|
||||||
<colorrole role="WindowText">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>78</red>
|
|
||||||
<green>154</green>
|
|
||||||
<blue>6</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
</active>
|
|
||||||
<inactive>
|
|
||||||
<colorrole role="WindowText">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>78</red>
|
|
||||||
<green>154</green>
|
|
||||||
<blue>6</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
</inactive>
|
|
||||||
<disabled>
|
|
||||||
<colorrole role="WindowText">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>190</red>
|
|
||||||
<green>190</green>
|
|
||||||
<blue>190</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
</disabled>
|
|
||||||
</palette>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>OK</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="2" column="0" colspan="4">
|
||||||
<spacer name="horizontalSpacer_3">
|
<widget class="Line" name="line">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Fixed</enum>
|
||||||
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>40</width>
|
<width>40</width>
|
||||||
@ -828,35 +222,18 @@
|
|||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
<item row="2" column="1">
|
||||||
</item>
|
<spacer name="horizontalSpacer_2">
|
||||||
<item row="3" column="0">
|
|
||||||
<spacer name="verticalSpacer">
|
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Expanding</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>20</width>
|
<width>20</width>
|
||||||
<height>40</height>
|
<height>20</height>
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="3">
|
|
||||||
<spacer name="horizontalSpacer_5">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>377</width>
|
|
||||||
<height>17</height>
|
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>740</width>
|
<width>775</width>
|
||||||
<height>320</height>
|
<height>345</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -24,140 +24,40 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>740</width>
|
<width>775</width>
|
||||||
<height>330</height>
|
<height>400</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Form</string>
|
<string>Form</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<property name="leftMargin">
|
<item row="1" column="0" colspan="3">
|
||||||
<number>9</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>2</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>2</number>
|
|
||||||
</property>
|
|
||||||
<property name="verticalSpacing">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item row="1" column="0" colspan="5">
|
|
||||||
<widget class="QTabWidget" name="tabWidget">
|
<widget class="QTabWidget" name="tabWidget">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
<horstretch>5</horstretch>
|
<horstretch>5</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>16777215</width>
|
|
||||||
<height>330</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>0</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tabDAC">
|
<widget class="QWidget" name="tabDAC">
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>16777215</width>
|
|
||||||
<height>330</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>DACs</string>
|
<string>DACs</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QGridLayout" name="gridlayoutDac">
|
<layout class="QGridLayout" name="gridlayoutDac"/>
|
||||||
<property name="topMargin">
|
|
||||||
<number>2</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>2</number>
|
|
||||||
</property>
|
|
||||||
<property name="horizontalSpacing">
|
|
||||||
<number>10</number>
|
|
||||||
</property>
|
|
||||||
<property name="verticalSpacing">
|
|
||||||
<number>2</number>
|
|
||||||
</property>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="tabADC">
|
<widget class="QWidget" name="tabADC">
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>ADCs</string>
|
<string>ADCs</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QGridLayout" name="gridlayoutAdc">
|
<layout class="QGridLayout" name="gridlayoutAdc"/>
|
||||||
<property name="horizontalSpacing">
|
|
||||||
<number>10</number>
|
|
||||||
</property>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="0" colspan="2">
|
<item row="0" column="1">
|
||||||
<spacer name="horizontalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Fixed</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>350</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="2">
|
|
||||||
<widget class="QLabel" name="lblReadout">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Readout: </string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="3" colspan="2">
|
|
||||||
<widget class="QComboBox" name="comboDetector">
|
<widget class="QComboBox" name="comboDetector">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
@ -168,32 +68,42 @@
|
|||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>0</width>
|
<width>0</width>
|
||||||
<height>25</height>
|
<height>28</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<spacer name="horizontalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Fixed</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>16777215</width>
|
<width>500</width>
|
||||||
<height>25</height>
|
<height>20</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
</spacer>
|
||||||
<font>
|
</item>
|
||||||
<family>Cantarell</family>
|
<item row="0" column="0">
|
||||||
<pointsize>10</pointsize>
|
<widget class="QLabel" name="lblReadout">
|
||||||
</font>
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="text">
|
||||||
<string>Select readout to read dac or adc info</string>
|
<string>Readout: </string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
|
||||||
<tabstop>comboDetector</tabstop>
|
|
||||||
<tabstop>tabWidget</tabstop>
|
|
||||||
</tabstops>
|
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../include/icons.qrc"/>
|
<include location="../include/icons.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -28,24 +28,12 @@
|
|||||||
<height>345</height>
|
<height>345</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Form</string>
|
<string>Form</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="1" column="1" colspan="3">
|
<item row="1" column="1" colspan="3">
|
||||||
<widget class="QTextEdit" name="dispLog">
|
<widget class="QTextEdit" name="dispLog">
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="focusPolicy">
|
<property name="focusPolicy">
|
||||||
<enum>Qt::NoFocus</enum>
|
<enum>Qt::NoFocus</enum>
|
||||||
</property>
|
</property>
|
||||||
@ -59,23 +47,11 @@
|
|||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>0</width>
|
<width>0</width>
|
||||||
<height>26</height>
|
<height>25</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>16777215</width>
|
|
||||||
<height>28</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string><html><head/><body><p><img src=":/icons/images/upload.png"/> = previous command</p><p><img src=":/icons/images/download.png"/> = clears current command</p><p>[Return or Enter key] = executes current command</p></body></html></string>
|
<string><html><head/><body><p>Up arrow key picks up the previous command.</p><p>Down arrow key clears the current command.</p><p>Return or Enter key executes the current command</p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -87,27 +63,12 @@
|
|||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>35</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>16777215</width>
|
<width>16777215</width>
|
||||||
<height>35</height>
|
<height>35</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Clear log</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Clear</string>
|
<string>Clear</string>
|
||||||
</property>
|
</property>
|
||||||
@ -125,27 +86,12 @@
|
|||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>35</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>16777215</width>
|
<width>16777215</width>
|
||||||
<height>35</height>
|
<height>35</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Save log</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Save</string>
|
<string>Save</string>
|
||||||
</property>
|
</property>
|
||||||
@ -163,12 +109,6 @@
|
|||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Cantarell</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Command:</string>
|
<string>Command:</string>
|
||||||
</property>
|
</property>
|
||||||
@ -190,9 +130,9 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>btnSave</tabstop>
|
|
||||||
<tabstop>btnClear</tabstop>
|
|
||||||
<tabstop>dispCommand</tabstop>
|
<tabstop>dispCommand</tabstop>
|
||||||
|
<tabstop>btnClear</tabstop>
|
||||||
|
<tabstop>btnSave</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../include/icons.qrc"/>
|
<include location="../include/icons.qrc"/>
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -41,10 +41,7 @@ class qDefs : public QWidget {
|
|||||||
*/
|
*/
|
||||||
qDefs(){};
|
qDefs(){};
|
||||||
|
|
||||||
static QFont GetDefaultFont() {
|
static const int Q_FONT_SIZE = 9;
|
||||||
return QFont("Cantarell", 10, QFont::Normal);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const int DATA_GAIN_PLOT_RATIO = 5;
|
static const int DATA_GAIN_PLOT_RATIO = 5;
|
||||||
static const int MIN_HEIGHT_GAIN_PLOT_1D = 75;
|
static const int MIN_HEIGHT_GAIN_PLOT_1D = 75;
|
||||||
static const int GUI_ZMQ_RCV_HWM = 2;
|
static const int GUI_ZMQ_RCV_HWM = 2;
|
||||||
|
@ -4,6 +4,9 @@
|
|||||||
#include "qDefs.h"
|
#include "qDefs.h"
|
||||||
#include "sls/Detector.h"
|
#include "sls/Detector.h"
|
||||||
#include "ui_form_detectormain.h"
|
#include "ui_form_detectormain.h"
|
||||||
|
#include <QTabWidget>
|
||||||
|
|
||||||
|
class QScrollArea;
|
||||||
class QResizeEvent;
|
class QResizeEvent;
|
||||||
|
|
||||||
namespace sls {
|
namespace sls {
|
||||||
@ -18,6 +21,15 @@ class qTabDebugging;
|
|||||||
class qTabDeveloper;
|
class qTabDeveloper;
|
||||||
class qTabMessages;
|
class qTabMessages;
|
||||||
|
|
||||||
|
/** To Over-ride the QTabWidget class to get the tabBar protected
|
||||||
|
* methodTabWidget */
|
||||||
|
class MyTabWidget : public QTabWidget {
|
||||||
|
public:
|
||||||
|
MyTabWidget(QWidget *parent = 0) { setParent(parent); }
|
||||||
|
/** Overridden protected method from QTabWidget */
|
||||||
|
QTabBar *tabBar() { return QTabWidget::tabBar(); }
|
||||||
|
};
|
||||||
|
|
||||||
class qDetectorMain : public QMainWindow, private Ui::DetectorMainObject {
|
class qDetectorMain : public QMainWindow, private Ui::DetectorMainObject {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
@ -63,6 +75,8 @@ class qDetectorMain : public QMainWindow, private Ui::DetectorMainObject {
|
|||||||
slsDetectorDefs::detectorType detType;
|
slsDetectorDefs::detectorType detType;
|
||||||
std::unique_ptr<Detector> det;
|
std::unique_ptr<Detector> det;
|
||||||
qDrawPlot *plot;
|
qDrawPlot *plot;
|
||||||
|
MyTabWidget *tabs;
|
||||||
|
QScrollArea *scroll[NumberOfTabs];
|
||||||
qTabMeasurement *tabMeasurement;
|
qTabMeasurement *tabMeasurement;
|
||||||
qTabDataOutput *tabDataOutput;
|
qTabDataOutput *tabDataOutput;
|
||||||
qTabPlot *tabPlot;
|
qTabPlot *tabPlot;
|
||||||
@ -71,7 +85,9 @@ class qDetectorMain : public QMainWindow, private Ui::DetectorMainObject {
|
|||||||
qTabDebugging *tabDebugging;
|
qTabDebugging *tabDebugging;
|
||||||
qTabDeveloper *tabDeveloper;
|
qTabDeveloper *tabDeveloper;
|
||||||
qTabMessages *tabMessages;
|
qTabMessages *tabMessages;
|
||||||
int isDeveloper{false};
|
int isDeveloper;
|
||||||
|
int heightPlotWindow;
|
||||||
|
int heightCentralWidget;
|
||||||
QString zoomToolTip;
|
QString zoomToolTip;
|
||||||
QColor defaultTabColor;
|
QColor defaultTabColor;
|
||||||
};
|
};
|
||||||
|
@ -64,8 +64,6 @@ class qDrawPlot : public QWidget, private Ui::PlotObject {
|
|||||||
void resizeEvent(QResizeEvent *event);
|
void resizeEvent(QResizeEvent *event);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void Zoom1DGainPlot(const QRectF &rect);
|
|
||||||
void Zoom2DGainPlot(const QRectF &rect);
|
|
||||||
void SetSaveFileName(QString val);
|
void SetSaveFileName(QString val);
|
||||||
void UpdatePlot();
|
void UpdatePlot();
|
||||||
|
|
||||||
|
@ -4,6 +4,9 @@
|
|||||||
#include "sls/Detector.h"
|
#include "sls/Detector.h"
|
||||||
#include "ui_form_tab_debugging.h"
|
#include "ui_form_tab_debugging.h"
|
||||||
|
|
||||||
|
class QTreeWidget;
|
||||||
|
class QTreeWidgetItem;
|
||||||
|
|
||||||
namespace sls {
|
namespace sls {
|
||||||
|
|
||||||
class qTabDebugging : public QWidget, private Ui::TabDebuggingObject {
|
class qTabDebugging : public QWidget, private Ui::TabDebuggingObject {
|
||||||
@ -15,20 +18,22 @@ class qTabDebugging : public QWidget, private Ui::TabDebuggingObject {
|
|||||||
void Refresh();
|
void Refresh();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
void GetDetectorStatus();
|
||||||
void GetInfo();
|
void GetInfo();
|
||||||
void EnableTest();
|
void SetParameters(QTreeWidgetItem *item);
|
||||||
void TestDetector();
|
void TestDetector();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void SetupWidgetWindow();
|
void SetupWidgetWindow();
|
||||||
void Initialization();
|
void Initialization();
|
||||||
void PopulateDetectors();
|
void PopulateDetectors();
|
||||||
void GetFirmwareVersion();
|
|
||||||
void GetServerSoftwareVersion();
|
|
||||||
void GetReceiverVersion();
|
|
||||||
void GetDetectorStatus();
|
|
||||||
|
|
||||||
Detector *det;
|
Detector *det;
|
||||||
|
/** Tree Widget displaying the detectors, modules */
|
||||||
|
QTreeWidget *treeDet;
|
||||||
|
QLabel *lblDetectorHostname;
|
||||||
|
QLabel *lblDetectorFirmware;
|
||||||
|
QLabel *lblDetectorSoftware;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace sls
|
} // namespace sls
|
||||||
|
@ -103,6 +103,7 @@ class qTabMeasurement : public QWidget, private Ui::TabMeasurementObject {
|
|||||||
int numMeasurements{1};
|
int numMeasurements{1};
|
||||||
int currentMeasurement{0};
|
int currentMeasurement{0};
|
||||||
mutable std::mutex mProgress;
|
mutable std::mutex mProgress;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace sls
|
} // namespace sls
|
||||||
|
@ -38,8 +38,8 @@ class qTabPlot : public QWidget, private Ui::TabPlotObject {
|
|||||||
void CheckAspectRatio();
|
void CheckAspectRatio();
|
||||||
void SetZRange();
|
void SetZRange();
|
||||||
void SetStreamingFrequency();
|
void SetStreamingFrequency();
|
||||||
void SelectHwm(int value);
|
void SetStreamingHwm(int value);
|
||||||
void SetHwm(int value);
|
void SetReceivingHwm(int value);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void DisableZoomSignal(bool);
|
void DisableZoomSignal(bool);
|
||||||
@ -50,11 +50,8 @@ class qTabPlot : public QWidget, private Ui::TabPlotObject {
|
|||||||
void Select1DPlot(bool enable);
|
void Select1DPlot(bool enable);
|
||||||
void GetGapPixels();
|
void GetGapPixels();
|
||||||
void GetStreamingFrequency();
|
void GetStreamingFrequency();
|
||||||
void GetHwm();
|
|
||||||
void GetStreamingHwm();
|
void GetStreamingHwm();
|
||||||
void SetStreamingHwm(int value);
|
|
||||||
void GetReceivingHwm();
|
void GetReceivingHwm();
|
||||||
void SetReceivingHwm(int value);
|
|
||||||
void SetXYRange();
|
void SetXYRange();
|
||||||
void MaintainAspectRatio(int dimension);
|
void MaintainAspectRatio(int dimension);
|
||||||
|
|
||||||
@ -69,8 +66,6 @@ class qTabPlot : public QWidget, private Ui::TabPlotObject {
|
|||||||
static QString defaultImageXAxisTitle;
|
static QString defaultImageXAxisTitle;
|
||||||
static QString defaultImageYAxisTitle;
|
static QString defaultImageYAxisTitle;
|
||||||
static QString defaultImageZAxisTitle;
|
static QString defaultImageZAxisTitle;
|
||||||
|
|
||||||
enum { SND_HWM, RX_HWM };
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace sls
|
} // namespace sls
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
// SPDX-License-Identifier: LGPL-3.0-or-other
|
|
||||||
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include <QFontMetrics>
|
|
||||||
#include <QString>
|
|
||||||
|
|
||||||
namespace sls {
|
|
||||||
|
|
||||||
int qResolve_GetQFontWidth(const QFontMetrics fm, const QString &text,
|
|
||||||
int len = -1);
|
|
||||||
|
|
||||||
} // namespace sls
|
|
@ -92,7 +92,7 @@ class SlsQt1DPlot : public QwtPlot {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SlsQt1DPlot(QWidget * = NULL, bool gain = false);
|
SlsQt1DPlot(QWidget * = NULL);
|
||||||
~SlsQt1DPlot();
|
~SlsQt1DPlot();
|
||||||
|
|
||||||
void SetTitle(QString title);
|
void SetTitle(QString title);
|
||||||
@ -145,8 +145,6 @@ class SlsQt1DPlot : public QwtPlot {
|
|||||||
void DisableRoiBox();
|
void DisableRoiBox();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool gainPlot{false};
|
|
||||||
|
|
||||||
SlsQtH1DList *hist_list{nullptr};
|
SlsQtH1DList *hist_list{nullptr};
|
||||||
SlsQt1DZoomer *zoomer{nullptr};
|
SlsQt1DZoomer *zoomer{nullptr};
|
||||||
QwtPlotPanner *panner{nullptr};
|
QwtPlotPanner *panner{nullptr};
|
||||||
@ -171,16 +169,9 @@ class SlsQt1DPlot : public QwtPlot {
|
|||||||
|
|
||||||
QwtPlotShapeItem *roiBox{nullptr};
|
QwtPlotShapeItem *roiBox{nullptr};
|
||||||
|
|
||||||
signals:
|
|
||||||
void PlotZoomedSignal(const QRectF &);
|
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void SetZoomX(const QRectF &rect);
|
|
||||||
void UnZoom();
|
void UnZoom();
|
||||||
void Update();
|
void Update();
|
||||||
|
|
||||||
private slots:
|
|
||||||
void GetPannedCoord(int, int);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace sls
|
} // namespace sls
|
||||||
|
@ -19,7 +19,7 @@ class SlsQt2DPlot : public QwtPlot {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SlsQt2DPlot(QWidget * = NULL, bool gain = false);
|
SlsQt2DPlot(QWidget * = NULL);
|
||||||
~SlsQt2DPlot();
|
~SlsQt2DPlot();
|
||||||
void SetTitle(QString title);
|
void SetTitle(QString title);
|
||||||
void SetXTitle(QString title);
|
void SetXTitle(QString title);
|
||||||
@ -76,19 +76,10 @@ class SlsQt2DPlot : public QwtPlot {
|
|||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void showSpectrogram(bool on);
|
void showSpectrogram(bool on);
|
||||||
void SetZoom(const QRectF &rect);
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
void GetPannedCoord(int, int);
|
|
||||||
|
|
||||||
signals:
|
|
||||||
void PlotZoomedSignal(const QRectF &);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void SetupZoom();
|
void SetupZoom();
|
||||||
void SetupColorMap();
|
void SetupColorMap();
|
||||||
bool gainPlot{false};
|
|
||||||
|
|
||||||
QwtLinearColorMap *myColourMap(QVector<double> colourStops);
|
QwtLinearColorMap *myColourMap(QVector<double> colourStops);
|
||||||
QwtLinearColorMap *myColourMap(int log = 0);
|
QwtLinearColorMap *myColourMap(int log = 0);
|
||||||
|
|
||||||
|
@ -3,10 +3,6 @@
|
|||||||
|
|
||||||
/* TODO! short description */
|
/* TODO! short description */
|
||||||
#include "SlsQt1DPlot.h"
|
#include "SlsQt1DPlot.h"
|
||||||
#include "qDefs.h"
|
|
||||||
#include "qVersionResolve.h"
|
|
||||||
#include "sls/logger.h"
|
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <qwt_legend.h>
|
#include <qwt_legend.h>
|
||||||
#include <qwt_math.h>
|
#include <qwt_math.h>
|
||||||
@ -336,8 +332,7 @@ void SlsQtH1DList::Remove(SlsQtH1D *hist) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 1d plot stuff
|
// 1d plot stuff
|
||||||
SlsQt1DPlot::SlsQt1DPlot(QWidget *parent, bool gain)
|
SlsQt1DPlot::SlsQt1DPlot(QWidget *parent) : QwtPlot(parent) {
|
||||||
: QwtPlot(parent), gainPlot(gain) {
|
|
||||||
// n_histograms_attached=0;
|
// n_histograms_attached=0;
|
||||||
hline = vline = nullptr;
|
hline = vline = nullptr;
|
||||||
hist_list = new SlsQtH1DList();
|
hist_list = new SlsQtH1DList();
|
||||||
@ -355,19 +350,6 @@ SlsQt1DPlot::SlsQt1DPlot(QWidget *parent, bool gain)
|
|||||||
|
|
||||||
axisScaleEngine(QwtPlot::yLeft)->setAttribute(QwtScaleEngine::Floating);
|
axisScaleEngine(QwtPlot::yLeft)->setAttribute(QwtScaleEngine::Floating);
|
||||||
axisScaleEngine(QwtPlot::xBottom)->setAttribute(QwtScaleEngine::Floating);
|
axisScaleEngine(QwtPlot::xBottom)->setAttribute(QwtScaleEngine::Floating);
|
||||||
setFont(qDefs::GetDefaultFont());
|
|
||||||
SetTitleFont(qDefs::GetDefaultFont());
|
|
||||||
SetXFont(qDefs::GetDefaultFont());
|
|
||||||
SetYFont(qDefs::GetDefaultFont());
|
|
||||||
|
|
||||||
if (gainPlot) {
|
|
||||||
SetTitle("");
|
|
||||||
SetYTitle("Gain");
|
|
||||||
DisableZoom(true);
|
|
||||||
// set only major ticks from 0 to 3
|
|
||||||
auto div = axisScaleEngine(QwtPlot::yLeft)->divideScale(0, 3, 3, 0, 1);
|
|
||||||
setAxisScaleDiv(QwtPlot::yLeft, div);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SlsQt1DPlot::~SlsQt1DPlot() {
|
SlsQt1DPlot::~SlsQt1DPlot() {
|
||||||
@ -482,16 +464,6 @@ void SlsQt1DPlot::DisableRoiBox() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SlsQt1DPlot::SetZoomX(const QRectF &rect) {
|
|
||||||
double xmin = 0, xmax = 0, ymin = 0, ymax = 0;
|
|
||||||
rect.getCoords(&xmin, &ymin, &xmax, &ymax);
|
|
||||||
LOG(logDEBUG1) << "Zoomed in at " << xmin << "\t" << xmax << "\t" << ymin
|
|
||||||
<< "\t" << ymax;
|
|
||||||
SetXMinMax(xmin, xmax);
|
|
||||||
// SetYMinMax(ymin, ymax);
|
|
||||||
replot();
|
|
||||||
}
|
|
||||||
|
|
||||||
void SlsQt1DPlot::UnZoom() {
|
void SlsQt1DPlot::UnZoom() {
|
||||||
setAxisScale(QwtPlot::xBottom, zoomer->x(), zoomer->x() + zoomer->w());
|
setAxisScale(QwtPlot::xBottom, zoomer->x(), zoomer->x() + zoomer->w());
|
||||||
setAxisScale(QwtPlot::yLeft, zoomer->y(), zoomer->y() + zoomer->h());
|
setAxisScale(QwtPlot::yLeft, zoomer->y(), zoomer->y() + zoomer->h());
|
||||||
@ -508,22 +480,6 @@ void SlsQt1DPlot::SetZoom(double xmin, double ymin, double x_width,
|
|||||||
Update();
|
Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SlsQt1DPlot::GetPannedCoord(int, int) {
|
|
||||||
double xmin = invTransform(QwtPlot::xBottom, 0);
|
|
||||||
double xmax = invTransform(QwtPlot::xBottom, canvas()->rect().width());
|
|
||||||
double ymax = invTransform(QwtPlot::yLeft, 0);
|
|
||||||
double ymin = invTransform(QwtPlot::yLeft, canvas()->rect().height());
|
|
||||||
LOG(logDEBUG1) << "Rect1 " << xmin << "\t" << xmax << "\t" << ymin << "\t"
|
|
||||||
<< ymax;
|
|
||||||
QPointF topLeft = QPointF(xmin, ymin);
|
|
||||||
QPointF bottomRight = QPointF(xmax, ymax);
|
|
||||||
const QRectF rectf = QRectF(topLeft, bottomRight);
|
|
||||||
rectf.getCoords(&xmin, &ymin, &xmax, &ymax);
|
|
||||||
LOG(logDEBUG1) << "RectF " << xmin << "\t" << xmax << "\t" << ymin << "\t"
|
|
||||||
<< ymax;
|
|
||||||
emit PlotZoomedSignal(rectf);
|
|
||||||
}
|
|
||||||
|
|
||||||
void SlsQt1DPlot::RemoveHLine() {
|
void SlsQt1DPlot::RemoveHLine() {
|
||||||
if (hline)
|
if (hline)
|
||||||
hline->detach();
|
hline->detach();
|
||||||
@ -560,7 +516,7 @@ void SlsQt1DPlot::InsertVLine(double x) {
|
|||||||
|
|
||||||
void SlsQt1DPlot::SetupZoom() {
|
void SlsQt1DPlot::SetupZoom() {
|
||||||
// LeftButton for the zooming
|
// LeftButton for the zooming
|
||||||
// MiddleButton for the panning
|
// MidButton for the panning
|
||||||
// RightButton: zoom out by 1
|
// RightButton: zoom out by 1
|
||||||
// Ctrl+RighButton: zoom out to full size
|
// Ctrl+RighButton: zoom out to full size
|
||||||
|
|
||||||
@ -572,22 +528,18 @@ void SlsQt1DPlot::SetupZoom() {
|
|||||||
|
|
||||||
panner = new QwtPlotPanner((QwtPlotCanvas *)canvas());
|
panner = new QwtPlotPanner((QwtPlotCanvas *)canvas());
|
||||||
panner->setAxisEnabled(QwtPlot::yRight, false);
|
panner->setAxisEnabled(QwtPlot::yRight, false);
|
||||||
panner->setMouseButton(Qt::MiddleButton);
|
panner->setMouseButton(Qt::MidButton);
|
||||||
|
|
||||||
// Avoid jumping when labels with more/less digits
|
// Avoid jumping when labels with more/less digits
|
||||||
// appear/disappear when scrolling vertically
|
// appear/disappear when scrolling vertically
|
||||||
|
|
||||||
const QFontMetrics fm(axisWidget(QwtPlot::yLeft)->font());
|
const QFontMetrics fm(axisWidget(QwtPlot::yLeft)->font());
|
||||||
QwtScaleDraw *sd = axisScaleDraw(QwtPlot::yLeft);
|
QwtScaleDraw *sd = axisScaleDraw(QwtPlot::yLeft);
|
||||||
sd->setMinimumExtent(qResolve_GetQFontWidth(fm, "100.00"));
|
sd->setMinimumExtent(fm.width("100.00"));
|
||||||
|
|
||||||
const QColor c(Qt::darkBlue);
|
const QColor c(Qt::darkBlue);
|
||||||
zoomer->setRubberBandPen(c);
|
zoomer->setRubberBandPen(c);
|
||||||
zoomer->setTrackerPen(c);
|
zoomer->setTrackerPen(c);
|
||||||
|
|
||||||
connect(zoomer, SIGNAL(zoomed(const QRectF &)), this,
|
|
||||||
SIGNAL(PlotZoomedSignal(const QRectF &)));
|
|
||||||
connect(panner, SIGNAL(panned(int, int)), this,
|
|
||||||
SLOT(GetPannedCoord(int, int)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set a plain canvas frame and align the scales to it
|
// Set a plain canvas frame and align the scales to it
|
||||||
@ -646,7 +598,7 @@ void SlsQt1DPlot::DisableZoom(bool disable) {
|
|||||||
Qt::RightButton);
|
Qt::RightButton);
|
||||||
}
|
}
|
||||||
if (panner)
|
if (panner)
|
||||||
panner->setMouseButton(Qt::MiddleButton);
|
panner->setMouseButton(Qt::MidButton);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,16 +1,10 @@
|
|||||||
// SPDX-License-Identifier: LGPL-3.0-or-other
|
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
#include "SlsQt2DPlot.h"
|
#include "SlsQt2DPlot.h"
|
||||||
#include "qDefs.h"
|
// #include "sls/ansi.h"
|
||||||
#include "qVersionResolve.h"
|
|
||||||
#include "sls/logger.h"
|
|
||||||
|
|
||||||
//Suppressing warning until qwt has a fix, avoid
|
|
||||||
//patching and should be backwards compatible
|
|
||||||
//https://doc.qt.io/qt-5/qflags-obsolete.html
|
|
||||||
#pragma GCC diagnostic push
|
|
||||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
|
||||||
#include <qlist.h>
|
#include <qlist.h>
|
||||||
|
#include <qprinter.h>
|
||||||
#include <qtoolbutton.h>
|
#include <qtoolbutton.h>
|
||||||
#include <qwt_color_map.h>
|
#include <qwt_color_map.h>
|
||||||
#include <qwt_plot_layout.h>
|
#include <qwt_plot_layout.h>
|
||||||
@ -20,15 +14,13 @@
|
|||||||
#include <qwt_scale_draw.h>
|
#include <qwt_scale_draw.h>
|
||||||
#include <qwt_scale_engine.h>
|
#include <qwt_scale_engine.h>
|
||||||
#include <qwt_scale_widget.h>
|
#include <qwt_scale_widget.h>
|
||||||
#pragma GCC diagnostic pop
|
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
namespace sls {
|
namespace sls {
|
||||||
|
|
||||||
SlsQt2DPlot::SlsQt2DPlot(QWidget *parent, bool gain)
|
SlsQt2DPlot::SlsQt2DPlot(QWidget *parent) : QwtPlot(parent) {
|
||||||
: QwtPlot(parent), gainPlot(gain) {
|
|
||||||
isLog = 0;
|
isLog = 0;
|
||||||
axisScaleEngine(QwtPlot::yLeft)->setAttribute(QwtScaleEngine::Floating);
|
axisScaleEngine(QwtPlot::yLeft)->setAttribute(QwtScaleEngine::Floating);
|
||||||
axisScaleEngine(QwtPlot::xBottom)->setAttribute(QwtScaleEngine::Floating);
|
axisScaleEngine(QwtPlot::xBottom)->setAttribute(QwtScaleEngine::Floating);
|
||||||
@ -40,23 +32,7 @@ SlsQt2DPlot::SlsQt2DPlot(QWidget *parent, bool gain)
|
|||||||
d_spectrogram->attach(this);
|
d_spectrogram->attach(this);
|
||||||
plotLayout()->setAlignCanvasToScales(true);
|
plotLayout()->setAlignCanvasToScales(true);
|
||||||
FillTestPlot();
|
FillTestPlot();
|
||||||
setFont(qDefs::GetDefaultFont());
|
|
||||||
SetTitleFont(qDefs::GetDefaultFont());
|
|
||||||
SetXFont(qDefs::GetDefaultFont());
|
|
||||||
SetYFont(qDefs::GetDefaultFont());
|
|
||||||
SetZFont(qDefs::GetDefaultFont());
|
|
||||||
Update();
|
Update();
|
||||||
|
|
||||||
if (gainPlot) {
|
|
||||||
setTitle("Gain");
|
|
||||||
SetZTitle("");
|
|
||||||
enableAxis(QwtPlot::yLeft, false);
|
|
||||||
enableAxis(QwtPlot::xBottom, false);
|
|
||||||
DisableZoom(true);
|
|
||||||
// set only major ticks from 0 to 3
|
|
||||||
auto div = axisScaleEngine(QwtPlot::yRight)->divideScale(0, 3, 3, 0, 1);
|
|
||||||
setAxisScaleDiv(QwtPlot::yRight, div);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SlsQt2DPlot::~SlsQt2DPlot() = default;
|
SlsQt2DPlot::~SlsQt2DPlot() = default;
|
||||||
@ -142,7 +118,7 @@ void SlsQt2DPlot::FillTestPlot(int mode) {
|
|||||||
|
|
||||||
void SlsQt2DPlot::SetupZoom() {
|
void SlsQt2DPlot::SetupZoom() {
|
||||||
// LeftButton for the zooming
|
// LeftButton for the zooming
|
||||||
// MiddleButton for the panning
|
// MidButton for the panning
|
||||||
// RightButton: zoom out by 1
|
// RightButton: zoom out by 1
|
||||||
// Ctrl+RighButton: zoom out to full size
|
// Ctrl+RighButton: zoom out to full size
|
||||||
|
|
||||||
@ -153,23 +129,18 @@ void SlsQt2DPlot::SetupZoom() {
|
|||||||
zoomer->setMousePattern(QwtEventPattern::MouseSelect3, Qt::RightButton);
|
zoomer->setMousePattern(QwtEventPattern::MouseSelect3, Qt::RightButton);
|
||||||
panner = new QwtPlotPanner(canvas());
|
panner = new QwtPlotPanner(canvas());
|
||||||
panner->setAxisEnabled(QwtPlot::yRight, false);
|
panner->setAxisEnabled(QwtPlot::yRight, false);
|
||||||
panner->setMouseButton(Qt::MiddleButton);
|
panner->setMouseButton(Qt::MidButton);
|
||||||
|
|
||||||
// Avoid jumping when labels with more/less digits
|
// Avoid jumping when labels with more/less digits
|
||||||
// appear/disappear when scrolling vertically
|
// appear/disappear when scrolling vertically
|
||||||
|
|
||||||
const QFontMetrics fm(axisWidget(QwtPlot::yLeft)->font());
|
const QFontMetrics fm(axisWidget(QwtPlot::yLeft)->font());
|
||||||
QwtScaleDraw *sd = axisScaleDraw(QwtPlot::yLeft);
|
QwtScaleDraw *sd = axisScaleDraw(QwtPlot::yLeft);
|
||||||
sd->setMinimumExtent(qResolve_GetQFontWidth(fm, "100.00"));
|
sd->setMinimumExtent(fm.width("100.00"));
|
||||||
|
|
||||||
const QColor c(Qt::darkBlue);
|
const QColor c(Qt::darkBlue);
|
||||||
zoomer->setRubberBandPen(c);
|
zoomer->setRubberBandPen(c);
|
||||||
zoomer->setTrackerPen(c);
|
zoomer->setTrackerPen(c);
|
||||||
|
|
||||||
connect(zoomer, SIGNAL(zoomed(const QRectF &)), this,
|
|
||||||
SIGNAL(PlotZoomedSignal(const QRectF &)));
|
|
||||||
|
|
||||||
connect(panner, SIGNAL(panned(int, int)), this,
|
|
||||||
SLOT(GetPannedCoord(int, int)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SlsQt2DPlot::UnZoom(bool replot) {
|
void SlsQt2DPlot::UnZoom(bool replot) {
|
||||||
@ -182,32 +153,6 @@ void SlsQt2DPlot::UnZoom(bool replot) {
|
|||||||
// zoomer->zoom(0);
|
// zoomer->zoom(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SlsQt2DPlot::GetPannedCoord(int, int) {
|
|
||||||
double xmin = invTransform(QwtPlot::xBottom, 0);
|
|
||||||
double xmax = invTransform(QwtPlot::xBottom, canvas()->rect().width());
|
|
||||||
double ymax = invTransform(QwtPlot::yLeft, 0);
|
|
||||||
double ymin = invTransform(QwtPlot::yLeft, canvas()->rect().height());
|
|
||||||
LOG(logDEBUG1) << "Rect1 " << xmin << "\t" << xmax << "\t" << ymin << "\t"
|
|
||||||
<< ymax;
|
|
||||||
QPointF topLeft = QPointF(xmin, ymin);
|
|
||||||
QPointF bottomRight = QPointF(xmax, ymax);
|
|
||||||
const QRectF rectf = QRectF(topLeft, bottomRight);
|
|
||||||
rectf.getCoords(&xmin, &ymin, &xmax, &ymax);
|
|
||||||
LOG(logDEBUG1) << "RectF " << xmin << "\t" << xmax << "\t" << ymin << "\t"
|
|
||||||
<< ymax;
|
|
||||||
emit PlotZoomedSignal(rectf);
|
|
||||||
}
|
|
||||||
|
|
||||||
void SlsQt2DPlot::SetZoom(const QRectF &rect) {
|
|
||||||
double xmin = 0, xmax = 0, ymin = 0, ymax = 0;
|
|
||||||
rect.getCoords(&xmin, &ymin, &xmax, &ymax);
|
|
||||||
LOG(logDEBUG1) << "Plot zooming in to " << xmin << " " << xmax << " "
|
|
||||||
<< ymin << " " << ymax;
|
|
||||||
SetXMinMax(xmin, xmax);
|
|
||||||
SetYMinMax(ymin, ymax);
|
|
||||||
replot();
|
|
||||||
}
|
|
||||||
|
|
||||||
void SlsQt2DPlot::SetZoom(double xmin, double ymin, double x_width,
|
void SlsQt2DPlot::SetZoom(double xmin, double ymin, double x_width,
|
||||||
double y_width) {
|
double y_width) {
|
||||||
zoomer->setZoomBase(QRectF(xmin, ymin, x_width, y_width));
|
zoomer->setZoomBase(QRectF(xmin, ymin, x_width, y_width));
|
||||||
@ -244,7 +189,7 @@ void SlsQt2DPlot::DisableZoom(bool disable) {
|
|||||||
Qt::RightButton);
|
Qt::RightButton);
|
||||||
}
|
}
|
||||||
if (panner)
|
if (panner)
|
||||||
panner->setMouseButton(Qt::MiddleButton);
|
panner->setMouseButton(Qt::MidButton);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -288,12 +233,10 @@ void SlsQt2DPlot::Update() {
|
|||||||
hist->SetMinimumToFirstGreaterThanZero();
|
hist->SetMinimumToFirstGreaterThanZero();
|
||||||
const QwtInterval zInterval = d_spectrogram->data()->interval(Qt::ZAxis);
|
const QwtInterval zInterval = d_spectrogram->data()->interval(Qt::ZAxis);
|
||||||
rightAxis->setColorMap(zInterval, myColourMap(isLog));
|
rightAxis->setColorMap(zInterval, myColourMap(isLog));
|
||||||
|
|
||||||
if (!zoomer->zoomRectIndex())
|
if (!zoomer->zoomRectIndex())
|
||||||
UnZoom();
|
UnZoom();
|
||||||
if (!gainPlot) {
|
setAxisScale(QwtPlot::yRight, zInterval.minValue(), zInterval.maxValue());
|
||||||
setAxisScale(QwtPlot::yRight, zInterval.minValue(),
|
|
||||||
zInterval.maxValue());
|
|
||||||
}
|
|
||||||
plotLayout()->setAlignCanvasToScales(true);
|
plotLayout()->setAlignCanvasToScales(true);
|
||||||
replot();
|
replot();
|
||||||
}
|
}
|
||||||
|
@ -49,6 +49,7 @@ void qCloneWidget::SetupWidgetWindow(QString title) {
|
|||||||
std::string(" - ") + Logger::Timestamp();
|
std::string(" - ") + Logger::Timestamp();
|
||||||
setWindowTitle(QString(winTitle.c_str()));
|
setWindowTitle(QString(winTitle.c_str()));
|
||||||
|
|
||||||
|
boxPlot->setFont(QFont("Sans Serif", qDefs::Q_FONT_SIZE, QFont::Normal));
|
||||||
boxPlot->setTitle(title);
|
boxPlot->setTitle(title);
|
||||||
|
|
||||||
// 1d
|
// 1d
|
||||||
@ -107,7 +108,7 @@ void qCloneWidget::SavePlot() {
|
|||||||
QString fName = filePath + QString('/') + fileName + QString("_clone") +
|
QString fName = filePath + QString('/') + fileName + QString("_clone") +
|
||||||
QString("%1").arg(id) + QString("_acq") +
|
QString("%1").arg(id) + QString("_acq") +
|
||||||
QString("%1").arg(acqIndex) + QString(".png");
|
QString("%1").arg(acqIndex) + QString(".png");
|
||||||
LOG(logINFO) << "Saving Clone:" << fName.toLatin1().constData();
|
LOG(logINFO) << "Saving Clone:" << fName.toAscii().constData();
|
||||||
// save
|
// save
|
||||||
QImage img(centralwidget->size().width(), centralwidget->size().height(),
|
QImage img(centralwidget->size().width(), centralwidget->size().height(),
|
||||||
QImage::Format_RGB32);
|
QImage::Format_RGB32);
|
||||||
|
@ -61,7 +61,7 @@ void qDacWidget::GetDac() {
|
|||||||
|
|
||||||
void qDacWidget::SetDac() {
|
void qDacWidget::SetDac() {
|
||||||
int val = (int)spinDac->value();
|
int val = (int)spinDac->value();
|
||||||
LOG(logINFO) << "Setting dac:" << lblDac->text().toLatin1().data() << " : "
|
LOG(logINFO) << "Setting dac:" << lblDac->text().toAscii().data() << " : "
|
||||||
<< val;
|
<< val;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -16,28 +16,21 @@
|
|||||||
#include "sls/versionAPI.h"
|
#include "sls/versionAPI.h"
|
||||||
|
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
|
#include <QPlastiqueStyle>
|
||||||
#include <QResizeEvent>
|
#include <QResizeEvent>
|
||||||
|
#include <QScrollArea>
|
||||||
#include <QSizePolicy>
|
#include <QSizePolicy>
|
||||||
|
|
||||||
#include "sls/Version.h"
|
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
std::string getClientVersion() {
|
|
||||||
try {
|
|
||||||
sls::Version v(APILIB);
|
|
||||||
return v.concise();
|
|
||||||
} catch (...) {
|
|
||||||
return std::string("unknown");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
|
|
||||||
// options
|
// options
|
||||||
std::string fname;
|
std::string fname;
|
||||||
bool isDeveloper = false;
|
bool isDeveloper = false;
|
||||||
|
int64_t tempval = 0;
|
||||||
int multiId = 0;
|
int multiId = 0;
|
||||||
|
|
||||||
// parse command line for config
|
// parse command line for config
|
||||||
@ -79,7 +72,9 @@ int main(int argc, char **argv) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'v':
|
case 'v':
|
||||||
LOG(sls::logINFO) << "SLS Detector GUI " << getClientVersion();
|
tempval = APIGUI;
|
||||||
|
LOG(sls::logINFO) << "SLS Detector GUI " << GITBRANCH << " (0x"
|
||||||
|
<< std::hex << tempval << ")";
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case 'h':
|
case 'h':
|
||||||
@ -100,6 +95,7 @@ int main(int argc, char **argv) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QApplication app(argc, argv);
|
QApplication app(argc, argv);
|
||||||
|
app.setStyle(new QPlastiqueStyle); // style is deleted by QApplication
|
||||||
try {
|
try {
|
||||||
sls::qDetectorMain det(multiId, fname, isDeveloper);
|
sls::qDetectorMain det(multiId, fname, isDeveloper);
|
||||||
det.show();
|
det.show();
|
||||||
@ -117,7 +113,7 @@ namespace sls {
|
|||||||
qDetectorMain::qDetectorMain(int multiId, const std::string &fname,
|
qDetectorMain::qDetectorMain(int multiId, const std::string &fname,
|
||||||
bool isDevel)
|
bool isDevel)
|
||||||
: QMainWindow(nullptr), detType(slsDetectorDefs::GENERIC),
|
: QMainWindow(nullptr), detType(slsDetectorDefs::GENERIC),
|
||||||
isDeveloper(isDevel) {
|
isDeveloper(isDevel), heightPlotWindow(0), heightCentralWidget(0) {
|
||||||
|
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
SetUpDetector(fname, multiId);
|
SetUpDetector(fname, multiId);
|
||||||
@ -126,45 +122,94 @@ qDetectorMain::qDetectorMain(int multiId, const std::string &fname,
|
|||||||
|
|
||||||
qDetectorMain::~qDetectorMain() {
|
qDetectorMain::~qDetectorMain() {
|
||||||
disconnect(tabs, SIGNAL(currentChanged(int)), this, SLOT(Refresh(int)));
|
disconnect(tabs, SIGNAL(currentChanged(int)), this, SLOT(Refresh(int)));
|
||||||
|
for (int i = 0; i < NumberOfTabs; ++i) {
|
||||||
|
delete scroll[i];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void qDetectorMain::SetUpWidgetWindow() {
|
void qDetectorMain::SetUpWidgetWindow() {
|
||||||
|
setFont(QFont("Sans Serif", qDefs::Q_FONT_SIZE, QFont::Normal));
|
||||||
|
|
||||||
// plot setup
|
// plot setup
|
||||||
plot = new qDrawPlot(dockWidgetPlot, det.get());
|
plot = new qDrawPlot(dockWidgetPlot, det.get());
|
||||||
LOG(logDEBUG) << "DockPlot ready";
|
LOG(logDEBUG) << "DockPlot ready";
|
||||||
dockWidgetPlot->setWidget(plot);
|
dockWidgetPlot->setWidget(plot);
|
||||||
dockWidgetPlot->setFloating(false);
|
|
||||||
zoomToolTip = dockWidgetPlot->toolTip();
|
// tabs setup
|
||||||
|
tabs = new MyTabWidget(this);
|
||||||
|
layoutTabs->addWidget(tabs);
|
||||||
|
|
||||||
// creating all the other tab widgets
|
// creating all the other tab widgets
|
||||||
tabMeasurement = new qTabMeasurement(tMeasurement, det.get(), plot);
|
tabMeasurement = new qTabMeasurement(this, det.get(), plot);
|
||||||
tabDataOutput = new qTabDataOutput(tDataOutput, det.get());
|
tabDataOutput = new qTabDataOutput(this, det.get());
|
||||||
tabPlot = new qTabPlot(tPlot, det.get(), plot);
|
tabPlot = new qTabPlot(this, det.get(), plot);
|
||||||
tabSettings = new qTabSettings(tSettings, det.get());
|
tabSettings = new qTabSettings(this, det.get());
|
||||||
tabAdvanced = new qTabAdvanced(tAdvanced, det.get(), plot);
|
tabAdvanced = new qTabAdvanced(this, det.get(), plot);
|
||||||
tabDebugging = new qTabDebugging(tDebugging, det.get());
|
tabDebugging = new qTabDebugging(this, det.get());
|
||||||
tabDeveloper = new qTabDeveloper(tDeveloper, det.get());
|
tabDeveloper = new qTabDeveloper(this, det.get());
|
||||||
|
|
||||||
scrollMeasurement->setWidget(tabMeasurement);
|
// creating the scroll area widgets for the tabs
|
||||||
scrollDataOutput->setWidget(tabDataOutput);
|
for (int i = 0; i < NumberOfTabs; ++i) {
|
||||||
scrollPlot->setWidget(tabPlot);
|
scroll[i] = new QScrollArea();
|
||||||
scrollSettings->setWidget(tabSettings);
|
scroll[i]->setFrameShape(QFrame::NoFrame);
|
||||||
scrollAdvanced->setWidget(tabAdvanced);
|
}
|
||||||
scrollDebugging->setWidget(tabDebugging);
|
// setting the tab widgets to the scrollareas
|
||||||
scrollDeveloper->setWidget(tabDeveloper);
|
scroll[MEASUREMENT]->setWidget(tabMeasurement);
|
||||||
scrollTerminal->setWidget(tabMessages);
|
scroll[DATAOUTPUT]->setWidget(tabDataOutput);
|
||||||
|
scroll[PLOT]->setWidget(tabPlot);
|
||||||
|
scroll[SETTINGS]->setWidget(tabSettings);
|
||||||
|
scroll[ADVANCED]->setWidget(tabAdvanced);
|
||||||
|
scroll[DEBUGGING]->setWidget(tabDebugging);
|
||||||
|
scroll[DEVELOPER]->setWidget(tabDeveloper);
|
||||||
|
// inserting all the tabs
|
||||||
|
tabs->insertTab(MEASUREMENT, scroll[MEASUREMENT], "Measurement");
|
||||||
|
tabs->insertTab(DATAOUTPUT, scroll[DATAOUTPUT], "Data Output");
|
||||||
|
tabs->insertTab(PLOT, scroll[PLOT], "Plot");
|
||||||
|
tabs->insertTab(SETTINGS, scroll[SETTINGS], "Settings");
|
||||||
|
tabs->insertTab(ADVANCED, scroll[ADVANCED], "Advanced");
|
||||||
|
tabs->insertTab(DEBUGGING, scroll[DEBUGGING], "Debugging");
|
||||||
|
tabs->insertTab(DEVELOPER, scroll[DEVELOPER], "Developer");
|
||||||
|
// no scroll buttons this way
|
||||||
|
tabs->insertTab(MESSAGES, tabMessages, "Terminal");
|
||||||
|
|
||||||
|
// swap tabs so that messages is last tab
|
||||||
|
tabs->tabBar()->moveTab(tabs->indexOf(tabMeasurement), MEASUREMENT);
|
||||||
|
tabs->tabBar()->moveTab(tabs->indexOf(tabSettings), SETTINGS);
|
||||||
|
tabs->tabBar()->moveTab(tabs->indexOf(tabDataOutput), DATAOUTPUT);
|
||||||
|
tabs->tabBar()->moveTab(tabs->indexOf(tabPlot), PLOT);
|
||||||
|
tabs->tabBar()->moveTab(tabs->indexOf(tabAdvanced), ADVANCED);
|
||||||
|
tabs->tabBar()->moveTab(tabs->indexOf(tabDebugging), DEBUGGING);
|
||||||
|
tabs->tabBar()->moveTab(tabs->indexOf(tabDeveloper), DEVELOPER);
|
||||||
|
tabs->tabBar()->moveTab(tabs->indexOf(tabMessages), MESSAGES);
|
||||||
tabs->setCurrentIndex(MEASUREMENT);
|
tabs->setCurrentIndex(MEASUREMENT);
|
||||||
|
|
||||||
|
// other tab properties
|
||||||
|
// Default tab color
|
||||||
defaultTabColor = tabs->tabBar()->tabTextColor(DATAOUTPUT);
|
defaultTabColor = tabs->tabBar()->tabTextColor(DATAOUTPUT);
|
||||||
// set current tab to blue
|
// Set the current tab(measurement) to blue as it is the current one
|
||||||
tabs->tabBar()->setTabTextColor(0, QColor(0, 0, 200, 255));
|
tabs->tabBar()->setTabTextColor(0, QColor(0, 0, 200, 255));
|
||||||
|
tabs->tabBar()->setExpanding(true);
|
||||||
|
|
||||||
|
// mode setup - to set up the tabs initially as disabled, not in form so
|
||||||
|
// done here
|
||||||
|
LOG(logINFO)
|
||||||
|
<< "Dockable Mode: 0, Debug Mode: 0, Expert Mode: 0, Developer Mode: "
|
||||||
|
<< isDeveloper;
|
||||||
tabs->setTabEnabled(DEBUGGING, false);
|
tabs->setTabEnabled(DEBUGGING, false);
|
||||||
tabs->setTabEnabled(ADVANCED, false);
|
tabs->setTabEnabled(ADVANCED, false);
|
||||||
tabs->setTabEnabled(DEVELOPER, isDeveloper);
|
tabs->setTabEnabled(DEVELOPER, isDeveloper);
|
||||||
actionLoadTrimbits->setVisible(false);
|
actionLoadTrimbits->setVisible(false);
|
||||||
actionSaveTrimbits->setVisible(false);
|
actionSaveTrimbits->setVisible(false);
|
||||||
LOG(logINFO) << "Debug Mode: 0, Expert Mode: 0, Developer Mode: "
|
|
||||||
<< isDeveloper;
|
dockWidgetPlot->setFloating(false);
|
||||||
|
dockWidgetPlot->setFeatures(QDockWidget::NoDockWidgetFeatures);
|
||||||
|
|
||||||
|
// Other setup
|
||||||
|
// Height of plot and central widget
|
||||||
|
heightPlotWindow = dockWidgetPlot->size().height();
|
||||||
|
heightCentralWidget = centralwidget->size().height();
|
||||||
|
// Default zoom Tool Tip
|
||||||
|
zoomToolTip = dockWidgetPlot->toolTip();
|
||||||
|
|
||||||
Initialization();
|
Initialization();
|
||||||
}
|
}
|
||||||
@ -175,7 +220,7 @@ void qDetectorMain::SetUpDetector(const std::string &config_file, int multiID) {
|
|||||||
det = make_unique<Detector>(multiID);
|
det = make_unique<Detector>(multiID);
|
||||||
|
|
||||||
// create messages tab to capture config file loading logs
|
// create messages tab to capture config file loading logs
|
||||||
tabMessages = new qTabMessages(tTerminal);
|
tabMessages = new qTabMessages(this);
|
||||||
|
|
||||||
// loads the config file at startup
|
// loads the config file at startup
|
||||||
if (!config_file.empty())
|
if (!config_file.empty())
|
||||||
@ -305,8 +350,18 @@ void qDetectorMain::EnableModes(QAction *action) {
|
|||||||
actionSaveTrimbits->setVisible(visible);
|
actionSaveTrimbits->setVisible(visible);
|
||||||
tabSettings->SetExportMode(enable);
|
tabSettings->SetExportMode(enable);
|
||||||
LOG(logINFO) << "Expert Mode: " << qDefs::stringEnable(enable);
|
LOG(logINFO) << "Expert Mode: " << qDefs::stringEnable(enable);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set DockableMode
|
||||||
|
else {
|
||||||
|
enable = actionDockable->isChecked();
|
||||||
|
if (enable) {
|
||||||
|
dockWidgetPlot->setFeatures(QDockWidget::DockWidgetFloatable);
|
||||||
} else {
|
} else {
|
||||||
LOG(logERROR) << "Unknown action";
|
dockWidgetPlot->setFloating(false);
|
||||||
|
dockWidgetPlot->setFeatures(QDockWidget::NoDockWidgetFeatures);
|
||||||
|
}
|
||||||
|
LOG(logINFO) << "Dockable Mode: " << qDefs::stringEnable(enable);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -323,7 +378,7 @@ void qDetectorMain::ExecuteUtilities(QAction *action) {
|
|||||||
// Gets called when cancelled as well
|
// Gets called when cancelled as well
|
||||||
if (!fName.isEmpty()) {
|
if (!fName.isEmpty()) {
|
||||||
refreshTabs = true;
|
refreshTabs = true;
|
||||||
det->loadConfig(std::string(fName.toLatin1().constData()));
|
det->loadConfig(std::string(fName.toAscii().constData()));
|
||||||
qDefs::Message(qDefs::INFORMATION,
|
qDefs::Message(qDefs::INFORMATION,
|
||||||
"The Configuration Parameters have been "
|
"The Configuration Parameters have been "
|
||||||
"configured successfully.",
|
"configured successfully.",
|
||||||
@ -341,7 +396,7 @@ void qDetectorMain::ExecuteUtilities(QAction *action) {
|
|||||||
// Gets called when cancelled as well
|
// Gets called when cancelled as well
|
||||||
if (!fName.isEmpty()) {
|
if (!fName.isEmpty()) {
|
||||||
refreshTabs = true;
|
refreshTabs = true;
|
||||||
det->loadParameters(std::string(fName.toLatin1().constData()));
|
det->loadParameters(std::string(fName.toAscii().constData()));
|
||||||
qDefs::Message(qDefs::INFORMATION,
|
qDefs::Message(qDefs::INFORMATION,
|
||||||
"The Detector Parameters have been "
|
"The Detector Parameters have been "
|
||||||
"configured successfully.",
|
"configured successfully.",
|
||||||
@ -361,7 +416,7 @@ void qDetectorMain::ExecuteUtilities(QAction *action) {
|
|||||||
fileDialog->setFileMode(QFileDialog::AnyFile);
|
fileDialog->setFileMode(QFileDialog::AnyFile);
|
||||||
if (fileDialog->exec() == QDialog::Accepted) {
|
if (fileDialog->exec() == QDialog::Accepted) {
|
||||||
fName = fileDialog->selectedFiles()[0];
|
fName = fileDialog->selectedFiles()[0];
|
||||||
det->loadTrimbits(std::string(fName.toLatin1().constData()));
|
det->loadTrimbits(std::string(fName.toAscii().constData()));
|
||||||
qDefs::Message(qDefs::INFORMATION,
|
qDefs::Message(qDefs::INFORMATION,
|
||||||
"The Trimbits have been loaded successfully.",
|
"The Trimbits have been loaded successfully.",
|
||||||
"qDetectorMain::ExecuteUtilities");
|
"qDetectorMain::ExecuteUtilities");
|
||||||
@ -377,7 +432,7 @@ void qDetectorMain::ExecuteUtilities(QAction *action) {
|
|||||||
this, tr("Save Detector Trimbits"), fPath,
|
this, tr("Save Detector Trimbits"), fPath,
|
||||||
tr("Trimbit files (*.trim noise.sn*);;All Files(*)"));
|
tr("Trimbit files (*.trim noise.sn*);;All Files(*)"));
|
||||||
if (!fName.isEmpty()) {
|
if (!fName.isEmpty()) {
|
||||||
det->saveTrimbits(std::string(fName.toLatin1().constData()));
|
det->saveTrimbits(std::string(fName.toAscii().constData()));
|
||||||
qDefs::Message(qDefs::INFORMATION,
|
qDefs::Message(qDefs::INFORMATION,
|
||||||
"The Trimbits have been saved successfully.",
|
"The Trimbits have been saved successfully.",
|
||||||
"qDetectorMain::ExecuteUtilities");
|
"qDetectorMain::ExecuteUtilities");
|
||||||
@ -408,9 +463,10 @@ void qDetectorMain::ExecuteHelp(QAction *action) {
|
|||||||
LOG(logINFO) << "About Common GUI for Jungfrau, Eiger, Mythen3, "
|
LOG(logINFO) << "About Common GUI for Jungfrau, Eiger, Mythen3, "
|
||||||
"Gotthard, Gotthard2 and Moench detectors";
|
"Gotthard, Gotthard2 and Moench detectors";
|
||||||
|
|
||||||
|
std::string guiVersion = ToStringHex(APIGUI);
|
||||||
std::string clientVersion = "unknown";
|
std::string clientVersion = "unknown";
|
||||||
try {
|
try {
|
||||||
clientVersion = det->getClientVersion();
|
clientVersion = ToStringHex(det->getClientVersion());
|
||||||
}
|
}
|
||||||
CATCH_DISPLAY("Could not get client version.",
|
CATCH_DISPLAY("Could not get client version.",
|
||||||
"qDetectorMain::ExecuteHelp")
|
"qDetectorMain::ExecuteHelp")
|
||||||
@ -419,8 +475,9 @@ void qDetectorMain::ExecuteHelp(QAction *action) {
|
|||||||
qDefs::INFORMATION,
|
qDefs::INFORMATION,
|
||||||
"<p style=\"font-family:verdana;\">"
|
"<p style=\"font-family:verdana;\">"
|
||||||
|
|
||||||
"<b>SLS Detector Client version: " +
|
"<b>SLS Detector GUI version: " +
|
||||||
clientVersion +
|
guiVersion +
|
||||||
|
"<br>SLS Detector Client version: " + clientVersion +
|
||||||
"</b><br><br>"
|
"</b><br><br>"
|
||||||
|
|
||||||
"Common GUI to control the SLS Detectors: "
|
"Common GUI to control the SLS Detectors: "
|
||||||
@ -487,17 +544,36 @@ void qDetectorMain::Refresh(int index) {
|
|||||||
|
|
||||||
void qDetectorMain::ResizeMainWindow(bool b) {
|
void qDetectorMain::ResizeMainWindow(bool b) {
|
||||||
LOG(logDEBUG1) << "Resizing Main Window: height:" << height();
|
LOG(logDEBUG1) << "Resizing Main Window: height:" << height();
|
||||||
|
|
||||||
|
// undocked from the main window
|
||||||
if (b) {
|
if (b) {
|
||||||
setMaximumHeight(centralwidget->height() + menu->height());
|
// sets the main window height to a smaller maximum to get rid of space
|
||||||
LOG(logINFO) << "Plot undocked from main window";
|
setMaximumHeight(height() - heightPlotWindow - 9);
|
||||||
|
dockWidgetPlot->setMinimumHeight(0);
|
||||||
|
LOG(logINFO) << "Undocking from main window";
|
||||||
} else {
|
} else {
|
||||||
setMaximumHeight(QWIDGETSIZE_MAX);
|
setMaximumHeight(QWIDGETSIZE_MAX);
|
||||||
LOG(logINFO) << "Plot docked back to main window";
|
// the minimum for plot will be set when the widget gets resized
|
||||||
|
// automatically
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void qDetectorMain::resizeEvent(QResizeEvent *event) {
|
void qDetectorMain::resizeEvent(QResizeEvent *event) {
|
||||||
tabs->tabBar()->setFixedWidth(width());
|
if (!dockWidgetPlot->isFloating()) {
|
||||||
|
dockWidgetPlot->setMinimumHeight(height() - centralwidget->height() -
|
||||||
|
50);
|
||||||
|
centralwidget->setMaximumHeight(heightCentralWidget);
|
||||||
|
}
|
||||||
|
|
||||||
|
// adjusting tab width
|
||||||
|
if (width() >= 800) {
|
||||||
|
tabs->tabBar()->setFixedWidth(width() + 61);
|
||||||
|
} else {
|
||||||
|
tabs->tabBar()->setMinimumWidth(0);
|
||||||
|
tabs->tabBar()->setExpanding(true);
|
||||||
|
tabs->tabBar()->setUsesScrollButtons(true);
|
||||||
|
}
|
||||||
|
|
||||||
event->accept();
|
event->accept();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,8 +12,7 @@
|
|||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
#include <QResizeEvent>
|
#include <QResizeEvent>
|
||||||
#include <QtConcurrent/QtConcurrentRun>
|
#include <QtConcurrentRun>
|
||||||
#include <qwt_scale_engine.h>
|
|
||||||
|
|
||||||
namespace sls {
|
namespace sls {
|
||||||
|
|
||||||
@ -99,6 +98,8 @@ void qDrawPlot::Initialization() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void qDrawPlot::SetupPlots() {
|
void qDrawPlot::SetupPlots() {
|
||||||
|
setFont(QFont("Sans Serif", qDefs::Q_FONT_SIZE, QFont::Normal));
|
||||||
|
|
||||||
// default image size
|
// default image size
|
||||||
slsDetectorDefs::xy res = det->getDetectorSize();
|
slsDetectorDefs::xy res = det->getDetectorSize();
|
||||||
nPixelsX = res.x;
|
nPixelsX = res.x;
|
||||||
@ -106,10 +107,10 @@ void qDrawPlot::SetupPlots() {
|
|||||||
LOG(logINFO) << "nPixelsX:" << nPixelsX;
|
LOG(logINFO) << "nPixelsX:" << nPixelsX;
|
||||||
LOG(logINFO) << "nPixelsY:" << nPixelsY;
|
LOG(logINFO) << "nPixelsY:" << nPixelsY;
|
||||||
|
|
||||||
|
boxPlot->setFont(QFont("Sans Serif", qDefs::Q_FONT_SIZE, QFont::Normal));
|
||||||
widgetStatistics->hide();
|
widgetStatistics->hide();
|
||||||
lblCompleteImage->hide();
|
lblCompleteImage->hide();
|
||||||
lblInCompleteImage->hide();
|
lblInCompleteImage->hide();
|
||||||
lblRxRoiEnabled->hide();
|
|
||||||
|
|
||||||
// setup 1d data
|
// setup 1d data
|
||||||
|
|
||||||
@ -135,6 +136,11 @@ void qDrawPlot::SetupPlots() {
|
|||||||
hists1d.append(h);
|
hists1d.append(h);
|
||||||
// setup 1d plot
|
// setup 1d plot
|
||||||
plot1d = new SlsQt1DPlot(boxPlot);
|
plot1d = new SlsQt1DPlot(boxPlot);
|
||||||
|
plot1d->setFont(QFont("Sans Serif", qDefs::Q_FONT_SIZE, QFont::Normal));
|
||||||
|
plot1d->SetTitleFont(
|
||||||
|
QFont("Sans Serif", qDefs::Q_FONT_SIZE, QFont::Normal));
|
||||||
|
plot1d->SetXFont(QFont("Sans Serif", qDefs::Q_FONT_SIZE, QFont::Normal));
|
||||||
|
plot1d->SetYFont(QFont("Sans Serif", qDefs::Q_FONT_SIZE, QFont::Normal));
|
||||||
plot1d->SetTitle("");
|
plot1d->SetTitle("");
|
||||||
plot1d->SetXTitle(xTitle1d);
|
plot1d->SetXTitle(xTitle1d);
|
||||||
plot1d->SetYTitle(yTitle1d);
|
plot1d->SetYTitle(yTitle1d);
|
||||||
@ -152,13 +158,25 @@ void qDrawPlot::SetupPlots() {
|
|||||||
gainhist1d->SetLineColor(0);
|
gainhist1d->SetLineColor(0);
|
||||||
gainhist1d->setStyleLinesorDots(isLines);
|
gainhist1d->setStyleLinesorDots(isLines);
|
||||||
gainhist1d->setSymbolMarkers(isMarkers);
|
gainhist1d->setSymbolMarkers(isMarkers);
|
||||||
gainhist1d->setItemAttribute(QwtPlotItem::Legend, false);
|
|
||||||
// setup 1d gain plot
|
// setup 1d gain plot
|
||||||
gainplot1d = new SlsQt1DPlot(boxPlot, true);
|
gainplot1d = new SlsQt1DPlot(boxPlot);
|
||||||
|
gainplot1d->SetTitleFont(
|
||||||
|
QFont("Sans Serif", qDefs::Q_FONT_SIZE, QFont::Normal));
|
||||||
|
gainplot1d->SetYFont(
|
||||||
|
QFont("Sans Serif", qDefs::Q_FONT_SIZE, QFont::Normal));
|
||||||
|
gainplot1d->SetTitle("");
|
||||||
|
gainplot1d->SetYTitle("Gain");
|
||||||
|
// set ticks to just 3
|
||||||
|
QList<double> majorTicks({0, 1, 2, 3});
|
||||||
|
QwtScaleDiv div(0, 3, QList<double>(), QList<double>(), majorTicks);
|
||||||
|
gainplot1d->setAxisScaleDiv(QwtPlot::yLeft, div);
|
||||||
|
// gainplot1d->axisScaleDraw(QwtPlot::xBottom)->enableComponent(QwtScaleDraw::Ticks,
|
||||||
|
// false);
|
||||||
|
// gainplot1d->axisScaleDraw(QwtPlot::yLeft)->enableComponent(QwtScaleDraw::Labels,
|
||||||
|
// false);
|
||||||
|
gainhist1d->setItemAttribute(QwtPlotItem::Legend, false);
|
||||||
gainhist1d->Attach(gainplot1d);
|
gainhist1d->Attach(gainplot1d);
|
||||||
gainplot1d->hide();
|
gainplot1d->hide();
|
||||||
connect(plot1d, SIGNAL(PlotZoomedSignal(const QRectF &)), this,
|
|
||||||
SLOT(Zoom1DGainPlot(const QRectF &)));
|
|
||||||
|
|
||||||
// setup 2d data
|
// setup 2d data
|
||||||
|
|
||||||
@ -185,17 +203,30 @@ void qDrawPlot::SetupPlots() {
|
|||||||
plot2d = new SlsQt2DPlot(boxPlot);
|
plot2d = new SlsQt2DPlot(boxPlot);
|
||||||
plot2d->SetData(nPixelsX, -0.5, nPixelsX - 0.5, nPixelsY, -0.5,
|
plot2d->SetData(nPixelsX, -0.5, nPixelsX - 0.5, nPixelsY, -0.5,
|
||||||
nPixelsY - 0.5, data2d);
|
nPixelsY - 0.5, data2d);
|
||||||
|
plot2d->setFont(QFont("Sans Serif", qDefs::Q_FONT_SIZE, QFont::Normal));
|
||||||
|
plot2d->SetTitleFont(
|
||||||
|
QFont("Sans Serif", qDefs::Q_FONT_SIZE, QFont::Normal));
|
||||||
|
plot2d->SetXFont(QFont("Sans Serif", qDefs::Q_FONT_SIZE, QFont::Normal));
|
||||||
|
plot2d->SetYFont(QFont("Sans Serif", qDefs::Q_FONT_SIZE, QFont::Normal));
|
||||||
|
plot2d->SetZFont(QFont("Sans Serif", qDefs::Q_FONT_SIZE, QFont::Normal));
|
||||||
plot2d->setTitle("");
|
plot2d->setTitle("");
|
||||||
plot2d->SetXTitle(xTitle2d);
|
plot2d->SetXTitle(xTitle2d);
|
||||||
plot2d->SetYTitle(yTitle2d);
|
plot2d->SetYTitle(yTitle2d);
|
||||||
plot2d->SetZTitle(zTitle2d);
|
plot2d->SetZTitle(zTitle2d);
|
||||||
|
|
||||||
gainplot2d = new SlsQt2DPlot(boxPlot, true);
|
gainplot2d = new SlsQt2DPlot(boxPlot);
|
||||||
gainplot2d->SetData(nPixelsX, -0.5, nPixelsX - 0.5, nPixelsY, -0.5,
|
gainplot2d->SetData(nPixelsX, -0.5, nPixelsX - 0.5, nPixelsY, -0.5,
|
||||||
nPixelsY - 0.5, gainData);
|
nPixelsY - 0.5, gainData);
|
||||||
|
gainplot2d->SetTitleFont(
|
||||||
|
QFont("Sans Serif", qDefs::Q_FONT_SIZE, QFont::Normal));
|
||||||
|
gainplot2d->setTitle("Gain");
|
||||||
|
gainplot2d->SetZTitle("");
|
||||||
|
gainplot2d->enableAxis(QwtPlot::yLeft, false);
|
||||||
|
// gainplot2d->enableAxis(1, false);
|
||||||
|
gainplot2d->enableAxis(QwtPlot::xBottom, false);
|
||||||
|
// set ticks to just 3
|
||||||
|
gainplot2d->setAxisScaleDiv(QwtPlot::yRight, div);
|
||||||
gainplot2d->hide();
|
gainplot2d->hide();
|
||||||
connect(plot2d, SIGNAL(PlotZoomedSignal(const QRectF &)), this,
|
|
||||||
SLOT(Zoom2DGainPlot(const QRectF &)));
|
|
||||||
|
|
||||||
// layout of plots
|
// layout of plots
|
||||||
int ratio = qDefs::DATA_GAIN_PLOT_RATIO - 1;
|
int ratio = qDefs::DATA_GAIN_PLOT_RATIO - 1;
|
||||||
@ -206,16 +237,6 @@ void qDrawPlot::SetupPlots() {
|
|||||||
Qt::AlignRight | Qt::AlignTop);
|
Qt::AlignRight | Qt::AlignTop);
|
||||||
}
|
}
|
||||||
|
|
||||||
void qDrawPlot::Zoom1DGainPlot(const QRectF &rect) {
|
|
||||||
std::lock_guard<std::mutex> lock(mPlots);
|
|
||||||
gainplot1d->SetZoomX(rect);
|
|
||||||
}
|
|
||||||
|
|
||||||
void qDrawPlot::Zoom2DGainPlot(const QRectF &rect) {
|
|
||||||
std::lock_guard<std::mutex> lock(mPlots);
|
|
||||||
gainplot2d->SetZoom(rect);
|
|
||||||
}
|
|
||||||
|
|
||||||
void qDrawPlot::resizeEvent(QResizeEvent *event) {
|
void qDrawPlot::resizeEvent(QResizeEvent *event) {
|
||||||
if (gainplot2d->isVisible()) {
|
if (gainplot2d->isVisible()) {
|
||||||
gainplot2d->setFixedWidth(plot2d->width() /
|
gainplot2d->setFixedWidth(plot2d->width() /
|
||||||
@ -264,13 +285,13 @@ void qDrawPlot::Select1dPlot(bool enable) {
|
|||||||
|
|
||||||
void qDrawPlot::SetPlotTitlePrefix(QString title) {
|
void qDrawPlot::SetPlotTitlePrefix(QString title) {
|
||||||
std::lock_guard<std::mutex> lock(mPlots);
|
std::lock_guard<std::mutex> lock(mPlots);
|
||||||
LOG(logINFO) << "Setting Title to " << title.toLatin1().constData();
|
LOG(logINFO) << "Setting Title to " << title.toAscii().constData();
|
||||||
plotTitlePrefix = title;
|
plotTitlePrefix = title;
|
||||||
}
|
}
|
||||||
|
|
||||||
void qDrawPlot::SetXAxisTitle(QString title) {
|
void qDrawPlot::SetXAxisTitle(QString title) {
|
||||||
std::lock_guard<std::mutex> lock(mPlots);
|
std::lock_guard<std::mutex> lock(mPlots);
|
||||||
LOG(logINFO) << "Setting X Axis Title to " << title.toLatin1().constData();
|
LOG(logINFO) << "Setting X Axis Title to " << title.toAscii().constData();
|
||||||
if (is1d) {
|
if (is1d) {
|
||||||
xTitle1d = title;
|
xTitle1d = title;
|
||||||
} else {
|
} else {
|
||||||
@ -280,7 +301,7 @@ void qDrawPlot::SetXAxisTitle(QString title) {
|
|||||||
|
|
||||||
void qDrawPlot::SetYAxisTitle(QString title) {
|
void qDrawPlot::SetYAxisTitle(QString title) {
|
||||||
std::lock_guard<std::mutex> lock(mPlots);
|
std::lock_guard<std::mutex> lock(mPlots);
|
||||||
LOG(logINFO) << "Setting Y Axis Title to " << title.toLatin1().constData();
|
LOG(logINFO) << "Setting Y Axis Title to " << title.toAscii().constData();
|
||||||
if (is1d) {
|
if (is1d) {
|
||||||
yTitle1d = title;
|
yTitle1d = title;
|
||||||
} else {
|
} else {
|
||||||
@ -290,7 +311,7 @@ void qDrawPlot::SetYAxisTitle(QString title) {
|
|||||||
|
|
||||||
void qDrawPlot::SetZAxisTitle(QString title) {
|
void qDrawPlot::SetZAxisTitle(QString title) {
|
||||||
std::lock_guard<std::mutex> lock(mPlots);
|
std::lock_guard<std::mutex> lock(mPlots);
|
||||||
LOG(logINFO) << "Setting Z Axis Title to " << title.toLatin1().constData();
|
LOG(logINFO) << "Setting Z Axis Title to " << title.toAscii().constData();
|
||||||
zTitle2d = title;
|
zTitle2d = title;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -472,7 +493,7 @@ void qDrawPlot::EnableGainPlot(bool enable) {
|
|||||||
void qDrawPlot::SetSaveFileName(QString val) {
|
void qDrawPlot::SetSaveFileName(QString val) {
|
||||||
std::lock_guard<std::mutex> lock(mPlots);
|
std::lock_guard<std::mutex> lock(mPlots);
|
||||||
LOG(logDEBUG) << "Setting Clone/Save File Name to "
|
LOG(logDEBUG) << "Setting Clone/Save File Name to "
|
||||||
<< val.toLatin1().constData();
|
<< val.toAscii().constData();
|
||||||
fileSaveName = val;
|
fileSaveName = val;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -487,6 +508,14 @@ void qDrawPlot::ClonePlot() {
|
|||||||
if (is1d) {
|
if (is1d) {
|
||||||
LOG(logDEBUG) << "Cloning 1D Image";
|
LOG(logDEBUG) << "Cloning 1D Image";
|
||||||
cloneplot1D = new SlsQt1DPlot();
|
cloneplot1D = new SlsQt1DPlot();
|
||||||
|
cloneplot1D->setFont(
|
||||||
|
QFont("Sans Serif", qDefs::Q_FONT_SIZE, QFont::Normal));
|
||||||
|
cloneplot1D->SetTitleFont(
|
||||||
|
QFont("Sans Serif", qDefs::Q_FONT_SIZE, QFont::Normal));
|
||||||
|
cloneplot1D->SetXFont(
|
||||||
|
QFont("Sans Serif", qDefs::Q_FONT_SIZE, QFont::Normal));
|
||||||
|
cloneplot1D->SetYFont(
|
||||||
|
QFont("Sans Serif", qDefs::Q_FONT_SIZE, QFont::Normal));
|
||||||
cloneplot1D->SetTitle(plot1d->title().text());
|
cloneplot1D->SetTitle(plot1d->title().text());
|
||||||
cloneplot1D->SetXTitle(xTitle1d);
|
cloneplot1D->SetXTitle(xTitle1d);
|
||||||
cloneplot1D->SetYTitle(yTitle1d);
|
cloneplot1D->SetYTitle(yTitle1d);
|
||||||
@ -496,7 +525,6 @@ void qDrawPlot::ClonePlot() {
|
|||||||
h->SetLineColor(iHist);
|
h->SetLineColor(iHist);
|
||||||
h->setStyleLinesorDots(isLines);
|
h->setStyleLinesorDots(isLines);
|
||||||
h->setSymbolMarkers(isMarkers);
|
h->setSymbolMarkers(isMarkers);
|
||||||
h->setItemAttribute(QwtPlotItem::Legend, false);
|
|
||||||
cloneplotHists1D.append(h);
|
cloneplotHists1D.append(h);
|
||||||
h->Attach(cloneplot1D);
|
h->Attach(cloneplot1D);
|
||||||
}
|
}
|
||||||
@ -506,14 +534,32 @@ void qDrawPlot::ClonePlot() {
|
|||||||
h->setStyleLinesorDots(isLines);
|
h->setStyleLinesorDots(isLines);
|
||||||
h->setSymbolMarkers(isMarkers);
|
h->setSymbolMarkers(isMarkers);
|
||||||
h->setItemAttribute(QwtPlotItem::Legend, false);
|
h->setItemAttribute(QwtPlotItem::Legend, false);
|
||||||
clonegainplot1D = new SlsQt1DPlot(NULL, true);
|
clonegainplot1D = new SlsQt1DPlot();
|
||||||
|
clonegainplot1D->SetTitleFont(
|
||||||
|
QFont("Sans Serif", qDefs::Q_FONT_SIZE, QFont::Normal));
|
||||||
|
clonegainplot1D->SetYFont(
|
||||||
|
QFont("Sans Serif", qDefs::Q_FONT_SIZE, QFont::Normal));
|
||||||
|
clonegainplot1D->SetTitle("");
|
||||||
|
clonegainplot1D->SetYTitle("Gain");
|
||||||
|
// set ticks to just 3
|
||||||
|
QList<double> majorTicks({0, 1, 2, 3});
|
||||||
|
QwtScaleDiv div(0, 3, QList<double>(), QList<double>(), majorTicks);
|
||||||
|
clonegainplot1D->setAxisScaleDiv(QwtPlot::yLeft, div);
|
||||||
h->Attach(clonegainplot1D);
|
h->Attach(clonegainplot1D);
|
||||||
connect(cloneplot1D, SIGNAL(PlotZoomedSignal(const QRectF &)),
|
|
||||||
clonegainplot1D, SLOT(SetZoomX(const QRectF &)));
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
LOG(logDEBUG) << "Cloning 2D Image";
|
LOG(logDEBUG) << "Cloning 2D Image";
|
||||||
cloneplot2D = new SlsQt2DPlot();
|
cloneplot2D = new SlsQt2DPlot();
|
||||||
|
cloneplot2D->setFont(
|
||||||
|
QFont("Sans Serif", qDefs::Q_FONT_SIZE, QFont::Normal));
|
||||||
|
cloneplot2D->SetTitleFont(
|
||||||
|
QFont("Sans Serif", qDefs::Q_FONT_SIZE, QFont::Normal));
|
||||||
|
cloneplot2D->SetXFont(
|
||||||
|
QFont("Sans Serif", qDefs::Q_FONT_SIZE, QFont::Normal));
|
||||||
|
cloneplot2D->SetYFont(
|
||||||
|
QFont("Sans Serif", qDefs::Q_FONT_SIZE, QFont::Normal));
|
||||||
|
cloneplot2D->SetZFont(
|
||||||
|
QFont("Sans Serif", qDefs::Q_FONT_SIZE, QFont::Normal));
|
||||||
cloneplot2D->setTitle(plot2d->title().text());
|
cloneplot2D->setTitle(plot2d->title().text());
|
||||||
cloneplot2D->SetXTitle(xTitle2d);
|
cloneplot2D->SetXTitle(xTitle2d);
|
||||||
cloneplot2D->SetYTitle(yTitle2d);
|
cloneplot2D->SetYTitle(yTitle2d);
|
||||||
@ -523,11 +569,23 @@ void qDrawPlot::ClonePlot() {
|
|||||||
cloneplot2D->SetZRange(isZRange[0], isZRange[1], zRange[0], zRange[1]);
|
cloneplot2D->SetZRange(isZRange[0], isZRange[1], zRange[0], zRange[1]);
|
||||||
|
|
||||||
if (isGainDataExtracted) {
|
if (isGainDataExtracted) {
|
||||||
clonegainplot2D = new SlsQt2DPlot(NULL, true);
|
clonegainplot2D = new SlsQt2DPlot();
|
||||||
|
clonegainplot2D->SetTitleFont(
|
||||||
|
QFont("Sans Serif", qDefs::Q_FONT_SIZE, QFont::Normal));
|
||||||
|
clonegainplot2D->SetTitle("Gain");
|
||||||
|
clonegainplot2D->SetZTitle("");
|
||||||
|
clonegainplot2D->enableAxis(QwtPlot::yLeft, false);
|
||||||
|
clonegainplot2D->enableAxis(QwtPlot::xBottom, false);
|
||||||
|
// set ticks to just 3
|
||||||
|
QList<double> majorTicks({0, 1, 2, 3});
|
||||||
|
QwtScaleDiv div(0, 3, QList<double>(), QList<double>(), majorTicks);
|
||||||
|
clonegainplot2D->setAxisScaleDiv(QwtPlot::yRight, div);
|
||||||
|
|
||||||
|
clonegainplot2D->enableAxis(0, false);
|
||||||
|
clonegainplot2D->enableAxis(1, false);
|
||||||
|
clonegainplot2D->enableAxis(2, false);
|
||||||
clonegainplot2D->SetData(nPixelsX, -0.5, nPixelsX - 0.5, nPixelsY,
|
clonegainplot2D->SetData(nPixelsX, -0.5, nPixelsX - 0.5, nPixelsY,
|
||||||
-0.5, nPixelsY - 0.5, gainData);
|
-0.5, nPixelsY - 0.5, gainData);
|
||||||
connect(cloneplot2D, SIGNAL(PlotZoomedSignal(const QRectF &)),
|
|
||||||
clonegainplot2D, SLOT(SetZoom(const QRectF &)));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1046,14 +1104,12 @@ void qDrawPlot::Update2dPlot() {
|
|||||||
void qDrawPlot::Update1dXYRange() {
|
void qDrawPlot::Update1dXYRange() {
|
||||||
if (!isXYRange[qDefs::XMIN] && !isXYRange[qDefs::XMAX]) {
|
if (!isXYRange[qDefs::XMIN] && !isXYRange[qDefs::XMAX]) {
|
||||||
plot1d->EnableXAutoScaling();
|
plot1d->EnableXAutoScaling();
|
||||||
gainplot1d->EnableXAutoScaling();
|
|
||||||
} else {
|
} else {
|
||||||
double xmin = (isXYRange[qDefs::XMIN] ? xyRange[qDefs::XMIN]
|
double xmin = (isXYRange[qDefs::XMIN] ? xyRange[qDefs::XMIN]
|
||||||
: plot1d->GetXMinimum());
|
: plot1d->GetXMinimum());
|
||||||
double xmax = (isXYRange[qDefs::XMAX] ? xyRange[qDefs::XMAX]
|
double xmax = (isXYRange[qDefs::XMAX] ? xyRange[qDefs::XMAX]
|
||||||
: plot1d->GetXMaximum());
|
: plot1d->GetXMaximum());
|
||||||
plot1d->SetXMinMax(xmin, xmax);
|
plot1d->SetXMinMax(xmin, xmax);
|
||||||
gainplot1d->SetXMinMax(xmin, xmax);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isXYRange[qDefs::YMIN] && !isXYRange[qDefs::YMAX]) {
|
if (!isXYRange[qDefs::YMIN] && !isXYRange[qDefs::YMAX]) {
|
||||||
@ -1066,35 +1122,29 @@ void qDrawPlot::Update1dXYRange() {
|
|||||||
plot1d->SetYMinMax(ymin, ymax);
|
plot1d->SetYMinMax(ymin, ymax);
|
||||||
}
|
}
|
||||||
plot1d->Update();
|
plot1d->Update();
|
||||||
gainplot1d->Update();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void qDrawPlot::Update2dXYRange() {
|
void qDrawPlot::Update2dXYRange() {
|
||||||
if (!isXYRange[qDefs::XMIN] && !isXYRange[qDefs::XMAX]) {
|
if (!isXYRange[qDefs::XMIN] && !isXYRange[qDefs::XMAX]) {
|
||||||
plot2d->EnableXAutoScaling();
|
plot2d->EnableXAutoScaling();
|
||||||
gainplot2d->EnableXAutoScaling();
|
|
||||||
} else {
|
} else {
|
||||||
double xmin = (isXYRange[qDefs::XMIN] ? xyRange[qDefs::XMIN]
|
double xmin = (isXYRange[qDefs::XMIN] ? xyRange[qDefs::XMIN]
|
||||||
: plot2d->GetXMinimum());
|
: plot2d->GetXMinimum());
|
||||||
double xmax = (isXYRange[qDefs::XMAX] ? xyRange[qDefs::XMAX]
|
double xmax = (isXYRange[qDefs::XMAX] ? xyRange[qDefs::XMAX]
|
||||||
: plot2d->GetXMaximum());
|
: plot2d->GetXMaximum());
|
||||||
plot2d->SetXMinMax(xmin, xmax);
|
plot2d->SetXMinMax(xmin, xmax);
|
||||||
gainplot2d->SetXMinMax(xmin, xmax);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isXYRange[qDefs::YMIN] && !isXYRange[qDefs::YMAX]) {
|
if (!isXYRange[qDefs::YMIN] && !isXYRange[qDefs::YMAX]) {
|
||||||
plot2d->EnableYAutoScaling();
|
plot2d->EnableYAutoScaling();
|
||||||
gainplot2d->EnableYAutoScaling();
|
|
||||||
} else {
|
} else {
|
||||||
double ymin = (isXYRange[qDefs::YMIN] ? xyRange[qDefs::YMIN]
|
double ymin = (isXYRange[qDefs::YMIN] ? xyRange[qDefs::YMIN]
|
||||||
: plot2d->GetYMinimum());
|
: plot2d->GetYMinimum());
|
||||||
double ymax = (isXYRange[qDefs::YMAX] ? xyRange[qDefs::YMAX]
|
double ymax = (isXYRange[qDefs::YMAX] ? xyRange[qDefs::YMAX]
|
||||||
: plot2d->GetYMaximum());
|
: plot2d->GetYMaximum());
|
||||||
plot2d->SetYMinMax(ymin, ymax);
|
plot2d->SetYMinMax(ymin, ymax);
|
||||||
gainplot2d->SetYMinMax(ymin, ymax);
|
|
||||||
}
|
}
|
||||||
plot2d->Update();
|
plot2d->Update();
|
||||||
gainplot2d->Update();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void qDrawPlot::toDoublePixelData(double *dest, char *source, int size,
|
void qDrawPlot::toDoublePixelData(double *dest, char *source, int size,
|
||||||
|
@ -400,7 +400,7 @@ void qTabAdvanced::GetRxrZMQIP() {
|
|||||||
|
|
||||||
void qTabAdvanced::SetDetector() {
|
void qTabAdvanced::SetDetector() {
|
||||||
LOG(logDEBUG) << "Set Detector: "
|
LOG(logDEBUG) << "Set Detector: "
|
||||||
<< comboDetector->currentText().toLatin1().data();
|
<< comboDetector->currentText().toAscii().data();
|
||||||
|
|
||||||
GetControlPort();
|
GetControlPort();
|
||||||
GetStopPort();
|
GetStopPort();
|
||||||
@ -441,7 +441,7 @@ void qTabAdvanced::SetDetectorUDPIP(bool force) {
|
|||||||
// return forces modification (inconsistency from command line)
|
// return forces modification (inconsistency from command line)
|
||||||
if (dispDetectorUDPIP->isModified() || force) {
|
if (dispDetectorUDPIP->isModified() || force) {
|
||||||
dispDetectorUDPIP->setModified(false);
|
dispDetectorUDPIP->setModified(false);
|
||||||
std::string s = dispDetectorUDPIP->text().toLatin1().constData();
|
std::string s = dispDetectorUDPIP->text().toAscii().constData();
|
||||||
LOG(logINFO) << "Setting Detector UDP IP:" << s;
|
LOG(logINFO) << "Setting Detector UDP IP:" << s;
|
||||||
try {
|
try {
|
||||||
det->setSourceUDPIP(IpAddr{s}, {comboDetector->currentIndex()});
|
det->setSourceUDPIP(IpAddr{s}, {comboDetector->currentIndex()});
|
||||||
@ -458,7 +458,7 @@ void qTabAdvanced::SetDetectorUDPMAC(bool force) {
|
|||||||
// return forces modification (inconsistency from command line)
|
// return forces modification (inconsistency from command line)
|
||||||
if (dispDetectorUDPMAC->isModified() || force) {
|
if (dispDetectorUDPMAC->isModified() || force) {
|
||||||
dispDetectorUDPMAC->setModified(false);
|
dispDetectorUDPMAC->setModified(false);
|
||||||
std::string s = dispDetectorUDPMAC->text().toLatin1().constData();
|
std::string s = dispDetectorUDPMAC->text().toAscii().constData();
|
||||||
LOG(logINFO) << "Setting Detector UDP MAC:" << s;
|
LOG(logINFO) << "Setting Detector UDP MAC:" << s;
|
||||||
try {
|
try {
|
||||||
det->setSourceUDPMAC(MacAddr{s}, {comboDetector->currentIndex()});
|
det->setSourceUDPMAC(MacAddr{s}, {comboDetector->currentIndex()});
|
||||||
@ -485,7 +485,7 @@ void qTabAdvanced::SetCltZMQIP(bool force) {
|
|||||||
// return forces modification (inconsistency from command line)
|
// return forces modification (inconsistency from command line)
|
||||||
if (dispZMQIP->isModified() || force) {
|
if (dispZMQIP->isModified() || force) {
|
||||||
dispZMQIP->setModified(false);
|
dispZMQIP->setModified(false);
|
||||||
std::string s = dispZMQIP->text().toLatin1().constData();
|
std::string s = dispZMQIP->text().toAscii().constData();
|
||||||
LOG(logINFO) << "Setting Client ZMQ IP:" << s;
|
LOG(logINFO) << "Setting Client ZMQ IP:" << s;
|
||||||
try {
|
try {
|
||||||
det->setClientZmqIp(IpAddr{s}, {comboDetector->currentIndex()});
|
det->setClientZmqIp(IpAddr{s}, {comboDetector->currentIndex()});
|
||||||
@ -502,7 +502,7 @@ void qTabAdvanced::SetRxrHostname(bool force) {
|
|||||||
// return forces modification (inconsistency from command line)
|
// return forces modification (inconsistency from command line)
|
||||||
if (dispRxrHostname->isModified() || force) {
|
if (dispRxrHostname->isModified() || force) {
|
||||||
dispRxrHostname->setModified(false);
|
dispRxrHostname->setModified(false);
|
||||||
std::string s = dispRxrHostname->text().toLatin1().constData();
|
std::string s = dispRxrHostname->text().toAscii().constData();
|
||||||
LOG(logINFO) << "Setting Receiver Hostname:" << s;
|
LOG(logINFO) << "Setting Receiver Hostname:" << s;
|
||||||
try {
|
try {
|
||||||
det->setRxHostname(s, {comboDetector->currentIndex()});
|
det->setRxHostname(s, {comboDetector->currentIndex()});
|
||||||
@ -542,7 +542,7 @@ void qTabAdvanced::SetRxrUDPIP(bool force) {
|
|||||||
// return forces modification (inconsistency from command line)
|
// return forces modification (inconsistency from command line)
|
||||||
if (dispRxrUDPIP->isModified() || force) {
|
if (dispRxrUDPIP->isModified() || force) {
|
||||||
dispRxrUDPIP->setModified(false);
|
dispRxrUDPIP->setModified(false);
|
||||||
std::string s = dispRxrUDPIP->text().toLatin1().constData();
|
std::string s = dispRxrUDPIP->text().toAscii().constData();
|
||||||
LOG(logINFO) << "Setting Receiver UDP IP:" << s;
|
LOG(logINFO) << "Setting Receiver UDP IP:" << s;
|
||||||
try {
|
try {
|
||||||
det->setDestinationUDPIP(IpAddr{s},
|
det->setDestinationUDPIP(IpAddr{s},
|
||||||
@ -560,7 +560,7 @@ void qTabAdvanced::SetRxrUDPMAC(bool force) {
|
|||||||
// return forces modification (inconsistency from command line)
|
// return forces modification (inconsistency from command line)
|
||||||
if (dispRxrUDPMAC->isModified() || force) {
|
if (dispRxrUDPMAC->isModified() || force) {
|
||||||
dispRxrUDPMAC->setModified(false);
|
dispRxrUDPMAC->setModified(false);
|
||||||
std::string s = dispRxrUDPMAC->text().toLatin1().constData();
|
std::string s = dispRxrUDPMAC->text().toAscii().constData();
|
||||||
LOG(logINFO) << "Setting Receiver UDP MAC:" << s;
|
LOG(logINFO) << "Setting Receiver UDP MAC:" << s;
|
||||||
try {
|
try {
|
||||||
det->setDestinationUDPMAC(MacAddr{s},
|
det->setDestinationUDPMAC(MacAddr{s},
|
||||||
@ -588,7 +588,7 @@ void qTabAdvanced::SetRxrZMQIP(bool force) {
|
|||||||
// return forces modification (inconsistency from command line)
|
// return forces modification (inconsistency from command line)
|
||||||
if (dispRxrZMQIP->isModified() || force) {
|
if (dispRxrZMQIP->isModified() || force) {
|
||||||
dispRxrZMQIP->setModified(false);
|
dispRxrZMQIP->setModified(false);
|
||||||
std::string s = dispRxrZMQIP->text().toLatin1().constData();
|
std::string s = dispRxrZMQIP->text().toAscii().constData();
|
||||||
LOG(logINFO) << "Setting Receiver ZMQ IP:" << s;
|
LOG(logINFO) << "Setting Receiver ZMQ IP:" << s;
|
||||||
try {
|
try {
|
||||||
det->setRxZmqIP(IpAddr{s}, {comboDetector->currentIndex()});
|
det->setRxZmqIP(IpAddr{s}, {comboDetector->currentIndex()});
|
||||||
|
@ -192,7 +192,7 @@ void qTabDataOutput::SetOutputDir(bool force) {
|
|||||||
dispOutputDir->setModified(false);
|
dispOutputDir->setModified(false);
|
||||||
QString path = dispOutputDir->text();
|
QString path = dispOutputDir->text();
|
||||||
LOG(logDEBUG) << "Setting output directory to "
|
LOG(logDEBUG) << "Setting output directory to "
|
||||||
<< path.toLatin1().constData();
|
<< path.toAscii().constData();
|
||||||
|
|
||||||
// empty
|
// empty
|
||||||
if (path.isEmpty()) {
|
if (path.isEmpty()) {
|
||||||
@ -208,7 +208,7 @@ void qTabDataOutput::SetOutputDir(bool force) {
|
|||||||
path.chop(1);
|
path.chop(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
std::string spath = std::string(path.toLatin1().constData());
|
std::string spath = std::string(path.toAscii().constData());
|
||||||
try {
|
try {
|
||||||
det->setFilePath(spath, {comboDetector->currentIndex() - 1});
|
det->setFilePath(spath, {comboDetector->currentIndex() - 1});
|
||||||
}
|
}
|
||||||
@ -245,7 +245,7 @@ void qTabDataOutput::GetFileFormat() {
|
|||||||
|
|
||||||
void qTabDataOutput::SetFileFormat(int format) {
|
void qTabDataOutput::SetFileFormat(int format) {
|
||||||
LOG(logINFO) << "Setting File Format to "
|
LOG(logINFO) << "Setting File Format to "
|
||||||
<< comboFileFormat->currentText().toLatin1().data();
|
<< comboFileFormat->currentText().toAscii().data();
|
||||||
try {
|
try {
|
||||||
det->setFileFormat(static_cast<slsDetectorDefs::fileFormat>(
|
det->setFileFormat(static_cast<slsDetectorDefs::fileFormat>(
|
||||||
comboFileFormat->currentIndex()));
|
comboFileFormat->currentIndex()));
|
||||||
@ -388,7 +388,7 @@ void qTabDataOutput::GetSpeed() {
|
|||||||
|
|
||||||
void qTabDataOutput::SetSpeed(int speed) {
|
void qTabDataOutput::SetSpeed(int speed) {
|
||||||
LOG(logINFO) << "Setting Readout Speed to "
|
LOG(logINFO) << "Setting Readout Speed to "
|
||||||
<< comboClkDivider->currentText().toLatin1().data();
|
<< comboClkDivider->currentText().toAscii().data();
|
||||||
try {
|
try {
|
||||||
det->setReadoutSpeed(static_cast<slsDetectorDefs::speedLevel>(speed));
|
det->setReadoutSpeed(static_cast<slsDetectorDefs::speedLevel>(speed));
|
||||||
}
|
}
|
||||||
|
@ -3,36 +3,49 @@
|
|||||||
#include "qTabDebugging.h"
|
#include "qTabDebugging.h"
|
||||||
#include "qDefs.h"
|
#include "qDefs.h"
|
||||||
#include "sls/ToString.h"
|
#include "sls/ToString.h"
|
||||||
|
#include <QDesktopWidget>
|
||||||
|
#include <QGridLayout>
|
||||||
|
#include <QTreeWidget>
|
||||||
|
|
||||||
namespace sls {
|
namespace sls {
|
||||||
|
|
||||||
qTabDebugging::qTabDebugging(QWidget *parent, Detector *detector)
|
qTabDebugging::qTabDebugging(QWidget *parent, Detector *detector)
|
||||||
: QWidget(parent), det(detector) {
|
: QWidget(parent), det(detector), treeDet(nullptr),
|
||||||
|
lblDetectorHostname(nullptr), lblDetectorFirmware(nullptr),
|
||||||
|
lblDetectorSoftware(nullptr) {
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
SetupWidgetWindow();
|
SetupWidgetWindow();
|
||||||
LOG(logDEBUG) << "Debugging ready";
|
LOG(logDEBUG) << "Debugging ready";
|
||||||
}
|
}
|
||||||
|
|
||||||
qTabDebugging::~qTabDebugging() {}
|
qTabDebugging::~qTabDebugging() {
|
||||||
|
delete treeDet;
|
||||||
|
delete lblDetectorHostname;
|
||||||
|
delete lblDetectorFirmware;
|
||||||
|
delete lblDetectorSoftware;
|
||||||
|
}
|
||||||
|
|
||||||
void qTabDebugging::SetupWidgetWindow() {
|
void qTabDebugging::SetupWidgetWindow() {
|
||||||
|
// enabling according to det type
|
||||||
if (det->getDetectorType().squash() == slsDetectorDefs::EIGER) {
|
if (det->getDetectorType().squash() == slsDetectorDefs::EIGER) {
|
||||||
groupTest->setEnabled(false);
|
lblDetector->setText("Half Module:");
|
||||||
} else {
|
chkDetectorFirmware->setEnabled(false);
|
||||||
EnableTest();
|
chkDetectorBus->setEnabled(false);
|
||||||
|
btnTest->setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
PopulateDetectors();
|
PopulateDetectors();
|
||||||
|
|
||||||
Initialization();
|
Initialization();
|
||||||
|
|
||||||
Refresh();
|
Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
void qTabDebugging::Initialization() {
|
void qTabDebugging::Initialization() {
|
||||||
connect(comboDetector, SIGNAL(currentIndexChanged(int)), this,
|
connect(comboDetector, SIGNAL(currentIndexChanged(int)), this,
|
||||||
SLOT(GetInfo()));
|
SLOT(GetDetectorStatus()));
|
||||||
connect(chkDetectorFirmware, SIGNAL(toggled(bool)), this,
|
connect(btnGetInfo, SIGNAL(clicked()), this, SLOT(GetInfo()));
|
||||||
SLOT(EnableTest()));
|
if (btnTest->isEnabled()) {
|
||||||
connect(chkDetectorBus, SIGNAL(toggled(bool)), this, SLOT(EnableTest()));
|
|
||||||
if (groupTest->isEnabled()) {
|
|
||||||
connect(btnTest, SIGNAL(clicked()), this, SLOT(TestDetector()));
|
connect(btnTest, SIGNAL(clicked()), this, SLOT(TestDetector()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -40,73 +53,20 @@ void qTabDebugging::Initialization() {
|
|||||||
void qTabDebugging::PopulateDetectors() {
|
void qTabDebugging::PopulateDetectors() {
|
||||||
LOG(logDEBUG) << "Populating detectors";
|
LOG(logDEBUG) << "Populating detectors";
|
||||||
|
|
||||||
try {
|
|
||||||
comboDetector->clear();
|
comboDetector->clear();
|
||||||
comboDetector->addItem("All");
|
|
||||||
auto res = det->getHostname();
|
auto res = det->getHostname();
|
||||||
if (det->size() > 1) {
|
|
||||||
for (auto &it : res) {
|
for (auto &it : res) {
|
||||||
comboDetector->addItem(QString(it.c_str()));
|
comboDetector->addItem(QString(it.c_str()));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
comboDetector->setCurrentIndex(0);
|
|
||||||
}
|
|
||||||
CATCH_DISPLAY("Could not populate readouts for debugging",
|
|
||||||
"qTabDebugging::PopulateDetectors")
|
|
||||||
}
|
|
||||||
|
|
||||||
void qTabDebugging::GetFirmwareVersion() {
|
|
||||||
LOG(logDEBUG) << "Firmware Version";
|
|
||||||
try {
|
|
||||||
auto retval =
|
|
||||||
det->getFirmwareVersion({comboDetector->currentIndex() - 1})
|
|
||||||
.squash(-1);
|
|
||||||
std::string s = "inconsistent";
|
|
||||||
if (retval != -1) {
|
|
||||||
if (det->getDetectorType().squash() == slsDetectorDefs::EIGER) {
|
|
||||||
s = ToString(retval);
|
|
||||||
} else {
|
|
||||||
s = ToStringHex(retval);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
dispFirmwareVersion->setText(s.c_str());
|
|
||||||
}
|
|
||||||
CATCH_DISPLAY("Could not get firmware version.",
|
|
||||||
"qTabDebugging::GetFirmwareVersion")
|
|
||||||
}
|
|
||||||
|
|
||||||
void qTabDebugging::GetServerSoftwareVersion() {
|
|
||||||
LOG(logDEBUG) << "Server Software Version";
|
|
||||||
try {
|
|
||||||
std::string s =
|
|
||||||
det->getDetectorServerVersion({comboDetector->currentIndex() - 1})
|
|
||||||
.squash("inconsistent");
|
|
||||||
dispSoftwareVersion->setText(s.c_str());
|
|
||||||
}
|
|
||||||
CATCH_DISPLAY("Could not get on-board software version.",
|
|
||||||
"qTabDebugging::GetServerSoftwareVersion")
|
|
||||||
}
|
|
||||||
|
|
||||||
void qTabDebugging::GetReceiverVersion() {
|
|
||||||
LOG(logDEBUG) << "Server Receiver Version";
|
|
||||||
try {
|
|
||||||
std::string s =
|
|
||||||
det->getReceiverVersion({comboDetector->currentIndex() - 1})
|
|
||||||
.squash("inconsistent");
|
|
||||||
dispReceiverVersion->setText(s.c_str());
|
|
||||||
}
|
|
||||||
CATCH_DISPLAY("Could not receiver version.",
|
|
||||||
"qTabDebugging::GetReceiverVersion")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void qTabDebugging::GetDetectorStatus() {
|
void qTabDebugging::GetDetectorStatus() {
|
||||||
LOG(logDEBUG) << "Getting Status";
|
LOG(logDEBUG) << "Getting Status";
|
||||||
|
|
||||||
try {
|
try {
|
||||||
std::string s =
|
std::string status = ToString(
|
||||||
ToString(det->getDetectorStatus({comboDetector->currentIndex() - 1})
|
det->getDetectorStatus({comboDetector->currentIndex()})[0]);
|
||||||
.squash(defs::runStatus::ERROR));
|
lblStatus->setText(QString(status.c_str()).toUpper());
|
||||||
lblStatus->setText(QString(s.c_str()).toUpper());
|
|
||||||
}
|
}
|
||||||
CATCH_DISPLAY("Could not get detector status.",
|
CATCH_DISPLAY("Could not get detector status.",
|
||||||
"qTabDebugging::GetDetectorStatus")
|
"qTabDebugging::GetDetectorStatus")
|
||||||
@ -114,53 +74,174 @@ void qTabDebugging::GetDetectorStatus() {
|
|||||||
|
|
||||||
void qTabDebugging::GetInfo() {
|
void qTabDebugging::GetInfo() {
|
||||||
LOG(logDEBUG) << "Getting Readout Info";
|
LOG(logDEBUG) << "Getting Readout Info";
|
||||||
GetFirmwareVersion();
|
|
||||||
GetServerSoftwareVersion();
|
// open info in a new popup
|
||||||
GetReceiverVersion();
|
QFrame *popup1 = new QFrame(this, Qt::Popup | Qt::SubWindow);
|
||||||
GetDetectorStatus();
|
QList<QTreeWidgetItem *> items;
|
||||||
|
QGridLayout *layout = new QGridLayout(popup1);
|
||||||
|
treeDet = new QTreeWidget(popup1);
|
||||||
|
layout->addWidget(treeDet, 0, 0);
|
||||||
|
QFrame *dispFrame = new QFrame(popup1);
|
||||||
|
QGridLayout *formLayout = new QGridLayout(dispFrame);
|
||||||
|
lblDetectorHostname = new QLabel("");
|
||||||
|
lblDetectorFirmware = new QLabel("");
|
||||||
|
lblDetectorSoftware = new QLabel("");
|
||||||
|
// to make sure the size is constant
|
||||||
|
lblDetectorFirmware->setFixedWidth(100);
|
||||||
|
layout->addWidget(dispFrame, 0, 1);
|
||||||
|
QString detName =
|
||||||
|
QString(ToString(det->getDetectorType().squash()).c_str());
|
||||||
|
|
||||||
|
switch (det->getDetectorType().squash()) {
|
||||||
|
|
||||||
|
case slsDetectorDefs::EIGER:
|
||||||
|
formLayout->addWidget(new QLabel("Half Module:"), 0, 0);
|
||||||
|
formLayout->addItem(
|
||||||
|
new QSpacerItem(15, 20, QSizePolicy::Fixed, QSizePolicy::Fixed), 0,
|
||||||
|
1);
|
||||||
|
formLayout->addWidget(lblDetectorHostname, 0, 2);
|
||||||
|
formLayout->addWidget(new QLabel("Half Module Firmware Version:"), 1,
|
||||||
|
0);
|
||||||
|
formLayout->addWidget(lblDetectorFirmware, 1, 2);
|
||||||
|
formLayout->addWidget(new QLabel("Half Module Software Version:"), 2,
|
||||||
|
0);
|
||||||
|
formLayout->addWidget(lblDetectorSoftware, 2, 2);
|
||||||
|
treeDet->setHeaderLabel("Eiger Detector");
|
||||||
|
// get num modules
|
||||||
|
for (int i = 0; i < comboDetector->count() / 2; ++i)
|
||||||
|
items.append(
|
||||||
|
new QTreeWidgetItem((QTreeWidget *)nullptr,
|
||||||
|
QStringList(QString("Module %1").arg(i))));
|
||||||
|
treeDet->insertTopLevelItems(0, items);
|
||||||
|
// gets det names
|
||||||
|
for (int i = 0; i < comboDetector->count(); ++i) {
|
||||||
|
QList<QTreeWidgetItem *> childItems;
|
||||||
|
childItems.append(new QTreeWidgetItem(
|
||||||
|
(QTreeWidget *)nullptr,
|
||||||
|
QStringList(QString("Half Module (%1)")
|
||||||
|
.arg(comboDetector->itemText(i)))));
|
||||||
|
treeDet->topLevelItem(i * 2)->insertChildren(0, childItems);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
formLayout->addWidget(new QLabel("Module:"), 0, 0);
|
||||||
|
formLayout->addItem(
|
||||||
|
new QSpacerItem(15, 20, QSizePolicy::Fixed, QSizePolicy::Fixed), 0,
|
||||||
|
1);
|
||||||
|
formLayout->addWidget(lblDetectorHostname, 0, 2);
|
||||||
|
formLayout->addWidget(new QLabel("Module Firmware Version:"), 1, 0);
|
||||||
|
formLayout->addWidget(lblDetectorFirmware, 1, 2);
|
||||||
|
formLayout->addWidget(new QLabel("Module Software Version:"), 2, 0);
|
||||||
|
formLayout->addWidget(lblDetectorSoftware, 2, 2);
|
||||||
|
treeDet->setHeaderLabel(QString(detName + " Detector"));
|
||||||
|
// gets det names
|
||||||
|
for (int i = 0; i < comboDetector->count(); ++i)
|
||||||
|
items.append(new QTreeWidgetItem(
|
||||||
|
(QTreeWidget *)nullptr,
|
||||||
|
QStringList(
|
||||||
|
QString("Module (%1)").arg(comboDetector->itemText(i)))));
|
||||||
|
treeDet->insertTopLevelItems(0, items);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// show and center widget
|
||||||
|
int x = ((parentWidget()->width()) - (popup1->frameGeometry().width())) / 2;
|
||||||
|
int y =
|
||||||
|
((parentWidget()->height()) - (popup1->frameGeometry().height())) / 2;
|
||||||
|
QDesktopWidget *desktop = QApplication::desktop();
|
||||||
|
int screen = desktop->screenNumber(this);
|
||||||
|
popup1->setWindowModality(Qt::WindowModal);
|
||||||
|
popup1->move((desktop->screenGeometry(screen).x()) + x,
|
||||||
|
(desktop->screenGeometry(screen).y()) + y);
|
||||||
|
popup1->show();
|
||||||
|
|
||||||
|
// put the first parameters
|
||||||
|
SetParameters(treeDet->topLevelItem(0));
|
||||||
|
|
||||||
|
// connect to slots
|
||||||
|
connect(treeDet, SIGNAL(itemDoubleClicked(QTreeWidgetItem *, int)), this,
|
||||||
|
SLOT(SetParameters(QTreeWidgetItem *)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void qTabDebugging::EnableTest() {
|
void qTabDebugging::SetParameters(QTreeWidgetItem *item) {
|
||||||
btnTest->setEnabled(chkDetectorFirmware->isChecked() ||
|
// eiger: if half module clicked, others: true always
|
||||||
chkDetectorBus->isChecked());
|
bool ignoreOrHalfModuleClicked = true;
|
||||||
lblBusTestOk->hide();
|
if (det->getDetectorType().squash() == slsDetectorDefs::EIGER) {
|
||||||
lblBusTestFail->hide();
|
if (!(item->text(0).contains("Half Module"))) {
|
||||||
lblFwTestOk->hide();
|
ignoreOrHalfModuleClicked = false;
|
||||||
lblFwTestFail->hide();
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ignoreOrHalfModuleClicked) {
|
||||||
|
// find index
|
||||||
|
for (int i = 0; i < comboDetector->count(); ++i) {
|
||||||
|
if (item == treeDet->topLevelItem(i))
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
auto retval = std::string("0x") +
|
||||||
|
std::to_string((unsigned long)det->getFirmwareVersion(
|
||||||
|
{comboDetector->currentIndex()})[0]);
|
||||||
|
lblDetectorFirmware->setText(QString(retval.c_str()));
|
||||||
|
retval =
|
||||||
|
std::string("0x") +
|
||||||
|
std::to_string((unsigned long)det->getDetectorServerVersion(
|
||||||
|
{comboDetector->currentIndex()})[0]);
|
||||||
|
lblDetectorSoftware->setText(QString(retval.c_str()));
|
||||||
|
}
|
||||||
|
CATCH_DISPLAY("Could not get versions.", "qTabDebugging::SetParameters")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void qTabDebugging::TestDetector() {
|
void qTabDebugging::TestDetector() {
|
||||||
LOG(logINFO) << "Testing Readout";
|
LOG(logINFO) << "Testing Readout";
|
||||||
|
|
||||||
// hide results if clicking button again
|
try {
|
||||||
EnableTest();
|
QString moduleName = "Module";
|
||||||
|
if (det->getDetectorType().squash() == slsDetectorDefs::EIGER) {
|
||||||
|
moduleName = "Half Module";
|
||||||
|
}
|
||||||
|
|
||||||
|
// construct message
|
||||||
|
QString message = QString("<nobr>Test Results for %1:</nobr><br><br>")
|
||||||
|
.arg(comboDetector->currentText());
|
||||||
|
|
||||||
// detector firmware
|
// detector firmware
|
||||||
if (chkDetectorFirmware->isChecked()) {
|
if (chkDetectorFirmware->isChecked()) {
|
||||||
try {
|
try {
|
||||||
det->executeFirmwareTest({comboDetector->currentIndex() - 1});
|
det->executeFirmwareTest({comboDetector->currentIndex()});
|
||||||
|
message.append(QString("<nobr>%1 Firmware: PASS</nobr><br>")
|
||||||
|
.arg(moduleName));
|
||||||
LOG(logINFO) << "Detector Firmware Test: Pass";
|
LOG(logINFO) << "Detector Firmware Test: Pass";
|
||||||
lblFwTestOk->show();
|
|
||||||
} catch (std::exception &e) {
|
|
||||||
LOG(logWARNING)
|
|
||||||
<< "Detector Firmware Test: Fail (" << e.what() << ")";
|
|
||||||
lblFwTestFail->show();
|
|
||||||
}
|
}
|
||||||
|
CATCH_DISPLAY("Firmware test failed.",
|
||||||
|
"qTabDebugging::TestDetector")
|
||||||
}
|
}
|
||||||
|
|
||||||
// detector CPU-FPGA bus
|
// detector CPU-FPGA bus
|
||||||
if (chkDetectorBus->isChecked()) {
|
if (chkDetectorBus->isChecked()) {
|
||||||
try {
|
try {
|
||||||
det->executeBusTest({comboDetector->currentIndex() - 1});
|
det->executeBusTest({comboDetector->currentIndex()});
|
||||||
|
message.append(
|
||||||
|
QString("<nobr>%1 Bus: PASS</nobr><br>").arg(moduleName));
|
||||||
LOG(logINFO) << "Detector Bus Test: Pass";
|
LOG(logINFO) << "Detector Bus Test: Pass";
|
||||||
lblBusTestOk->show();
|
|
||||||
} catch (std::exception &e) {
|
|
||||||
LOG(logWARNING) << "Detector Bus Test: Fail (" << e.what() << ")";
|
|
||||||
lblBusTestFail->show();
|
|
||||||
}
|
}
|
||||||
|
CATCH_DISPLAY("Bus test failed.", "qTabDebugging::TestDetector")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// display message
|
||||||
|
qDefs::Message(qDefs::INFORMATION, message.toAscii().constData(),
|
||||||
|
"qTabDebugging::TestDetector");
|
||||||
|
}
|
||||||
|
CATCH_DISPLAY("Could not execute digital test.",
|
||||||
|
"qTabDebugging::TestDetector")
|
||||||
}
|
}
|
||||||
|
|
||||||
void qTabDebugging::Refresh() { GetInfo(); }
|
void qTabDebugging::Refresh() {
|
||||||
|
LOG(logDEBUG) << "**Updating Debugging Tab";
|
||||||
|
GetDetectorStatus();
|
||||||
|
LOG(logDEBUG) << "**Updated Debugging Tab";
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace sls
|
} // namespace sls
|
||||||
|
@ -200,9 +200,6 @@ void qTabDeveloper::SetupWidgetWindow() {
|
|||||||
dacWidgets.push_back(
|
dacWidgets.push_back(
|
||||||
new qDacWidget(this, det, true,
|
new qDacWidget(this, det, true,
|
||||||
"vthreshold: ", getSLSIndex(detType, tempid++)));
|
"vthreshold: ", getSLSIndex(detType, tempid++)));
|
||||||
adcWidgets.push_back(new qDacWidget(
|
|
||||||
this, det, false,
|
|
||||||
"Temperature FPGA: ", getSLSIndex(detType, tempid++)));
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case slsDetectorDefs::GOTTHARD2:
|
case slsDetectorDefs::GOTTHARD2:
|
||||||
@ -245,9 +242,6 @@ void qTabDeveloper::SetupWidgetWindow() {
|
|||||||
dacWidgets.push_back(
|
dacWidgets.push_back(
|
||||||
new qDacWidget(this, det, true,
|
new qDacWidget(this, det, true,
|
||||||
"vcom_adc2: ", getSLSIndex(detType, tempid++)));
|
"vcom_adc2: ", getSLSIndex(detType, tempid++)));
|
||||||
adcWidgets.push_back(new qDacWidget(
|
|
||||||
this, det, false,
|
|
||||||
"Temperature FPGA: ", getSLSIndex(detType, tempid++)));
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@ -285,7 +279,6 @@ void qTabDeveloper::Initialization() {
|
|||||||
void qTabDeveloper::PopulateDetectors() {
|
void qTabDeveloper::PopulateDetectors() {
|
||||||
LOG(logDEBUG) << "Populating detectors";
|
LOG(logDEBUG) << "Populating detectors";
|
||||||
|
|
||||||
try {
|
|
||||||
comboDetector->clear();
|
comboDetector->clear();
|
||||||
comboDetector->addItem("All");
|
comboDetector->addItem("All");
|
||||||
auto res = det->getHostname();
|
auto res = det->getHostname();
|
||||||
@ -295,9 +288,6 @@ void qTabDeveloper::PopulateDetectors() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
comboDetector->setCurrentIndex(0);
|
comboDetector->setCurrentIndex(0);
|
||||||
}
|
|
||||||
CATCH_DISPLAY("Could not populate readouts for dacs/adcs",
|
|
||||||
"qTabDeveloper::PopulateDetectors")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
slsDetectorDefs::dacIndex
|
slsDetectorDefs::dacIndex
|
||||||
@ -471,8 +461,6 @@ qTabDeveloper::getSLSIndex(slsDetectorDefs::detectorType detType, int index) {
|
|||||||
return slsDetectorDefs::VDCSH;
|
return slsDetectorDefs::VDCSH;
|
||||||
case 16:
|
case 16:
|
||||||
return slsDetectorDefs::VTHRESHOLD;
|
return slsDetectorDefs::VTHRESHOLD;
|
||||||
case 17:
|
|
||||||
return slsDetectorDefs::TEMPERATURE_FPGA;
|
|
||||||
default:
|
default:
|
||||||
throw RuntimeError(std::string("Unknown dac/adc index") +
|
throw RuntimeError(std::string("Unknown dac/adc index") +
|
||||||
std::to_string(index));
|
std::to_string(index));
|
||||||
@ -509,8 +497,6 @@ qTabDeveloper::getSLSIndex(slsDetectorDefs::detectorType detType, int index) {
|
|||||||
return slsDetectorDefs::VB_OPA_FD;
|
return slsDetectorDefs::VB_OPA_FD;
|
||||||
case 13:
|
case 13:
|
||||||
return slsDetectorDefs::VCOM_ADC2;
|
return slsDetectorDefs::VCOM_ADC2;
|
||||||
case 14:
|
|
||||||
return slsDetectorDefs::TEMPERATURE_FPGA;
|
|
||||||
default:
|
default:
|
||||||
throw RuntimeError(std::string("Unknown dac/adc index") +
|
throw RuntimeError(std::string("Unknown dac/adc index") +
|
||||||
std::to_string(index));
|
std::to_string(index));
|
||||||
|
@ -20,7 +20,6 @@ qTabMeasurement::qTabMeasurement(QWidget *parent, Detector *detector,
|
|||||||
qTabMeasurement::~qTabMeasurement() { delete progressTimer; }
|
qTabMeasurement::~qTabMeasurement() { delete progressTimer; }
|
||||||
|
|
||||||
void qTabMeasurement::SetupWidgetWindow() {
|
void qTabMeasurement::SetupWidgetWindow() {
|
||||||
setFont(QFont("Carlito", 9, QFont::Normal));
|
|
||||||
// palette
|
// palette
|
||||||
red = QPalette();
|
red = QPalette();
|
||||||
red.setColor(QPalette::Active, QPalette::WindowText, Qt::red);
|
red.setColor(QPalette::Active, QPalette::WindowText, Qt::red);
|
||||||
@ -385,7 +384,7 @@ void qTabMeasurement::GetTimingMode() {
|
|||||||
|
|
||||||
void qTabMeasurement::SetTimingMode(int val) {
|
void qTabMeasurement::SetTimingMode(int val) {
|
||||||
LOG(logINFO) << "Setting timing mode:"
|
LOG(logINFO) << "Setting timing mode:"
|
||||||
<< comboTimingMode->currentText().toLatin1().data();
|
<< comboTimingMode->currentText().toAscii().data();
|
||||||
try {
|
try {
|
||||||
det->setTimingMode(static_cast<slsDetectorDefs::timingMode>(val));
|
det->setTimingMode(static_cast<slsDetectorDefs::timingMode>(val));
|
||||||
EnableWidgetsforTimingMode();
|
EnableWidgetsforTimingMode();
|
||||||
@ -421,7 +420,7 @@ void qTabMeasurement::GetBurstMode() {
|
|||||||
|
|
||||||
void qTabMeasurement::SetBurstMode(int val) {
|
void qTabMeasurement::SetBurstMode(int val) {
|
||||||
LOG(logINFO) << "Setting burst mode:"
|
LOG(logINFO) << "Setting burst mode:"
|
||||||
<< comboBurstMode->currentText().toLatin1().data();
|
<< comboBurstMode->currentText().toAscii().data();
|
||||||
try {
|
try {
|
||||||
det->setBurstMode(static_cast<slsDetectorDefs::burstMode>(val));
|
det->setBurstMode(static_cast<slsDetectorDefs::burstMode>(val));
|
||||||
ShowTriggerDelay();
|
ShowTriggerDelay();
|
||||||
@ -801,7 +800,7 @@ void qTabMeasurement::SetFileName(bool force) {
|
|||||||
if (dispFileName->isModified() || force) {
|
if (dispFileName->isModified() || force) {
|
||||||
dispFileName->setModified(false);
|
dispFileName->setModified(false);
|
||||||
std::string val =
|
std::string val =
|
||||||
std::string(dispFileName->text().toLatin1().constData());
|
std::string(dispFileName->text().toAscii().constData());
|
||||||
LOG(logINFO) << "Setting File Name Prefix:" << val;
|
LOG(logINFO) << "Setting File Name Prefix:" << val;
|
||||||
try {
|
try {
|
||||||
det->setFileNamePrefix(val);
|
det->setFileNamePrefix(val);
|
||||||
@ -967,7 +966,7 @@ void qTabMeasurement::AcquireFinished() {
|
|||||||
void qTabMeasurement::AbortAcquire(QString exmsg) {
|
void qTabMeasurement::AbortAcquire(QString exmsg) {
|
||||||
LOG(logINFORED) << "Abort Acquire";
|
LOG(logINFORED) << "Abort Acquire";
|
||||||
qDefs::ExceptionMessage("Acquire unsuccessful.",
|
qDefs::ExceptionMessage("Acquire unsuccessful.",
|
||||||
exmsg.toLatin1().constData(),
|
exmsg.toAscii().constData(),
|
||||||
"qDrawPlot::AcquireFinished");
|
"qDrawPlot::AcquireFinished");
|
||||||
isAcquisitionStopped = true;
|
isAcquisitionStopped = true;
|
||||||
AcquireFinished();
|
AcquireFinished();
|
||||||
@ -979,7 +978,8 @@ void qTabMeasurement::Enable(bool enable) {
|
|||||||
|
|
||||||
// shortcut each time, else it doesnt work a second time
|
// shortcut each time, else it doesnt work a second time
|
||||||
btnStart->setShortcut(QApplication::translate("TabMeasurementObject",
|
btnStart->setShortcut(QApplication::translate("TabMeasurementObject",
|
||||||
"Shift+Space", nullptr));
|
"Shift+Space", nullptr,
|
||||||
|
QApplication::UnicodeUTF8));
|
||||||
}
|
}
|
||||||
|
|
||||||
void qTabMeasurement::Refresh() {
|
void qTabMeasurement::Refresh() {
|
||||||
|
@ -78,9 +78,9 @@ void qTabMessages::ExecuteCommand() {
|
|||||||
|
|
||||||
QString command = param.at(0);
|
QString command = param.at(0);
|
||||||
param.removeFirst();
|
param.removeFirst();
|
||||||
LOG(logINFO) << "Executing Command:[" << command.toLatin1().constData()
|
LOG(logINFO) << "Executing Command:[" << command.toAscii().constData()
|
||||||
<< "] with Arguments:["
|
<< "] with Arguments:["
|
||||||
<< param.join(" ").toLatin1().constData() << "]";
|
<< param.join(" ").toAscii().constData() << "]";
|
||||||
|
|
||||||
process->setProcessChannelMode(QProcess::MergedChannels);
|
process->setProcessChannelMode(QProcess::MergedChannels);
|
||||||
process->start(command, param);
|
process->start(command, param);
|
||||||
@ -117,15 +117,15 @@ void qTabMessages::SaveLog() {
|
|||||||
outfile.setFileName(fName);
|
outfile.setFileName(fName);
|
||||||
if (outfile.open(QIODevice::WriteOnly | QIODevice::Text)) {
|
if (outfile.open(QIODevice::WriteOnly | QIODevice::Text)) {
|
||||||
QTextStream out(&outfile);
|
QTextStream out(&outfile);
|
||||||
out << dispLog->toPlainText() << '\n';
|
out << dispLog->toPlainText() << endl;
|
||||||
std::string mess =
|
std::string mess =
|
||||||
std::string("The Log has been successfully saved to ") +
|
std::string("The Log has been successfully saved to ") +
|
||||||
fName.toLatin1().constData();
|
fName.toAscii().constData();
|
||||||
qDefs::Message(qDefs::INFORMATION, mess, "TabMessages::SaveLog");
|
qDefs::Message(qDefs::INFORMATION, mess, "TabMessages::SaveLog");
|
||||||
LOG(logINFO) << mess;
|
LOG(logINFO) << mess;
|
||||||
} else {
|
} else {
|
||||||
LOG(logWARNING) << "Attempt to save log file failed: "
|
LOG(logWARNING) << "Attempt to save log file failed: "
|
||||||
<< fName.toLatin1().constData();
|
<< fName.toAscii().constData();
|
||||||
qDefs::Message(qDefs::WARNING, "Attempt to save log file failed.",
|
qDefs::Message(qDefs::WARNING, "Attempt to save log file failed.",
|
||||||
"qTabMessages::SaveLog");
|
"qTabMessages::SaveLog");
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,6 @@ void qTabPlot::SetupWidgetWindow() {
|
|||||||
stackedWidget1D->setCurrentIndex(0);
|
stackedWidget1D->setCurrentIndex(0);
|
||||||
stackedWidget2D->setCurrentIndex(0);
|
stackedWidget2D->setCurrentIndex(0);
|
||||||
// Plot Axis
|
// Plot Axis
|
||||||
// its not spinboxes to not take value when checkbox checked
|
|
||||||
dispXMin->setValidator(new QDoubleValidator(dispXMin));
|
dispXMin->setValidator(new QDoubleValidator(dispXMin));
|
||||||
dispYMin->setValidator(new QDoubleValidator(dispYMin));
|
dispYMin->setValidator(new QDoubleValidator(dispYMin));
|
||||||
dispZMin->setValidator(new QDoubleValidator(dispZMin));
|
dispZMin->setValidator(new QDoubleValidator(dispZMin));
|
||||||
@ -74,11 +73,9 @@ void qTabPlot::SetupWidgetWindow() {
|
|||||||
Initialization();
|
Initialization();
|
||||||
Refresh();
|
Refresh();
|
||||||
|
|
||||||
// update both zmq high water mark to GUI_ZMQ_RCV_HWM (2)
|
// set zmq high water mark to GUI_ZMQ_RCV_HWM (2)
|
||||||
comboHwm->setCurrentIndex(SND_HWM);
|
spinSndHwm->setValue(qDefs::GUI_ZMQ_RCV_HWM);
|
||||||
spinHwm->setValue(qDefs::GUI_ZMQ_RCV_HWM);
|
spinRcvHwm->setValue(qDefs::GUI_ZMQ_RCV_HWM);
|
||||||
comboHwm->setCurrentIndex(RX_HWM);
|
|
||||||
spinHwm->setValue(qDefs::GUI_ZMQ_RCV_HWM);
|
|
||||||
|
|
||||||
if (chkGapPixels->isEnabled()) {
|
if (chkGapPixels->isEnabled()) {
|
||||||
chkGapPixels->setChecked(true);
|
chkGapPixels->setChecked(true);
|
||||||
@ -88,9 +85,10 @@ void qTabPlot::SetupWidgetWindow() {
|
|||||||
void qTabPlot::Initialization() {
|
void qTabPlot::Initialization() {
|
||||||
// Plotting frequency box
|
// Plotting frequency box
|
||||||
connect(chkNoPlot, SIGNAL(toggled(bool)), this, SLOT(SetPlot()));
|
connect(chkNoPlot, SIGNAL(toggled(bool)), this, SLOT(SetPlot()));
|
||||||
connect(comboHwm, SIGNAL(currentIndexChanged(int)), this,
|
connect(spinSndHwm, SIGNAL(valueChanged(int)), this,
|
||||||
SLOT(SelectHwm(int)));
|
SLOT(SetStreamingHwm(int)));
|
||||||
connect(spinHwm, SIGNAL(valueChanged(int)), this, SLOT(SetHwm(int)));
|
connect(spinRcvHwm, SIGNAL(valueChanged(int)), this,
|
||||||
|
SLOT(SetReceivingHwm(int)));
|
||||||
connect(comboFrequency, SIGNAL(currentIndexChanged(int)), this,
|
connect(comboFrequency, SIGNAL(currentIndexChanged(int)), this,
|
||||||
SLOT(SetStreamingFrequency()));
|
SLOT(SetStreamingFrequency()));
|
||||||
connect(comboTimeGapUnit, SIGNAL(currentIndexChanged(int)), this,
|
connect(comboTimeGapUnit, SIGNAL(currentIndexChanged(int)), this,
|
||||||
@ -198,14 +196,15 @@ void qTabPlot::Initialization() {
|
|||||||
void qTabPlot::Select1DPlot(bool enable) {
|
void qTabPlot::Select1DPlot(bool enable) {
|
||||||
LOG(logDEBUG) << "Selecting " << (enable ? "1" : "2") << "D Plot";
|
LOG(logDEBUG) << "Selecting " << (enable ? "1" : "2") << "D Plot";
|
||||||
is1d = enable;
|
is1d = enable;
|
||||||
stackedPlotOptions->setCurrentIndex(is1d ? 0 : 1);
|
box1D->setEnabled(enable);
|
||||||
chkZAxis->setEnabled(!is1d);
|
box2D->setEnabled(!enable);
|
||||||
dispZAxis->setEnabled(!is1d);
|
chkZAxis->setEnabled(!enable);
|
||||||
chkZMin->setEnabled(!is1d);
|
dispZAxis->setEnabled(!enable);
|
||||||
chkZMax->setEnabled(!is1d);
|
chkZMin->setEnabled(!enable);
|
||||||
dispZMin->setEnabled(!is1d);
|
chkZMax->setEnabled(!enable);
|
||||||
dispZMax->setEnabled(!is1d);
|
dispZMin->setEnabled(!enable);
|
||||||
plot->Select1dPlot(is1d);
|
dispZMax->setEnabled(!enable);
|
||||||
|
plot->Select1dPlot(enable);
|
||||||
SetTitles();
|
SetTitles();
|
||||||
SetXYRange();
|
SetXYRange();
|
||||||
if (!is1d) {
|
if (!is1d) {
|
||||||
@ -222,12 +221,14 @@ void qTabPlot::SetPlot() {
|
|||||||
plotEnable = true;
|
plotEnable = true;
|
||||||
}
|
}
|
||||||
comboFrequency->setEnabled(plotEnable);
|
comboFrequency->setEnabled(plotEnable);
|
||||||
comboHwm->setEnabled(plotEnable);
|
lblSndHwm->setEnabled(plotEnable);
|
||||||
spinHwm->setEnabled(plotEnable);
|
spinSndHwm->setEnabled(plotEnable);
|
||||||
|
lblRcvHwm->setEnabled(plotEnable);
|
||||||
|
spinRcvHwm->setEnabled(plotEnable);
|
||||||
stackedTimeInterval->setEnabled(plotEnable);
|
stackedTimeInterval->setEnabled(plotEnable);
|
||||||
stackedPlotOptions->setEnabled(plotEnable);
|
box1D->setEnabled(plotEnable);
|
||||||
btnSave->setEnabled(plotEnable);
|
box2D->setEnabled(plotEnable);
|
||||||
btnClone->setEnabled(plotEnable);
|
boxSave->setEnabled(plotEnable);
|
||||||
boxPlotAxis->setEnabled(plotEnable);
|
boxPlotAxis->setEnabled(plotEnable);
|
||||||
|
|
||||||
if (plotEnable) {
|
if (plotEnable) {
|
||||||
@ -248,6 +249,8 @@ void qTabPlot::Set1DPlotOptionsRight() {
|
|||||||
stackedWidget1D->setCurrentIndex(0);
|
stackedWidget1D->setCurrentIndex(0);
|
||||||
else
|
else
|
||||||
stackedWidget1D->setCurrentIndex(i + 1);
|
stackedWidget1D->setCurrentIndex(i + 1);
|
||||||
|
box1D->setTitle(
|
||||||
|
QString("1D Plot Options %1").arg(stackedWidget1D->currentIndex() + 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
void qTabPlot::Set1DPlotOptionsLeft() {
|
void qTabPlot::Set1DPlotOptionsLeft() {
|
||||||
@ -257,6 +260,8 @@ void qTabPlot::Set1DPlotOptionsLeft() {
|
|||||||
stackedWidget1D->setCurrentIndex(stackedWidget1D->count() - 1);
|
stackedWidget1D->setCurrentIndex(stackedWidget1D->count() - 1);
|
||||||
else
|
else
|
||||||
stackedWidget1D->setCurrentIndex(i - 1);
|
stackedWidget1D->setCurrentIndex(i - 1);
|
||||||
|
box1D->setTitle(
|
||||||
|
QString("1D Plot Options %1").arg(stackedWidget1D->currentIndex() + 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
void qTabPlot::Set2DPlotOptionsRight() {
|
void qTabPlot::Set2DPlotOptionsRight() {
|
||||||
@ -266,6 +271,8 @@ void qTabPlot::Set2DPlotOptionsRight() {
|
|||||||
stackedWidget2D->setCurrentIndex(0);
|
stackedWidget2D->setCurrentIndex(0);
|
||||||
else
|
else
|
||||||
stackedWidget2D->setCurrentIndex(i + 1);
|
stackedWidget2D->setCurrentIndex(i + 1);
|
||||||
|
box2D->setTitle(
|
||||||
|
QString("2D Plot Options %1").arg(stackedWidget2D->currentIndex() + 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
void qTabPlot::Set2DPlotOptionsLeft() {
|
void qTabPlot::Set2DPlotOptionsLeft() {
|
||||||
@ -275,6 +282,8 @@ void qTabPlot::Set2DPlotOptionsLeft() {
|
|||||||
stackedWidget2D->setCurrentIndex(stackedWidget2D->count() - 1);
|
stackedWidget2D->setCurrentIndex(stackedWidget2D->count() - 1);
|
||||||
else
|
else
|
||||||
stackedWidget2D->setCurrentIndex(i - 1);
|
stackedWidget2D->setCurrentIndex(i - 1);
|
||||||
|
box2D->setTitle(
|
||||||
|
QString("2D Plot Options %1").arg(stackedWidget2D->currentIndex() + 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
void qTabPlot::EnablePersistency(bool enable) {
|
void qTabPlot::EnablePersistency(bool enable) {
|
||||||
@ -702,34 +711,20 @@ void qTabPlot::SetStreamingFrequency() {
|
|||||||
&qTabPlot::GetStreamingFrequency)
|
&qTabPlot::GetStreamingFrequency)
|
||||||
}
|
}
|
||||||
|
|
||||||
void qTabPlot::SelectHwm(int value) { GetHwm(); }
|
|
||||||
|
|
||||||
void qTabPlot::GetHwm() {
|
|
||||||
if (comboHwm->currentIndex() == SND_HWM)
|
|
||||||
GetStreamingHwm();
|
|
||||||
else
|
|
||||||
GetReceivingHwm();
|
|
||||||
}
|
|
||||||
|
|
||||||
void qTabPlot::SetHwm(int value) {
|
|
||||||
if (comboHwm->currentIndex() == SND_HWM)
|
|
||||||
SetStreamingHwm(value);
|
|
||||||
else
|
|
||||||
SetReceivingHwm(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
void qTabPlot::GetStreamingHwm() {
|
void qTabPlot::GetStreamingHwm() {
|
||||||
LOG(logDEBUG) << "Getting Streaming Hwm for receiver";
|
LOG(logDEBUG) << "Getting Streaming Hwm for receiver";
|
||||||
disconnect(spinHwm, SIGNAL(valueChanged(int)), this, SLOT(SetHwm(int)));
|
disconnect(spinSndHwm, SIGNAL(valueChanged(int)), this,
|
||||||
|
SLOT(SetStreamingHwm(int)));
|
||||||
try {
|
try {
|
||||||
int value = det->getRxZmqHwm().tsquash(
|
int value = det->getRxZmqHwm().tsquash(
|
||||||
"Inconsistent streaming hwm for all receivers.");
|
"Inconsistent streaming hwm for all receivers.");
|
||||||
LOG(logDEBUG) << "Got streaming hwm for receiver " << value;
|
LOG(logDEBUG) << "Got streaming hwm for receiver " << value;
|
||||||
spinHwm->setValue(value);
|
spinSndHwm->setValue(value);
|
||||||
}
|
}
|
||||||
CATCH_DISPLAY("Could not get streaming hwm for receiver.",
|
CATCH_DISPLAY("Could not get streaming hwm for receiver.",
|
||||||
"qTabPlot::GetStreamingHwm")
|
"qTabPlot::GetStreamingHwm")
|
||||||
connect(spinHwm, SIGNAL(valueChanged(int)), this, SLOT(SetHwm(int)));
|
connect(spinSndHwm, SIGNAL(valueChanged(int)), this,
|
||||||
|
SLOT(SetStreamingHwm(int)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void qTabPlot::SetStreamingHwm(int value) {
|
void qTabPlot::SetStreamingHwm(int value) {
|
||||||
@ -738,20 +733,17 @@ void qTabPlot::SetStreamingHwm(int value) {
|
|||||||
det->setRxZmqHwm(value);
|
det->setRxZmqHwm(value);
|
||||||
}
|
}
|
||||||
CATCH_HANDLE("Could not set streaming hwm for receiver.",
|
CATCH_HANDLE("Could not set streaming hwm for receiver.",
|
||||||
"qTabPlot::SetStreamingHwm", this, &qTabPlot::GetHwm)
|
"qTabPlot::SetStreamingHwm", this, &qTabPlot::GetStreamingHwm)
|
||||||
}
|
}
|
||||||
|
|
||||||
void qTabPlot::GetReceivingHwm() {
|
void qTabPlot::GetReceivingHwm() {
|
||||||
LOG(logDEBUG) << "Getting Receiving Hwm for client";
|
LOG(logDEBUG) << "Getting Receiving Hwm for client";
|
||||||
disconnect(spinHwm, SIGNAL(valueChanged(int)), this, SLOT(SetHwm(int)));
|
|
||||||
try {
|
try {
|
||||||
int value = det->getClientZmqHwm();
|
int value = det->getClientZmqHwm();
|
||||||
LOG(logDEBUG) << "Got receiving hwm for client " << value;
|
LOG(logDEBUG) << "Got receiving hwm for client " << value;
|
||||||
spinHwm->setValue(value);
|
|
||||||
}
|
}
|
||||||
CATCH_DISPLAY("Could not get receiving hwm for client.",
|
CATCH_DISPLAY("Could not get receiving hwm for client.",
|
||||||
"qTabPlot::GetReceivingHwm")
|
"qTabPlot::GetReceivingHwm")
|
||||||
connect(spinHwm, SIGNAL(valueChanged(int)), this, SLOT(SetHwm(int)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void qTabPlot::SetReceivingHwm(int value) {
|
void qTabPlot::SetReceivingHwm(int value) {
|
||||||
@ -760,7 +752,7 @@ void qTabPlot::SetReceivingHwm(int value) {
|
|||||||
det->setClientZmqHwm(value);
|
det->setClientZmqHwm(value);
|
||||||
}
|
}
|
||||||
CATCH_HANDLE("Could not set receiving hwm from client.",
|
CATCH_HANDLE("Could not set receiving hwm from client.",
|
||||||
"qTabPlot::SetReceivingHwm", this, &qTabPlot::GetHwm)
|
"qTabPlot::SetReceivingHwm", this, &qTabPlot::GetReceivingHwm)
|
||||||
}
|
}
|
||||||
|
|
||||||
void qTabPlot::Refresh() {
|
void qTabPlot::Refresh() {
|
||||||
@ -768,8 +760,19 @@ void qTabPlot::Refresh() {
|
|||||||
|
|
||||||
if (!plot->GetIsRunning()) {
|
if (!plot->GetIsRunning()) {
|
||||||
boxFrequency->setEnabled(true);
|
boxFrequency->setEnabled(true);
|
||||||
|
|
||||||
|
// streaming frequency
|
||||||
|
if (!chkNoPlot->isChecked()) {
|
||||||
|
comboFrequency->setEnabled(true);
|
||||||
|
stackedTimeInterval->setEnabled(true);
|
||||||
|
lblSndHwm->setEnabled(true);
|
||||||
|
spinSndHwm->setEnabled(true);
|
||||||
|
lblRcvHwm->setEnabled(true);
|
||||||
|
spinRcvHwm->setEnabled(true);
|
||||||
|
}
|
||||||
GetStreamingFrequency();
|
GetStreamingFrequency();
|
||||||
GetHwm();
|
GetStreamingHwm();
|
||||||
|
GetReceivingHwm();
|
||||||
// gain plot, gap pixels enable
|
// gain plot, gap pixels enable
|
||||||
switch (det->getDetectorType().squash()) {
|
switch (det->getDetectorType().squash()) {
|
||||||
case slsDetectorDefs::EIGER:
|
case slsDetectorDefs::EIGER:
|
||||||
|
@ -18,6 +18,7 @@ qTabSettings::qTabSettings(QWidget *parent, Detector *detector)
|
|||||||
qTabSettings::~qTabSettings() {}
|
qTabSettings::~qTabSettings() {}
|
||||||
|
|
||||||
void qTabSettings::SetupWidgetWindow() {
|
void qTabSettings::SetupWidgetWindow() {
|
||||||
|
|
||||||
comboHV->hide();
|
comboHV->hide();
|
||||||
lblComboHV->hide();
|
lblComboHV->hide();
|
||||||
lblSpinHV->hide();
|
lblSpinHV->hide();
|
||||||
@ -401,7 +402,7 @@ void qTabSettings::SetGainMode(int index) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
LOG(logINFO) << "Setting Gain Mode to "
|
LOG(logINFO) << "Setting Gain Mode to "
|
||||||
<< comboGainMode->currentText().toLatin1().data();
|
<< comboGainMode->currentText().toAscii().data();
|
||||||
auto val = static_cast<slsDetectorDefs::gainMode>(index);
|
auto val = static_cast<slsDetectorDefs::gainMode>(index);
|
||||||
try {
|
try {
|
||||||
|
|
||||||
@ -448,7 +449,7 @@ void qTabSettings::GetDynamicRange() {
|
|||||||
|
|
||||||
void qTabSettings::SetDynamicRange(int index) {
|
void qTabSettings::SetDynamicRange(int index) {
|
||||||
LOG(logINFO) << "Setting dynamic range to "
|
LOG(logINFO) << "Setting dynamic range to "
|
||||||
<< comboDynamicRange->currentText().toLatin1().data();
|
<< comboDynamicRange->currentText().toAscii().data();
|
||||||
try {
|
try {
|
||||||
switch (index) {
|
switch (index) {
|
||||||
case DYNAMICRANGE_32:
|
case DYNAMICRANGE_32:
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
// SPDX-License-Identifier: LGPL-3.0-or-other
|
|
||||||
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
|
||||||
#include "qVersionResolve.h"
|
|
||||||
#include <iostream>
|
|
||||||
|
|
||||||
namespace sls {
|
|
||||||
|
|
||||||
int qResolve_GetQFontWidth(const QFontMetrics fm, const QString &text,
|
|
||||||
int len) {
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0)
|
|
||||||
return fm.horizontalAdvance(text, len);
|
|
||||||
#else
|
|
||||||
return fm.width(text, len);
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace sls
|
|
@ -11,9 +11,9 @@ install(TARGETS slsProjectCSettings
|
|||||||
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||||
)
|
)
|
||||||
add_subdirectory(ctbDetectorServer)
|
add_subdirectory(ctbDetectorServer)
|
||||||
add_subdirectory(eigerDetectorServer)
|
#add_subdirectory(eigerDetectorServer)
|
||||||
add_subdirectory(gotthardDetectorServer)
|
#add_subdirectory(gotthardDetectorServer)
|
||||||
add_subdirectory(jungfrauDetectorServer)
|
#add_subdirectory(jungfrauDetectorServer)
|
||||||
add_subdirectory(mythen3DetectorServer)
|
#add_subdirectory(mythen3DetectorServer)
|
||||||
add_subdirectory(gotthard2DetectorServer)
|
#add_subdirectory(gotthard2DetectorServer)
|
||||||
add_subdirectory(moenchDetectorServer)
|
#add_subdirectory(moenchDetectorServer)
|
||||||
|
@ -1,84 +1,43 @@
|
|||||||
# SPDX-License-Identifier: LGPL-3.0-or-other
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
|
if [ $# -eq 0 ]; then
|
||||||
# empty branch = developer branch in updateAPIVersion.sh
|
declare -a det=("ctbDetectorServer"
|
||||||
branch=""
|
|
||||||
det_list=("ctbDetectorServer"
|
|
||||||
"gotthardDetectorServer"
|
"gotthardDetectorServer"
|
||||||
"gotthard2DetectorServer"
|
"gotthard2DetectorServer"
|
||||||
"jungfrauDetectorServer"
|
"jungfrauDetectorServer"
|
||||||
"mythen3DetectorServer"
|
"mythen3DetectorServer"
|
||||||
"moenchDetectorServer"
|
"moenchDetectorServer"
|
||||||
)
|
)
|
||||||
usage="\nUsage: compileAllServers.sh [server|all(opt)] [branch(opt)]. \n\tNo arguments mean all servers with 'developer' branch. \n\tNo 'branch' input means 'developer branch'"
|
|
||||||
|
|
||||||
# arguments
|
|
||||||
if [ $# -eq 0 ]; then
|
|
||||||
# no argument, all servers
|
|
||||||
declare -a det=${det_list[@]}
|
|
||||||
echo "Compiling all servers"
|
|
||||||
elif [ $# -eq 1 ] || [ $# -eq 2 ]; then
|
|
||||||
# 'all' servers
|
|
||||||
if [[ $1 == "all" ]]; then
|
|
||||||
declare -a det=${det_list[@]}
|
|
||||||
echo "Compiling all servers"
|
|
||||||
else
|
|
||||||
# only one server
|
|
||||||
# arg not in list
|
|
||||||
if [[ $det_list != *$1* ]]; then
|
|
||||||
echo -e "Invalid argument 1: $1. $usage"
|
|
||||||
return -1
|
|
||||||
fi
|
|
||||||
declare -a det=("${1}")
|
|
||||||
#echo "Compiling only $1"
|
|
||||||
fi
|
|
||||||
# branch
|
|
||||||
if [ $# -eq 2 ]; then
|
|
||||||
# arg in list
|
|
||||||
if [[ $det_list == *$2* ]]; then
|
|
||||||
echo -e "Invalid argument 2: $2. $usage"
|
|
||||||
return -1
|
|
||||||
fi
|
|
||||||
branch+=$2
|
|
||||||
#echo "with branch $branch"
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
echo -e "Too many arguments.$usage"
|
declare -a det=("${1}")
|
||||||
return -1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
declare -a deterror=("OK" "OK" "OK" "OK" "OK" "OK")
|
declare -a deterror=("OK" "OK" "OK" "OK" "OK" "OK")
|
||||||
|
|
||||||
echo -e "list is ${det[@]}"
|
for ((i=0;i<${#det[@]};++i))
|
||||||
|
|
||||||
# compile each server
|
|
||||||
idet=0
|
|
||||||
for i in ${det[@]}
|
|
||||||
do
|
do
|
||||||
dir=$i
|
dir=${det[i]}
|
||||||
file="${i}_developer"
|
file="${det[i]}_developer"
|
||||||
echo -e "Compiling $dir [$file]"
|
echo -e "Compiling $dir [$file]"
|
||||||
cd $dir
|
cd $dir
|
||||||
make clean
|
make clean
|
||||||
if make version API_BRANCH=$branch; then
|
if make version; then
|
||||||
deterror[$idet]="OK"
|
deterror[i]="OK"
|
||||||
else
|
else
|
||||||
deterror[$idet]="FAIL"
|
deterror[i]="FAIL"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mv bin/$dir bin/$file
|
mv bin/$dir bin/$file
|
||||||
git add -f bin/$file
|
git add -f bin/$file
|
||||||
cp bin/$file /tftpboot/
|
cp bin/$file /tftpboot/
|
||||||
cd ..
|
cd ..
|
||||||
echo -e "\n\n"
|
echo -e "\n\n"
|
||||||
((++idet))
|
|
||||||
done
|
done
|
||||||
|
|
||||||
echo -e "Results:"
|
echo -e "Results:"
|
||||||
idet=0
|
for ((i=0;i<${#det[@]};++i))
|
||||||
for i in ${det[@]}
|
|
||||||
do
|
do
|
||||||
printf "%s\t\t= %s\n" "$i" "${deterror[$idet]}"
|
printf "%s\t\t= %s\n" "${det[i]}" "${deterror[i]}"
|
||||||
((++idet))
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,86 +0,0 @@
|
|||||||
# SPDX-License-Identifier: LGPL-3.0-or-other
|
|
||||||
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
|
||||||
|
|
||||||
# empty branch = developer branch in updateAPIVersion.sh
|
|
||||||
branch=""
|
|
||||||
det_list=("ctbDetectorServer"
|
|
||||||
"gotthardDetectorServer"
|
|
||||||
"gotthard2DetectorServer"
|
|
||||||
"jungfrauDetectorServer"
|
|
||||||
"mythen3DetectorServer"
|
|
||||||
"moenchDetectorServer"
|
|
||||||
)
|
|
||||||
usage="\nUsage: compileAllServers.sh [server|all(opt)] [branch(opt)]. \n\tNo arguments mean all servers with 'developer' branch. \n\tNo 'branch' input means 'developer branch'"
|
|
||||||
|
|
||||||
# arguments
|
|
||||||
if [ $# -eq 0 ]; then
|
|
||||||
# no argument, all servers
|
|
||||||
declare -a det=${det_list[@]}
|
|
||||||
echo "Compiling all servers"
|
|
||||||
elif [ $# -eq 1 ] || [ $# -eq 2 ]; then
|
|
||||||
# 'all' servers
|
|
||||||
if [[ $1 == "all" ]]; then
|
|
||||||
declare -a det=${det_list[@]}
|
|
||||||
echo "Compiling all servers"
|
|
||||||
else
|
|
||||||
# only one server
|
|
||||||
# arg not in list
|
|
||||||
if [[ $det_list != *$1* ]]; then
|
|
||||||
echo -e "Invalid argument 1: $1. $usage"
|
|
||||||
return -1
|
|
||||||
fi
|
|
||||||
declare -a det=("${1}")
|
|
||||||
#echo "Compiling only $1"
|
|
||||||
fi
|
|
||||||
# branch
|
|
||||||
if [ $# -eq 2 ]; then
|
|
||||||
# arg in list
|
|
||||||
if [[ $det_list == *$2* ]]; then
|
|
||||||
echo -e "Invalid argument 2: $2. $usage"
|
|
||||||
return -1
|
|
||||||
fi
|
|
||||||
branch+=$2
|
|
||||||
#echo "with branch $branch"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo -e "Too many arguments.$usage"
|
|
||||||
return -1
|
|
||||||
fi
|
|
||||||
|
|
||||||
declare -a deterror=("OK" "OK" "OK" "OK" "OK" "OK")
|
|
||||||
|
|
||||||
echo -e "list is ${det[@]}"
|
|
||||||
|
|
||||||
# compile each server
|
|
||||||
idet=0
|
|
||||||
for i in ${det[@]}
|
|
||||||
do
|
|
||||||
dir=$i
|
|
||||||
file="${i}_developer"
|
|
||||||
echo -e "Compiling $dir [$file]"
|
|
||||||
cd $dir
|
|
||||||
make clean
|
|
||||||
if make API_BRANCH=$branch; then
|
|
||||||
deterror[$idet]="OK"
|
|
||||||
else
|
|
||||||
deterror[$idet]="FAIL"
|
|
||||||
fi
|
|
||||||
mv bin/$dir bin/$file
|
|
||||||
git add -f bin/$file
|
|
||||||
cp bin/$file /tftpboot/
|
|
||||||
cd ..
|
|
||||||
echo -e "\n\n"
|
|
||||||
((++idet))
|
|
||||||
done
|
|
||||||
|
|
||||||
echo -e "Results:"
|
|
||||||
idet=0
|
|
||||||
for i in ${det[@]}
|
|
||||||
do
|
|
||||||
printf "%s\t\t= %s\n" "$i" "${deterror[$idet]}"
|
|
||||||
((++idet))
|
|
||||||
done
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,32 +1,32 @@
|
|||||||
# SPDX-License-Identifier: LGPL-3.0-or-other
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
deterror="OK"
|
declare -a det=("eigerDetectorServer")
|
||||||
dir="eigerDetectorServer"
|
|
||||||
file="${dir}_developer"
|
|
||||||
branch=""
|
|
||||||
|
|
||||||
# arguments
|
declare -a deterror=("OK" "OK" "OK" "OK")
|
||||||
if [ $# -eq 1 ]; then
|
|
||||||
branch+=$1
|
|
||||||
#echo "with branch $branch"
|
|
||||||
elif [ ! $# -eq 0 ]; then
|
|
||||||
echo -e "Only one optional argument allowed for branch."
|
|
||||||
return -1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo -e "Compiling $dir [$file]"
|
for ((i=0;i<${#det[@]};++i))
|
||||||
cd $dir
|
do
|
||||||
make clean
|
dir=${det[i]}
|
||||||
if make version API_BRANCH=$branch; then
|
file="${det[i]}_developer"
|
||||||
deterror="OK"
|
echo -e "Compiling $dir [$file]"
|
||||||
else
|
cd $dir
|
||||||
deterror="FAIL"
|
make clean
|
||||||
fi
|
if make version; then
|
||||||
|
deterror[i]="OK"
|
||||||
|
else
|
||||||
|
deterror[i]="FAIL"
|
||||||
|
fi
|
||||||
|
|
||||||
mv bin/$dir bin/$file
|
mv bin/$dir bin/$file
|
||||||
git add -f bin/$file
|
git add -f bin/$file
|
||||||
cp bin/$file /tftpboot/
|
cp bin/$file /tftpboot/
|
||||||
cd ..
|
cd ..
|
||||||
echo -e "\n\n"
|
echo -e "\n\n"
|
||||||
printf "Result:\t\t= %s\n" "${deterror}"
|
done
|
||||||
|
|
||||||
|
echo -e "Results:"
|
||||||
|
for ((i=0;i<${#det[@]};++i))
|
||||||
|
do
|
||||||
|
printf "%s\t\t= %s\n" "${det[i]}" "${deterror[i]}"
|
||||||
|
done
|
||||||
|
|
||||||
|
@ -25,11 +25,10 @@ version: clean versioning $(PROGS)
|
|||||||
|
|
||||||
boot: $(OBJS)
|
boot: $(OBJS)
|
||||||
|
|
||||||
version_branch=$(API_BRANCH)
|
|
||||||
version_name=APICTB
|
version_name=APICTB
|
||||||
version_path=slsDetectorServers/ctbDetectorServer
|
version_path=slsDetectorServers/ctbDetectorServer
|
||||||
versioning:
|
versioning:
|
||||||
cd ../../ && echo $(PWD) && echo `tput setaf 6; ./updateAPIVersion.sh $(version_name) $(version_path) $(version_branch); tput sgr0;`
|
cd ../../ && echo $(PWD) && echo `tput setaf 6; ./updateAPIVersion.sh $(version_name) $(version_path); tput sgr0;`
|
||||||
|
|
||||||
|
|
||||||
$(PROGS): $(OBJS)
|
$(PROGS): $(OBJS)
|
||||||
|
@ -380,6 +380,22 @@
|
|||||||
#define PLL_CNTRL_ADDR_OFST (16)
|
#define PLL_CNTRL_ADDR_OFST (16)
|
||||||
#define PLL_CNTRL_ADDR_MSK (0x0000003F << PLL_CNTRL_ADDR_OFST)
|
#define PLL_CNTRL_ADDR_MSK (0x0000003F << PLL_CNTRL_ADDR_OFST)
|
||||||
|
|
||||||
|
/* Reconfiguratble PLL Paramater RW register */
|
||||||
|
#define PLL_A_PARAM_REG (0x93 << MEM_MAP_SHIFT)
|
||||||
|
|
||||||
|
/* Reconfiguratble PLL Control RW regiser */
|
||||||
|
#define PLL_A_CNTRL_REG (0x94 << MEM_MAP_SHIFT)
|
||||||
|
|
||||||
|
#define PLL_A_CNTRL_RCNFG_PRMTR_RST_OFST (0)
|
||||||
|
#define PLL_A_CNTRL_RCNFG_PRMTR_RST_MSK \
|
||||||
|
(0x00000001 << PLL_A_CNTRL_RCNFG_PRMTR_RST_OFST)
|
||||||
|
#define PLL_A_CNTRL_WR_PRMTR_OFST (2)
|
||||||
|
#define PLL_A_CNTRL_WR_PRMTR_MSK (0x00000001 << PLL_A_CNTRL_WR_PRMTR_OFST)
|
||||||
|
#define PLL_A_CNTRL_PLL_RST_OFST (3)
|
||||||
|
#define PLL_A_CNTRL_PLL_RST_MSK (0x00000001 << PLL_A_CNTRL_PLL_RST_OFST)
|
||||||
|
#define PLL_A_CNTRL_ADDR_OFST (16)
|
||||||
|
#define PLL_A_CNTRL_ADDR_MSK (0x0000003F << PLL_A_CNTRL_ADDR_OFST)
|
||||||
|
|
||||||
/* Pattern Control RW register */
|
/* Pattern Control RW register */
|
||||||
#define PATTERN_CNTRL_REG (0x52 << MEM_MAP_SHIFT)
|
#define PATTERN_CNTRL_REG (0x52 << MEM_MAP_SHIFT)
|
||||||
|
|
||||||
|
Binary file not shown.
@ -62,7 +62,7 @@ uint32_t adcEnableMask_1g = BIT32_MSK;
|
|||||||
uint8_t adcEnableMask_10g = 0xFF;
|
uint8_t adcEnableMask_10g = 0xFF;
|
||||||
|
|
||||||
int32_t clkPhase[NUM_CLOCKS] = {};
|
int32_t clkPhase[NUM_CLOCKS] = {};
|
||||||
uint32_t clkFrequency[NUM_CLOCKS] = {40, 20, 20, 200};
|
uint32_t clkFrequency[NUM_CLOCKS] = {40, 20, 20, 200, 400};
|
||||||
int dacValues[NDAC] = {};
|
int dacValues[NDAC] = {};
|
||||||
// software limit that depends on the current chip on the ctb
|
// software limit that depends on the current chip on the ctb
|
||||||
int vLimit = 0;
|
int vLimit = 0;
|
||||||
@ -121,10 +121,9 @@ void basictests() {
|
|||||||
uint32_t ipadd = getDetectorIP();
|
uint32_t ipadd = getDetectorIP();
|
||||||
uint64_t macadd = getDetectorMAC();
|
uint64_t macadd = getDetectorMAC();
|
||||||
int64_t fwversion = getFirmwareVersion();
|
int64_t fwversion = getFirmwareVersion();
|
||||||
char swversion[MAX_STR_LENGTH] = {0};
|
int64_t swversion = getServerVersion();
|
||||||
memset(swversion, 0, MAX_STR_LENGTH);
|
|
||||||
getServerVersion(swversion);
|
|
||||||
int64_t sw_fw_apiversion = 0;
|
int64_t sw_fw_apiversion = 0;
|
||||||
|
int64_t client_sw_apiversion = getClientServerAPIVersion();
|
||||||
|
|
||||||
if (fwversion >= MIN_REQRD_VRSN_T_RD_API)
|
if (fwversion >= MIN_REQRD_VRSN_T_RD_API)
|
||||||
sw_fw_apiversion = getFirmwareAPIVersion();
|
sw_fw_apiversion = getFirmwareAPIVersion();
|
||||||
@ -137,13 +136,15 @@ void basictests() {
|
|||||||
"Detector MAC Addr:\t\t 0x%llx\n\n"
|
"Detector MAC Addr:\t\t 0x%llx\n\n"
|
||||||
|
|
||||||
"Firmware Version:\t\t 0x%llx\n"
|
"Firmware Version:\t\t 0x%llx\n"
|
||||||
"Software Version:\t\t %s\n"
|
"Software Version:\t\t 0x%llx\n"
|
||||||
"F/w-S/w API Version:\t\t 0x%llx\n"
|
"F/w-S/w API Version:\t\t 0x%llx\n"
|
||||||
"Required Firmware Version:\t 0x%x\n"
|
"Required Firmware Version:\t 0x%x\n"
|
||||||
|
"Client-Software API Version:\t 0x%llx\n"
|
||||||
"********************************************************\n",
|
"********************************************************\n",
|
||||||
hversion, hsnumber, ipadd, (long long unsigned int)macadd,
|
hversion, hsnumber, ipadd, (long long unsigned int)macadd,
|
||||||
(long long int)fwversion, swversion, (long long int)sw_fw_apiversion,
|
(long long int)fwversion, (long long int)swversion,
|
||||||
REQRD_FRMWR_VRSN));
|
(long long int)sw_fw_apiversion, REQRD_FRMWR_VRSN,
|
||||||
|
(long long int)client_sw_apiversion));
|
||||||
|
|
||||||
#ifndef VIRTUAL
|
#ifndef VIRTUAL
|
||||||
// return if flag is not zero, debug mode
|
// return if flag is not zero, debug mode
|
||||||
@ -324,7 +325,9 @@ int testBus() {
|
|||||||
|
|
||||||
/* Ids */
|
/* Ids */
|
||||||
|
|
||||||
void getServerVersion(char *version) { strcpy(version, APICTB); }
|
uint64_t getServerVersion() { return APICTB; }
|
||||||
|
|
||||||
|
uint64_t getClientServerAPIVersion() { return APICTB; }
|
||||||
|
|
||||||
uint64_t getFirmwareVersion() {
|
uint64_t getFirmwareVersion() {
|
||||||
#ifdef VIRTUAL
|
#ifdef VIRTUAL
|
||||||
@ -468,6 +471,7 @@ void setupDetector() {
|
|||||||
clkFrequency[ADC_CLK] = DEFAULT_ADC_CLK;
|
clkFrequency[ADC_CLK] = DEFAULT_ADC_CLK;
|
||||||
clkFrequency[SYNC_CLK] = DEFAULT_SYNC_CLK;
|
clkFrequency[SYNC_CLK] = DEFAULT_SYNC_CLK;
|
||||||
clkFrequency[DBIT_CLK] = DEFAULT_DBIT_CLK;
|
clkFrequency[DBIT_CLK] = DEFAULT_DBIT_CLK;
|
||||||
|
clkFrequency[GATED_CLK] = DEFAULT_GATED_CLK;
|
||||||
for (int i = 0; i < NDAC; ++i)
|
for (int i = 0; i < NDAC; ++i)
|
||||||
dacValues[i] = -1;
|
dacValues[i] = -1;
|
||||||
}
|
}
|
||||||
@ -486,11 +490,13 @@ void setupDetector() {
|
|||||||
setupUDPCommParameters();
|
setupUDPCommParameters();
|
||||||
|
|
||||||
// altera pll
|
// altera pll
|
||||||
ALTERA_PLL_SetDefines(PLL_CNTRL_REG, PLL_PARAM_REG,
|
ALTERA_PLL_SetDefines(
|
||||||
PLL_CNTRL_RCNFG_PRMTR_RST_MSK, PLL_CNTRL_WR_PRMTR_MSK,
|
PLL_CNTRL_REG, PLL_PARAM_REG, PLL_CNTRL_RCNFG_PRMTR_RST_MSK,
|
||||||
PLL_CNTRL_PLL_RST_MSK, PLL_CNTRL_ADDR_MSK,
|
PLL_CNTRL_WR_PRMTR_MSK, PLL_CNTRL_PLL_RST_MSK, PLL_CNTRL_ADDR_MSK,
|
||||||
PLL_CNTRL_ADDR_OFST);
|
PLL_CNTRL_ADDR_OFST, PLL_A_CNTRL_REG, PLL_A_PARAM_REG);
|
||||||
ALTERA_PLL_ResetPLLAndReconfiguration();
|
// both plls
|
||||||
|
ALTERA_PLL_ResetPLLAndReconfiguration(0);
|
||||||
|
ALTERA_PLL_ResetPLLAndReconfiguration(1);
|
||||||
|
|
||||||
resetCore();
|
resetCore();
|
||||||
resetPeripheral();
|
resetPeripheral();
|
||||||
@ -1781,19 +1787,29 @@ int setFrequency(enum CLKINDEX ind, int val) {
|
|||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int pllIndex = 0;
|
||||||
|
int vcofreq = PLL_VCO_FREQ_MHZ;
|
||||||
|
if (ind == GATED_CLK) {
|
||||||
|
pllIndex = 1;
|
||||||
|
vcofreq = PLL_A_VCO_FREQ_MHZ;
|
||||||
|
}
|
||||||
// Remembering adcphase/ dbit phase in degrees
|
// Remembering adcphase/ dbit phase in degrees
|
||||||
int adcPhase = getPhase(ADC_CLK, 1);
|
int adcPhase = 0, dbitPhase = 0;
|
||||||
|
if (pllIndex == 0) {
|
||||||
|
adcPhase = getPhase(ADC_CLK, 1);
|
||||||
LOG(logDEBUG1, ("\tRemembering ADC phase: %d degrees\n", adcPhase));
|
LOG(logDEBUG1, ("\tRemembering ADC phase: %d degrees\n", adcPhase));
|
||||||
int dbitPhase = getPhase(DBIT_CLK, 1);
|
dbitPhase = getPhase(DBIT_CLK, 1);
|
||||||
LOG(logDEBUG1, ("\tRemembering DBIT phase: %d degrees\n", dbitPhase));
|
LOG(logDEBUG1, ("\tRemembering DBIT phase: %d degrees\n", dbitPhase));
|
||||||
|
}
|
||||||
|
|
||||||
// Calculate and set output frequency
|
// Calculate and set output frequency
|
||||||
clkFrequency[ind] =
|
clkFrequency[ind] =
|
||||||
ALTERA_PLL_SetOuputFrequency(ind, PLL_VCO_FREQ_MHZ, val);
|
ALTERA_PLL_SetOuputFrequency(pllIndex, ind, vcofreq, val);
|
||||||
LOG(logINFO, ("\t%s clock (%d) frequency set to %d MHz\n", clock_names[ind],
|
LOG(logINFO, ("\t%s clock (%d) frequency set to %d MHz\n", clock_names[ind],
|
||||||
ind, clkFrequency[ind]));
|
ind, clkFrequency[ind]));
|
||||||
|
|
||||||
// phase reset by pll (when setting output frequency)
|
// phase reset by pll (when setting output frequency)
|
||||||
|
if (pllIndex == 0) {
|
||||||
clkPhase[ADC_CLK] = 0;
|
clkPhase[ADC_CLK] = 0;
|
||||||
clkPhase[DBIT_CLK] = 0;
|
clkPhase[DBIT_CLK] = 0;
|
||||||
|
|
||||||
@ -1810,6 +1826,7 @@ int setFrequency(enum CLKINDEX ind, int val) {
|
|||||||
if (ind != SYNC_CLK) {
|
if (ind != SYNC_CLK) {
|
||||||
configureSyncFrequency(ind);
|
configureSyncFrequency(ind);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,8 +86,8 @@ enum DACINDEX {
|
|||||||
D_PWR_A,
|
D_PWR_A,
|
||||||
D_PWR_IO
|
D_PWR_IO
|
||||||
};
|
};
|
||||||
enum CLKINDEX { RUN_CLK, ADC_CLK, SYNC_CLK, DBIT_CLK, NUM_CLOCKS };
|
enum CLKINDEX { RUN_CLK, ADC_CLK, SYNC_CLK, DBIT_CLK, GATED_CLK, NUM_CLOCKS };
|
||||||
#define CLK_NAMES "run", "adc", "sync", "dbit"
|
#define CLK_NAMES "run", "adc", "sync", "dbit", "gated"
|
||||||
|
|
||||||
/* Hardware Definitions */
|
/* Hardware Definitions */
|
||||||
#define NCHAN (36)
|
#define NCHAN (36)
|
||||||
@ -124,6 +124,7 @@ enum CLKINDEX { RUN_CLK, ADC_CLK, SYNC_CLK, DBIT_CLK, NUM_CLOCKS };
|
|||||||
#define DEFAULT_ADC_CLK (40) // 20
|
#define DEFAULT_ADC_CLK (40) // 20
|
||||||
#define DEFAULT_SYNC_CLK (40) // 20
|
#define DEFAULT_SYNC_CLK (40) // 20
|
||||||
#define DEFAULT_DBIT_CLK (200)
|
#define DEFAULT_DBIT_CLK (200)
|
||||||
|
#define DEFAULT_GATED_CLK (400)
|
||||||
|
|
||||||
#define UDP_HEADER_MAX_FRAME_VALUE (0xFFFFFFFFFFFF)
|
#define UDP_HEADER_MAX_FRAME_VALUE (0xFFFFFFFFFFFF)
|
||||||
|
|
||||||
@ -162,3 +163,4 @@ enum CLKINDEX { RUN_CLK, ADC_CLK, SYNC_CLK, DBIT_CLK, NUM_CLOCKS };
|
|||||||
|
|
||||||
#define MAXIMUM_ADC_CLK (65)
|
#define MAXIMUM_ADC_CLK (65)
|
||||||
#define PLL_VCO_FREQ_MHZ (800)
|
#define PLL_VCO_FREQ_MHZ (800)
|
||||||
|
#define PLL_A_VCO_FREQ_MHZ (800)
|
||||||
|
@ -395,11 +395,35 @@ int Feb_Control_ReceiveHighVoltage(unsigned int *value) {
|
|||||||
|
|
||||||
// normal
|
// normal
|
||||||
if (Feb_Control_normal) {
|
if (Feb_Control_normal) {
|
||||||
|
// open file
|
||||||
if (readADCFromFile(NORMAL_HIGHVOLTAGE_INPUTPORT, value) == FAIL) {
|
FILE *fd = fopen(NORMAL_HIGHVOLTAGE_INPUTPORT, "r");
|
||||||
LOG(logERROR, ("Could not get high voltage\n"));
|
if (fd == NULL) {
|
||||||
|
LOG(logERROR,
|
||||||
|
("Could not open file for writing to get high voltage\n"));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// read, assigning line to null and readbytes to 0 then getline
|
||||||
|
// allocates initial buffer
|
||||||
|
size_t readbytes = 0;
|
||||||
|
char *line = NULL;
|
||||||
|
if (getline(&line, &readbytes, fd) == -1) {
|
||||||
|
LOG(logERROR, ("could not read file to get high voltage\n"));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
// read again to read the updated value
|
||||||
|
rewind(fd);
|
||||||
|
free(line);
|
||||||
|
readbytes = 0;
|
||||||
|
readbytes = getline(&line, &readbytes, fd);
|
||||||
|
if (readbytes == -1) {
|
||||||
|
LOG(logERROR, ("could not read file to get high voltage\n"));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
// Remove the trailing 0
|
||||||
|
*value = atoi(line) / 10;
|
||||||
|
free(line);
|
||||||
|
fclose(fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 9m
|
// 9m
|
||||||
@ -690,7 +714,7 @@ int Feb_Control_ProcessingInProgress() {
|
|||||||
unsigned int regr = 0, regl = 0;
|
unsigned int regr = 0, regl = 0;
|
||||||
// deactivated should return end of processing
|
// deactivated should return end of processing
|
||||||
if (!Feb_Control_activated)
|
if (!Feb_Control_activated)
|
||||||
return STATUS_IDLE;
|
return IDLE;
|
||||||
|
|
||||||
if (!Feb_Interface_ReadRegister(Feb_Control_rightAddress, FEB_REG_STATUS,
|
if (!Feb_Interface_ReadRegister(Feb_Control_rightAddress, FEB_REG_STATUS,
|
||||||
®r)) {
|
®r)) {
|
||||||
@ -704,9 +728,8 @@ int Feb_Control_ProcessingInProgress() {
|
|||||||
"processing status\n"));
|
"processing status\n"));
|
||||||
return STATUS_ERROR;
|
return STATUS_ERROR;
|
||||||
}
|
}
|
||||||
LOG(logDEBUG1, ("regl:0x%x regr:0x%x\n", regl, regr));
|
|
||||||
// processing done
|
// processing done
|
||||||
if (regr & regl & FEB_REG_STATUS_ACQ_DONE_MSK) {
|
if ((regr | regl) & FEB_REG_STATUS_ACQ_DONE_MSK) {
|
||||||
return STATUS_IDLE;
|
return STATUS_IDLE;
|
||||||
}
|
}
|
||||||
// processing running
|
// processing running
|
||||||
@ -1031,7 +1054,6 @@ int Feb_Control_StopAcquisition() {
|
|||||||
// wait for feb processing to be done
|
// wait for feb processing to be done
|
||||||
int is_processing = Feb_Control_ProcessingInProgress();
|
int is_processing = Feb_Control_ProcessingInProgress();
|
||||||
int check_error = 0;
|
int check_error = 0;
|
||||||
int check_stuck = 0;
|
|
||||||
while (is_processing != STATUS_IDLE) {
|
while (is_processing != STATUS_IDLE) {
|
||||||
usleep(500);
|
usleep(500);
|
||||||
is_processing = Feb_Control_ProcessingInProgress();
|
is_processing = Feb_Control_ProcessingInProgress();
|
||||||
@ -1043,29 +1065,12 @@ int Feb_Control_StopAcquisition() {
|
|||||||
break;
|
break;
|
||||||
check_error++;
|
check_error++;
|
||||||
} // reset check_error for next time
|
} // reset check_error for next time
|
||||||
else {
|
else
|
||||||
check_error = 0;
|
check_error = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// check stuck only 2000 times (1s)
|
|
||||||
if (is_processing == STATUS_RUNNING) {
|
|
||||||
if (check_stuck == 2000) {
|
|
||||||
LOG(logERROR,
|
|
||||||
("Unable to get feb processing done signal\n"));
|
|
||||||
// at least it is idle
|
|
||||||
if (Feb_Control_AcquisitionInProgress() == STATUS_IDLE) {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
LOG(logERROR, ("Unable to get acquisition done signal\n"));
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
check_stuck++;
|
|
||||||
} // reset check_stuck for next time
|
|
||||||
else {
|
|
||||||
check_stuck = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
LOG(logINFO, ("Feb: Processing done (to stop acq)\n"));
|
LOG(logINFO, ("Feb: Processing done (to stop acq)\n"));
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -1625,9 +1630,7 @@ int Feb_Control_SetChipSignalsToTrimQuad(int enable) {
|
|||||||
LOG(logINFO, ("%s chip signals to trim quad\n",
|
LOG(logINFO, ("%s chip signals to trim quad\n",
|
||||||
enable ? "Enabling" : "Disabling"));
|
enable ? "Enabling" : "Disabling"));
|
||||||
unsigned int regval = 0;
|
unsigned int regval = 0;
|
||||||
// right fpga only
|
if (!Feb_Control_ReadRegister(DAQ_REG_HRDWRE, ®val)) {
|
||||||
uint32_t righOffset = DAQ_REG_HRDWRE + Feb_Control_rightAddress;
|
|
||||||
if (!Feb_Control_ReadRegister(righOffset, ®val)) {
|
|
||||||
LOG(logERROR, ("Could not set chip signals to trim quad\n"));
|
LOG(logERROR, ("Could not set chip signals to trim quad\n"));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -1637,7 +1640,7 @@ int Feb_Control_SetChipSignalsToTrimQuad(int enable) {
|
|||||||
regval &= ~(DAQ_REG_HRDWRE_PROGRAM_MSK | DAQ_REG_HRDWRE_M8_MSK);
|
regval &= ~(DAQ_REG_HRDWRE_PROGRAM_MSK | DAQ_REG_HRDWRE_M8_MSK);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Feb_Control_WriteRegister(righOffset, regval)) {
|
if (!Feb_Control_WriteRegister(DAQ_REG_HRDWRE, regval)) {
|
||||||
LOG(logERROR, ("Could not set chip signals to trim quad\n"));
|
LOG(logERROR, ("Could not set chip signals to trim quad\n"));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -1673,19 +1676,19 @@ int Feb_Control_WriteRegister(uint32_t offset, uint32_t data) {
|
|||||||
|
|
||||||
int run[2] = {0, 0};
|
int run[2] = {0, 0};
|
||||||
// both registers
|
// both registers
|
||||||
if (offset < Feb_Control_leftAddress) {
|
if (offset < 0x100) {
|
||||||
run[0] = 1;
|
run[0] = 1;
|
||||||
run[1] = 1;
|
run[1] = 1;
|
||||||
}
|
}
|
||||||
// right registers only
|
// right registers only
|
||||||
else if (offset >= Feb_Control_rightAddress) {
|
else if (offset >= 0x200) {
|
||||||
run[0] = 1;
|
run[0] = 1;
|
||||||
actualOffset = offset - Feb_Control_rightAddress;
|
actualOffset = offset - 0x200;
|
||||||
}
|
}
|
||||||
// left registers only
|
// left registers only
|
||||||
else {
|
else {
|
||||||
run[1] = 1;
|
run[1] = 1;
|
||||||
actualOffset = offset - Feb_Control_leftAddress;
|
actualOffset = offset - 0x100;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int iloop = 0; iloop < 2; ++iloop) {
|
for (int iloop = 0; iloop < 2; ++iloop) {
|
||||||
@ -1723,19 +1726,19 @@ int Feb_Control_ReadRegister(uint32_t offset, uint32_t *retval) {
|
|||||||
uint32_t value[2] = {0, 0};
|
uint32_t value[2] = {0, 0};
|
||||||
int run[2] = {0, 0};
|
int run[2] = {0, 0};
|
||||||
// both registers
|
// both registers
|
||||||
if (offset < Feb_Control_leftAddress) {
|
if (offset < 0x100) {
|
||||||
run[0] = 1;
|
run[0] = 1;
|
||||||
run[1] = 1;
|
run[1] = 1;
|
||||||
}
|
}
|
||||||
// right registers only
|
// right registers only
|
||||||
else if (offset >= Feb_Control_rightAddress) {
|
else if (offset >= 0x200) {
|
||||||
run[0] = 1;
|
run[0] = 1;
|
||||||
actualOffset = offset - Feb_Control_rightAddress;
|
actualOffset = offset - 0x200;
|
||||||
}
|
}
|
||||||
// left registers only
|
// left registers only
|
||||||
else {
|
else {
|
||||||
run[1] = 1;
|
run[1] = 1;
|
||||||
actualOffset = offset - Feb_Control_leftAddress;
|
actualOffset = offset - 0x100;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int iloop = 0; iloop < 2; ++iloop) {
|
for (int iloop = 0; iloop < 2; ++iloop) {
|
||||||
@ -1756,10 +1759,11 @@ int Feb_Control_ReadRegister(uint32_t offset, uint32_t *retval) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Inconsistent values when reading both registers
|
// Inconsistent values
|
||||||
if ((run[0] & run[1]) & (value[0] != value[1])) {
|
if (value[0] != value[1]) {
|
||||||
LOG(logERROR, ("Inconsistent values read from %s 0x%x and %s 0x%x\n",
|
LOG(logERROR,
|
||||||
side[0], value[0], side[1], value[1]));
|
("Inconsistent values read from left 0x%x and right 0x%x\n",
|
||||||
|
value[0], value[1]));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -25,11 +25,10 @@ version: clean versioning $(PROGS) #hv9m_blackfin_server
|
|||||||
|
|
||||||
boot: $(OBJS)
|
boot: $(OBJS)
|
||||||
|
|
||||||
version_branch=$(API_BRANCH)
|
|
||||||
version_name=APIEIGER
|
version_name=APIEIGER
|
||||||
version_path=slsDetectorServers/eigerDetectorServer
|
version_path=slsDetectorServers/eigerDetectorServer
|
||||||
versioning:
|
versioning:
|
||||||
cd ../../ && echo $(PWD) && echo `tput setaf 6; ./updateAPIVersion.sh $(version_name) $(version_path) $(version_branch); tput sgr0;`
|
cd ../../ && echo $(PWD) && echo `tput setaf 6; ./updateAPIVersion.sh $(version_name) $(version_path); tput sgr0;`
|
||||||
|
|
||||||
|
|
||||||
$(PROGS): $(OBJS)
|
$(PROGS): $(OBJS)
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -117,10 +117,9 @@ void basictests() {
|
|||||||
uint32_t ipadd = getDetectorIP();
|
uint32_t ipadd = getDetectorIP();
|
||||||
uint64_t macadd = getDetectorMAC();
|
uint64_t macadd = getDetectorMAC();
|
||||||
int64_t fwversion = getFirmwareVersion();
|
int64_t fwversion = getFirmwareVersion();
|
||||||
char swversion[MAX_STR_LENGTH] = {0};
|
int64_t swversion = getServerVersion();
|
||||||
memset(swversion, 0, MAX_STR_LENGTH);
|
|
||||||
getServerVersion(swversion);
|
|
||||||
int64_t sw_fw_apiversion = getFirmwareAPIVersion();
|
int64_t sw_fw_apiversion = getFirmwareAPIVersion();
|
||||||
|
int64_t client_sw_apiversion = getClientServerAPIVersion();
|
||||||
|
|
||||||
LOG(logINFOBLUE,
|
LOG(logINFOBLUE,
|
||||||
("**************************************************\n"
|
("**************************************************\n"
|
||||||
@ -128,13 +127,16 @@ void basictests() {
|
|||||||
"Detector MAC Addr:\t\t 0x%llx\n"
|
"Detector MAC Addr:\t\t 0x%llx\n"
|
||||||
|
|
||||||
"Firmware Version:\t\t %lld\n"
|
"Firmware Version:\t\t %lld\n"
|
||||||
"Software Version:\t\t %s\n"
|
"Software Version:\t\t 0x%llx\n"
|
||||||
"F/w-S/w API Version:\t\t %lld\n"
|
"F/w-S/w API Version:\t\t %lld\n"
|
||||||
"Required Firmware Version:\t %d\n"
|
"Required Firmware Version:\t %d\n"
|
||||||
|
"Client-Software API Version:\t 0x%llx\n"
|
||||||
|
"\n"
|
||||||
"********************************************************\n",
|
"********************************************************\n",
|
||||||
(unsigned int)ipadd, (long long unsigned int)macadd,
|
(unsigned int)ipadd, (long long unsigned int)macadd,
|
||||||
(long long int)fwversion, swversion, (long long int)sw_fw_apiversion,
|
(long long int)fwversion, (long long int)swversion,
|
||||||
REQUIRED_FIRMWARE_VERSION));
|
(long long int)sw_fw_apiversion, REQUIRED_FIRMWARE_VERSION,
|
||||||
|
(long long int)client_sw_apiversion));
|
||||||
|
|
||||||
// update default udpdstip and udpdstmac (1g is hardware ip and hardware
|
// update default udpdstip and udpdstmac (1g is hardware ip and hardware
|
||||||
// mac)
|
// mac)
|
||||||
@ -206,7 +208,9 @@ int getTestImageMode() { return eiger_virtual_test_mode; }
|
|||||||
|
|
||||||
/* Ids */
|
/* Ids */
|
||||||
|
|
||||||
void getServerVersion(char *version) { strcpy(version, APIEIGER); }
|
uint64_t getServerVersion() { return APIEIGER; }
|
||||||
|
|
||||||
|
uint64_t getClientServerAPIVersion() { return APIEIGER; }
|
||||||
|
|
||||||
u_int64_t getFirmwareVersion() {
|
u_int64_t getFirmwareVersion() {
|
||||||
#ifdef VIRTUAL
|
#ifdef VIRTUAL
|
||||||
@ -2181,9 +2185,6 @@ int setTrimbits(int *chanregs, char *mess) {
|
|||||||
|
|
||||||
// if quad, set M8 and PROGRAM manually
|
// if quad, set M8 and PROGRAM manually
|
||||||
if (!Feb_Control_SetChipSignalsToTrimQuad(1)) {
|
if (!Feb_Control_SetChipSignalsToTrimQuad(1)) {
|
||||||
sprintf(mess, "Could not set module. Could not enable chip signals to "
|
|
||||||
"set trimbits\n");
|
|
||||||
LOG(logERROR, (mess));
|
|
||||||
sharedMemory_unlockLocalLink();
|
sharedMemory_unlockLocalLink();
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
@ -2197,9 +2198,6 @@ int setTrimbits(int *chanregs, char *mess) {
|
|||||||
|
|
||||||
// if quad, reset M8 and PROGRAM manually
|
// if quad, reset M8 and PROGRAM manually
|
||||||
if (!Feb_Control_SetChipSignalsToTrimQuad(0)) {
|
if (!Feb_Control_SetChipSignalsToTrimQuad(0)) {
|
||||||
sprintf(mess, "Could not set module. Could not disable chip "
|
|
||||||
"signals to set trimbits\n");
|
|
||||||
LOG(logERROR, (mess));
|
|
||||||
sharedMemory_unlockLocalLink();
|
sharedMemory_unlockLocalLink();
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
@ -2210,9 +2208,6 @@ int setTrimbits(int *chanregs, char *mess) {
|
|||||||
|
|
||||||
// if quad, reset M8 and PROGRAM manually
|
// if quad, reset M8 and PROGRAM manually
|
||||||
if (!Feb_Control_SetChipSignalsToTrimQuad(0)) {
|
if (!Feb_Control_SetChipSignalsToTrimQuad(0)) {
|
||||||
sprintf(mess, "Could not set module. Could not disable chip signals to "
|
|
||||||
"set trimbits\n");
|
|
||||||
LOG(logERROR, (mess));
|
|
||||||
sharedMemory_unlockLocalLink();
|
sharedMemory_unlockLocalLink();
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
@ -2424,43 +2419,42 @@ int setTransmissionDelayRight(int value) {
|
|||||||
|
|
||||||
/* aquisition */
|
/* aquisition */
|
||||||
|
|
||||||
int startStateMachine() {
|
int prepareAcquisition() {
|
||||||
sharedMemory_lockAcqFlag();
|
#ifndef VIRTUAL
|
||||||
|
sharedMemory_lockLocalLink();
|
||||||
|
LOG(logINFO, ("Going to prepare for acquisition with counter_bit:%d\n",
|
||||||
|
Feb_Control_Get_Counter_Bit()));
|
||||||
|
Feb_Control_PrepareForAcquisition();
|
||||||
|
sharedMemory_unlockLocalLink();
|
||||||
|
#endif
|
||||||
|
return OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
int startStateMachine() {
|
||||||
#ifdef VIRTUAL
|
#ifdef VIRTUAL
|
||||||
// create udp socket
|
// create udp socket
|
||||||
if (createUDPSocket(0) != OK) {
|
if (createUDPSocket(0) != OK) {
|
||||||
sharedMemory_unlockAcqFlag();
|
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
if (createUDPSocket(1) != OK) {
|
if (createUDPSocket(1) != OK) {
|
||||||
sharedMemory_unlockAcqFlag();
|
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
LOG(logINFOBLUE, ("Starting State Machine\n"));
|
LOG(logINFOBLUE, ("Starting State Machine\n"));
|
||||||
if (sharedMemory_getStop() != 0) {
|
if (sharedMemory_getStop() != 0) {
|
||||||
LOG(logERROR, ("Cant start acquisition. "
|
LOG(logERROR, ("Cant start acquisition. "
|
||||||
"Stop server has not updated stop status to 0\n"));
|
"Stop server has not updated stop status to 0\n"));
|
||||||
sharedMemory_unlockAcqFlag();
|
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
sharedMemory_setStatus(RUNNING);
|
sharedMemory_setStatus(RUNNING);
|
||||||
if (pthread_create(&virtual_tid, NULL, &start_timer, NULL)) {
|
if (pthread_create(&virtual_tid, NULL, &start_timer, NULL)) {
|
||||||
LOG(logERROR, ("Could not start Virtual acquisition thread\n"));
|
LOG(logERROR, ("Could not start Virtual acquisition thread\n"));
|
||||||
sharedMemory_setStatus(IDLE);
|
sharedMemory_setStatus(IDLE);
|
||||||
sharedMemory_unlockAcqFlag();
|
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
LOG(logINFO, ("Virtual Acquisition started\n"));
|
LOG(logINFO, ("Virtual Acquisition started\n"));
|
||||||
sharedMemory_unlockAcqFlag();
|
|
||||||
return OK;
|
return OK;
|
||||||
#else
|
#else
|
||||||
sharedMemory_lockLocalLink();
|
sharedMemory_lockLocalLink();
|
||||||
|
|
||||||
LOG(logINFO, ("Going to prepare for acquisition with counter_bit:%d\n",
|
|
||||||
Feb_Control_Get_Counter_Bit()));
|
|
||||||
Feb_Control_PrepareForAcquisition();
|
|
||||||
|
|
||||||
LOG(logINFO, ("Acquisition started bit toggled\n"));
|
LOG(logINFO, ("Acquisition started bit toggled\n"));
|
||||||
int ret = OK, prev_flag;
|
int ret = OK, prev_flag;
|
||||||
// get the DAQ toggle bit
|
// get the DAQ toggle bit
|
||||||
@ -2478,13 +2472,12 @@ int startStateMachine() {
|
|||||||
LOG(logERROR,
|
LOG(logERROR,
|
||||||
("Acquisition did not LOG(logERROR ouble reading register\n"));
|
("Acquisition did not LOG(logERROR ouble reading register\n"));
|
||||||
sharedMemory_unlockLocalLink();
|
sharedMemory_unlockLocalLink();
|
||||||
sharedMemory_unlockAcqFlag();
|
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
LOG(logINFOGREEN, ("Acquisition started\n"));
|
LOG(logINFOGREEN, ("Acquisition started\n"));
|
||||||
}
|
}
|
||||||
sharedMemory_unlockLocalLink();
|
sharedMemory_unlockLocalLink();
|
||||||
sharedMemory_unlockAcqFlag();
|
|
||||||
return ret;
|
return ret;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -2778,10 +2771,6 @@ void *start_timer(void *arg) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
int stopStateMachine() {
|
int stopStateMachine() {
|
||||||
|
|
||||||
// acq lock for seamless stop
|
|
||||||
sharedMemory_lockAcqFlag();
|
|
||||||
|
|
||||||
LOG(logINFORED, ("Stopping state machine\n"));
|
LOG(logINFORED, ("Stopping state machine\n"));
|
||||||
// if scan active, stop scan
|
// if scan active, stop scan
|
||||||
if (sharedMemory_getScanStatus() == RUNNING) {
|
if (sharedMemory_getScanStatus() == RUNNING) {
|
||||||
@ -2794,15 +2783,13 @@ int stopStateMachine() {
|
|||||||
usleep(500);
|
usleep(500);
|
||||||
sharedMemory_setStop(0);
|
sharedMemory_setStop(0);
|
||||||
LOG(logINFO, ("Stopped State Machine\n"));
|
LOG(logINFO, ("Stopped State Machine\n"));
|
||||||
sharedMemory_unlockAcqFlag();
|
|
||||||
return OK;
|
return OK;
|
||||||
#else
|
#else
|
||||||
sharedMemory_lockLocalLink();
|
sharedMemory_lockLocalLink();
|
||||||
// sends last frames from fifo and wait for feb processing done
|
// sends last frames from fifo and wait for feb processing done
|
||||||
if (!Feb_Control_StopAcquisition()) {
|
if ((Feb_Control_StopAcquisition() != STATUS_IDLE)) {
|
||||||
LOG(logERROR, ("failed to stop acquisition\n"));
|
LOG(logERROR, ("failed to stop acquisition\n"));
|
||||||
sharedMemory_unlockLocalLink();
|
sharedMemory_unlockLocalLink();
|
||||||
sharedMemory_unlockAcqFlag();
|
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
sharedMemory_unlockLocalLink();
|
sharedMemory_unlockLocalLink();
|
||||||
@ -2813,7 +2800,6 @@ int stopStateMachine() {
|
|||||||
// wait for beb to send out all packets
|
// wait for beb to send out all packets
|
||||||
if (Beb_IsTransmitting(&isTransmitting, send_to_ten_gig, 1) == FAIL) {
|
if (Beb_IsTransmitting(&isTransmitting, send_to_ten_gig, 1) == FAIL) {
|
||||||
LOG(logERROR, ("failed to stop beb acquisition\n"));
|
LOG(logERROR, ("failed to stop beb acquisition\n"));
|
||||||
sharedMemory_unlockAcqFlag();
|
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
if (isTransmitting) {
|
if (isTransmitting) {
|
||||||
@ -2828,7 +2814,6 @@ int stopStateMachine() {
|
|||||||
sharedMemory_unlockLocalLink();
|
sharedMemory_unlockLocalLink();
|
||||||
if (!Beb_StopAcquisition()) {
|
if (!Beb_StopAcquisition()) {
|
||||||
LOG(logERROR, ("failed to stop acquisition\n"));
|
LOG(logERROR, ("failed to stop acquisition\n"));
|
||||||
sharedMemory_unlockAcqFlag();
|
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2838,7 +2823,6 @@ int stopStateMachine() {
|
|||||||
Beb_SetNextFrameNumber(retval + 1);
|
Beb_SetNextFrameNumber(retval + 1);
|
||||||
}
|
}
|
||||||
LOG(logINFOBLUE, ("Stopping state machine complete\n\n"));
|
LOG(logINFOBLUE, ("Stopping state machine complete\n\n"));
|
||||||
sharedMemory_unlockAcqFlag();
|
|
||||||
return OK;
|
return OK;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -2919,8 +2903,7 @@ void waitForAcquisitionEnd(int *ret, char *mess) {
|
|||||||
sharedMemory_lockLocalLink();
|
sharedMemory_lockLocalLink();
|
||||||
if (Feb_Control_WaitForFinishedFlag(5000, 1) == STATUS_ERROR) {
|
if (Feb_Control_WaitForFinishedFlag(5000, 1) == STATUS_ERROR) {
|
||||||
sharedMemory_unlockLocalLink();
|
sharedMemory_unlockLocalLink();
|
||||||
strcpy(mess, "Could not wait for finished flag\n");
|
LOG(logERROR, ("Waiting for finished flag\n"));
|
||||||
LOG(logERROR, (mess));
|
|
||||||
*ret = FAIL;
|
*ret = FAIL;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -2936,7 +2919,6 @@ void waitForAcquisitionEnd(int *ret, char *mess) {
|
|||||||
sharedMemory_unlockLocalLink();
|
sharedMemory_unlockLocalLink();
|
||||||
if (i == STATUS_ERROR) {
|
if (i == STATUS_ERROR) {
|
||||||
strcpy(mess, "Could not read feb processing done register\n");
|
strcpy(mess, "Could not read feb processing done register\n");
|
||||||
LOG(logERROR, (mess));
|
|
||||||
*ret = (int)FAIL;
|
*ret = (int)FAIL;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -2948,7 +2930,6 @@ void waitForAcquisitionEnd(int *ret, char *mess) {
|
|||||||
// wait for beb to send out all packets
|
// wait for beb to send out all packets
|
||||||
if (Beb_IsTransmitting(&isTransmitting, send_to_ten_gig, 1) == FAIL) {
|
if (Beb_IsTransmitting(&isTransmitting, send_to_ten_gig, 1) == FAIL) {
|
||||||
strcpy(mess, "Could not read delay counters\n");
|
strcpy(mess, "Could not read delay counters\n");
|
||||||
LOG(logERROR, (mess));
|
|
||||||
*ret = (int)FAIL;
|
*ret = (int)FAIL;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user