50 Commits

Author SHA1 Message Date
5f805f8789
Dev/jf firmware rollback (#1011)
* jf: rolling back firmware required to v1.5 and 2.5, updated release notes, fixed a bug when updating server (when server name same as link name:throws with no message, pedestal mode check changed for the time being for loops to be 0xFF size

* compensating for jf fw bug for pedestalmode where loops should be 16 bit, but is 8 bit in fw. to be fixed in next version

* formatting

* formatting, merge fix

* fixed python test simulator to kill previous servers

* rmeoved merge binary
2024-10-24 15:53:49 +02:00
3d21bb64c4
Dev/xilinx acq (#901)
* period and exptime(patternwaittime level 0)

* added new regsieterdefs and updated api version and fixedpattern reg

* autogenerate commands

* formatting

* minor

* wip resetflow, readout mode, transceiver mask, transceiver enable

* acquisition, but streaming done bit and busy (exposing + read chip to fifo) not known yet from fw

* programming fpga and device tree done

* most configuration done, need to connect configuretransceiver to client

* stuck at resetting transciever timed out

* minor

* fixed virtual, added chip busyto fifo, streaming busy, set/getnext framenumber

* configuretransceiver from client, added help in client

* make formatt and command generation

* tests for xilinx ctb works

* command generation

* dacs added and tested, power not done

* power added

* added temp_fpga

* binaries in

* ctrlreg is 0 to enable chip=fixed, high dac val = min val= fixed, power regulators in weird order=fixed, device tree could be loaded with dacs before adcs=fixed

* start works

* virtual server sends

* receiver works

* tests

* python function and enum generation, commands generatorn and autocomplete, formatting, tests

* tests fail at start(transceiver not aligned)

* tests passed

* all binaries compiled

* eiger binary in

* added --nomodule cehck for xilinx
2024-02-07 13:23:08 +01:00
9a08ecc5a5
Xilinx client tests (#887)
* implemented testbus, testfpga, set/get #frames, triggers, allowed that and for connection to client, also allowed, getnumchannels, configuremac, getrunstatus, setdetectorposition with dummy values

* allowing tests for xilinx

* binaries in
2024-01-10 16:23:52 +01:00
ce7270e8a2
commands code generation (#871)
* commands code generation  (#803)

* commands code generation for only frames command

* fix cmake file and add Caller files

* working exptime, fully extended commands file and its variants

* start adding template commands

* add INT_CMD_VEC_ID template

* add list command, generate multiple bins, format code

* reach 208 commands using the cpp macros

* add tests for command parser

* start adding tests for commands parser

* fix typo to use commands.yaml

* add more tests for command_parser

* add all template functions (up to 218 commands)

* finish template functions and add more CmdProxy.cpp functions (250+)

* 257 commands

* 300 commands the rest are very special commands

* add special commands without generation

* separate special functions from generated c++ file

* implementing one command for put and get (buggy)

* add infer action in a separate file

* generate header for special commands from yaml

* allow only 0 or 1 for bool inputs

* group all commands in gen_commands.py

* add help to gen_commands.py

* add autocomplete bash script

* autocompletion: add support for module levels and help

* remove debugging line

* add autocompletion, help to commands, change int [0,1] to bool

* copy tests for Caller.cpp. Tests pass

* update with the new developer branch changes

* fix errors after merging (there is problems with tests)

* fixed port/stopport in yaml (intput typo), added '_caller' to the test dac and test on chip dac command in global test for cmdcaller

* undo previous test simulator debug change

* add documentation for the generated code

* reducing the comment to be replaced in length so formatting does not split into 2 lines

* removed formatting specific style of C++11 in gen_commands.py to keep with the top level clang format of the project
* regeneratign code for commands

* automation generated

* Redirect deprecated commands (#872)

* working implementation, need to fix dac

* fixed deprecation redirect for dac command

* Detector specific autocomplete (#873)

* working implementation, need to fix dac

* fixed deprecation redirect for dac command

* detector specific completion for dac

* added autocomplete using detector specific

* fixed error when autocompleting partial words

* Generate commands/fix commands (#875)

* fix vm_a, im_a etc have deg Celsius suffix, also help missing or changed in some places

* dac: require det id for all, arg0 to be printed at output, help for onchip dac and dac, onchipdac: spacing

* getscan detid and blocking trigger help

* udp_Dstlist det_id fixed, but rx_id invalid

* cmdApp in line with cmdLineApp (missing version, receiver_id, not creating det object in help action

* added set_command to differentiate between check_det_id and require_det_id (mixed up), args: -1 needs to check for at least one argument

* reordering

* reordering and checked till integer_command_hex

* fixed a lot more commands

* fix caller tests for eiger

* changes to tests after Bechir left

* changing .cmd to .cmdcall for the caller commands

* fixed tests for caller, still warning for setexptime about cast input

* autocomplete ran

* add moench test

* regenerating autocomplete and commands

* fixing other things from merge conflicts (renaming slsDetectorDefs to defs in commands.yaml)

* formatting

* added code injection to help (#876)

* updated 3 commands to have get output that can be put into put (#877)

* updated some commands to have get output that can be put into put

* fix tests for clkdiv

* adding help to free (#878)

* removing old commands and renaming them, (also making it work for parameters command as it was still calling cmdproxy) (#879)

* More helpful error messages for unsupported actions (#880)

* removing old commands and renaming them, (also making it work for parameters command as it was still calling cmdproxy)

* Added specific help for unsupported actions

* fixed a vetofile get special exception message. more specific warning for special exception message instead of no function warning

* added condition checking true in exceptions for special message

---------
Co-authored-by: Bechir Brahem <bachbrahem@gmail.com>
Co-authored-by: Erik Frojdh <erik.frojdh@gmail.com>
Co-authored-by: Dhanya Thattil <dhanya.thattil@psi.ch>
2023-12-13 14:43:38 +01:00
7f0868f344 minor fix for test_simulator 2023-11-10 11:39:03 +01:00
397e846509
Dev: fix py virtual test (#846)
* draft to fix virtual test when it fails

* catching errors in tests and removing sigchild ignore so servers (process in background) executing commands will not fail (pclose no child processes, if sigchld is ignored) fixed

* uncommented python loading config

* somehow killal slsReciever in second detector test fails even though no receiver running

* fixing script for virtual simlator test:fixed issue with check if process running, fixed moench tests
2023-11-07 09:30:46 +01:00
fb25a01db5
Automate virtual test (#714)
* using argparse for parsing command line arguments

* added command line option to specify which servers to run

---------

Co-authored-by: Erik Fröjdh <erik.frojdh@gmail.com>
2023-05-11 12:15:22 +02:00
Dhanya Thattil
7de6f157b5
M3badchannels (#526)
* badchannels for m3 and modify for g2 (file from single and multi)

* m3: invert polarity of bit 7 and 11 signals from setmodule, allow commas in bad channel file

* badchannel file can take commas, colons and comments (also taking care of spaces at the end of channel numbers)

* tests 'badchannels' and 'Channel file reading' added, removing duplicates in badchannel list, defining macro for num counters in client side

* fix segfault when list from file is empty, 

* fix tests assertion for ctbconfig (adding message) for c++11

* fixed badchannels in m3server (clocking in trimming) 

* badchannel tests can be run from any folder (finds the file)
2022-09-01 15:30:04 +02:00
Dhanya Thattil
6bf9dbf6d3
Format (#506)
Formatted package
2022-08-05 15:39:34 +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
Erik Fröjdh
f6e76145c1
Make a library for writing and reading tiff, added tests (#347)
* removed Makefile for moench and integrated the build in CMake
* broke out tiff reading and writing to its own library
* moved tiff includes to include/sls
* moved tiffio source to src
* removed incorrectly used bps
* cleanup and tests for tiffio
* removed using namespace std from header
* some fixing for moench04
* Program for offline processing renamed

Co-authored-by: Anna Bergamaschi <anna.bergamaschi@psi.ch>
2022-01-27 10:24:02 +01:00
Erik Frojdh
b0a5a76065 adding LTO to tests 2021-11-24 17:40:14 +01:00
519b09fcad permission 2021-10-18 15:01:10 +02:00
ca08cd9ec1 updated cmakelists.txt for licesnse 2021-10-18 11:44:47 +02:00
dac60ad76d added .cpp licenses 2021-10-15 15:47:04 +02:00
4de7bb51ed updated all .h files with license notice and copyright notice 2021-10-14 18:10:56 +02:00
Erik Frojdh
df2d0524a5 added back commented cmake 2021-09-15 10:03:57 +02:00
Erik Frojdh
adaf56ca2e WIP 2021-09-14 15:14:08 +02:00
Erik Fröjdh
201d304874
Better control of what is built (#247)
* allow for build only detector libs

* allow receiver libs only

* option for shared libraries
2021-06-02 16:09:28 +02:00
Erik Fröjdh
2f2fe4dd47
Release of 5.1.0 (#237)
* Setting pattern from memory (#218)

* ToString accepts c-style arrays

* fixed patwait time bug in validation

* Introduced pattern class

* compile for servers too

* Python binding for Pattern

* added scanParameters in Python

* slsReceiver: avoid potential memory leak around Implementation::generalData

* additional constructors for scanPrameters in python

* bugfix: avoid potentital memory leak in receiver if called outside constructor context

* added scanParameters in Python

* additional constructors for scanPrameters in python

* M3defaultpattern (#227)

* default pattern for m3 and moench including Python bindings

* M3settings (#228)

* some changes to compile on RH7 and in the server to load the default chip status register at startup

* Updated mythen3DeectorServer_developer executable with correct initialization at startup

Co-authored-by: Erik Frojdh <erik.frojdh@gmail.com>
Co-authored-by: Anna Bergamaschi <anna.bergamaschi@psi.ch>

* Pattern.h as a public header files (#229)

* fixed buffer overflow but caused by using global instead of local enum

* replacing out of range trimbits with edge values

* replacing dac values that are out of range after interpolation

* updated pybind11 to 2.6.2

* Mythen3 improved synchronization (#231)

Disabling scans for multi module Mythen3, since there is no feedback of the detectors being ready
startDetector first starts the slaves then the master
acquire firs calls startDetector for the slaves then acquire on the master
getMaster to read back from hardware which one is master

* New server for JF to go with the new FW (#232)

* Modified Jungfrau speed settings for HW1.0 - FW fix version 1.1.1, compilation date 210218

* Corrected bug. DBIT clk phase is implemented in both HW version 1.0 and 2.0. Previous version did not update the DBIT phase shift on the configuration of a speed.

* fix for m3 scan with single module

* m3 fw version

* m3 server

* bugfix for bottom when setting quad

* new strategy for finding zmq based on cppzmq



Co-authored-by: Dhanya Thattil <dhanya.thattil@psi.ch>
Co-authored-by: Dhanya Thattil <33750417+thattil@users.noreply.github.com>
Co-authored-by: Alejandro Homs Puron <ahoms@esrf.fr>
Co-authored-by: Anna Bergamaschi <anna.bergamaschi@psi.ch>
Co-authored-by: Xiaoqiang Wang <xiaoqiangwang@gmail.com>
Co-authored-by: lopez_c <carlos.lopez-cuenca@psi.ch>
2021-03-22 14:43:11 +01:00
Erik Frojdh
06dbf82e93 clang-format 2020-11-18 18:01:39 +01:00
Erik Fröjdh
a15d8dd30a
Moving headers into include/sls (#212) 2020-11-02 16:05:28 +01:00
Erik Frojdh
fb8842e048 build and libname 2020-09-07 09:14:47 +02:00
Erik Frojdh
959fd562d3 clang-format 2020-05-04 16:30:00 +02:00
Erik Fröjdh
4e4f06560c
Adding support for clang-format (#94) 2020-05-04 16:16:23 +02:00
Erik Frojdh
ec66079f65 renamed ServerInterface 2020-02-04 08:57:35 +01:00
Erik Frojdh
eae1fb6609 WIP 2019-11-25 11:42:21 +01:00
1f64d2a4e2 speed separated 2019-11-05 18:50:35 +01:00
031241ae28 timer split up 2019-11-04 16:40:11 +01:00
Dhanya Thattil
995f0924e5
Commandline (#66)
* WIP

* WIP

* removed status to string from defs

* WIP

* WIP

* WIP removed unused functions in multi

* WIP

* print hex in a terrible way

* WIP, loadconfig error

* WIP, type to string

* WIP

* fix to conversion

* WIP, hostname doesnt work

* WIP

* WIP

* WIP

* WIP, threshold

* WIP, threshold

* WIP

* WIP, triggers

* WIP, cycles to triggers

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* rx_udsocksize fx, WIP

* WIP

* WIP

* WIP

* file index (64 bit), WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* merge

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* New python mod
2019-10-21 10:29:06 +02:00
Erik Frojdh
c3c3f78c59 removed roflags from python 2019-09-17 09:32:22 +02:00
Erik Fröjdh
1a9755ad0b New filename structure (#38)
* WIP

* WIP

* linking names

* define for hdf5

* minor

* addressed comments
2019-07-22 15:52:21 +02:00
Erik Fröjdh
3bb0daeefb moved libs (#36) 2019-06-25 11:20:31 +02:00
Erik Fröjdh
c1435ea94f
Renamed receiver commands to rx_ (#32)
* renamed receiver commands to rx_

* WIP

* more commands

* check

* overwrite

* foverwrite
2019-06-13 15:29:05 +02:00
Erik Frojdh
c86a1e7d48 WIP 2019-06-06 17:00:05 +02:00
Erik Frojdh
5944957977 cleaning up socket 2019-06-06 10:34:57 +02:00
Erik Frojdh
7a11c6c986 hash 2019-06-06 08:51:46 +02:00
Erik Frojdh
2c7d78ff56 include 2019-06-06 08:46:11 +02:00
Erik Frojdh
c4ea181811 test 2019-06-06 08:41:50 +02:00
Erik Frojdh
45dc48721e server 2019-06-06 08:41:19 +02:00
Erik Frojdh
e46f3f9a2c WIP 2019-06-05 17:45:02 +02:00
Erik Frojdh
03f8b389ad WIP 2019-06-05 17:30:21 +02:00
Dhanya Thattil
29141ac1a6
set starting frame number of next acquisition for both jungfrau and e… (#27)
* set starting frame number of next acquisition for both jungfrau and eiger. firmware has not implemented a get, so workaround. tests included. frame number 0 not allowed due to Eiger. Eiger max frame is 48 bit, while jungfrau is 64 bit

* made argument of setstartingframenumber const
2019-06-03 11:07:53 +02:00
Erik Fröjdh
0224dccd2e Added noexcept and constexpr (#21)
* noexcept and constexpr

* check size
2019-05-14 11:08:25 +02:00
Erik Frojdh
dbf927901f more of sendToDetector 2019-04-24 14:39:08 +02:00
Erik Frojdh
5192be6784 more tests 2019-04-24 08:28:16 +02:00
Erik Frojdh
02fd4b356e adding config for tests 2019-04-23 17:37:02 +02:00
89a06f099c merging refactor (replacing) 2019-04-12 10:53:09 +02:00