1317 Commits

Author SHA1 Message Date
Dhanya Thattil
f7618fbb93
error message 'unrecognized function enum' from detector or receiver prepended with Software version mismatch to handle enum start change between v6 and v7 (#680) 2023-02-22 11:11:46 +01:00
Erik Fröjdh
0251aa9e63
fixed linking issue in arping and shm test (#659)
Co-authored-by: Erik Frojdh <erik.frojdh@psi.ch>
2023-02-14 14:49:00 +01:00
Dhanya Thattil
18136fed9d
exception messages (#656)
* fix exception messages for more printout about sockets or more detail
2023-02-13 11:22:05 +01:00
4ee4d66977
Jf zeromq display (#644)
* modified ZmqSocket to expose the SO_RCVBUF and SO_SENDBUF parameters. Modified DataStreamer.cpp to change the SENDBUF to 1MB when HWL is <10. Modified Datastreamer.cpp so that when HWL is changed, socket is unbind/rebind. Added rebind to ZmqSocket.cpp.
Changed slot UpdatePlot() in qdrawplot.h from privat tto public, added plot->UpdatePlot() after every axis range change, so the plots are updated immediatly and not at the next image.
Added onlinedisp_zmq program which connects to the receiver ZMQ port and show images and histos. Compiled against  ROOT 6.22/02. Added examples files.

* added setbuffer size also for gui, moved hardcoded values to a macro, removed unnecessary return of ok or success, added actual zmq exception message to could not create sockets error

* zmq: changing buffer size done within hwm

---------

Co-authored-by: mozzanica <l_mozzanica@mpc2012.psi.ch>
Co-authored-by: Dhanya Thattil <dhanya.thattil@psi.ch>
2023-02-09 17:24:28 +01:00
Dhanya Thattil
8158ef876c
eiger: quad write/read reg (dr) and quad positions (#649)
* eiger: adding mask to read/write registers. useful for setting quad parameters as they might have different values for left and right fpga registers.
** fix quad position
* fix quad flipping
* formatting
2023-02-09 15:55:35 +01:00
Dhanya Thattil
ebb6f53b21
Fix rx arping socket bind (#646)
* first tries with a process intead of thread for rx_arping

* Moving delete pointer of udp socket to stopReciever,so rx_arping can only be set when udp socket is closed

* refactoring and formatting

* unused variable processId

* ignore sigchild to prevent zombie from child processes being killed
2023-02-03 17:18:09 +01:00
964bdf5fc3 fix for changing udp socket buffer size 2022-12-05 13:17:16 +01:00
Dhanya Thattil
a2f41c13b7
fixed clang compiler warnings (#586) 2022-11-25 11:00:02 +01:00
f6241f7a5e formatting 2022-11-18 14:26:58 +01:00
Dhanya Thattil
4bb1a612f1
changed detector header version to detector specific field names and incremented version number, also for zmq (#574) 2022-11-17 15:24:12 +01:00
Dhanya Thattil
f108ec82ea
destruct arping thread in Arping desturctor (#578) 2022-11-17 15:22:54 +01:00
Dhanya Thattil
05f657c106
Versioning (#568)
- removed getClientServerAPIVersion in server (not used)
- removed rxr side (clientversion compatibility check), removed enum as well as it is now done on the client side.
- versionAPI.h
   - GITBRANCH changed to RELEASE
   - dates for all API changed to "sem_version date". Scripts to compile servers modified for this. Empty "branch" name will end up with developer for sem_version.

- Version class with constructor taking in the long version (APILIB date). Other member functions including concise(to get sem_version for new releases and date for old releases), 
  
- bypassing initial tests, also now bypasses the client-rxr compatibility check (at rx_hostname command)

- previously, compatibility between client-det was ensuring both had the same detector API (eg. same APIJUNGFRAU)
   - Now, compatibility only checks APILIB (client side) and detector API(eg. APIJUNGFRAU) (detector side) have same major version. It only does backward compatibility test. Rest is upto user to ensure. 
   - If server is from an older release, it will compare dates like previous implementation (APIJUNGFRAU from both client and det)
 
- - previously, compatibility between client-rxr was ensuring both had the same APIRECEIVER
   - Now, compatibility only checks APILIB (client side) and APIRECEIVER (rxr side) have same major version. It only does backward compatibility test. Rest is upto user to ensure. 
   - If rxr is from an older release, it will compare dates like previous implementation (APIRECEIVER from both client and rxr)

- removed APIGUI, evalVersionVariables.sh, genVersionHeader.sh (not needed or not used)

- clientVersion, rxrversion and detectorserverversion all return strings and not integers (in hex) anymore. Depending if it has semantic versioning, it will print that or the date if it is too old.

- fixed in python (strings for versions)
- check_version function in detector server changed to "initial checks" as it only checks server-firmware compatibility and initial server checks. Client compatibilities are moved to client side.
- --version gives sem_version and date? Is date needed as well. The clientversion, detserverversion and rxrversion API gives only sem_version (no date)
- - formatting
2022-11-09 11:13:09 +01:00
Dhanya Thattil
e7879ee365
g2 and m3 round robin (#559)
* g2 and m3: round robin
2022-10-18 15:51:23 +02:00
Dhanya Thattil
d2c4827b31
increasing default rx tcp port (#562)
* increasing rx tcp port by default when creating shm
2022-10-18 15:24:04 +02:00
Dhanya Thattil
4913c9c0b0
incorrect check for fwrite fail (#541) 2022-08-31 15:53:24 +02:00
Dhanya Thattil
e0207cfac1
Udpsocket (#507)
* udp socket refactor from reuss: closing socket before throwing for bind error in constructor, closing socket at destructor and not at shutdown to allow other thread to read with a -1, so the object can still be accessed

* check for size of packet for every detector

* nullptr to unique ptr to call its destructor, when deallocating resources moved out of shutdown

* minor
2022-08-11 09:14:29 +02:00
Dhanya Thattil
6bf9dbf6d3
Format (#506)
Formatted package
2022-08-05 15:39:34 +02:00
Dhanya Thattil
7173785b29
Hdf5 para (#505)
* incorrect dimensions for virtual hdf5 parameter set

* fix for corner case bug in hdf5 virtual parameter dataset when frames caught is not a multiple of framesperfile

* reafctoring for readability and error prone hard numbers
2022-08-05 09:09:00 +02:00
Dhanya Thattil
89e293cb5a
Rxpointers (#504)
* gui message doesnt show if it has a '>' symbol in error msg

* minor refactoring for readability (size_t calc fifo size)

* refactoring listening udp socket code: activated and datastream dont create udp sockets anyway, rc<=- should be discarded in any case

* wip

* refactoring memory structure access

* wip: bugfix write header + data to binary

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* portRoi no roi effecto on progress

* fail at receiver progress, wip

* segfaults for char pointer in struct

* reference to header to get header and data

* refactoring

* use const defined for size of header of fifo

* updated release notes

* remove pointer in callback for sls_receiver_header pointer

* rx same name arguments in constructors

* rx: same name arguments in constructor

* rx: removing the '_' suffix in class data members

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* diff undo for clang later

* wip

* Wip

* const string&
2022-08-05 09:08:18 +02:00
Dhanya Thattil
9ac8dab8af
Rxclassmembers (#503)
* gui message doesnt show if it has a '>' symbol in error msg

* minor refactoring for readability (size_t calc fifo size)

* refactoring listening udp socket code: activated and datastream dont create udp sockets anyway, rc<=- should be discarded in any case

* wip

* refactoring memory structure access

* wip: bugfix write header + data to binary

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* portRoi no roi effecto on progress

* fail at receiver progress, wip

* segfaults for char pointer in struct

* reference to header to get header and data

* refactoring

* use const defined for size of header of fifo

* updated release notes

* remove pointer in callback for sls_receiver_header pointer

* rx same name arguments in constructors

* rx: same name arguments in constructor

* rx: removing the '_' suffix in class data members

* merge fix

* merge fix

* review fix refactoring
2022-07-25 14:02:11 +02:00
Dhanya Thattil
d132ad8d02
Callback rxheader (#502)
* gui message doesnt show if it has a '>' symbol in error msg

* minor refactoring for readability (size_t calc fifo size)

* refactoring listening udp socket code: activated and datastream dont create udp sockets anyway, rc<=- should be discarded in any case

* wip

* refactoring memory structure access

* wip: bugfix write header + data to binary

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* portRoi no roi effecto on progress

* fail at receiver progress, wip

* segfaults for char pointer in struct

* reference to header to get header and data

* refactoring

* use const defined for size of header of fifo

* updated release notes

* remove pointer in callback for sls_receiver_header pointer

* passing reference header for callback instead of copying it
2022-07-22 16:15:21 +02:00
Dhanya Thattil
4117cda79b
Rx: refactor memory structure and listener (#496)
* gui message doesnt show if it has a '>' symbol in error msg

* minor refactoring for readability (size_t calc fifo size)

* refactoring listening udp socket code: activated and datastream dont create udp sockets anyway, rc<=- should be discarded in any case

* wip

* refactoring memory structure access

* wip: bugfix write header + data to binary

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* portRoi no roi effecto on progress

* fail at receiver progress, wip

* segfaults for char pointer in struct

* reference to header to get header and data

* refactoring

* use const defined for size of header of fifo

* updated release notes

* refactoring from review: fwrite, static_cast
2022-07-22 15:32:41 +02:00
Dhanya Thattil
5be50785fb
rx noRoi should not create files for port (#499) 2022-07-14 10:09:48 +02:00
Dhanya Thattil
5490daa0a1
storagecells not updated in rx and allowing it in idle mode (#485) 2022-06-09 13:42:18 +02:00
Dhanya Thattil
8ca8185d41
H5 one dataset name (#484)
* rename all datasets in hdf5 files to just 'data'

* removing the global qualifier H5

* update release notes
2022-06-09 12:35:33 +02:00
Dhanya Thattil
89aa0760c6
Hdf5fix (#483)
* hdf5 fix for string reference

* fix hdf5 compilation after namespace change
2022-06-09 11:42:32 +02:00
Dhanya Thattil
728cb35c37
rxMemsize (#479)
* changing fifo header size to 16 to fix the rxr header (112) to be a power of 2 to make it more efficient and reduce packet loss

* release notes
2022-06-08 12:03:13 +02:00
Dhanya Thattil
d61741c28b
tests add to namespace sls (#466)
* tests add to namespace sls

* fixed for tests

* finish up namespace sls for tests
2022-05-23 16:17:32 +02:00
Dhanya Thattil
8656eeec25
Revert "tests add to namespace sls (#464)" (#465)
This reverts commit f5745fcf18ae9c6953227a0cd3fe03b9b157ae9e.
2022-05-20 15:43:48 +02:00
Dhanya Thattil
f5745fcf18
tests add to namespace sls (#464) 2022-05-20 15:41:37 +02:00
Dhanya Thattil
70aed474dc
fedora cant compile as make_unique in Implementation points to std and not sls namespace, but it compiles for DetectorImpl (#463) 2022-05-20 12:00:24 +02:00
Dhanya Thattil
4259363169
rxr sls namespace (#457)
* rxr src files and classes (detectordata, ZmqSocket) added to sls namespace

* moving defines inside namespace

* moving defines inside namespace, added helpdacs to namespace

* added namespace to gui

* gui also updated

* removed unnecessary sls:: when already in sls namespace for slsDetectoSoftware, receverSoftware, slsDetectorGui and slsSupportlib
2022-05-18 11:48:38 +02:00
Dhanya Thattil
fcc7f7aef8
Rx roi (#428)
* roi structure expanded to have ymin and ymax

* compile with 'detector roi'

* wip

* wip, rx_roi, rx_clearroi

* wip rxroi

* rxroi wip

* wip rxroi

* merge fix

* wip

* rx_roi works, impl wip, test

* tests in, impl left

* wip, rxroi impl

* wip, rxroi impl

* wip

* setrx_Roi works, getrx_roi, wip

* rx_roi impl done

* wip, rxroi

* wip, getrx_roi rxr ports

* fix ports

* wip

* wip

* fix positions on server side

* wip

* numports wip

* wip

* jungfrau top inner interface row increment

* x, y detpos, wip

* removed eiger row indices flipping in gui (bottom flipping maintained)

* wip

* wip, jungfrau numinterfaces2

* jungfrau virtual works

* eiger, jungfrau, g2 virtual server works

* eiger positions fix, wip

* binaries in

* minor printout

* binaries in

* merge fix

* merge fix

* removing getposition

* setrxroi wip

* set upto port

* get messed, wip

* roi multi to module works, wip

* wip

* roi dont return -1

* added rxroi metadata in master file

* added rxroifromshm, not yet in detector

* rx roi in gui with box, also for gap pixels (gappixels for jungfrau mess)

* fix for segfault in gui with detaching roi box in gui

* wip

* m3 gui: slave timing modes should be discarded when squashing

* fixed m3 virtual data, and fixed counters in gui asthetics

* m3 roi works

* wip, g2

* wip

* handling g225um boards, and showing roi for gainplot as well

* udpate python functions

* fix for 1d and a2d roi written

* fixed actual roi written to file

* no virtual hdf5 when handling rx roi

* test

* minor

* binarie in
2022-05-16 12:35:06 +02:00
Erik Fröjdh
fa12ab2858
Support external builds of python bindings, gui, ctbgui and moench stuff (#440)
Use already installed version of the slsDetectorPackage. Assumes that the library has already been built and installed either on a system wide location or pointed to by CMAKE_PREFIX_PATH
2022-04-28 16:35:29 +02:00
Dhanya Thattil
afeee5501c
Fixpositions (#436)
* fix positions on server side

* wip

* numports wip

* wip

* jungfrau top inner interface row increment

* x, y detpos, wip

* removed eiger row indices flipping in gui (bottom flipping maintained)

* wip

* wip, jungfrau numinterfaces2

* jungfrau virtual works

* eiger, jungfrau, g2 virtual server works

* eiger positions fix, wip

* binaries in

* minor printout

* binaries in

* pointer bug

* comment to define test_mod_geometry define
2022-04-28 16:32:26 +02:00
Dhanya Thattil
2db2694660
m3 rxr: inconsistent generaldata default (#435)
* inconsistent copy with generalData and implementation members, especially for m3 (non default rxr generic values), issue caught on second configure with non m3 default values, eg tengiga 0

* removing test
2022-04-22 16:02:10 +02:00
Erik Fröjdh
e9dc3d8c38
minor changes (#429)
Various small changes to the data processor
2022-04-07 14:39:26 +02:00
Dhanya Thattil
62418c1316
sls_receiver_header* in callbacks (#425)
* char* to sls_receiver_header* in receiver data call backs

* uint32_t to size_t in callbacks

* string to const std::string & for callbacks
2022-04-07 10:19:47 +02:00
03d2158472 Merge branch 'developer' into jsonmaster 2022-03-30 16:49:41 +02:00
e1988bf088 fixes 2022-03-30 16:47:43 +02:00
28572af3ab resetting frames in file when creating a new hdf5 file 2022-03-30 15:39:20 +02:00
c57e528447 wip, prettywriter 2022-03-30 10:43:43 +02:00
74e325edb4 removing \n in timestamp for json file 2022-03-30 09:06:09 +02:00
8ce6868e46 fixed compilation 2022-03-29 16:13:33 +02:00
f5cca7a98f removed binary master file as well 2022-03-29 13:30:06 +02:00
b9aa0f46e4 wip, hdf5 refactored 2022-03-29 13:02:57 +02:00
6cd780ae99 wip 2022-03-29 11:49:30 +02:00
f2be834d55 wip, binary file refactored for stringbuffer, hdf5 mid way, masterattributes to be de (inherited) :) 2022-03-28 17:43:58 +02:00
cbed2e88c6 wip, binary json master for other dets 2022-03-25 15:34:39 +01:00
0f02ffdc9a binary master json done, hdf5 left wip 2022-03-25 13:29:03 +01:00