Compare commits

...

142 Commits

Author SHA1 Message Date
0e31023da0 Merge branch '2509-viewer-performance' into 'main'
v1.0.0-rc.78

See merge request jungfraujoch/nextgendcu!166
2025-09-14 15:59:58 +02:00
418d4957cf v1.0.0-rc.78 2025-09-14 15:59:58 +02:00
39367f7080 Merge branch '2509-integration-development' into 'main'
2509 integration development

See merge request jungfraujoch/nextgendcu!165
2025-09-12 15:21:38 +02:00
3c17ce3b0b 2509 integration development 2025-09-12 15:21:38 +02:00
8c8be007ce Merge branch '2509-viewer-fixes' into 'main'
v1.0.0-rc.76

See merge request jungfraujoch/nextgendcu!164
2025-09-11 14:37:16 +02:00
20cd8dc4ac v1.0.0-rc.76 2025-09-11 14:37:16 +02:00
a7c92923ec Bugfix to rc.75 2025-09-11 09:58:03 +02:00
ea1a9bc68a VERSION: 1.0.0-rc.75 2025-09-11 09:02:36 +02:00
e7a89e1209 DectrisSimplonClient: EIGER2 missing min threshold 2025-09-11 09:00:29 +02:00
a19531ba70 Merge branch '2509-eiger-fix' into 'main'
v1.0.0-rc.74

See merge request jungfraujoch/nextgendcu!163
2025-09-10 12:33:39 +02:00
c936e9bab7 v1.0.0-rc.74 2025-09-10 12:33:39 +02:00
7e6f1933d2 Merge branch '2509-rc.73' into 'main'
v1.0.0-rc.73

See merge request jungfraujoch/nextgendcu!162
2025-09-09 11:24:20 +02:00
a0fee8aec0 v1.0.0-rc.73 2025-09-09 11:24:19 +02:00
e36bac7589 Merge branch '2509-refinement' into 'main'
v1.0.0-rc.72

See merge request jungfraujoch/nextgendcu!161
2025-09-08 20:28:59 +02:00
c67337cfe1 v1.0.0-rc.72 2025-09-08 20:28:59 +02:00
6c88c6902e Merge branch '2508-viewer' into 'main'
v1.0.0-rc.71

See merge request jungfraujoch/nextgendcu!160
2025-08-28 07:07:01 +02:00
dba807fadd v1.0.0-rc.71 2025-08-28 07:07:01 +02:00
4e3b54f0b0 Merge branch '2508-1.0.0-rc.70' into 'main'
v1.0.0-rc.70

See merge request jungfraujoch/nextgendcu!159
2025-08-27 06:21:10 +02:00
bb32f27635 v1.0.0-rc.70 2025-08-27 06:21:10 +02:00
06978efe6b Merge branch '2508-calibration' into 'main'
v1.0.0-rc.69

See merge request jungfraujoch/nextgendcu!158
2025-08-17 21:21:20 +02:00
fa95858008 v1.0.0-rc.69 2025-08-17 21:21:20 +02:00
f98402043b Merge branch '2508-det-settings' into 'main'
v1.0.0-rc.68

See merge request jungfraujoch/nextgendcu!157
2025-08-16 19:59:27 +02:00
20973792e4 v1.0.0-rc.68 2025-08-16 19:59:27 +02:00
764ca111e2 Merge branch '2507-ssl-2' into 'main'
v1.0.0-rc.67

See merge request jungfraujoch/nextgendcu!156
2025-08-11 11:14:00 +02:00
a32cec3404 v1.0.0-rc.67 2025-08-11 11:13:59 +02:00
4189fa3e3c Merge branch '2507-indexer-thread-pool-2' into 'main'
1.0.0-rc.66

See merge request jungfraujoch/nextgendcu!155
2025-07-18 11:42:39 +02:00
51cbef4c84 1.0.0-rc.66 2025-07-18 11:42:39 +02:00
d42c606e5d Merge branch '2507-remove-excessive-print' into 'main'
Fix to jfjoch_viewer excessive printing

See merge request jungfraujoch/nextgendcu!154
2025-07-17 10:49:31 +02:00
3955ddb257 Fix to jfjoch_viewer excessive printing 2025-07-17 10:49:31 +02:00
54264a435a Merge branch '2507-live-viewer' into 'main'
1.0.0-rc.65

See merge request jungfraujoch/nextgendcu!153
2025-07-16 20:19:48 +02:00
06c5b9cf7f 1.0.0-rc.65 2025-07-16 20:19:48 +02:00
5a6227230a Merge branch '2507-lite-perf' into 'main'
v1.0.0-rc.64

See merge request jungfraujoch/nextgendcu!152
2025-07-15 09:55:19 +02:00
be6d8ad0f5 v1.0.0-rc.64 2025-07-15 09:55:19 +02:00
c56d9bc1db Merge branch '2507-1.0.0-rc.63' into 'main'
Fix to 1.0.0-rc.63

See merge request jungfraujoch/nextgendcu!151
2025-07-09 16:06:22 +02:00
6966461da7 Fix to 1.0.0-rc.63 2025-07-09 16:06:22 +02:00
1ba456308d Merge branch '2507-1.0.0-rc.63' into 'main'
Fix to 1.0.0-rc.63

See merge request jungfraujoch/nextgendcu!150
2025-07-09 15:57:50 +02:00
0aac045d3d Fix to 1.0.0-rc.63 2025-07-09 15:57:50 +02:00
2980badaeb Merge branch '2507-analysis-time' into 'main'
v1.0.0-rc.63

See merge request jungfraujoch/nextgendcu!149
2025-07-09 14:55:28 +02:00
4da526c51b v1.0.0-rc.63 2025-07-09 14:55:28 +02:00
b8a252adaa Merge branch '2507-zmq-test' into 'main'
v1.0.0-rc.62

See merge request jungfraujoch/nextgendcu!148
2025-07-08 20:19:59 +02:00
0b5f28f50d v1.0.0-rc.62 2025-07-08 20:19:59 +02:00
02039b9f1c Merge branch '2507-indexing-issues' into 'main'
v1.0.0-rc.61

See merge request jungfraujoch/nextgendcu!147
2025-07-08 07:16:59 +02:00
e4ec9fb38f v1.0.0-rc.61 2025-07-08 07:16:59 +02:00
3c67b5a900 Merge branch '2507-1.0.0-rc.60' into 'main'
v1.0.0-rc.60

See merge request jungfraujoch/nextgendcu!146
2025-07-05 18:52:42 +02:00
fbaf15aa07 v1.0.0-rc.60 2025-07-05 18:52:42 +02:00
016e86cbc5 Merge branch '2506-1.0.0-rc.59' into 'main'
v1.0.0-rc.59

See merge request jungfraujoch/nextgendcu!145
2025-07-03 22:32:07 +02:00
f5ef540ca0 v1.0.0-rc.59 2025-07-03 22:32:07 +02:00
5f8b1d7de7 Merge branch '2506-1.0.0-rc.58' into 'main'
v1.0.0-rc.58

See merge request jungfraujoch/nextgendcu!144
2025-07-03 15:10:05 +02:00
7ad4a3337b v1.0.0-rc.58 2025-07-03 15:10:04 +02:00
1fb9919a00 Merge branch '2506-1.0.0-rc.57' into 'main'
v1.0.0-rc.57

See merge request jungfraujoch/nextgendcu!143
2025-07-02 20:04:35 +02:00
8fa8b612bb v1.0.0-rc.57 2025-07-02 20:04:35 +02:00
81c72bcf3d Merge branch '1.0.0-rc.56' into 'main'
v1.0.0-rc.56

See merge request jungfraujoch/nextgendcu!142
2025-07-02 12:40:46 +02:00
05e162ea5d v1.0.0-rc.56 2025-07-02 12:40:45 +02:00
776065c636 Merge branch '2506-1.0.0-rc.55' into 'main'
v1.0.0-rc.55

See merge request jungfraujoch/nextgendcu!141
2025-07-01 10:03:22 +02:00
9592e4ab92 NeuralNetInferenceClient: Fix wrong HTTP address 2025-07-01 09:18:44 +02:00
58d68ec4bc CHANGELOG: Update 2025-06-30 21:30:49 +02:00
92288c60d7 NeuralNetInferenceClient: Accept PixelMask 2025-06-30 21:29:48 +02:00
dba2544c48 VERSION: 1.0.0-rc.55 2025-06-30 21:06:53 +02:00
d6dbe53955 NeuralNetInferenceClient: Handle case of unsigned data 2025-06-29 13:07:40 +02:00
39faa49d86 DiffractionExperiment: Remove potential bug with control reaching function without returning value 2025-06-29 13:05:03 +02:00
7d7dbbcf79 Merge branch '2506-1.0.0-rc.54' into 'main'
1.0.0-rc.54

See merge request jungfraujoch/nextgendcu!140
2025-06-29 10:56:38 +02:00
99de57fe6f 1.0.0-rc.54 2025-06-29 10:56:38 +02:00
c5b41c7830 Merge branch '2506-1.0.0-rc.53' into 'main'
v1.0.0-rc.53

See merge request jungfraujoch/nextgendcu!139
2025-06-24 16:43:47 +02:00
c41858f80d v1.0.0-rc.53 2025-06-24 16:43:47 +02:00
a322689b2a Merge branch '2506-viewer-fixes' into 'main'
v1.0.0-rc.52

See merge request jungfraujoch/nextgendcu!138
2025-06-23 20:57:00 +02:00
1d256b2cf5 v1.0.0-rc.52 2025-06-23 20:57:00 +02:00
a59b6a0c37 Merge branch '2506-bug-in-plots' into 'main'
Bug fix for plotting

See merge request jungfraujoch/nextgendcu!137
2025-06-22 19:45:55 +02:00
f40d178545 Bug fix for plotting 2025-06-22 17:24:37 +02:00
7184fa5b5a Merge branch '2506-spot-filters' into 'main'
v1.0.0-rc.51

See merge request jungfraujoch/nextgendcu!136
2025-06-22 13:15:10 +02:00
50eaaaaf29 v1.0.0-rc.51 2025-06-22 13:15:10 +02:00
aa13b1cd0b Merge branch '2506-test-bug' into 'main'
v1.0.0-rc.50

See merge request jungfraujoch/nextgendcu!135
2025-06-20 09:52:26 +02:00
0d1b388f4d v1.0.0-rc.50 2025-06-20 09:52:26 +02:00
2bd9f4a424 Merge branch '2506-ring-current' into 'main'
v1.0.0-rc49

See merge request jungfraujoch/nextgendcu!134
2025-06-18 15:19:18 +02:00
fb87f376c8 v1.0.0-rc49 2025-06-18 15:19:18 +02:00
c464c00906 Merge branch '2506-uc-bug' into 'main'
VERSION to 1.0.0-rc.48

See merge request jungfraujoch/nextgendcu!133
2025-06-17 19:29:44 +02:00
259e17e483 VERSION to 1.0.0-rc.48 2025-06-17 17:20:43 +02:00
42c2edc2e5 Merge branch '2506-minor-fixes' into 'main'
v1.0.0-rc.47

See merge request jungfraujoch/nextgendcu!132
2025-06-17 16:28:28 +02:00
8e449fc581 v1.0.0-rc.47 2025-06-17 16:28:28 +02:00
29a3dde4df Merge branch '2506-viewer-dependencies' into 'main'
v1.0.0-rc.46

See merge request jungfraujoch/nextgendcu!131
2025-06-17 14:56:48 +02:00
9b8f7a7f88 v1.0.0-rc.46 2025-06-17 14:56:48 +02:00
7d0f783767 Merge branch '2506-missing-commit' into 'main'
v1.0.0-rc.45: missing commits

See merge request jungfraujoch/nextgendcu!130
2025-06-16 14:10:37 +02:00
07b78f846c v1.0.0-rc.45: missing commits 2025-06-16 14:10:36 +02:00
e018e5a9a1 Merge branch '2506-pixel-size-det' into 'main'
v1.0.0-rc.45

See merge request jungfraujoch/nextgendcu!129
2025-06-16 12:48:17 +02:00
ab5f502c8e v1.0.0-rc.45 2025-06-16 12:48:17 +02:00
da4d8868b3 Merge branch '2506-grid-scan-result' into 'main'
v1.0.0-rc.44

See merge request jungfraujoch/nextgendcu!128
2025-06-15 17:46:46 +02:00
b59a03ff02 v1.0.0-rc.44 2025-06-15 17:46:46 +02:00
50fd15c678 Merge branch '2506-raster-scan-result' into 'main'
v1.0.0-rc.43

See merge request jungfraujoch/nextgendcu!127
2025-06-13 16:00:50 +02:00
80251cc5b8 v1.0.0-rc.43 2025-06-13 16:00:50 +02:00
32c9e6926e Merge branch '2506-Isigma' into 'main'
v1.0.0-rc.42

See merge request jungfraujoch/nextgendcu!126
2025-06-11 19:53:33 +02:00
a9c7d23b9e v1.0.0-rc.42 2025-06-11 19:53:33 +02:00
dc90b05512 Merge branch '2506-Bragg-prediction' into 'main'
v1.0.0-rc.41

See merge request jungfraujoch/nextgendcu!125
2025-06-10 18:14:04 +02:00
41a3e671f4 v1.0.0-rc.41 2025-06-10 18:14:04 +02:00
72cdbd04a5 Merge branch '2405-grid-scan' into 'main'
v1.0.0-rc.40

See merge request jungfraujoch/nextgendcu!124
2025-05-28 18:49:27 +02:00
53c90ee5d8 v1.0.0-rc.40 2025-05-28 18:49:27 +02:00
aaae74e70b Merge branch '2505-fpga-sum-analysis' into 'main'
v1.0.0-rc.39

See merge request jungfraujoch/nextgendcu!123
2025-05-14 23:28:10 +02:00
18b50e9472 v1.0.0-rc.39 2025-05-14 23:28:10 +02:00
01877ffe60 Merge branch '2505-resonet-python' into 'main'
v1.0.0-rc.38

See merge request jungfraujoch/nextgendcu!122
2025-05-12 14:17:24 +02:00
b245967df3 v1.0.0-rc.38 2025-05-12 14:17:24 +02:00
19d6f22136 Merge branch '2405-eiger-mask' into 'main'
patch to 1.0.0-rc.36

See merge request jungfraujoch/nextgendcu!121
2025-05-07 16:24:35 +02:00
29ecd3515a patch to 1.0.0-rc.36 2025-05-07 16:24:35 +02:00
2533499acc Merge branch 'jfjoch_lite' into 'main'
v1.0.0-rc.36

See merge request jungfraujoch/nextgendcu!120
2025-05-05 19:32:23 +02:00
040cf08386 v1.0.0-rc.36 2025-05-05 19:32:22 +02:00
759243d1bf Merge branch '2404-test-ignore-frames' into 'main'
jfjoch_tests: Add test for missing modules with data acquistion continuing

See merge request jungfraujoch/nextgendcu!119
2025-04-23 17:22:11 +02:00
b3898b1915 jfjoch_tests: Add test for missing modules with data acquistion continuing 2025-04-23 17:22:11 +02:00
7c42c00fa9 Merge branch '2504-aq-dev-ret-handle' into 'main'
jfjoch_broker: acquisition device handles ignored if module is falling behind

See merge request jungfraujoch/nextgendcu!118
2025-04-23 16:01:22 +02:00
5c1650e71b jfjoch_broker: acquisition device handles ignored if module is falling behind 2025-04-23 15:13:13 +02:00
ec69e1ac95 Merge branch '2504-writer-mod' into 'main'
v1.0.0-rc.35

See merge request jungfraujoch/nextgendcu!117
2025-04-22 14:42:15 +02:00
9bec33290c v1.0.0-rc.35 2025-04-22 14:42:14 +02:00
2a1807f4bd Merge branch '2503-post-maxiv' into 'main'
v1.0.0-rc.34

See merge request jungfraujoch/nextgendcu!116
2025-04-14 11:52:06 +02:00
b0607ab3ca v1.0.0-rc.34 2025-04-14 11:52:06 +02:00
708b5fbc4b Merge branch '2503-eiger-trim-fix' into 'main'
v1.0.0-rc.32

See merge request jungfraujoch/nextgendcu!115
2025-03-24 18:08:05 +01:00
3f6be4c7a0 v1.0.0-rc.32 2025-03-24 18:08:05 +01:00
118e2f7992 Merge branch '2503-1.0.0-rc.32-2' into 'main'
v.1.0.0-rc.32

See merge request jungfraujoch/nextgendcu!114
2025-03-24 12:16:33 +01:00
a30707964d v.1.0.0-rc.32 2025-03-24 12:16:33 +01:00
19be3575f0 Merge branch '2502-release-script' into 'main'
Update FPGA version in the upload script

See merge request jungfraujoch/nextgendcu!113
2025-03-02 14:15:49 +01:00
d7b586452a Update FPGA version in the upload script 2025-03-02 14:15:11 +01:00
fbdb3de175 Merge branch '2505-fpga-revid-5' into 'main'
v1.0.0-rc.31

See merge request jungfraujoch/nextgendcu!112
2025-03-02 13:15:28 +01:00
ddf4c75645 v1.0.0-rc.31 2025-03-02 13:15:28 +01:00
aeabc81a4c Merge branch '2502-fix-pedestal-auto-count-time' into 'main'
DiffractionExperiment: Fix error in pedestal G1/G2 count time

See merge request jungfraujoch/nextgendcu!110
2025-02-14 12:50:32 +01:00
2fec68d3b9 DiffractionExperiment: Fix error in pedestal G1/G2 count time 2025-02-14 10:21:38 +01:00
1737f410d5 Merge branch '2501-pedestal-bug' into 'main'
Fix bug: Pixel mask applied + error in pedestal

See merge request jungfraujoch/nextgendcu!109
2025-01-21 16:53:40 +01:00
a059b66a3c AcquisitionDevice: Fix bug, when pixel mask was applied; in a situation of a bad pedestal run the system went into bad loop (given mask affected pedestal calculation, there was no way to actually take meaningful pedestal and update the mask) 2025-01-21 16:09:59 +01:00
f1e04d7d56 Merge branch '2412-writer' into 'main'
version 1.0.0-rc.30

See merge request jungfraujoch/nextgendcu!108
2024-12-09 20:34:58 +01:00
d5d7072a9f version 1.0.0-rc.30 2024-12-09 20:34:58 +01:00
483c12ca86 Merge branch '2412-warning-lost-frames' into 'main'
version 1.0.0-rc.29

See merge request jungfraujoch/nextgendcu!107
2024-12-08 13:26:13 +01:00
7564619574 version 1.0.0-rc.29 2024-12-08 13:26:13 +01:00
6ec126d65a Merge branch '2412-1.0.0-rc.28' into 'main'
version 1.0.0-rc.28

See merge request jungfraujoch/nextgendcu!106
2024-12-05 16:41:04 +01:00
e5a775b4a3 version 1.0.0-rc.28 2024-12-05 16:41:04 +01:00
381e44e944 Merge branch '2412-fix-no-cuda-compilation' into 'main'
version 1.0.0-rc.27 minor fixes

See merge request jungfraujoch/nextgendcu!105
2024-12-04 20:58:51 +01:00
89a77ceec7 version 1.0.0-rc.27 minor fixes 2024-12-04 20:58:51 +01:00
762bb1b9c0 Merge branch '2412-fix-one-test' into 'main'
version 1.0.0-rc.27 quick fix

See merge request jungfraujoch/nextgendcu!104
2024-12-03 09:27:54 +01:00
ed89fe2619 jfjoch_test: ZMQImageCommTest_NoWriter could potentially contain values that cannot be represented by CBOR 2024-12-03 08:57:56 +01:00
6f744fd86d Merge branch '2411-rc.1.0.0-rc.27' into 'main'
version 1.0.0-rc.27

See merge request jungfraujoch/nextgendcu!103
2024-12-02 21:17:14 +01:00
71290f374a version 1.0.0-rc.27 2024-12-02 21:17:14 +01:00
c3d6c280b8 Merge branch '2411-NXmx-docs' into 'main'
version 1.0.0-rc.26 minor fixes

See merge request jungfraujoch/nextgendcu!102
2024-11-27 16:27:41 +01:00
db5ee64f74 version 1.0.0-rc.26 minor fixes 2024-11-27 16:27:41 +01:00
6a4a2c54ff Merge branch '2411-status-vector-fix' into 'main'
version 1.0.0-rc.26 quick fixes

See merge request jungfraujoch/nextgendcu!101
2024-11-27 11:46:58 +01:00
50ef79e621 version 1.0.0-rc.26 quick fixes 2024-11-27 11:46:58 +01:00
deba54db4e Merge branch '2411-cbor-plots' into 'main'
version 1.0.0-rc.26

See merge request jungfraujoch/nextgendcu!100
2024-11-26 16:04:38 +01:00
b3e745a8dd version 1.0.0-rc.26 2024-11-26 16:04:38 +01:00
9ab5206c12 Merge branch '2411-documentation' into 'main'
version 1.0.0-rc.25

See merge request jungfraujoch/nextgendcu!99
2024-11-22 21:25:20 +01:00
28d224afab version 1.0.0-rc.25 2024-11-22 21:25:20 +01:00
858 changed files with 69393 additions and 24465 deletions

View File

@@ -4,7 +4,26 @@ stages:
- synthesis
- release
build:x86:gcc:
variables:
CMAKE_PREFIX_PATH: /opt/qt6:/opt/eigen-3.4
build:x86:gcc-11:
stage: build
variables:
CC: gcc
CXX: g++
tags:
- gcc
- x86
needs: []
script:
- mkdir build
- cd build
- source /opt/rh/gcc-toolset-11/enable
- cmake -DCMAKE_BUILD_TYPE=Release -DJFJOCH_VIEWER_BUILD=ON ..
- make -j48
build:x86:gcc-12:
stage: build
variables:
CC: gcc
@@ -17,7 +36,23 @@ build:x86:gcc:
- mkdir build
- cd build
- source /opt/rh/gcc-toolset-12/enable
- cmake -DCMAKE_BUILD_TYPE=Release ..
- cmake -DCMAKE_BUILD_TYPE=Release -DJFJOCH_VIEWER_BUILD=ON ..
- make -j48
build:x86:gcc-13:
stage: build
variables:
CC: gcc
CXX: g++
tags:
- gcc
- x86
needs: []
script:
- mkdir build
- cd build
- source /opt/rh/gcc-toolset-13/enable
- cmake -DCMAKE_BUILD_TYPE=Release -DJFJOCH_VIEWER_BUILD=ON ..
- make -j48
build:x86:gcc_writer:
@@ -36,6 +71,22 @@ build:x86:gcc_writer:
- cmake -DCMAKE_BUILD_TYPE=Release -DJFJOCH_WRITER_ONLY=ON ..
- make -j48
build:x86:gcc_nocuda:
stage: build
variables:
CC: gcc
CXX: g++
tags:
- gcc
- x86
needs: []
script:
- mkdir build
- cd build
- source /opt/rh/gcc-toolset-12/enable
- cmake -DCMAKE_BUILD_TYPE=Release -DJFJOCH_USE_CUDA=OFF ..
- make -j48
build:x86:driver:
stage: build
variables:
@@ -59,7 +110,7 @@ build:x86:python_client:
artifacts:
paths:
- jfjoch_client-*whl
- jfjoch-client-*tar.gz
- jfjoch_client-*tar.gz
expire_in: 1 week
build:x86:frontend:
@@ -88,7 +139,25 @@ build:x86:rpm:
- mkdir build
- cd build
- source /opt/rh/gcc-toolset-12/enable
- cmake -DCMAKE_BUILD_TYPE=Release -DJFJOCH_INSTALL_DRIVER_SOURCE=ON ..
- cmake -DCMAKE_BUILD_TYPE=Release -DJFJOCH_INSTALL_DRIVER_SOURCE=ON -DJFJOCH_VIEWER_BUILD=ON ..
- make frontend
- make -j48 package
- mv *.rpm ..
artifacts:
paths:
- "*.rpm"
expire_in: 1 week
build:x86:sls9:rpm:
stage: build
tags:
- x86
needs: []
script:
- mkdir build
- cd build
- source /opt/rh/gcc-toolset-12/enable
- cmake -DCMAKE_BUILD_TYPE=Release -DJFJOCH_INSTALL_DRIVER_SOURCE=OFF -DJFJOCH_VIEWER_BUILD=OFF -DSLS9=ON ..
- make frontend
- make -j48 package
- mv *.rpm ..
@@ -104,7 +173,7 @@ test:x86:gcc:
CTEST_OUTPUT_ON_FAILURE: 1
CC: gcc
CXX: g++
needs: ["build:x86:gcc"]
needs: ["build:x86:gcc-12"]
dependencies: []
tags:
- gcc
@@ -114,11 +183,11 @@ test:x86:gcc:
- mkdir -p build
- cd build
- cmake -DCMAKE_BUILD_TYPE=Release ..
- make -j48 jfjoch_test HDF5DatasetWriteTest
- make -j48 jfjoch_test jfjoch_hdf5_test
- cd tests
- ./jfjoch_test -r junit -o report.xml
- cd ../tools
- ./HDF5DatasetWriteTest ../../tests/test_data/compression_benchmark.h5
- ./jfjoch_hdf5_test ../../tests/test_data/compression_benchmark.h5
artifacts:
expire_in: 1 week
reports:
@@ -131,7 +200,7 @@ test:x86:crystfel:
CTEST_OUTPUT_ON_FAILURE: 1
CC: gcc
CXX: g++
needs: ["build:x86:gcc"]
needs: ["build:x86:gcc-12"]
dependencies: []
tags:
- gcc
@@ -142,9 +211,9 @@ test:x86:crystfel:
- mkdir -p build
- cd build
- cmake -DCMAKE_BUILD_TYPE=Release ..
- make -j8 HDF5DatasetWriteTest
- make -j8 jfjoch_hdf5_test
- cd ../tests/crystfel
- HDF5DATASET_WRITE_TEST_IMAGES_PER_FILE=0 ../../build/tools/HDF5DatasetWriteTest ../../tests/test_data/compression_benchmark.h5 10
- ../../build/tools/jfjoch_hdf5_test ../../tests/test_data/compression_benchmark.h5 10
- indexamajig -i writing_test.lst -g jf4m.geom -o x.stream --indexing=xgandalf
test:x86:xds_durin:
@@ -154,7 +223,7 @@ test:x86:xds_durin:
CTEST_OUTPUT_ON_FAILURE: 1
CC: gcc
CXX: g++
needs: ["build:x86:gcc"]
needs: ["build:x86:gcc-12"]
dependencies: []
tags:
- gcc
@@ -165,9 +234,32 @@ test:x86:xds_durin:
- mkdir -p build
- cd build
- cmake -DCMAKE_BUILD_TYPE=Release ..
- make -j8 HDF5DatasetWriteTest
- make -j8 jfjoch_hdf5_test
- cd ../tests/xds_durin
- HDF5DATASET_WRITE_TEST_IMAGES_PER_FILE=0 ../../build/tools/HDF5DatasetWriteTest ../../tests/test_data/compression_benchmark.h5 25
- ../../build/tools/jfjoch_hdf5_test ../../tests/test_data/compression_benchmark.h5 25
- xds_par |grep -a1 ISa |tail -n1
test:x86:xds_durin_new_hdf5_format:
stage: test
timeout: 90m
variables:
CTEST_OUTPUT_ON_FAILURE: 1
CC: gcc
CXX: g++
needs: ["build:x86:gcc-12"]
dependencies: []
tags:
- gcc
- x86
- xds
script:
- source /opt/rh/gcc-toolset-12/enable
- mkdir -p build
- cd build
- cmake -DCMAKE_BUILD_TYPE=Release ..
- make -j8 jfjoch_hdf5_test
- cd ../tests/xds_durin
- HDF5MASTER_NEW_FORMAT=1 ../../build/tools/jfjoch_hdf5_test ../../tests/test_data/compression_benchmark.h5 25
- xds_par |grep -a1 ISa |tail -n1
test:x86:xds_neggia:
@@ -177,7 +269,7 @@ test:x86:xds_neggia:
CTEST_OUTPUT_ON_FAILURE: 1
CC: gcc
CXX: g++
needs: ["build:x86:gcc"]
needs: ["build:x86:gcc-12"]
dependencies: []
tags:
- gcc
@@ -188,9 +280,9 @@ test:x86:xds_neggia:
- mkdir -p build
- cd build
- cmake -DCMAKE_BUILD_TYPE=Release ..
- make -j8 HDF5DatasetWriteTest
- make -j8 jfjoch_hdf5_test
- cd ../tests/xds_neggia
- HDF5DATASET_WRITE_TEST_IMAGES_PER_FILE=0 ../../build/tools/HDF5DatasetWriteTest ../../tests/test_data/compression_benchmark.h5 25
- ../../build/tools/jfjoch_hdf5_test ../../tests/test_data/compression_benchmark.h5 25
- xds_par |grep -a1 ISa |tail -n1
test:x86:xia2.ssx:
@@ -200,7 +292,7 @@ test:x86:xia2.ssx:
CTEST_OUTPUT_ON_FAILURE: 1
CC: gcc
CXX: g++
needs: ["build:x86:gcc"]
needs: ["build:x86:gcc-12"]
dependencies: []
tags:
- gcc
@@ -212,9 +304,9 @@ test:x86:xia2.ssx:
- mkdir -p dials_test
- cd build
- cmake -DCMAKE_BUILD_TYPE=Release ..
- make -j8 HDF5DatasetWriteTest
- make -j8 jfjoch_hdf5_test
- cd ../dials_test
- ../build/tools/HDF5DatasetWriteTest ../tests/test_data/compression_benchmark.h5 100
- ../build/tools/jfjoch_hdf5_test ../tests/test_data/compression_benchmark.h5 100
- source /usr/local/dials-v3-17-0/dials_env.sh
- xia2.ssx image=writing_test_master.h5 space_group=P43212 unit_cell=78.551,78.551,36.914,90.000,90.000,90.000
@@ -231,12 +323,12 @@ synthesis:hls:
- vivado
script:
- source /opt/rh/gcc-toolset-12/enable
- source /opt/Xilinx/Vivado/2022.1/settings64.sh
- source /opt/Xilinx/Vivado/2022.2/settings64.sh
- mkdir -p build
- cd build
- /usr/bin/cmake ..
- make hls
needs: ["build:x86:gcc", "test:x86:gcc"]
needs: ["build:x86:gcc-12", "test:x86:gcc"]
synthesis:100g:
stage: synthesis
@@ -248,6 +340,7 @@ synthesis:100g:
allow_failure: true
rules:
- if: $CI_COMMIT_MESSAGE =~ /^FPGA/
- if: $CI_COMMIT_MESSAGE =~ /^100G/
tags:
- vivado
artifacts:
@@ -256,13 +349,13 @@ synthesis:100g:
expire_in: 1 week
script:
- source /opt/rh/gcc-toolset-12/enable
- source /opt/Xilinx/Vivado/2022.1/settings64.sh
- source /opt/Xilinx/Vivado/2022.2/settings64.sh
- mkdir -p build
- cd build
- /usr/bin/cmake ..
- make -j4 pcie_100g
- mv fpga/jfjoch_fpga_pcie_100g.mcs ..
needs: ["build:x86:gcc", "test:x86:gcc"]
needs: ["build:x86:gcc-12", "test:x86:gcc"]
synthesis:8x10g:
stage: synthesis
@@ -274,6 +367,7 @@ synthesis:8x10g:
allow_failure: true
rules:
- if: $CI_COMMIT_MESSAGE =~ /^FPGA/
- if: $CI_COMMIT_MESSAGE =~ /^8x10G/
tags:
- vivado
artifacts:
@@ -282,13 +376,13 @@ synthesis:8x10g:
expire_in: 1 week
script:
- source /opt/rh/gcc-toolset-12/enable
- source /opt/Xilinx/Vivado/2022.1/settings64.sh
- source /opt/Xilinx/Vivado/2022.2/settings64.sh
- mkdir -p build
- cd build
- /usr/bin/cmake ..
- make -j4 pcie_8x10g
- mv fpga/jfjoch_fpga_pcie_8x10g.mcs ..
needs: [ "build:x86:gcc", "test:x86:gcc" ]
needs: [ "build:x86:gcc-12", "test:x86:gcc" ]
release:
stage: release
@@ -301,6 +395,7 @@ release:
dependencies:
- build:x86:frontend
- build:x86:rpm
- build:x86:sls9:rpm
- build:x86:python_client
script:
- bash gitlab_upload_release.sh

30
.readthedocs.yaml Normal file
View File

@@ -0,0 +1,30 @@
# Read the Docs configuration file for Sphinx projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
version: 2
build:
os: ubuntu-22.04
tools:
python: "3.12"
sphinx:
configuration: docs/conf.py
# You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs
# builder: "dirhtml"
# Fail on all warnings to avoid broken references
# fail_on_warning: true
# Optionally build your docs in additional formats such as PDF and ePub
# formats:
# - pdf
# - epub
# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: docs/requirements.txt

View File

@@ -11,6 +11,13 @@ SET(CMAKE_CXX_STANDARD_REQUIRED True)
SET(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wno-deprecated-enum-enum-conversion")
SET(CMAKE_C_FLAGS_RELEASE "-O3")
SET(JFJOCH_WRITER_ONLY OFF CACHE BOOL "Compile HDF5 writer only")
SET(JFJOCH_INSTALL_DRIVER_SOURCE OFF CACHE BOOL "Install kernel driver source (ignored if building writer only; necessary for RPM building)")
SET(JFJOCH_USE_CUDA ON CACHE BOOL "Compile Jungfraujoch with CUDA")
SET(JFJOCH_VIEWER_BUILD OFF CACHE BOOL "Compile Jungfraujoch viewer")
OPTION(SLS9 "Build with sls_detector_package v9.2.0" OFF)
SET(BUILD_SHARED_LIBS OFF)
SET(BUILD_TESTING OFF)
@@ -33,28 +40,41 @@ SET(HDF5_BUILD_CPP_LIB OFF)
SET(HDF5_ENABLE_Z_LIB_SUPPORT OFF)
SET(HDF5_EXTERNALLY_CONFIGURED 1)
# TIFF
SET(jbig OFF)
SET(zstd OFF)
SET(lzma OFF)
SET(jpeg OFF)
SET(old-jpeg OFF)
# PNG
set(PNG_SHARED OFF)
set(PNG_STATIC ON)
set(PNG_EXECUTABLES OFF)
set(PNG_TESTS OFF)
INCLUDE(CheckLanguage)
CHECK_LANGUAGE(CUDA)
SET(CMAKE_CUDA_ARCHITECTURES 70 75 80 86 89) # V100, T4, A100, RTX A4000, L4
SET(CMAKE_CUDA_ARCHITECTURES 75 80 86 89) # T4, A100, RTX A4000, L4
SET(CMAKE_CUDA_STANDARD 17)
SET(CMAKE_CUDA_FLAGS_RELEASE "-O3")
IF (CMAKE_CUDA_COMPILER)
ENABLE_LANGUAGE(CUDA)
MESSAGE(STATUS "CUDA VERSION: ${CMAKE_CUDA_COMPILER_VERSION}")
ADD_COMPILE_DEFINITIONS(JFJOCH_USE_CUDA)
FIND_LIBRARY(CUDART_LIBRARY cudart_static PATHS ${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES} REQUIRED)
ENDIF()
SET(JFJOCH_CUDA_AVAILABLE OFF)
SET(JFJOCH_WRITER_ONLY OFF CACHE BOOL "Compile HDF5 writer only")
SET(JFJOCH_INSTALL_DRIVER_SOURCE OFF CACHE BOOL "Install kernel driver source (ignored if building writer only; necessary for RPM building)")
IF (CMAKE_CUDA_COMPILER)
IF (JFJOCH_USE_CUDA)
ENABLE_LANGUAGE(CUDA)
FIND_PACKAGE(CUDAToolkit REQUIRED)
SET(CMAKE_CUDA_RUNTIME_LIBRARY Static)
MESSAGE(STATUS "CUDA VERSION: ${CMAKE_CUDA_COMPILER_VERSION}")
ADD_COMPILE_DEFINITIONS(JFJOCH_USE_CUDA)
FIND_LIBRARY(CUDART_LIBRARY cudart_static PATHS ${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES} REQUIRED)
SET(JFJOCH_CUDA_AVAILABLE ON)
ELSE()
MESSAGE(WARNING "CUDA Available, but disabled by user")
ENDIF()
ENDIF()
INCLUDE_DIRECTORIES(include)
INCLUDE(CheckIncludeFile)
@@ -70,19 +90,27 @@ FetchContent_Declare(tiff
GIT_TAG v4.6.0
EXCLUDE_FROM_ALL)
FetchContent_Declare(
png
GIT_REPOSITORY https://github.com/pnggroup/libpng
GIT_TAG v1.6.49
EXCLUDE_FROM_ALL
)
FetchContent_Declare(hdf5
GIT_REPOSITORY https://github.com/HDFGroup/hdf5/
GIT_TAG hdf5_1.14.4.2
GIT_TAG hdf5_1.14.5
GIT_SHALLOW 1
EXCLUDE_FROM_ALL)
SET(PISTACHE_USE_CONTENT_ENCODING_DEFLATE ON)
SET(PISTACHE_BUILD_TESTS OFF)
SET(PISTACHE_USE_SSL ON)
FetchContent_Declare(
pistache_http
GIT_REPOSITORY https://github.com/fleon-psi/pistache
GIT_TAG 784955df8bbef471924d1631606f0f2a2f93d570
GIT_TAG 280b0f6f28f81745870bccb31f4a3a59958807f6
EXCLUDE_FROM_ALL
)
@@ -94,10 +122,15 @@ FetchContent_Declare(
EXCLUDE_FROM_ALL
)
SET(SLS_DETECTOR_GIT_TAG "8.0.2")
IF(SLS9)
SET(SLS_DETECTOR_GIT_TAG "9.2.0")
ENDIF()
FetchContent_Declare(
sls_detector_package
GIT_REPOSITORY https://github.com/slsdetectorgroup/slsDetectorPackage
GIT_TAG 8.0.2
GIT_TAG ${SLS_DETECTOR_GIT_TAG}
)
FetchContent_Declare(
@@ -107,15 +140,19 @@ FetchContent_Declare(
EXCLUDE_FROM_ALL
)
FetchContent_MakeAvailable(pistache_http zstd sls_detector_package catch2 hdf5 tiff)
FetchContent_MakeAvailable(pistache_http zstd sls_detector_package catch2 hdf5 tiff png)
ADD_SUBDIRECTORY(jungfrau)
ADD_SUBDIRECTORY(compression)
ADD_SUBDIRECTORY(common)
ADD_SUBDIRECTORY(writer)
ADD_SUBDIRECTORY(frame_serialize)
ADD_SUBDIRECTORY(reader)
ADD_SUBDIRECTORY(detector_control)
ADD_SUBDIRECTORY(image_puller)
ADD_SUBDIRECTORY(preview)
ADD_SUBDIRECTORY(symmetry)
IF (JFJOCH_WRITER_ONLY)
MESSAGE(STATUS "Compiling HDF5 writer only")
ELSE()
@@ -127,7 +164,10 @@ ELSE()
ADD_SUBDIRECTORY(image_analysis)
ADD_SUBDIRECTORY(tests)
ADD_SUBDIRECTORY(tools)
ADD_SUBDIRECTORY(preview)
ENDIF()
IF (JFJOCH_VIEWER_BUILD)
ADD_SUBDIRECTORY(viewer)
ENDIF()
IF (NOT JFJOCH_WRITER_ONLY)
@@ -162,18 +202,29 @@ IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
# Set Package Name
set(CPACK_PACKAGE_NAME "jfjoch")
# Initialize CPACK_COMPONENTS_ALL with common components
SET(CPACK_COMPONENTS_ALL jfjoch writer)
IF (SLS9)
SET(CPACK_PACKAGE_NAME "jfjoch-slsdet9")
ELSE()
SET(CPACK_PACKAGE_NAME "jfjoch")
ENDIF()
SET(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION /usr/src /usr/share /usr/share/dbus-1 /usr/share/dbus-1/services)
IF (JFJOCH_INSTALL_DRIVER_SOURCE)
SET(CPACK_COMPONENTS_ALL jfjoch writer driver-dkms)
LIST(APPEND CPACK_COMPONENTS_ALL driver-dkms)
SET(CPACK_RPM_DRIVER-DKMS_PACKAGE_REQUIRES "dkms, gcc, bash, sed")
SET(CPACK_RPM_DRIVER-DKMS_PACKAGE_ARCHITECTURE "noarch")
SET(CPACK_RPM_DRIVER-DKMS_POST_INSTALL_SCRIPT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/fpga/pcie_driver/postinstall.sh)
SET(CPACK_RPM_DRIVER-DKMS_PRE_UNINSTALL_SCRIPT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/fpga/pcie_driver/preuninstall.sh)
SET(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION /usr/src)
ELSE()
SET(CPACK_COMPONENTS_ALL jfjoch writer)
ENDIF()
IF (JFJOCH_VIEWER_BUILD)
LIST(APPEND CPACK_COMPONENTS_ALL viewer)
ENDIF()
SET(CPACK_GENERATOR RPM)
SET(CPACK_RPM_COMPONENT_INSTALL ON)
SET(CPACK_RPM_MAIN_COMPONENT jfjoch)
@@ -184,10 +235,11 @@ SET(CPACK_RPM_PACKAGE_RELEASE 1)
SET(CPACK_RPM_PACKAGE_SUMMARY "Jungfraujoch data acquisition system")
SET(CPACK_RPM_PACKAGE_DESCRIPTION "Jungfraujoch")
SET(CPACK_PACKAGE_CONTACT "Filip Leonarski <filip.leonarski@psi.ch>")
# Set The Vendor Name
SET(CPACK_PACKAGE_VENDOR "Paul Scherrer Institut")
# Set The License Information
SET(CPACK_RPM_PACKAGE_LICENSE "Proprietary")
SET(CPACK_RPM_PACKAGE_LICENSE "GPLv3")
INCLUDE(CPack)

View File

@@ -1,16 +1,4 @@
# Contributing
We actively welcome community contributions, please use a pull request feature.
To accept contributions into our codebase we need to have Contributor License Agreement (CLA) with you or your employer.
The CLA is necessary because you own the copyright to your changes, even after your contribution becomes part of our codebase.
Since Jungfraujoch development is supported by commercialization grant from the Innosuisse agency, which allows PSI to carry the development.
In return for the Innosuisse support, we need to allow our commercial partner (DECTRIS) to use the code without restrictions,
and we have to ensure community contributions don't violate this requirement.
The obligation applies only if your contributions are merged into PSI codebase.
If you like to make a bigger contribution, like for example new data analysis method beyond what is available currently,
please also contact us beforehand to figure out best licensing strategy.
Please contact [Filip Leonarski](mailto:filip.leonarski@psi.ch) for details.
We actively welcome community contributions.
Please contact [Filip Leonarski](mailto:filip.leonarski@psi.ch), if you like to contribute to the project.

687
LICENSE
View File

@@ -1,6 +1,685 @@
Operating Jungfraujoch requires license from the Paul Scherrer Institute.
Jungfraujoch software is licensed with GPLv3 license.
Jungfraujoch FPGA is licensed with CERN OHL-S license (see fpga/LICENSE).
Specifically, non-profit research facilities operating PSI JUNGFRAU and PSI EIGER detectors are granted the license to use the
code and binary images within their facilities, as well as to modify the code according to their needs.
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Sharing the code requires explicit permission from the Paul Scherrer Institute.
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.
================
As a special exception, we specifically permit linking Jungfraujoch code with Nvidia CUDA libraries.
We also permit to link Jungfraujoch software (GPLv3) with Jungfraujoch high-level synthesis code (CERN OHL 2.0) for the purpose
of simulating FPGA design on CPU.

View File

@@ -2,4 +2,5 @@
Application to receive data from the PSI JUNGFRAU and EIGER detectors.
All documentation is now placed in [docs/](docs/) subdirectory.
All documentation is now placed in [docs/](docs/) subdirectory and for the current version hosted on
[Jungfraujoch Read The Docs page](https://jungfraujoch.readthedocs.io).

View File

@@ -1 +1 @@
1.0.0-rc.24
1.0.0-rc.78

View File

@@ -1,4 +1,5 @@
// Copyright (2019-2023) Paul Scherrer Institute
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#include <thread>
@@ -10,7 +11,7 @@ AcquisitionCounters::AcquisitionCounters()
total_packets(0), expected_frames(0), acquisition_finished(false) {}
void AcquisitionCounters::Reset(const DiffractionExperiment &experiment, uint16_t data_stream) {
std::unique_lock<std::shared_mutex> ul(m);
std::unique_lock ul(m);
acquisition_finished = false;
slowest_frame_number = 0;
@@ -37,16 +38,16 @@ void AcquisitionCounters::Reset(const DiffractionExperiment &experiment, uint16_
total_packets = 0;
expected_packets_per_module = 512 * experiment.GetFPGASummation();
if (experiment.GetByteDepthReadout() == 4)
if (experiment.GetBitDepthReadout() == 32)
bytes_per_packet = 4096LU;
else if (experiment.GetByteDepthReadout() == 1)
else if (experiment.GetBitDepthReadout() == 8)
bytes_per_packet = 1024LU; // Need to seriously refactor, to have expected_packets_per_module specific for detector
else
bytes_per_packet = 2048LU;
}
void AcquisitionCounters::UpdateCounters(const Completion *c) {
std::unique_lock<std::shared_mutex> ul(m);
std::unique_lock ul(m);
if (c->module_number >= nmodules)
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
@@ -70,6 +71,9 @@ void AcquisitionCounters::UpdateCounters(const Completion *c) {
fastest_frame_number = c->frame_number;
}
if (fastest_frame_number - slowest_frame_number > ThresholdFramesLost)
slowest_frame_number = fastest_frame_number - ThresholdFramesLost;
packets_collected.at(c->frame_number * nmodules + c->module_number) = c->packet_count;
handle_for_frame.at(c->frame_number * nmodules + c->module_number) = c->handle;
saved_completions.at(c->frame_number * nmodules + c->module_number) = *c;
@@ -82,7 +86,7 @@ void AcquisitionCounters::UpdateCounters(const Completion *c) {
}
void AcquisitionCounters::SetAcquisitionFinished() {
std::unique_lock<std::shared_mutex> ul(m);
std::unique_lock ul(m);
acquisition_finished = true;
data_updated.notify_all();
}
@@ -99,7 +103,7 @@ uint64_t AcquisitionCounters::GetBufferHandle(size_t frame, uint16_t module_numb
}
uint64_t AcquisitionCounters::GetBufferHandleAndClear(size_t frame, uint16_t module_number) {
std::unique_lock<std::shared_mutex> ul(m);
std::unique_lock ul(m);
if (frame >= expected_frames)
throw JFJochException(JFJochExceptionCategory::ArrayOutOfBounds,
"GetBufferHandleAndClear Wrong frame number: " + std::to_string(frame));
@@ -113,7 +117,7 @@ uint64_t AcquisitionCounters::GetBufferHandleAndClear(size_t frame, uint16_t mod
}
uint64_t AcquisitionCounters::GetPedestalBufferHandle(size_t storage_cell, uint16_t module_number) const {
std::unique_lock<std::shared_mutex> ul(m);
std::unique_lock ul(m);
if (storage_cell >= 16)
throw JFJochException(JFJochExceptionCategory::ArrayOutOfBounds,
"GetBufferHandleAndClear Wrong frame number: " + std::to_string(storage_cell));
@@ -196,7 +200,7 @@ uint64_t AcquisitionCounters::GetTotalPackets() const {
}
uint64_t AcquisitionCounters::GetTotalPackets(uint16_t module_number) const {
std::unique_lock<std::shared_mutex> ul(m);
std::unique_lock ul(m);
if (module_number >= nmodules)
throw JFJochException(JFJochExceptionCategory::ArrayOutOfBounds,
@@ -205,11 +209,15 @@ uint64_t AcquisitionCounters::GetTotalPackets(uint16_t module_number) const {
return packets_per_module[module_number];
}
uint64_t AcquisitionCounters::GetExpectedPackets() const {
return GetExpectedPacketsPerModule() * nmodules;
uint64_t AcquisitionCounters::GetExpectedPacketsPerImage() const {
return expected_packets_per_module * nmodules;
}
uint64_t AcquisitionCounters::GetExpectedPacketsPerModule() const {
uint64_t AcquisitionCounters::GetTotalExpectedPackets() const {
return GetTotalExpectedPacketsPerModule() * nmodules;
}
uint64_t AcquisitionCounters::GetTotalExpectedPacketsPerModule() const {
return expected_frames * expected_packets_per_module;
}

View File

@@ -1,4 +1,5 @@
// Copyright (2019-2023) Paul Scherrer Institute
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#ifndef JUNGFRAUJOCH_ACQUISITIONCOUNTERS_H
#define JUNGFRAUJOCH_ACQUISITIONCOUNTERS_H
@@ -17,7 +18,6 @@
class AcquisitionCounters {
uint16_t expected_packets_per_module;
constexpr static const uint64_t max_modules = 32;
mutable std::shared_mutex m;
mutable std::condition_variable_any data_updated;
@@ -40,6 +40,7 @@ class AcquisitionCounters {
public:
static constexpr const uint64_t HandleNotFound = UINT64_MAX;
constexpr static const uint64_t ThresholdFramesLost = 50;
AcquisitionCounters();
void Reset(const DiffractionExperiment &experiment, uint16_t data_stream);
@@ -64,8 +65,9 @@ public:
uint64_t GetTotalPackets(uint16_t module_number) const;
uint64_t GetBytesReceived() const;
uint64_t GetExpectedPackets() const;
uint64_t GetExpectedPacketsPerModule() const;
uint64_t GetTotalExpectedPackets() const;
uint64_t GetTotalExpectedPacketsPerModule() const;
uint64_t GetExpectedPacketsPerImage() const;
uint64_t GetModuleNumber() const;
};

View File

@@ -1,4 +1,5 @@
// Copyright (2019-2023) Paul Scherrer Institute
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#ifdef JFJOCH_USE_NUMA
#include <numaif.h>
@@ -102,6 +103,9 @@ void AcquisitionDevice::WaitForActionComplete() {
logger->Error("Completion with wrong module number data stream {} completion frame number {} module {} handle {}",
data_stream, c.frame_number, c.module_number, c.handle);
SendWorkRequest(c.handle);
} else if (c.frame_number < counters.GetSlowestFrameNumber()) {
// Module is falling behind, needs to return the handle then
SendWorkRequest(c.handle);
} else {
try {
counters.UpdateCounters(&c);
@@ -170,21 +174,65 @@ void AcquisitionDevice::InitializeROIMap(const uint16_t *map, size_t module_numb
void AcquisitionDevice::InitializePixelMask(const uint32_t *module_mask, size_t module_number) {}
void AcquisitionDevice::InitializeROIMap(const DiffractionExperiment& experiment) {
void AcquisitionDevice::InitializeROIMap(const DiffractionExperiment& experiment, const std::vector<uint16_t>& roi_map) {
if (roi_map.size() != experiment.GetXPixelsNumConv() * experiment.GetYPixelsNumConv())
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, "Mismatch in array size");
std::vector<uint16_t> tmp(RAW_MODULE_SIZE);
auto offset = experiment.GetFirstModuleOfDataStream(data_stream);
size_t modules = experiment.GetModulesNum(data_stream);
for (int m = 0; m < modules; m++) {
experiment.ExportROIMap(tmp.data(), offset + m);
ConvertedToRawGeometry(experiment, offset + m, tmp.data(), roi_map.data());
InitializeROIMap(tmp.data(), m);
}
}
void AcquisitionDevice::InitializeEmptyPixelMask(const DiffractionExperiment &experiment) {
std::vector<uint32_t> empty_mask(RAW_MODULE_SIZE);
size_t modules = experiment.GetModulesNum(data_stream);
for (int m = 0; m < modules; m++)
InitializePixelMask(empty_mask.data(), m);
}
void AcquisitionDevice::InitializeDataProcessing(const DiffractionExperiment &experiment,
const AzimuthalIntegration &azint) {
auto offset = experiment.GetFirstModuleOfDataStream(data_stream);
size_t modules = experiment.GetModulesNum(data_stream);
if (experiment.IsGeometryTransformed()) {
std::vector<float> tmp1(RAW_MODULE_SIZE);
std::vector<uint16_t> tmp2(RAW_MODULE_SIZE);
for (int m = 0; m < modules; m++) {
ConvertedToRawGeometry(experiment, offset + m, tmp1.data(), azint.Corrections().data());
ConvertedToRawGeometry(experiment, offset + m, tmp2.data(), azint.GetPixelToBin().data());
InitializeIntegrationMap(tmp2.data(), tmp1.data(), m);
ConvertedToRawGeometry(experiment, offset + m, tmp1.data(), azint.Resolution().data());
InitializeSpotFinderResolutionMap(tmp1.data(), m);
}
} else {
for (int m = 0; m < modules; m++) {
InitializeIntegrationMap(azint.GetPixelToBin().data() + (offset + m) * RAW_MODULE_SIZE,
azint.Corrections().data() + (offset + m) * RAW_MODULE_SIZE,
m);
InitializeSpotFinderResolutionMap(azint.Resolution().data() + (m + offset) * RAW_MODULE_SIZE,
m);
}
}
}
void AcquisitionDevice::InitializePixelMask(const DiffractionExperiment &experiment, const PixelMask &mask) {
auto offset = experiment.GetFirstModuleOfDataStream(data_stream);
size_t modules = experiment.GetModulesNum(data_stream);
for (int m = 0; m < modules; m++)
InitializePixelMask(mask.GetMaskRaw().data() + RAW_MODULE_SIZE * (offset + m), m);
std::vector<uint32_t> tmp(RAW_MODULE_SIZE);
for (int m = 0; m < modules; m++) {
ConvertedToRawGeometry(experiment, offset + m, tmp.data(), mask.GetMask().data());
InitializePixelMask(tmp.data(), m);
}
}
void AcquisitionDevice::MapBuffersStandard(size_t c2h_buffer_count, int16_t numa_node) {
@@ -245,7 +293,7 @@ AcquisitionDeviceStatistics AcquisitionDevice::GetStatistics() const {
ret.bytes_received = GetBytesReceived();
ret.start_timestamp = start_time.time_since_epoch().count();
ret.end_timestamp = end_time.time_since_epoch().count();
ret.packets_expected = counters.GetExpectedPackets();
ret.packets_expected = counters.GetTotalExpectedPackets();
ret.good_packets = counters.GetTotalPackets();
for (int i = 0; i < counters.GetModuleNumber(); i++)
@@ -275,6 +323,7 @@ void AcquisitionDevice::RunInternalGenerator(const DiffractionExperiment &experi
FrameGeneratorConfig config{};
config.frames = experiment.GetFrameNum() + DELAY_FRAMES_STOP_AND_QUIT + 1;
config.modules = experiment.GetModulesNum(data_stream);
config.data_stream = data_stream;
config.pulse_id = INT_PKT_GEN_BUNCHID;
config.exptime = INT_PKT_GEN_EXPTTIME;
config.debug = INT_PKT_GEN_DEBUG;
@@ -287,8 +336,10 @@ void AcquisitionDevice::RunInternalGenerator(const DiffractionExperiment &experi
break;
case DetectorType::EIGER:
config.detector_type = SLS_DETECTOR_TYPE_EIGER;
config.eiger_bit_depth = experiment.GetByteDepthReadout() * 8;
config.eiger_bit_depth = experiment.GetBitDepthReadout();
break;
default:
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, "Detector not supported");
}
HW_RunInternalGenerator(config);
}

View File

@@ -1,4 +1,5 @@
// Copyright (2019-2023) Paul Scherrer Institute
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#ifndef JUNGFRAUJOCH_ACQUISITIONDEVICE_H
#define JUNGFRAUJOCH_ACQUISITIONDEVICE_H
@@ -20,6 +21,7 @@
#include "Completion.h"
#include "../fpga/pcie_driver/jfjoch_fpga.h"
#include "../common/NetworkAddressConvert.h"
#include "../common/AzimuthalIntegration.h"
struct AcquisitionDeviceStatistics {
uint64_t good_packets;
@@ -95,9 +97,11 @@ public:
virtual void InitializeIntegrationMap(const uint16_t *map, const float *weights, size_t module_number);
virtual void InitializeSpotFinderResolutionMap(const float *data, size_t module_number);
virtual void InitializeROIMap(const uint16_t *map, size_t module_number);
void InitializePixelMask(const DiffractionExperiment &experiment, const PixelMask &mask);
void InitializeEmptyPixelMask(const DiffractionExperiment &experiment); // Empty Mask
void InitializePixelMask(const DiffractionExperiment &experiment, const PixelMask &mask_raw);
virtual void InitializePixelMask(const uint32_t *module_mask, size_t module_number);
void InitializeROIMap(const DiffractionExperiment &experiment);
void InitializeROIMap(const DiffractionExperiment& experiment, const std::vector<uint16_t>& raw_roi_map);
void InitializeDataProcessing(const DiffractionExperiment &experiment, const AzimuthalIntegration& azint);
const AcquisitionCounters& Counters() const;

View File

@@ -1,4 +1,5 @@
// Copyright (2019-2023) Paul Scherrer Institute
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#include "AcquisitionDeviceGroup.h"
#include "PCIExpressDevice.h"

View File

@@ -1,4 +1,5 @@
// Copyright (2019-2023) Paul Scherrer Institute
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#ifndef JUNGFRAUJOCH_ACQUISITIONDEVICEGROUP_H
#define JUNGFRAUJOCH_ACQUISITIONDEVICEGROUP_H

View File

@@ -1,4 +1,5 @@
// Copyright (2019-2023) Paul Scherrer Institute
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#include "Completion.h"
#include "../common/Definitions.h"

View File

@@ -1,4 +1,5 @@
// Copyright (2019-2023) Paul Scherrer Institute
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#ifndef JUNGFRAUJOCH_COMPLETION_H
#define JUNGFRAUJOCH_COMPLETION_H

View File

@@ -1,4 +1,5 @@
// Copyright (2019-2023) Paul Scherrer Institute
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#include <random>
#include "FPGAAcquisitionDevice.h"
@@ -224,6 +225,7 @@ void FPGAAcquisitionDevice::FillActionRegister(const DiffractionExperiment& x, D
job.nstorage_cells = x.GetStorageCellNumber() - 1;
job.mode = data_collection_id << 16;
job.nsummation = x.GetFPGASummation() - 1;
job.data_stream = data_stream;
expected_descriptors_per_module = DMA_DESCRIPTORS_PER_MODULE;

View File

@@ -1,4 +1,5 @@
// Copyright (2019-2023) Paul Scherrer Institute
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#ifndef JUNGFRAUJOCH_FPGAACQUISITIONDEVICE_H
#define JUNGFRAUJOCH_FPGAACQUISITIONDEVICE_H

View File

@@ -1,4 +1,5 @@
// Copyright (2019-2023) Paul Scherrer Institute
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#include "HLSSimulatedDevice.h"
@@ -9,12 +10,8 @@ HLSSimulatedDevice::HLSSimulatedDevice(uint16_t data_stream, size_t in_frame_buf
max_modules = MAX_MODULES_FPGA;
if (data_stream != 0)
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
"HLS simulation can only work with 1 data_stream, due to use of static variables");
MapBuffersStandard(in_frame_buffer_size_modules, numa_node);
device = std::make_unique<HLSDevice>(buffer_device);
}

View File

@@ -1,4 +1,5 @@
// Copyright (2019-2023) Paul Scherrer Institute
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#ifndef JUNGFRAUJOCH_HLSSIMULATEDDEVICE_H
#define JUNGFRAUJOCH_HLSSIMULATEDDEVICE_H

View File

@@ -1,4 +1,5 @@
// Copyright (2019-2023) Paul Scherrer Institute
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#include "PCIExpressDevice.h"
#include "../common/NetworkAddressConvert.h"

View File

@@ -1,4 +1,5 @@
// Copyright (2019-2023) Paul Scherrer Institute
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#ifndef JUNGFRAUJOCH_PCIEXPRESSDEVICE_H
#define JUNGFRAUJOCH_PCIEXPRESSDEVICE_H

View File

@@ -1,4 +1,5 @@
// Copyright (2019-2024) Paul Scherrer Institute
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
// Using OpenAPI licensed with Apache License 2.0
#include <nlohmann/json.hpp>
@@ -9,13 +10,13 @@
#include "../preview/JFJochTIFF.h"
JFJochBrokerHttp::JFJochBrokerHttp(const DiffractionExperiment &experiment, std::shared_ptr<Pistache::Rest::Router> &rtr)
: DefaultApi(rtr) {
: DefaultApi(rtr),
state_machine(experiment, services, logger) {
Pistache::Rest::Routes::Get(*rtr, "/", Pistache::Rest::Routes::bind(&JFJochBrokerHttp::GetStaticFile, this));
Pistache::Rest::Routes::Get(*rtr, "/frontend", Pistache::Rest::Routes::bind(&JFJochBrokerHttp::GetStaticFile, this));
Pistache::Rest::Routes::Get(*rtr, "/frontend/*", Pistache::Rest::Routes::bind(&JFJochBrokerHttp::GetStaticFile, this));
Pistache::Rest::Routes::Get(*rtr, "/frontend/assets/*", Pistache::Rest::Routes::bind(&JFJochBrokerHttp::GetStaticFile, this));
state_machine.NotThreadSafe_Experiment() = experiment;
init();
}
@@ -59,18 +60,18 @@ void JFJochBrokerHttp::status_get(Pistache::Http::ResponseWriter &response) {
void JFJochBrokerHttp::wait_till_done_post(const std::optional<int32_t> &timeout,
Pistache::Http::ResponseWriter &response) {
JFJochState state;
BrokerStatus status;
if (!timeout)
state = state_machine.WaitTillMeasurementDone(std::chrono::minutes(1));
status = state_machine.WaitTillMeasurementDone(std::chrono::minutes(1));
else if ((timeout.value() > 3600) || (timeout.value() < 0)) {
response.send(Pistache::Http::Code::Bad_Request);
return;
} else if (timeout.value() == 0)
state = state_machine.GetState();
status = state_machine.GetStatus();
else
state = state_machine.WaitTillMeasurementDone(std::chrono::seconds(timeout.value()));
status = state_machine.WaitTillMeasurementDone(std::chrono::seconds(timeout.value()));
switch (state) {
switch (status.state) {
case JFJochState::Idle:
response.send(Pistache::Http::Code::Ok);
break;
@@ -78,8 +79,7 @@ void JFJochBrokerHttp::wait_till_done_post(const std::optional<int32_t> &timeout
response.send(Pistache::Http::Code::Bad_Gateway);
break;
case JFJochState::Error:
response.send(Pistache::Http::Code::Internal_Server_Error);
break;
throw WrongDAQStateException(status.message.value_or("Unknown error"));
case JFJochState::Measuring:
case JFJochState::Busy:
case JFJochState::Pedestal:
@@ -140,11 +140,6 @@ void JFJochBrokerHttp::config_spot_finding_put(
response.send(Pistache::Http::Code::Ok);
}
void JFJochBrokerHttp::plot_azim_int_get(const std::optional<bool>& compression,
Pistache::Http::ResponseWriter &response) {
GenericPlot(PlotType::AzInt, 0, compression, response);
}
void JFJochBrokerHttp::statistics_calibration_get(Pistache::Http::ResponseWriter &response) {
nlohmann::json j;
for (const auto &d: Convert(state_machine.GetCalibrationStatistics()))
@@ -227,39 +222,6 @@ void JFJochBrokerHttp::detector_status_get(Pistache::Http::ResponseWriter &respo
response.send(Pistache::Http::Code::Not_Found);
}
void JFJochBrokerHttp::preview_calibration_tiff_get(Pistache::Http::ResponseWriter &response) {
std::string s = state_machine.GetPreviewTIFF(true);
if (!s.empty())
response.send(Pistache::Http::Code::Ok, s, Pistache::Http::Mime::MediaType::fromString("image/tiff"));
else
response.send(Pistache::Http::Code::Not_Found);
}
void
JFJochBrokerHttp::preview_image_jpeg_post(const org::openapitools::server::model::Preview_settings &previewSettings,
Pistache::Http::ResponseWriter &response) {
std::string s = state_machine.GetPreviewJPEG(Convert(previewSettings));
if (!s.empty())
response.send(Pistache::Http::Code::Ok, s, Pistache::Http::Mime::MediaType::fromString("image/jpeg"));
else
response.send(Pistache::Http::Code::Not_Found);
}
void JFJochBrokerHttp::preview_image_jpeg_get(Pistache::Http::ResponseWriter &response) {
std::string s = state_machine.GetPreviewJPEG(PreviewJPEGSettings());
if (!s.empty())
response.send(Pistache::Http::Code::Ok, s, Pistache::Http::Mime::MediaType::fromString("image/jpeg"));
else
response.send(Pistache::Http::Code::Not_Found);
}
void JFJochBrokerHttp::preview_image_tiff_get(Pistache::Http::ResponseWriter &response) {
std::string s = state_machine.GetPreviewTIFF(false);
if (!s.empty())
response.send(Pistache::Http::Code::Ok, s, Pistache::Http::Mime::MediaType::fromString("image/tiff"));
else
response.send(Pistache::Http::Code::Not_Found);
}
void JFJochBrokerHttp::config_internal_generator_image_put(const Pistache::Rest::Request &request,
Pistache::Http::ResponseWriter &response) {
@@ -291,23 +253,14 @@ void JFJochBrokerHttp::config_internal_generator_image_tiff_put(const Pistache::
response.send(Pistache::Http::Code::Ok);
}
void JFJochBrokerHttp::roi_box_get(Pistache::Http::ResponseWriter &response) {
ProcessOutput(Convert(state_machine.GetBoxROI()), response);
void JFJochBrokerHttp::config_roi_get(Pistache::Http::ResponseWriter &response) {
ProcessOutput(Convert(state_machine.GetROIDefintion()), response);
}
void JFJochBrokerHttp::roi_box_put(const org::openapitools::server::model::Roi_box_list &roiBoxList,
Pistache::Http::ResponseWriter &response) {
state_machine.SetBoxROI(Convert(roiBoxList));
response.send(Pistache::Http::Code::Ok);
}
void JFJochBrokerHttp::config_roi_put(const org::openapitools::server::model::Roi_definitions &roiDefinitions,
void JFJochBrokerHttp::roi_circle_get(Pistache::Http::ResponseWriter &response) {
ProcessOutput(Convert(state_machine.GetCircleROI()), response);
}
void JFJochBrokerHttp::roi_circle_put(const org::openapitools::server::model::Roi_circle_list &roiCircleList,
Pistache::Http::ResponseWriter &response) {
state_machine.SetCircleROI(Convert(roiCircleList));
Pistache::Http::ResponseWriter &response) {
state_machine.SetROIDefinition(Convert(roiDefinitions));
response.send(Pistache::Http::Code::Ok);
}
@@ -339,88 +292,6 @@ void JFJochBrokerHttp::preview_pedestal_tiff_get(const std::optional<int32_t> &g
response.send(Pistache::Http::Code::Not_Found);
}
void JFJochBrokerHttp::GenericPlot(PlotType plot_type, const std::optional<int32_t> &binning,
const std::optional<bool>& in_compression,
Pistache::Http::ResponseWriter &response) {
bool compression = !in_compression.has_value() || in_compression.value();
PlotRequest req{.type = plot_type, .binning = 0};
if (binning) {
if (binning.value() < 0)
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
"Binning must be positive number or zero");
req.binning = binning.value();
}
auto plot = state_machine.GetPlots(req);
ProcessOutput(Convert(plot), response, compression);
}
void JFJochBrokerHttp::plot_bkg_estimate_get(const std::optional<int32_t> &binning,
const std::optional<bool>& compression,
Pistache::Http::ResponseWriter &response) {
GenericPlot(PlotType::BkgEstimate, binning, compression, response);
}
void JFJochBrokerHttp::plot_error_pixel_get(const std::optional<int32_t> &binning,
const std::optional<bool>& compression,
Pistache::Http::ResponseWriter &response) {
GenericPlot(PlotType::ErrorPixels, binning, compression, response);
}
void JFJochBrokerHttp::plot_image_collection_efficiency_get(const std::optional<int32_t> &binning,
const std::optional<bool>& compression,
Pistache::Http::ResponseWriter &response) {
GenericPlot(PlotType::ImageCollectionEfficiency, binning, compression, response);
}
void JFJochBrokerHttp::plot_indexing_rate_get(const std::optional<int32_t> &binning,
const std::optional<bool>& compression,
Pistache::Http::ResponseWriter &response) {
GenericPlot(PlotType::IndexingRate, binning, compression, response);
}
void JFJochBrokerHttp::plot_receiver_delay_get(const std::optional<int32_t> &binning,
const std::optional<bool>& compression,
Pistache::Http::ResponseWriter &response) {
GenericPlot(PlotType::ReceiverDelay, binning, compression, response);
}
void JFJochBrokerHttp::plot_receiver_free_send_buffers_get(const std::optional<int32_t> &binning,
const std::optional<bool>& compression,
Pistache::Http::ResponseWriter &response) {
GenericPlot(PlotType::ReceiverFreeSendBuf, binning, compression, response);
}
void JFJochBrokerHttp::plot_roi_max_count_get(const std::optional<int32_t> &binning,
const std::optional<bool>& compression,
Pistache::Http::ResponseWriter &response) {
GenericPlot(PlotType::ROIMaxCount, binning, compression, response);
}
void JFJochBrokerHttp::plot_roi_sum_get(const std::optional<int32_t> &binning,
const std::optional<bool>& compression,
Pistache::Http::ResponseWriter &response) {
GenericPlot(PlotType::ROISum, binning, compression, response);
}
void JFJochBrokerHttp::plot_roi_valid_pixels_get(const std::optional<int32_t> &binning,
const std::optional<bool>& compression,
Pistache::Http::ResponseWriter &response) {
GenericPlot(PlotType::ROIPixels, binning, compression, response);
}
void JFJochBrokerHttp::plot_spot_count_get(const std::optional<int32_t> &binning,
const std::optional<bool>& compression,
Pistache::Http::ResponseWriter &response) {
GenericPlot(PlotType::SpotCount, binning, compression, response);
}
void JFJochBrokerHttp::plot_strong_pixel_get(const std::optional<int32_t> &binning,
const std::optional<bool>& compression,
Pistache::Http::ResponseWriter &response) {
GenericPlot(PlotType::StrongPixels, binning, compression, response);
}
void JFJochBrokerHttp::config_mask_tiff_get(Pistache::Http::ResponseWriter &response) {
auto s = state_machine.GetFullPixelMaskTIFF();
response.send(Pistache::Http::Code::Ok, s, Pistache::Http::Mime::MediaType::fromString("image/tiff"));
@@ -536,11 +407,20 @@ void JFJochBrokerHttp::statistics_get(const std::optional<bool> &compression, Pi
statistics.setInstrumentMetadata(Convert(state_machine.GetInstrumentMetadata()));
statistics.setImageFormatSettings(Convert(state_machine.GetImageFormatSettings()));
statistics.setPixelMask(Convert(state_machine.GetPixelMaskStatistics()));
statistics.setRoi(Convert(state_machine.GetROIDefintion()));
statistics.setFileWriterSettings(Convert(state_machine.GetFileWriterSettings()));
statistics.setAzInt(Convert(state_machine.GetRadialIntegrationSettings()));
statistics.setBuffer(Convert(state_machine.GetImageBufferStatus()));
statistics.setIndexing(Convert(state_machine.GetIndexingSettings()));
auto zeromq_prev = state_machine.GetPreviewSocketSettings();
if (!zeromq_prev.address.empty())
statistics.setZeromqPreview(Convert(zeromq_prev));
auto zeromq_metadata = state_machine.GetMetadataSocketSettings();
if (!zeromq_metadata.address.empty())
statistics.setZeromqMetadata(Convert(zeromq_metadata));
nlohmann::json j = statistics;
if (!compression.has_value() || compression.value())
response.setCompression(Pistache::Http::Header::Encoding::Deflate);
@@ -559,4 +439,179 @@ void JFJochBrokerHttp::config_zeromq_preview_put(
response.send(Pistache::Http::Code::Ok);
}
void JFJochBrokerHttp::config_zeromq_metadata_get(Pistache::Http::ResponseWriter &response) {
ProcessOutput(Convert(state_machine.GetMetadataSocketSettings()), response);
}
void JFJochBrokerHttp::config_zeromq_metadata_put(
const org::openapitools::server::model::Zeromq_metadata_settings &zeromqMetadataSettings,
Pistache::Http::ResponseWriter &response) {
state_machine.SetMetadataSocketSettings(Convert(zeromqMetadataSettings));
response.send(Pistache::Http::Code::Ok);
}
void JFJochBrokerHttp::image_buffer_clear_post(Pistache::Http::ResponseWriter &response) {
state_machine.ClearImageBuffer();
response.send(Pistache::Http::Code::Ok);
}
void JFJochBrokerHttp::image_buffer_image_cbor_get(const std::optional<int64_t> &imageNumber,
Pistache::Http::ResponseWriter &response) {
std::vector<uint8_t> tmp_vector;
state_machine.GetImageFromBuffer(tmp_vector, imageNumber.value_or(-1));
std::string s = std::string((char *) tmp_vector.data(), tmp_vector.size());
if (!s.empty())
response.send(Pistache::Http::Code::Ok, s,
Pistache::Http::Mime::MediaType::fromString("application/cbor"));
else
response.send(Pistache::Http::Code::Not_Found);
}
void JFJochBrokerHttp::image_buffer_image_jpeg_get(const std::optional<int64_t> &id,
const std::optional<bool> &showUserMask,
const std::optional<bool> &showRoi,
const std::optional<bool> &showSpots,
const std::optional<bool> &showBeamCenter,
const std::optional<float> &saturation,
const std::optional<int64_t> &jpegQuality,
const std::optional<float> &showResRing,
const std::optional<std::string> &color,
Pistache::Http::ResponseWriter &response) {
int64_t image_id = id.value_or(ImageBuffer::MaxImage);
PreviewImageSettings settings{};
settings.show_user_mask = showUserMask.value_or(true);
settings.show_roi = showRoi.value_or(false);
settings.show_spots = showSpots.value_or(true);
settings.saturation_value = saturation.value_or(10);
settings.jpeg_quality = jpegQuality.value_or(100);
settings.resolution_ring = showResRing;
settings.scale = ConvertColorScale(color);
settings.show_beam_center = showBeamCenter.value_or(true);
settings.format = PreviewImageFormat::JPEG;
std::string s = state_machine.GetPreviewJPEG(settings, image_id);
if (!s.empty())
response.send(Pistache::Http::Code::Ok, s, Pistache::Http::Mime::MediaType::fromString("image/jpeg"));
else
response.send(Pistache::Http::Code::Not_Found);
}
void JFJochBrokerHttp::image_buffer_image_png_get(const std::optional<int64_t> &id,
const std::optional<bool> &showUserMask,
const std::optional<bool> &showRoi,
const std::optional<bool> &showSpots,
const std::optional<bool> &showBeamCenter,
const std::optional<float> &saturation,
const std::optional<int64_t> &jpegQuality,
const std::optional<float> &showResRing,
const std::optional<std::string> &color,
Pistache::Http::ResponseWriter &response) {
int64_t image_id = id.value_or(ImageBuffer::MaxImage);
PreviewImageSettings settings{};
settings.show_user_mask = showUserMask.value_or(true);
settings.show_roi = showRoi.value_or(false);
settings.show_spots = showSpots.value_or(true);
settings.saturation_value = saturation.value_or(10);
settings.jpeg_quality = jpegQuality.value_or(100);
settings.resolution_ring = showResRing;
settings.scale = ConvertColorScale(color);
settings.show_beam_center = showBeamCenter.value_or(true);
settings.format = PreviewImageFormat::PNG;
std::string s = state_machine.GetPreviewJPEG(settings, image_id);
if (!s.empty())
response.send(Pistache::Http::Code::Ok, s, Pistache::Http::Mime::MediaType::fromString("image/jpeg"));
else
response.send(Pistache::Http::Code::Not_Found);
}
void
JFJochBrokerHttp::image_buffer_image_tiff_get(const std::optional<int64_t> &id, Pistache::Http::ResponseWriter &response) {
int64_t image_id = ImageBuffer::MaxImage;
if (id.has_value())
image_id = id.value();
std::string s = state_machine.GetPreviewTIFF(image_id);
if (!s.empty())
response.send(Pistache::Http::Code::Ok, s, Pistache::Http::Mime::MediaType::fromString("image/tiff"));
else
response.send(Pistache::Http::Code::Not_Found);
}
void JFJochBrokerHttp::image_buffer_start_cbor_get(Pistache::Http::ResponseWriter &response) {
std::vector<uint8_t> tmp_vector;
state_machine.GetStartMessageFromBuffer(tmp_vector);
std::string s = std::string((char *) tmp_vector.data(), tmp_vector.size());
if (!s.empty())
response.send(Pistache::Http::Code::Ok, s,
Pistache::Http::Mime::MediaType::fromString("application/cbor"));
else
response.send(Pistache::Http::Code::Not_Found);
}
void JFJochBrokerHttp::image_buffer_status_get(Pistache::Http::ResponseWriter &response) {
ProcessOutput(Convert(state_machine.GetImageBufferStatus()), response);
}
void JFJochBrokerHttp::config_file_writer_get(Pistache::Http::ResponseWriter &response) {
ProcessOutput(Convert(state_machine.GetFileWriterSettings()), response);
}
void JFJochBrokerHttp::config_file_writer_put(
const org::openapitools::server::model::File_writer_settings &fileWriterSettings,
Pistache::Http::ResponseWriter &response) {
state_machine.LoadFileWriterSettings(Convert(fileWriterSettings));
response.send(Pistache::Http::Code::Ok);
}
void JFJochBrokerHttp::preview_plot_get(const std::optional<std::string> &type, const std::optional<int32_t> &binning,
const std::optional<bool> &compression, const std::optional<float> &fill,
const std::optional<bool> &experimentalCoord,
const std::optional<std::string> &azintUnit, Pistache::Http::ResponseWriter &response) {
PlotAzintUnit unit = PlotAzintUnit::Q_recipA;
if (azintUnit.has_value()) {
if (azintUnit == "Q_recipA" || azintUnit == "q_recipa")
unit = PlotAzintUnit::Q_recipA;
else if (azintUnit == "d_A" || azintUnit == "d_a")
unit = PlotAzintUnit::D_A;
else if (azintUnit == "two_theta_deg")
unit = PlotAzintUnit::TwoTheta_deg;
}
PlotRequest req{
.type = ConvertPlotType(type),
.binning = 0,
.experimental_coord = experimentalCoord.value_or(false),
.azint_unit = unit,
.fill_value = fill
};
if (binning) {
if (binning.value() < 0)
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
"Binning must be positive number or zero");
req.binning = binning.value();
}
auto plot = state_machine.GetPlots(req);
ProcessOutput(Convert(plot), response, compression.value_or(false));
}
void JFJochBrokerHttp::config_indexing_get(Pistache::Http::ResponseWriter &response) {
ProcessOutput(Convert(state_machine.GetIndexingSettings()), response);
}
void JFJochBrokerHttp::config_indexing_put(const org::openapitools::server::model::Indexing_settings &indexingSettings,
Pistache::Http::ResponseWriter &response) {
state_machine.SetIndexingSettings(Convert(indexingSettings));
response.send(Pistache::Http::Code::Ok);
}
void JFJochBrokerHttp::result_scan_get(Pistache::Http::ResponseWriter &response) {
auto ret = state_machine.GetScanResult();
if (ret.has_value())
ProcessOutput(Convert(ret.value()), response, true);
else
response.send(Pistache::Http::Code::Not_Found);
}

View File

@@ -1,4 +1,5 @@
// Copyright (2019-2023) Paul Scherrer Institute
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
// Using OpenAPI licensed with Apache License 2.0
#ifndef JUNGFRAUJOCH_JFJOCHBROKERHTTP_H
@@ -25,7 +26,7 @@ class JFJochBrokerHttp : public org::openapitools::server::api::DefaultApi {
void fpga_status_get(Pistache::Http::ResponseWriter &response) override;
JFJochStateMachine state_machine {services, logger};
JFJochStateMachine state_machine;
std::string frontend_directory;
void config_detector_get(Pistache::Http::ResponseWriter &response) override;
@@ -36,7 +37,7 @@ class JFJochBrokerHttp : public org::openapitools::server::api::DefaultApi {
void config_azim_int_get(Pistache::Http::ResponseWriter &response) override;
void config_azim_int_put(const org::openapitools::server::model::Azim_int_settings &radIntSettings,
Pistache::Http::ResponseWriter &response) override;
Pistache::Http::ResponseWriter &response) override;
void config_select_detector_get(Pistache::Http::ResponseWriter &response) override;
@@ -50,36 +51,6 @@ class JFJochBrokerHttp : public org::openapitools::server::api::DefaultApi {
void config_spot_finding_put(const org::openapitools::server::model::Spot_finding_settings &spotFindingSettings,
Pistache::Http::ResponseWriter &response) override;
void GenericPlot(PlotType plot_type,
const std::optional<int32_t> &binning,
const std::optional<bool>& compression,
Pistache::Http::ResponseWriter &response);
void plot_bkg_estimate_get(const std::optional<int32_t> &binning, const std::optional<bool>& compression,
Pistache::Http::ResponseWriter &response) override;
void plot_error_pixel_get(const std::optional<int32_t> &binning, const std::optional<bool>& compression,
Pistache::Http::ResponseWriter &response) override;
void plot_image_collection_efficiency_get(const std::optional<int32_t> &binning, const std::optional<bool>& compression,
Pistache::Http::ResponseWriter &response) override;
void plot_indexing_rate_get(const std::optional<int32_t> &binning, const std::optional<bool>& compression,
Pistache::Http::ResponseWriter &response) override;
void plot_receiver_delay_get(const std::optional<int32_t> &binning, const std::optional<bool>& compression,
Pistache::Http::ResponseWriter &response) override;
void plot_receiver_free_send_buffers_get(const std::optional<int32_t> &binning, const std::optional<bool>& compression,
Pistache::Http::ResponseWriter &response) override;
void plot_roi_max_count_get(const std::optional<int32_t> &binning, const std::optional<bool>& compression,
Pistache::Http::ResponseWriter &response) override;
void plot_roi_sum_get(const std::optional<int32_t> &binning, const std::optional<bool>& compression,
Pistache::Http::ResponseWriter &response) override;
void plot_roi_valid_pixels_get(const std::optional<int32_t> &binning, const std::optional<bool>& compression,
Pistache::Http::ResponseWriter &response) override;
void plot_spot_count_get(const std::optional<int32_t> &binning, const std::optional<bool>& compression,
Pistache::Http::ResponseWriter &response) override;
void plot_strong_pixel_get(const std::optional<int32_t> &binning, const std::optional<bool>& compression,
Pistache::Http::ResponseWriter &response) override;
void plot_azim_int_get(const std::optional<bool>& compression, Pistache::Http::ResponseWriter &response) override;
void statistics_calibration_get(Pistache::Http::ResponseWriter &response) override;
void statistics_data_collection_get(Pistache::Http::ResponseWriter &response) override;
@@ -99,22 +70,12 @@ class JFJochBrokerHttp : public org::openapitools::server::api::DefaultApi {
void trigger_post(Pistache::Http::ResponseWriter &response) override;
void pedestal_post(Pistache::Http::ResponseWriter &response) override;
void preview_calibration_tiff_get(Pistache::Http::ResponseWriter &response) override;
void preview_pedestal_tiff_get(const std::optional<int32_t> &gainLevel,
const std::optional<int32_t> &sc,
Pistache::Http::ResponseWriter &response) override;
void preview_image_jpeg_get(Pistache::Http::ResponseWriter &response) override;
void preview_image_jpeg_post(const org::openapitools::server::model::Preview_settings &previewSettings,
Pistache::Http::ResponseWriter &response) override;
void preview_image_tiff_get(Pistache::Http::ResponseWriter &response) override;
void roi_box_get(Pistache::Http::ResponseWriter &response) override;
void roi_box_put(const org::openapitools::server::model::Roi_box_list &roiBoxList,
Pistache::Http::ResponseWriter &response) override;
void roi_circle_get(Pistache::Http::ResponseWriter &response) override;
void roi_circle_put(const org::openapitools::server::model::Roi_circle_list &roiCircleList,
void config_roi_get(Pistache::Http::ResponseWriter &response) override;
void config_roi_put(const org::openapitools::server::model::Roi_definitions &roiDefinitions,
Pistache::Http::ResponseWriter &response) override;
void config_internal_generator_image_put(const Pistache::Rest::Request &request,
@@ -128,7 +89,7 @@ class JFJochBrokerHttp : public org::openapitools::server::api::DefaultApi {
void config_user_mask_tiff_get(Pistache::Http::ResponseWriter &response) override;
void config_user_mask_tiff_put(const Pistache::Rest::Request &request,
Pistache::Http::ResponseWriter &response) override;
Pistache::Http::ResponseWriter &response) override;
void config_internal_generator_image_tiff_put(const Pistache::Rest::Request &request,
Pistache::Http::ResponseWriter &response) override;
@@ -169,13 +130,60 @@ class JFJochBrokerHttp : public org::openapitools::server::api::DefaultApi {
config_zeromq_preview_put(const org::openapitools::server::model::Zeromq_preview_settings &zeromqPreviewSettings,
Pistache::Http::ResponseWriter &response) override;
void config_zeromq_metadata_get(Pistache::Http::ResponseWriter &response) override;
void config_zeromq_metadata_put(
const org::openapitools::server::model::Zeromq_metadata_settings &zeromqMetadataSettings,
Pistache::Http::ResponseWriter &response) override;
void config_mask_get(Pistache::Http::ResponseWriter &response) override;
void config_user_mask_get(Pistache::Http::ResponseWriter &response) override;
void config_user_mask_put(const Pistache::Rest::Request &request,
Pistache::Http::ResponseWriter &response) override;
Pistache::Http::ResponseWriter &response) override;
void image_buffer_clear_post(Pistache::Http::ResponseWriter &response) override;
void image_buffer_image_cbor_get(const std::optional<int64_t> &id,
Pistache::Http::ResponseWriter &response) override;
void image_buffer_image_jpeg_get(const std::optional<int64_t> &id,
const std::optional<bool> &showUserMask,
const std::optional<bool> &showRoi,
const std::optional<bool> &showSpots,
const std::optional<bool> &showBeamCenter,
const std::optional<float> &saturation,
const std::optional<int64_t> &jpegQuality,
const std::optional<float> &showResRing,
const std::optional<std::string> &color,
Pistache::Http::ResponseWriter &response) override;
void image_buffer_image_png_get(const std::optional<int64_t> &id,
const std::optional<bool> &showUserMask,
const std::optional<bool> &showRoi,
const std::optional<bool> &showSpots,
const std::optional<bool> &showBeamCenter,
const std::optional<float> &saturation,
const std::optional<int64_t> &jpegQuality,
const std::optional<float> &showResRing,
const std::optional<std::string> &color,
Pistache::Http::ResponseWriter &response) override;
void image_buffer_image_tiff_get(const std::optional<int64_t> &id, Pistache::Http::ResponseWriter &response) override;
void image_buffer_start_cbor_get(Pistache::Http::ResponseWriter &response) override;
void image_buffer_status_get(Pistache::Http::ResponseWriter &response) override;
void preview_plot_get(const std::optional<std::string> &type, const std::optional<int32_t> &binning,
const std::optional<bool> &compression, const std::optional<float> &fill,
const std::optional<bool> &experimentalCoord, const std::optional<std::string> &azintUnit,
Pistache::Http::ResponseWriter &response) override;
void config_indexing_get(Pistache::Http::ResponseWriter &response) override;
void config_indexing_put(const org::openapitools::server::model::Indexing_settings &indexingSettings,
Pistache::Http::ResponseWriter &response) override;
void result_scan_get(Pistache::Http::ResponseWriter &response) override;
public:
JFJochBrokerHttp(const DiffractionExperiment& experiment, std::shared_ptr<Pistache::Rest::Router> &rtr);
void AddDetectorSetup(const DetectorSetup &setup);
@@ -184,6 +192,12 @@ public:
JFJochBrokerHttp& FrontendDirectory(const std::string &directory);
~JFJochBrokerHttp() override = default;
private:
void config_file_writer_get(Pistache::Http::ResponseWriter &response) override;
void config_file_writer_put(const org::openapitools::server::model::File_writer_settings &fileWriterSettings,
Pistache::Http::ResponseWriter &response) override;
};

View File

@@ -1,4 +1,5 @@
// Copyright (2019-2023) Paul Scherrer Institute
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#include "JFJochBrokerParser.h"
#include "../common/NetworkAddressConvert.h"
@@ -9,9 +10,9 @@
#include "Detector_type.h"
#include "../image_pusher/NonePusher.h"
DetectorGeometry ParseStandardDetectorGeometry(const org::openapitools::server::model::Detector &j) {
DetectorGeometryModular ParseStandardDetectorGeometry(const org::openapitools::server::model::Detector &j) {
auto s = j.getStandardGeometry();
return {s.getNmodules(), s.getModulesInRow(), s.getGapX(), s.getGapY(), false};
return DetectorGeometryModular(s.getNmodules(), s.getModulesInRow(), s.getGapX(), s.getGapY(), false);
}
DetectorModuleGeometry::Direction Convert(const org::openapitools::server::model::Detector_module_direction& d) {
@@ -35,23 +36,25 @@ DetectorType Convert(const org::openapitools::server::model::Detector_type &d) {
return DetectorType::EIGER;
case org::openapitools::server::model::Detector_type::eDetector_type::JUNGFRAU:
return DetectorType::JUNGFRAU;
case org::openapitools::server::model::Detector_type::eDetector_type::DECTRIS:
return DetectorType::DECTRIS;
default:
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, "invalid detector type");
}
}
DetectorGeometry ParseCustomDetectorGeometry(const org::openapitools::server::model::Detector &j) {
DetectorGeometryModular ParseCustomDetectorGeometry(const org::openapitools::server::model::Detector &j) {
std::vector<DetectorModuleGeometry> modules;
for (const auto &iter: j.getCustomGeometry()) {
auto fast = Convert(iter.getFastAxis());
auto slow = Convert(iter.getSlowAxis());
modules.emplace_back(iter.getX0(), iter.getY0(), fast, slow);
}
return {modules, false};
return DetectorGeometryModular(modules, false);
}
DetectorGeometry ParseDetectorGeometry(const org::openapitools::server::model::Detector &d) {
DetectorGeometryModular ParseDetectorGeometry(const org::openapitools::server::model::Detector &d) {
if (d.standardGeometryIsSet() && d.customGeometryIsSet())
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, "Need to set EITHER standard or custom geometry");
@@ -64,24 +67,54 @@ DetectorGeometry ParseDetectorGeometry(const org::openapitools::server::model::D
}
DetectorSetup ParseDetectorSetup(const org::openapitools::server::model::Detector &d) {
DetectorGeometry geom = ParseDetectorGeometry(d);
DetectorType detector_type = Convert(d.getType());
if (detector_type == DetectorType::DECTRIS) {
std::string hostname;
if (d.getHostname().size() > 1)
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
"DECTRIS detector requires single hostname (or none)");
else if (d.getHostname().size() == 1)
hostname = d.getHostname()[0];
DetectorSetup setup = DetDECTRIS(1,1, d.getDescription(), hostname);
if (d.roiModeIsSet())
setup.DECTRISROI(d.getRoiMode());
return setup;
}
DetectorGeometryModular geom = ParseDetectorGeometry(d);
if (d.isMirrorY())
geom.VerticalFlip();
DetectorType detector_type = Convert(d.getType());
DetectorSetup setup(geom, detector_type, d.getDescription(), d.getHostname());
auto calib = d.getCalibrationFile();
if (!calib.empty()) {
if (detector_type == DetectorType::JUNGFRAU)
setup.LoadGain(calib);
else if (detector_type == DetectorType::EIGER)
setup.SetTrimFiles(calib);
switch (detector_type) {
case DetectorType::EIGER:
setup.SetTrimFiles(calib);
break;
case DetectorType::JUNGFRAU:
setup.LoadGain(calib);
break;
default:
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
"Detector type not supported");
}
}
if ((detector_type == DetectorType::EIGER) || (detector_type == DetectorType::JUNGFRAU))
setup.PixelSize_um(75.0f);
switch (detector_type) {
case DetectorType::EIGER:
case DetectorType::JUNGFRAU:
setup.PixelSize_um(75.0f);
break;
default:
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
"Detector type not supported");
}
if (d.highVoltageVIsSet())
setup.HighVoltage(d.getHighVoltageV());
@@ -92,11 +125,26 @@ DetectorSetup ParseDetectorSetup(const org::openapitools::server::model::Detecto
.SerialNumber(d.getSerialNumber())
.ModuleSync(d.isModuleSync());
if (d.readoutTimeUsIsSet())
setup.ReadOutTime(std::chrono::microseconds(d.getReadoutTimeUs()));
if (d.baseDataIpv4AddressIsSet())
setup.BaseIPv4Addr(d.getBaseDataIpv4Address());
if (d.txDelayIsSet())
setup.TxDelay(d.getTxDelay());
if (d.minimumCountTimeUsIsSet())
setup.MinCountTime(std::chrono::microseconds(d.getMinimumCountTimeUs()));
if (d.minimumFrameTimeUsIsSet())
setup.MinFrameTime(std::chrono::microseconds(d.getMinimumFrameTimeUs()));
if (d.defaultSettingsIsSet())
setup.DefaultSettings(Convert(d.getDefaultSettings()));
if (d.tempThresoldDegCIsSet())
setup.TempThreshold_degC(d.getTempThresoldDegC());
return setup;
}
@@ -104,14 +152,20 @@ void ParseFacilityConfiguration(const org::openapitools::server::model::Jfjoch_s
if (j.instrumentIsSet())
experiment.ImportInstrumentMetadata(Convert(j.getInstrument()));
if (j.fileWriterIsSet())
experiment.ImportFileWriterSettings(Convert(j.getFileWriter()));
if (j.detectorSettingsIsSet())
experiment.ImportDetectorSettings(Convert(j.getDetectorSettings()));
if (j.azimIntIsSet())
experiment.ImportRadialIntegrationSettings(Convert(j.getAzimInt()));
experiment.ImportAzimuthalIntegrationSettings(Convert(j.getAzimInt()));
if (j.imageFormatIsSet())
experiment.ImportImageFormatSettings(Convert(j.getImageFormat()));
if (j.indexingIsSet())
experiment.ImportIndexingSettings(Convert(j.getIndexing()));
}
std::unique_ptr<ImagePusher> ParseZMQImagePusher(const org::openapitools::server::model::Jfjoch_settings &j) {
@@ -174,4 +228,9 @@ void ParseReceiverSettings(const org::openapitools::server::model::Jfjoch_settin
service.PreviewSocket(input.getZeromqPreview().getSocketAddress());
service.PreviewSocketSettings(Convert(input.getZeromqPreview()));
}
if (input.zeromqMetadataIsSet()) {
service.MetadataSocket(input.getZeromqMetadata().getSocketAddress());
service.MetadataSocketSettings(Convert(input.getZeromqMetadata()));
}
}

View File

@@ -1,4 +1,5 @@
// Copyright (2019-2023) Paul Scherrer Institute
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#ifndef JUNGFRAUJOCH_JFJOCHBROKERPARSER_H
#define JUNGFRAUJOCH_JFJOCHBROKERPARSER_H
@@ -9,9 +10,9 @@
#include "../receiver/JFJochReceiverService.h"
#include "gen/model/Jfjoch_settings.h"
DetectorGeometry ParseStandardDetectorGeometry(const org::openapitools::server::model::Detector &j);
DetectorGeometry ParseCustomDetectorGeometry(const org::openapitools::server::model::Detector &j);
DetectorGeometry ParseDetectorGeometry(const org::openapitools::server::model::Detector &j);
DetectorGeometryModular ParseStandardDetectorGeometry(const org::openapitools::server::model::Detector &j);
DetectorGeometryModular ParseCustomDetectorGeometry(const org::openapitools::server::model::Detector &j);
DetectorGeometryModular ParseDetectorGeometry(const org::openapitools::server::model::Detector &j);
DetectorSetup ParseDetectorSetup(const org::openapitools::server::model::Detector &j);
void ParseFacilityConfiguration(const org::openapitools::server::model::Jfjoch_settings &j, DiffractionExperiment &experiment);

View File

@@ -1,7 +1,10 @@
// Copyright (2019-2023) Paul Scherrer Institute
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#include "JFJochServices.h"
#include "../common/JFJochException.h"
#include "../detector_control/SLSDetectorWrapper.h"
#include "../detector_control/DectrisDetectorWrapper.h"
JFJochServices::JFJochServices(Logger &in_logger) : logger(in_logger) {}
@@ -10,6 +13,8 @@ void JFJochServices::Start(const DiffractionExperiment& experiment,
const JFCalibration &calibration) {
logger.Info("Measurement start for: {}", experiment.GetFilePrefix());
cannot_stop_detector = false;
if (receiver != nullptr) {
logger.Info(" ... receiver start");
if (experiment.IsJungfrauConvPhotonCnt())
@@ -31,16 +36,21 @@ void JFJochServices::Off() {
detector->Deactivate();
}
void JFJochServices::On(const DiffractionExperiment &x) {
void JFJochServices::On(DiffractionExperiment &x) {
if (x.IsUsingInternalPacketGen() || (receiver == nullptr)) {
detector.reset();
} else {
logger.Info("Detector on");
if (!detector)
detector = std::make_unique<DetectorWrapper>();
switch (x.GetDetectorType()) {
case DetectorType::EIGER:
case DetectorType::JUNGFRAU:
detector = std::make_unique<SLSDetectorWrapper>();
break;
case DetectorType::DECTRIS:
detector = std::make_unique<DectrisDetectorWrapper>();
break;
}
detector->Initialize(x, receiver->GetNetworkConfig());
logger.Info(" ... done");
}
}
@@ -50,35 +60,35 @@ JFJochServicesOutput JFJochServices::Stop() {
std::unique_ptr<JFJochException> exception;
bool detector_error = false;
if (receiver != nullptr) {
try {
if (detector) {
logger.Info("Wait for detector done");
logger.Info("Wait for detector idle");
DetectorState state = detector->GetState();
while ((state == DetectorState::WAITING) || (state == DetectorState::BUSY)) {
while ((!cannot_stop_detector)
&& ((state == DetectorState::WAITING) || (state == DetectorState::BUSY))) {
// check detector state every 5 ms
std::this_thread::sleep_for(std::chrono::milliseconds(5));
state = detector->GetState();
}
if (state == DetectorState::ERROR) {
if (state == DetectorState::IDLE) {
logger.Info(" ... detector idle");
receiver->Cancel(true); // cancel silently
} else {
logger.Error(" ... detector in error state");
receiver->Cancel(false);
} else if (state == DetectorState::IDLE) {
receiver->Cancel(true); // cancel silently
detector_error = true;
}
}
logger.Info("Wait for receiver done");
ret.receiver_output = receiver->Stop();
if (ret.receiver_output.status.compressed_ratio)
logger.Info(" ... Receiver efficiency: {} % Max delay: {} Compression ratio {}x",
static_cast<int>(ret.receiver_output.efficiency * 100.0),
ret.receiver_output.status.max_receive_delay,
static_cast<int>(std::round(ret.receiver_output.status.compressed_ratio.value())));
else
logger.Info(" ... Receiver efficiency: {} % Max delay: {}",
static_cast<int>(ret.receiver_output.efficiency * 100.0),
ret.receiver_output.status.max_receive_delay);
static_cast<int>(ret.receiver_output.efficiency * 100.0),
ret.receiver_output.status.max_receive_delay.value_or(0),
static_cast<int>(std::round(ret.receiver_output.status.compressed_ratio.value_or(1))));
if (ret.receiver_output.efficiency < 1.0) {
for (int i = 0; i < ret.receiver_output.received_packets.size(); i++) {
@@ -102,15 +112,23 @@ JFJochServicesOutput JFJochServices::Stop() {
if (exception)
throw JFJochException(*exception);
if (detector_error)
throw JFJochException(JFJochExceptionCategory::Detector, "Error in detector operation");
return ret;
}
void JFJochServices::Cancel() {
if (receiver != nullptr) {
if (detector)
if (detector) {
// Best effort - if detector cannot be stopped, this is OK, important to still stop receiver
try {
detector->Stop();
receiver->Cancel(false);
} catch (...) {
cannot_stop_detector = true;
}
}
if (receiver != nullptr)
receiver->Cancel(false);
}
JFJochServices &JFJochServices::Receiver(JFJochReceiverService *input) {
@@ -133,12 +151,7 @@ std::optional<float> JFJochServices::GetReceiverProgress() const {
MultiLinePlot JFJochServices::GetPlots(const PlotRequest &request) {
if (receiver == nullptr)
return {};
try {
return receiver->GetDataProcessingPlot(request);
} catch (...) {
return {};
}
return receiver->GetDataProcessingPlot(request);
}
void JFJochServices::SetSpotFindingSettings(const SpotFindingSettings &settings) {
@@ -158,16 +171,16 @@ std::optional<DetectorStatus> JFJochServices::GetDetectorStatus() const {
return {};
}
std::string JFJochServices::GetPreviewJPEG(const PreviewJPEGSettings &settings) const {
std::string JFJochServices::GetPreviewJPEG(const PreviewImageSettings &settings, int64_t image_number) const {
if (receiver != nullptr)
return receiver->GetJPEG(settings);
return receiver->GetJPEGFromBuffer(settings, image_number);
else
return {};
}
std::string JFJochServices::GetPreviewTIFF(bool calibration) const {
std::string JFJochServices::GetPreviewTIFF(int64_t image_number) const {
if (receiver != nullptr)
return receiver->GetTIFF(calibration);
return receiver->GetTIFFFromBuffer(image_number);
else
return "";
}
@@ -204,11 +217,53 @@ std::vector<DeviceStatus> JFJochServices::GetDeviceStatus() const {
ZMQPreviewSettings JFJochServices::GetPreviewSocketSettings() {
if (receiver)
return receiver->GetPreviewSocketSettings();
else
return {};
return {};
}
ZMQMetadataSettings JFJochServices::GetMetadataSocketSettings() {
if (receiver)
return receiver->GetMetadataSocketSettings();
return {};
}
void JFJochServices::SetPreviewSocketSettings(const ZMQPreviewSettings &input) {
if (receiver)
receiver->PreviewSocketSettings(input);
}
void JFJochServices::SetMetadataSocketSettings(const ZMQMetadataSettings &input) {
if (receiver)
receiver->MetadataSocketSettings(input);
}
void JFJochServices::GetStartMessageFromBuffer(std::vector<uint8_t> &v) {
if (receiver)
return receiver->GetStartMessageFromBuffer(v);
}
bool JFJochServices::GetImageFromBuffer(std::vector<uint8_t> &v, int64_t image_number) {
if (receiver)
return receiver->GetImageFromBuffer(v, image_number);
return false;
}
ImageBufferStatus JFJochServices::GetImageBufferStatus() const {
if (receiver)
return receiver->GetImageBufferStatus();
else return ImageBufferStatus{.total_slots = 0, .available_slots = 0};
}
void JFJochServices::ClearImageBuffer() const {
if (receiver)
receiver->ClearImageBuffer();
}
void JFJochServices::LoadDetectorPixelMask(PixelMask &mask) {
if (detector)
detector->LoadPixelMask(mask);
}
void JFJochServices::SetupIndexing(const IndexingSettings &input) {
if (receiver)
receiver->Indexing(input);
}

View File

@@ -1,4 +1,5 @@
// Copyright (2019-2023) Paul Scherrer Institute
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#ifndef JUNGFRAUJOCH_JFJOCHSERVICES_H
#define JUNGFRAUJOCH_JFJOCHSERVICES_H
@@ -17,10 +18,11 @@ class JFJochServices {
JFJochReceiverService *receiver = nullptr;
std::unique_ptr<DetectorWrapper> detector;
volatile bool cannot_stop_detector = false;
Logger &logger;
public:
explicit JFJochServices(Logger &in_logger);
void On(const DiffractionExperiment& experiment);
void On(DiffractionExperiment& experiment);
void Off();
void ConfigureDetector(const DiffractionExperiment& experiment);
void Start(const DiffractionExperiment& experiment,
@@ -42,8 +44,8 @@ public:
std::optional<DetectorStatus> GetDetectorStatus() const;
std::string GetPreviewJPEG(const PreviewJPEGSettings &settings) const;
std::string GetPreviewTIFF(bool calibration) const;
std::string GetPreviewJPEG(const PreviewImageSettings &settings, int64_t image_number) const;
std::string GetPreviewTIFF(int64_t image_number) const;
void GetXFELPulseID(std::vector<uint64_t> &v) const;
void GetXFELEventCode(std::vector<uint64_t> &v) const;
@@ -52,6 +54,18 @@ public:
void SetPreviewSocketSettings(const ZMQPreviewSettings &input);
ZMQPreviewSettings GetPreviewSocketSettings();
void SetMetadataSocketSettings(const ZMQMetadataSettings &input);
ZMQMetadataSettings GetMetadataSocketSettings();
void GetStartMessageFromBuffer(std::vector<uint8_t> &v);
bool GetImageFromBuffer(std::vector<uint8_t> &v, int64_t image_number = -1);
ImageBufferStatus GetImageBufferStatus() const;
void ClearImageBuffer() const;
void LoadDetectorPixelMask(PixelMask &mask);
void SetupIndexing(const IndexingSettings& input);
};

View File

@@ -1,15 +1,29 @@
// Copyright (2019-2023) Paul Scherrer Institute
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#include <thread>
#include "JFJochStateMachine.h"
#include "../preview/JFJochTIFF.h"
#include "pistache/net.h"
#include "../common/CUDAWrapper.h"
JFJochStateMachine::JFJochStateMachine(JFJochServices &in_services, Logger &in_logger)
: services(in_services),
JFJochStateMachine::JFJochStateMachine(const DiffractionExperiment& in_experiment,
JFJochServices &in_services,
Logger &in_logger)
: experiment(in_experiment),
logger(in_logger),
services(in_services),
pixel_mask(experiment),
current_detector_setup(0),
data_processing_settings(DiffractionExperiment::DefaultDataProcessingSettings()),
pixel_mask(experiment) {
pixel_mask_statistics({0, 0, 0}),
gpu_count(get_gpu_count()) {
indexing_possible = (get_gpu_count() >= 0);
if (!indexing_possible)
data_processing_settings.indexing = false;
SupressTIFFErrors();
}
@@ -46,11 +60,21 @@ bool JFJochStateMachine::ImportPedestalG1G2(const JFJochReceiverOutput &receiver
}
void JFJochStateMachine::TakePedestalInternalAll(std::unique_lock<std::mutex> &ul) {
if (experiment.GetDetectorSetup().GetDetectorType() == DetectorType::EIGER) {
logger.Info("EIGER configuration");
services.ConfigureDetector(experiment);
logger.Info(" ... done ");
return;
if (experiment.GetDetectorSetup().GetDetectorType() != DetectorType::JUNGFRAU) {
try {
calibration.reset();
logger.Info("EIGER configuration");
services.ConfigureDetector(experiment);
logger.Info(" ... done ");
SetState(JFJochState::Idle,
"Detector configured",
BrokerStatus::MessageSeverity::Success);
return;
} catch (const std::exception &e) {
logger.Error("Configuration error {}", e.what());
SetState(JFJochState::Error, e.what(), BrokerStatus::MessageSeverity::Error);
throw;
}
}
calibration = std::make_unique<JFCalibration>(experiment);
@@ -74,12 +98,15 @@ void JFJochStateMachine::TakePedestalInternalAll(std::unique_lock<std::mutex> &u
TakePedestalInternalG2(ul, i);
}
}
SetState(JFJochState::Idle,
"Pedestal sequence done",
BrokerStatus::MessageSeverity::Success);
services.ConfigureDetector(experiment);
pixel_mask.LoadDetectorBadPixelMask(experiment, calibration.get());
UpdatePixelMaskStatistics(pixel_mask.GetStatistics());
} catch (const std::exception &e) {
logger.Error("Pedestal sequence error {}", e.what());
state = JFJochState::Error;
SetState(JFJochState::Error, e.what(), BrokerStatus::MessageSeverity::Error);
throw;
}
logger.Info("Pedestal sequence done");
@@ -88,10 +115,14 @@ void JFJochStateMachine::TakePedestalInternalAll(std::unique_lock<std::mutex> &u
void JFJochStateMachine::TakePedestalInternalG0(std::unique_lock<std::mutex> &ul) {
DiffractionExperiment local_experiment(experiment);
if (local_experiment.IsFixedGainG1())
std::string message;
if (local_experiment.IsFixedGainG1()) {
local_experiment.Mode(DetectorMode::PedestalG1);
else
message = "Pedestal G1";
} else {
local_experiment.Mode(DetectorMode::PedestalG0);
message = "Pedestal G0";
}
if (local_experiment.GetStorageCellNumber() == 1)
local_experiment.StorageCellStart(15);
@@ -99,15 +130,16 @@ void JFJochStateMachine::TakePedestalInternalG0(std::unique_lock<std::mutex> &ul
local_experiment.StorageCellStart(0);
if (cancel_sequence) {
state = JFJochState::Inactive;
return;
}
if (local_experiment.GetPedestalG0Frames() == 0) {
state = JFJochState::Idle;
SetState(JFJochState::Inactive,
"Pedestal sequence cancelled",
BrokerStatus::MessageSeverity::Warning);
return;
}
state = JFJochState::Pedestal;
if (local_experiment.GetPedestalG0Frames() == 0)
return;
SetState(JFJochState::Pedestal, message, BrokerStatus::MessageSeverity::Info);
services.ConfigureDetector(local_experiment);
services.Start(local_experiment, pixel_mask, *calibration);
@@ -120,9 +152,11 @@ void JFJochStateMachine::TakePedestalInternalG0(std::unique_lock<std::mutex> &ul
ul.lock();
if (ImportPedestalG0(pedestal_output.receiver_output))
state = JFJochState::Idle;
SetState(JFJochState::Idle);
else
state = JFJochState::Inactive;
SetState(JFJochState::Error,
"Pedestal not collected properly",
BrokerStatus::MessageSeverity::Error);
}
void JFJochStateMachine::TakePedestalInternalG1(std::unique_lock<std::mutex> &ul, int32_t storage_cell) {
@@ -136,16 +170,19 @@ void JFJochStateMachine::TakePedestalInternalG1(std::unique_lock<std::mutex> &ul
if (cancel_sequence) {
state = JFJochState::Inactive;
SetState(JFJochState::Inactive,
"Pedestal sequence cancelled",
BrokerStatus::MessageSeverity::Warning);
return;
}
if (local_experiment.GetPedestalG1Frames() == 0) {
state = JFJochState::Idle;
if (local_experiment.GetPedestalG1Frames() == 0)
return;
}
state = JFJochState::Pedestal;
SetState(JFJochState::Pedestal,
"Pedestal G1 SC" + std::to_string(storage_cell),
BrokerStatus::MessageSeverity::Info);
services.ConfigureDetector(local_experiment);
services.Start(local_experiment, pixel_mask, *calibration);
@@ -157,11 +194,10 @@ void JFJochStateMachine::TakePedestalInternalG1(std::unique_lock<std::mutex> &ul
auto pedestal_output = services.Stop();
ul.lock();
if (ImportPedestalG1G2(pedestal_output.receiver_output, 1, storage_cell))
state = JFJochState::Idle;
else
state = JFJochState::Inactive;
if (!ImportPedestalG1G2(pedestal_output.receiver_output, 1, storage_cell))
SetState(JFJochState::Error,
"Pedestal not collected properly",
BrokerStatus::MessageSeverity::Error);
}
void JFJochStateMachine::TakePedestalInternalG2(std::unique_lock<std::mutex> &ul, int32_t storage_cell) {
@@ -174,16 +210,19 @@ void JFJochStateMachine::TakePedestalInternalG2(std::unique_lock<std::mutex> &ul
local_experiment.StorageCellStart(15);
if (cancel_sequence) {
state = JFJochState::Inactive;
SetState(JFJochState::Inactive,
"Pedestal sequence cancelled",
BrokerStatus::MessageSeverity::Warning);
return;
}
if (local_experiment.GetPedestalG2Frames() == 0) {
state = JFJochState::Idle;
if (local_experiment.GetPedestalG2Frames() == 0)
return;
}
state = JFJochState::Pedestal;
SetState(JFJochState::Pedestal,
"Pedestal G2 SC" + std::to_string(storage_cell),
BrokerStatus::MessageSeverity::Info);
services.ConfigureDetector(local_experiment);
services.Start(local_experiment, pixel_mask, *calibration);
@@ -195,35 +234,44 @@ void JFJochStateMachine::TakePedestalInternalG2(std::unique_lock<std::mutex> &ul
auto pedestal_output = services.Stop();
ul.lock();
if (ImportPedestalG1G2(pedestal_output.receiver_output, 2, storage_cell))
state = JFJochState::Idle;
else
state = JFJochState::Inactive;
if (!ImportPedestalG1G2(pedestal_output.receiver_output, 2, storage_cell))
SetState(JFJochState::Error,
"Pedestal not collected properly",
BrokerStatus::MessageSeverity::Error);
}
void JFJochStateMachine::Initialize() {
std::unique_lock<std::mutex> ul(m);
std::unique_lock ul(m);
if (IsRunning())
throw WrongDAQStateException ("Cannot initialize during measurement");
throw WrongDAQStateException("Cannot initialize during measurement");
if (detector_setup.empty())
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, "Detector information not provided");
CheckError(); // Clear error, we don't care what was it
ResetError(); // Clear error, we don't care what was it
logger.Info("Initialize");
try {
services.SetupIndexing(experiment.GetIndexingSettings());
} catch (const JFJochException &e) {
SetState(JFJochState::Error,
e.what(),
BrokerStatus::MessageSeverity::Error);
throw;
}
SetState(JFJochState::Busy, "Configuring detector", BrokerStatus::MessageSeverity::Info);
state = JFJochState::Busy;
scan_result = {}; // Clear scan result
measurement = std::async(std::launch::async, &JFJochStateMachine::InitializeThread, this, std::move(ul));
}
void JFJochStateMachine::Pedestal() {
std::unique_lock<std::mutex> ul(m);
std::unique_lock ul(m);
if (state != JFJochState::Idle)
throw WrongDAQStateException ("Must be idle to take pedestal");
throw WrongDAQStateException("Must be idle to take pedestal");
measurement = std::async(std::launch::async, &JFJochStateMachine::PedestalThread, this, std::move(ul));
}
@@ -235,25 +283,29 @@ void JFJochStateMachine::PedestalThread(std::unique_lock<std::mutex> ul) {
void JFJochStateMachine::InitializeThread(std::unique_lock<std::mutex> ul) {
try {
// On might modify experiment (reads DECTRIS configuration), so need to have lock acquired at this point
services.On(experiment);
} catch (...) {
state = JFJochState::Error;
detector_setup[current_detector_setup] = experiment.GetDetectorSetup();
pixel_mask = PixelMask(experiment);
services.LoadDetectorPixelMask(pixel_mask);
UpdatePixelMaskStatistics(pixel_mask.GetStatistics());
} catch (const std::exception &e) {
logger.Error("Initialize error {}", e.what());
SetState(JFJochState::Error, e.what(), BrokerStatus::MessageSeverity::Error);
throw;
}
TakePedestalInternalAll(ul);
}
void JFJochStateMachine::Trigger() {
std::unique_lock<std::mutex> ul(m);
if (state == JFJochState::Measuring)
services.Trigger();
services.Trigger();
}
void JFJochStateMachine::Start(const DatasetSettings& settings) {
std::unique_lock<std::mutex> ul(m);
void JFJochStateMachine::Start(const DatasetSettings &settings) {
std::unique_lock ul(m);
if (state != JFJochState::Idle)
throw WrongDAQStateException ("Must be idle to start measurement");
throw WrongDAQStateException("Must be idle to start measurement");
if (measurement.valid())
measurement.get(); // In case measurement was running - clear thread
@@ -269,14 +321,14 @@ void JFJochStateMachine::Start(const DatasetSettings& settings) {
experiment.IncrementRunNumber();
try {
state = JFJochState::Busy;
SetState(JFJochState::Busy, "Preparing measurement", BrokerStatus::MessageSeverity::Info);
services.SetSpotFindingSettings(GetSpotFindingSettings());
services.Start(experiment, pixel_mask, *calibration);
state = JFJochState::Measuring;
SetState(JFJochState::Measuring, "Measuring ...", BrokerStatus::MessageSeverity::Info);
measurement = std::async(std::launch::async, &JFJochStateMachine::MeasurementThread, this);
} catch (...) {
state = JFJochState::Error;
} catch (const std::exception &e) {
SetState(JFJochState::Error, e.what(), BrokerStatus::MessageSeverity::Error);
services.Cancel();
throw;
}
@@ -296,48 +348,72 @@ void JFJochStateMachine::MeasurementThread() {
try {
auto tmp_output = services.Stop();
{
std::unique_lock<std::mutex> ul(m);
state = JFJochState::Idle;
std::unique_lock ul(m);
scan_result = tmp_output.receiver_output.scan_result;
if (tmp_output.receiver_output.writer_queue_full_warning)
SetState(JFJochState::Idle,
"Stream receiver (writer or downstream analysis) cannot cope with data; reduce frame rate",
BrokerStatus::MessageSeverity::Warning);
else if (tmp_output.receiver_output.status.cancelled)
SetState(JFJochState::Idle,
"Data collection cancelled",
BrokerStatus::MessageSeverity::Info);
else if (tmp_output.receiver_output.efficiency != 1.0)
SetState(JFJochState::Idle,
"Missing packets in data collection; reduce frame rate",
BrokerStatus::MessageSeverity::Error);
else if (!tmp_output.receiver_output.writer_err.empty())
SetState(JFJochState::Idle,
tmp_output.receiver_output.writer_err,
BrokerStatus::MessageSeverity::Error);
else
SetState(JFJochState::Idle,
"Data collection without problems",
BrokerStatus::MessageSeverity::Success);
}
} catch (...) {
std::unique_lock<std::mutex> ul(m);
state = JFJochState::Error;
} catch (const std::exception &e) {
std::unique_lock ul(m);
SetState(JFJochState::Error, e.what(), BrokerStatus::MessageSeverity::Error);
}
c.notify_all();
}
void JFJochStateMachine::Cancel() {
// This is inconsistency in naming - need to solve later
std::unique_lock<std::mutex> ul(m);
std::unique_lock ul(m);
if ((state == JFJochState::Pedestal) || (state == JFJochState::Measuring)) {
services.Cancel();
cancel_sequence = true;
}
}
void JFJochStateMachine::DebugOnly_SetState(JFJochState in_state) {
std::unique_lock<std::mutex> ul(m);
state = in_state;
void JFJochStateMachine::DebugOnly_SetState(JFJochState in_state,
const std::optional<std::string> &message,
BrokerStatus::MessageSeverity message_severity) {
std::unique_lock ul(m);
SetState(in_state, message, message_severity);
}
void JFJochStateMachine::Deactivate() {
std::unique_lock<std::mutex> ul(m);
std::unique_lock ul(m);
try {
if (measurement.valid())
measurement.get();
services.Off();
state = JFJochState::Inactive;
} catch (...) {
state = JFJochState::Error;
SetState(JFJochState::Inactive,
"Detector safe to turn off",
BrokerStatus::MessageSeverity::Info);
} catch (const std::exception &e) {
SetState(JFJochState::Error,
e.what(),
BrokerStatus::MessageSeverity::Error);
throw;
}
}
JFJochStateMachine::~JFJochStateMachine() {
try {
if (measurement.valid())
measurement.get();
} catch (...) {}
ResetError();
}
std::optional<MeasurementStatistics> JFJochStateMachine::GetMeasurementStatistics() const {
@@ -365,85 +441,120 @@ std::optional<MeasurementStatistics> JFJochStateMachine::GetMeasurementStatistic
tmp.indexing_rate = rcv_status->indexing_rate;
tmp.bkg_estimate = rcv_status->bkg_estimate;
tmp.collection_efficiency = rcv_status->efficiency;
tmp.error_pixels = rcv_status->error_pixels;
tmp.saturated_pixels = rcv_status->saturated_pixels;
tmp.roi_beam_sum = rcv_status->roi_beam_sum;
tmp.roi_beam_npixel = rcv_status->roi_beam_npixel;
}
return tmp;
}
std::vector<JFCalibrationModuleStatistics> JFJochStateMachine::GetCalibrationStatistics() const {
std::unique_lock<std::mutex> ul(calibration_statistics_mutex);
std::unique_lock ul(calibration_statistics_mutex);
return calibration_statistics;
}
void JFJochStateMachine::SetCalibrationStatistics(const std::vector<JFCalibrationModuleStatistics> &input) {
std::unique_lock<std::mutex> ul(calibration_statistics_mutex);
std::unique_lock ul(calibration_statistics_mutex);
calibration_statistics = input;
}
DetectorSettings JFJochStateMachine::GetDetectorSettings() const {
std::unique_lock<std::mutex> ul(experiment_detector_settings_mutex);
std::unique_lock ul(experiment_detector_settings_mutex);
return experiment.GetDetectorSettings();
}
void JFJochStateMachine::ImportDetectorSettings(const DetectorSettings &input) {
std::unique_lock<std::mutex> ul(experiment_detector_settings_mutex);
bool JFJochStateMachine::ImportDetectorSettings(const DetectorSettings &input) {
std::unique_lock ul(experiment_detector_settings_mutex);
// For JUNGFRAU detector, if detector settings changes key parameters
// need to recalibrate the detector
bool recalib = input.NeedsJUNGFRAURecalibration(experiment.GetDetectorSettings())
&& experiment.GetDetectorType() == DetectorType::JUNGFRAU;
experiment.ImportDetectorSettings(input);
return recalib;
}
void JFJochStateMachine::LoadDetectorSettings(const DetectorSettings &settings) {
std::unique_lock<std::mutex> ul(m);
std::unique_lock ul(m);
switch (state) {
case JFJochState::Inactive:
case JFJochState::Error:
ImportDetectorSettings(settings);
break;
case JFJochState::Idle:
state = JFJochState::Busy;
ImportDetectorSettings(settings);
measurement = std::async(std::launch::async, &JFJochStateMachine::PedestalThread, this, std::move(ul));
if (ImportDetectorSettings(settings)) {
SetState(JFJochState::Busy, "Loading settings", BrokerStatus::MessageSeverity::Info);
measurement = std::async(std::launch::async, &JFJochStateMachine::PedestalThread, this, std::move(ul));
} else {
try {
SetState(JFJochState::Busy, "Configure detector", BrokerStatus::MessageSeverity::Info);
services.ConfigureDetector(experiment);
SetState(JFJochState::Idle, "Detector configured", BrokerStatus::MessageSeverity::Info);
} catch (const std::exception &e) {
logger.Error("Detector configuration error {}", e.what());
SetState(JFJochState::Error, e.what(), BrokerStatus::MessageSeverity::Error);
}
}
break;
case JFJochState::Measuring:
case JFJochState::Busy:
case JFJochState::Pedestal:
throw WrongDAQStateException ("Cannot change detector settings during data collection");
throw WrongDAQStateException("Cannot change detector settings during data collection");
}
}
DiffractionExperiment &JFJochStateMachine::NotThreadSafe_Experiment() {
DiffractionExperiment JFJochStateMachine::Experiment() {
return experiment;
}
BrokerStatus JFJochStateMachine::GetStatus() const {
BrokerStatus ret{};
ret.broker_state = state;
std::unique_lock ul(broker_status_mutex);
BrokerStatus ret = broker_status;
ret.progress = services.GetReceiverProgress();
ret.gpu_count = gpu_count;
return ret;
}
void JFJochStateMachine::SetState(JFJochState curr_state,
const std::optional<std::string> &message,
BrokerStatus::MessageSeverity message_severity) {
std::unique_lock ul(broker_status_mutex);
state = curr_state;
broker_status = BrokerStatus{
.state = curr_state,
.message = message,
.message_severity = message_severity
};
}
MultiLinePlot JFJochStateMachine::GetPlots(const PlotRequest &request) const {
return services.GetPlots(request);
}
void JFJochStateMachine::SetSpotFindingSettings(const SpotFindingSettings &settings) {
std::unique_lock<std::mutex> ul(data_processing_settings_mutex);
std::unique_lock ul(data_processing_settings_mutex);
DiffractionExperiment::CheckDataProcessingSettings(settings);
data_processing_settings = settings;
services.SetSpotFindingSettings(settings);
// If there is no capability to use the features, make sure these are disabled
if (!indexing_possible)
data_processing_settings.indexing = false;
services.SetSpotFindingSettings(data_processing_settings);
}
SpotFindingSettings JFJochStateMachine::GetSpotFindingSettings() const {
std::unique_lock<std::mutex> ul(data_processing_settings_mutex);
std::unique_lock ul(data_processing_settings_mutex);
return data_processing_settings;
}
JFJochState JFJochStateMachine::GetState() const {
return state;
}
void JFJochStateMachine::AddDetectorSetup(const DetectorSetup &setup) {
std::unique_lock<std::mutex> ul(m);
// Not thread safe, only during setup
if (detector_setup.empty()) {
experiment.Detector(setup);
UpdateROIDefinition();
gain_calibration = setup.GetGainCalibration();
current_detector_setup = 0;
pixel_mask = PixelMask(experiment);
@@ -452,21 +563,24 @@ void JFJochStateMachine::AddDetectorSetup(const DetectorSetup &setup) {
}
DetectorList JFJochStateMachine::GetDetectorsList() const {
std::unique_lock<std::mutex> ul(m);
DetectorList ret;
for (const auto & i : detector_setup) {
for (const auto &i: detector_setup) {
DetectorListElement tmp;
tmp.description = i.GetDescription();
tmp.nmodules = i.GetModulesNum();
tmp.width = i.GetGeometry().GetWidth();
tmp.height = i.GetGeometry().GetHeight();
tmp.width = i.GetGeometry().GetWidth(true);
tmp.height = i.GetGeometry().GetHeight(true);
tmp.serial_number = i.GetSerialNumber();
tmp.base_ipv4_addr = i.GetBaseIPv4Addr();
tmp.udp_interface_count = i.GetUDPInterfaceCount();
tmp.min_frame_time = i.GetMinFrameTime();
tmp.min_count_time = i.GetMinCountTime();
tmp.readout_time = i.GetReadOutTime();
tmp.detector_type = i.GetDetectorType();
tmp.pixel_size_mm = i.GetPixelSize_mm();
ret.detector.emplace_back(std::move(tmp));
}
ret.current_id = current_detector_setup;
return ret;
}
@@ -476,38 +590,42 @@ std::optional<DetectorStatus> JFJochStateMachine::GetDetectorStatus() const {
}
void JFJochStateMachine::SelectDetector(int64_t id) {
std::unique_lock<std::mutex> ul(m);
std::unique_lock ul(m);
if ((id < 0) || (id >= detector_setup.size()))
throw JFJochException(JFJochExceptionCategory::ArrayOutOfBounds, "Detector doesn't exist");
if (IsRunning())
throw WrongDAQStateException ("Cannot change detector during data collection");
throw WrongDAQStateException("Cannot change detector during data collection");
try {
experiment.Detector(detector_setup[id]);
UpdateROIDefinition();
gain_calibration = detector_setup[id].GetGainCalibration();
pixel_mask = PixelMask(experiment);
state = JFJochState::Inactive;
SetState(JFJochState::Inactive, detector_setup[id].GetDescription() + " selected; please initialize");
current_detector_setup = id;
} catch (JFJochException &e) {
} catch (const JFJochException &e) {
logger.ErrorException(e);
state = JFJochState::Inactive;
SetState(JFJochState::Error, e.what(), BrokerStatus::MessageSeverity::Error);
throw; // re-throw the exception, so it is populated to caller
}
}
void JFJochStateMachine::SetRadialIntegrationSettings(const AzimuthalIntegrationSettings &settings) {
std::unique_lock<std::mutex> ul(m);
std::unique_lock ul(m);
if (IsRunning())
throw WrongDAQStateException ("Cannot change radial integration settings during data collection");
experiment.ImportRadialIntegrationSettings(settings);
throw WrongDAQStateException("Cannot change radial integration settings during data collection");
{
std::unique_lock ul2(experiment_azimuthal_integration_settings_mutex);
experiment.ImportAzimuthalIntegrationSettings(settings);
}
}
AzimuthalIntegrationSettings JFJochStateMachine::GetRadialIntegrationSettings() const {
std::unique_lock<std::mutex> ul(m);
return experiment.GetRadialIntegrationSettings();
std::unique_lock ul(experiment_azimuthal_integration_settings_mutex);
return experiment.GetAzimuthalIntegrationSettings();
}
bool JFJochStateMachine::IsRunning() const {
@@ -525,63 +643,62 @@ bool JFJochStateMachine::IsRunning() const {
}
}
JFJochState JFJochStateMachine::WaitTillMeasurementDone() {
std::unique_lock<std::mutex> ul(m);
BrokerStatus JFJochStateMachine::WaitTillMeasurementDone() {
std::unique_lock ul(m);
c.wait(ul, [&] { return !IsRunning(); });
return state;
return GetStatus();
}
JFJochState JFJochStateMachine::WaitTillMeasurementDone(std::chrono::milliseconds timeout) {
std::unique_lock<std::mutex> ul(m);
BrokerStatus JFJochStateMachine::WaitTillMeasurementDone(std::chrono::milliseconds timeout) {
std::unique_lock ul(m);
c.wait_for(ul, timeout, [&] { return !IsRunning(); });
return state;
return GetStatus();
}
std::optional<std::string> JFJochStateMachine::CheckError() {
void JFJochStateMachine::ResetError() noexcept {
try {
if (measurement.valid())
measurement.get();
} catch (JFJochException &e) {
return e.what();
} catch (...) {
}
return {};
}
std::string JFJochStateMachine::GetPreviewJPEG(const PreviewJPEGSettings& settings) const {
return services.GetPreviewJPEG(settings);
std::string JFJochStateMachine::GetPreviewJPEG(const PreviewImageSettings &settings, int64_t image_number) const {
return services.GetPreviewJPEG(settings, image_number);
}
std::string JFJochStateMachine::GetPreviewTIFF(bool calibration) const {
return services.GetPreviewTIFF(calibration);
std::string JFJochStateMachine::GetPreviewTIFF(int64_t image_number) const {
return services.GetPreviewTIFF(image_number);
}
std::string JFJochStateMachine::GetPedestalTIFF(size_t gain_level, size_t sc) const {
std::unique_lock<std::mutex> ul(m);
std::unique_lock ul(m);
if (state != JFJochState::Idle)
throw WrongDAQStateException ("Pedestal can be only retrieved in Idle state");
throw WrongDAQStateException("Pedestal can be only retrieved in Idle state");
if ((experiment.GetDetectorSetup().GetDetectorType() == DetectorType::JUNGFRAU) && calibration) {
auto tmp = calibration->GetPedestal(gain_level, sc);
return WriteTIFFToString(tmp.data(), RAW_MODULE_COLS, RAW_MODULE_LINES * experiment.GetModulesNum(),
sizeof(uint16_t), false);
CompressedImage image(tmp, RAW_MODULE_COLS, RAW_MODULE_LINES * experiment.GetModulesNum());
return WriteTIFFToString(image);
} else
return {};
}
void JFJochStateMachine::LoadInternalGeneratorImage(const void *data, size_t size, uint64_t image_number) {
std::unique_lock<std::mutex> ul(m);
std::unique_lock ul(m);
if (state != JFJochState::Idle)
throw WrongDAQStateException ("Can change internal generator image only when detector in Idle state");
throw WrongDAQStateException("Can change internal generator image only when detector in Idle state");
if ((size != experiment.GetPixelsNum() * sizeof(uint16_t))
&& (size != experiment.GetModulesNum() * RAW_MODULE_SIZE * sizeof(uint16_t)))
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, "Image size doesn't match current detector");
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
"Image size doesn't match current detector");
if (image_number >= experiment.GetInternalPacketGeneratorImages())
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
@@ -594,10 +711,10 @@ void JFJochStateMachine::LoadInternalGeneratorImage(const void *data, size_t siz
}
void JFJochStateMachine::LoadInternalGeneratorImageTIFF(const std::string &s, uint64_t image_number) {
std::unique_lock<std::mutex> ul(m);
std::unique_lock ul(m);
if (state != JFJochState::Idle)
throw WrongDAQStateException ("Can change internal generator image only when detector in Idle state");
throw WrongDAQStateException("Can change internal generator image only when detector in Idle state");
uint32_t cols, lines;
auto v = ReadTIFFFromString16(s, cols, lines);
@@ -605,35 +722,28 @@ void JFJochStateMachine::LoadInternalGeneratorImageTIFF(const std::string &s, ui
|| ((cols == RAW_MODULE_SIZE) && (lines == RAW_MODULE_LINES * experiment.GetModulesNum())))
services.LoadInternalGeneratorImage(experiment, v, image_number);
else
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, "Image size doesn't match current detector");
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
"Image size doesn't match current detector");
}
void JFJochStateMachine::SetBoxROI(const std::vector<ROIBox> &input) {
std::unique_lock<std::mutex> ul(m);
void JFJochStateMachine::UpdateROIDefinition() {
std::unique_lock ul(roi_mutex);
roi = experiment.ROI().GetROIDefinition();
}
void JFJochStateMachine::SetROIDefinition(const ROIDefinition &input) {
std::unique_lock ul(m);
if (IsRunning())
throw WrongDAQStateException ("ROI can be modified only when detector is not running");
throw WrongDAQStateException("ROI can be modified only when detector is not running");
experiment.ROI().SetROIBox(input);
experiment.ROI().SetROI(input);
UpdateROIDefinition();
}
void JFJochStateMachine::SetCircleROI(const std::vector<ROICircle> &input) {
std::unique_lock<std::mutex> ul(m);
if (IsRunning())
throw WrongDAQStateException ("ROI can be modified only when detector is not running");
experiment.ROI().SetROICircle(input);
}
std::vector<ROIBox> JFJochStateMachine::GetBoxROI() const {
std::unique_lock<std::mutex> ul(m);
return experiment.ROI().GetROIBox();
}
std::vector<ROICircle> JFJochStateMachine::GetCircleROI() const {
std::unique_lock<std::mutex> ul(m);
return experiment.ROI().GetROICircle();
ROIDefinition JFJochStateMachine::GetROIDefintion() const {
std::unique_lock ul(roi_mutex);
return roi;
}
std::vector<uint64_t> JFJochStateMachine::GetXFELPulseID() const {
@@ -649,34 +759,47 @@ std::vector<uint64_t> JFJochStateMachine::GetXFELEventCode() const {
}
std::string JFJochStateMachine::GetFullPixelMaskTIFF() const {
std::unique_lock<std::mutex> ul(m);
std::unique_lock ul(m);
if (state == JFJochState::Inactive)
return {};
std::vector v = pixel_mask.GetMask(experiment);
return WriteTIFFToString(v.data(), experiment.GetXPixelsNum(), experiment.GetYPixelsNum(),
sizeof(uint32_t), false);
CompressedImage mask_image(v, experiment.GetXPixelsNum(), experiment.GetYPixelsNum());
return WriteTIFFToString(mask_image);
}
std::string JFJochStateMachine::GetUserPixelMaskTIFF() const {
std::unique_lock<std::mutex> ul(m);
std::unique_lock ul(m);
if (state == JFJochState::Inactive)
return {};
std::vector v = pixel_mask.GetUserMask(experiment);
return WriteTIFFToString(v.data(), experiment.GetXPixelsNum(), experiment.GetYPixelsNum(),
sizeof(uint32_t), false);
CompressedImage mask_image(v, experiment.GetXPixelsNum(), experiment.GetYPixelsNum());
return WriteTIFFToString(mask_image);
}
std::vector<uint32_t> JFJochStateMachine::GetFullPixelMask() const {
std::unique_lock<std::mutex> ul(m);
std::unique_lock ul(m);
if (state == JFJochState::Inactive)
return {};
return pixel_mask.GetMask(experiment);
}
std::vector<uint32_t> JFJochStateMachine::GetUserPixelMask() const {
std::unique_lock<std::mutex> ul(m);
std::unique_lock ul(m);
if (state == JFJochState::Inactive)
return {};
return pixel_mask.GetUserMask(experiment);
}
void JFJochStateMachine::SetUserPixelMask(const std::vector<uint32_t> &v) {
std::unique_lock<std::mutex> ul(m);
std::unique_lock ul(m);
if (state != JFJochState::Idle)
throw WrongDAQStateException ("User mask can be only modified in Idle state");
throw WrongDAQStateException("User mask can be only modified in Idle state");
try {
pixel_mask.LoadUserMask(experiment, v);
@@ -688,49 +811,61 @@ void JFJochStateMachine::SetUserPixelMask(const std::vector<uint32_t> &v) {
}
InstrumentMetadata JFJochStateMachine::GetInstrumentMetadata() const {
std::unique_lock<std::mutex> ul(m);
std::unique_lock ul(experiment_instrument_metadata_mutex);
return experiment.GetInstrumentMetadata();
}
void JFJochStateMachine::LoadInstrumentMetadata(const InstrumentMetadata &settings) {
std::unique_lock<std::mutex> ul(m);
std::unique_lock ul(m);
if (IsRunning())
throw WrongDAQStateException ("Cannot change instrument metadata during data collection");
experiment.ImportInstrumentMetadata(settings);
throw WrongDAQStateException("Cannot change instrument metadata during data collection");
{
std::unique_lock ul2(experiment_instrument_metadata_mutex);
experiment.ImportInstrumentMetadata(settings);
}
}
ImageFormatSettings JFJochStateMachine::GetImageFormatSettings() const {
std::unique_lock<std::mutex> ul(m);
std::unique_lock ul(experiment_image_format_settings_mutex);
return experiment.GetImageFormatSettings();
}
void JFJochStateMachine::LoadImageFormatSettings(const ImageFormatSettings &settings) {
std::unique_lock<std::mutex> ul(m);
std::unique_lock ul(m);
if (IsRunning())
throw WrongDAQStateException ("Cannot change instrument metadata during data collection");
throw WrongDAQStateException("Cannot change image format settings during data collection");
bool recalc_mask = (experiment.GetPedestalG0RMSLimit() != settings.GetPedestalG0RMSLimit());
{
std::unique_lock ul2(experiment_image_format_settings_mutex);
experiment.ImportImageFormatSettings(settings);
}
if (recalc_mask)
pixel_mask.LoadDetectorBadPixelMask(experiment, calibration.get());
else
pixel_mask.CalcEdgePixels(experiment);
experiment.ImportImageFormatSettings(settings);
pixel_mask.Update(settings);
UpdatePixelMaskStatistics(pixel_mask.GetStatistics());
}
void JFJochStateMachine::RawImageFormatSettings() {
std::unique_lock<std::mutex> ul(m);
std::unique_lock ul(m);
if (IsRunning())
throw WrongDAQStateException ("Cannot change instrument metadata during data collection");
throw WrongDAQStateException("Cannot change instrument metadata during data collection");
experiment.Raw();
}
void JFJochStateMachine::ConvImageFormatSettings() {
std::unique_lock<std::mutex> ul(m);
std::unique_lock ul(m);
if (IsRunning())
throw WrongDAQStateException ("Cannot change instrument metadata during data collection");
throw WrongDAQStateException("Cannot change instrument metadata during data collection");
experiment.Conversion();
}
@@ -746,3 +881,80 @@ void JFJochStateMachine::SetPreviewSocketSettings(const ZMQPreviewSettings &inpu
ZMQPreviewSettings JFJochStateMachine::GetPreviewSocketSettings() {
return services.GetPreviewSocketSettings();
}
void JFJochStateMachine::SetMetadataSocketSettings(const ZMQMetadataSettings &input) {
services.SetMetadataSocketSettings(input);
}
ZMQMetadataSettings JFJochStateMachine::GetMetadataSocketSettings() {
return services.GetMetadataSocketSettings();
}
void JFJochStateMachine::GetStartMessageFromBuffer(std::vector<uint8_t> &v) {
return services.GetStartMessageFromBuffer(v);
}
void JFJochStateMachine::GetImageFromBuffer(std::vector<uint8_t> &v, int64_t image_number) {
services.GetImageFromBuffer(v, image_number);
}
ImageBufferStatus JFJochStateMachine::GetImageBufferStatus() const {
return services.GetImageBufferStatus();
}
void JFJochStateMachine::ClearImageBuffer() const {
std::unique_lock ul(m);
if (IsRunning())
throw WrongDAQStateException("Cannot clear image buffer during data collection");
services.ClearImageBuffer();
}
FileWriterSettings JFJochStateMachine::GetFileWriterSettings() const {
std::unique_lock ul(experiment_file_writer_settings_mutex);
return experiment.GetFileWriterSettings();
}
void JFJochStateMachine::LoadFileWriterSettings(const FileWriterSettings &settings) {
std::unique_lock ul(m);
if (IsRunning())
throw WrongDAQStateException("Cannot change instrument metadata during data collection");
{
std::unique_lock ul2(experiment_file_writer_settings_mutex);
experiment.ImportFileWriterSettings(settings);
}
}
IndexingSettings JFJochStateMachine::GetIndexingSettings() const {
std::unique_lock ul(experiment_indexing_settings_mutex);
return experiment.GetIndexingSettings();
}
void JFJochStateMachine::SetIndexingSettings(const IndexingSettings &input) {
std::unique_lock ul(m);
if (IsRunning())
throw WrongDAQStateException("Cannot change instrument metadata during data collection");
{
std::unique_lock ul2(experiment_indexing_settings_mutex);
experiment.ImportIndexingSettings(input);
try {
services.SetupIndexing(input);
} catch (const JFJochException &e) {
logger.ErrorException(e);
SetState(JFJochState::Error,
e.what(),
BrokerStatus::MessageSeverity::Error);
throw;
}
}
}
std::optional<ScanResult> JFJochStateMachine::GetScanResult() const {
std::unique_lock ul(m);
if (IsRunning())
throw WrongDAQStateException("Cannot check scan result, when running");
return scan_result;
}

View File

@@ -1,4 +1,5 @@
// Copyright (2019-2023) Paul Scherrer Institute
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#ifndef JUNGFRAUJOCH_JFJOCHSTATEMACHINE_H
#define JUNGFRAUJOCH_JFJOCHSTATEMACHINE_H
@@ -18,8 +19,11 @@
enum class JFJochState {Inactive, Idle, Measuring, Error, Busy, Pedestal};
struct BrokerStatus {
JFJochState broker_state;
JFJochState state = JFJochState::Inactive;
std::optional<float> progress;
std::optional<std::string> message;
enum class MessageSeverity {Error, Info, Warning, Success} message_severity = MessageSeverity::Error;
int64_t gpu_count;
};
struct DetectorListElement {
@@ -30,6 +34,11 @@ struct DetectorListElement {
int64_t nmodules;
int64_t width;
int64_t height;
std::chrono::microseconds readout_time;
std::chrono::microseconds min_frame_time;
std::chrono::microseconds min_count_time;
DetectorType detector_type;
float pixel_size_mm;
};
struct DetectorList {
@@ -51,7 +60,7 @@ struct MeasurementStatistics {
std::optional<float> compression_ratio;
bool cancelled;
int64_t max_receive_delay;
std::optional<int64_t> max_receive_delay;
std::optional<float> indexing_rate;
@@ -63,29 +72,40 @@ struct MeasurementStatistics {
std::optional<std::pair<float, float>> beam_center_drift_pxl;
std::string unit_cell;
std::optional<float> error_pixels;
std::optional<float> saturated_pixels;
std::optional<float> roi_beam_npixel;
std::optional<float> roi_beam_sum;
};
class JFJochStateMachine {
Logger &logger;
JFJochServices &services;
std::future<void> measurement;
// assuming immutable during normal operation
std::vector<DetectorSetup> detector_setup;
std::vector<JFModuleGainCalibration> gain_calibration;
mutable std::mutex experiment_detector_settings_mutex;
mutable std::mutex experiment_azimuthal_integration_settings_mutex;
mutable std::mutex experiment_instrument_metadata_mutex;
mutable std::mutex experiment_image_format_settings_mutex;
mutable std::mutex experiment_file_writer_settings_mutex;
mutable std::mutex experiment_indexing_settings_mutex;
DiffractionExperiment experiment;
// mutex m is protecting:
mutable std::mutex m;
std::condition_variable c;
// mutex m is protecting:
volatile JFJochState state = JFJochState::Inactive;
volatile JFJochState state = JFJochState::Inactive; // state should not be set directly, but through SetState function
volatile bool cancel_sequence = false;
std::unique_ptr<JFCalibration> calibration;
PixelMask pixel_mask;
std::vector<JFModuleGainCalibration> gain_calibration;
std::vector<DetectorSetup> detector_setup;
int64_t current_detector_setup;
std::future<void> measurement;
int64_t current_detector_setup; // Lock only on change
std::optional<ScanResult> scan_result;
mutable std::mutex calibration_statistics_mutex;
std::vector<JFCalibrationModuleStatistics> calibration_statistics;
@@ -96,31 +116,48 @@ class JFJochStateMachine {
mutable std::mutex pixel_mask_statistics_mutex;
PixelMaskStatistics pixel_mask_statistics;
mutable std::mutex broker_status_mutex;
BrokerStatus broker_status;
mutable std::mutex roi_mutex;
ROIDefinition roi;
bool indexing_possible;
bool resolution_estimate_possible;
const int32_t gpu_count;
void UpdatePixelMaskStatistics(const PixelMaskStatistics &input);
// Private functions assume that lock m is acquired
void SetState(JFJochState curr_state,
const std::optional<std::string> &message = {},
BrokerStatus::MessageSeverity message_severity = BrokerStatus::MessageSeverity::Info);
void MeasurementThread();
void PedestalThread(std::unique_lock<std::mutex> ul);
void InitializeThread(std::unique_lock<std::mutex> ul);
bool ImportPedestalG1G2(const JFJochReceiverOutput &receiver_output, size_t gain_level, size_t storage_cell = 0);
bool ImportPedestalG0(const JFJochReceiverOutput &receiver_output);
bool IsRunning() const; // Is state Busy/Pedestal/Measure
std::optional<std::string> CheckError();
void ResetError() noexcept;
void TakePedestalInternalAll(std::unique_lock<std::mutex> &ul);
void TakePedestalInternalG0(std::unique_lock<std::mutex> &ul);
void TakePedestalInternalG1(std::unique_lock<std::mutex> &ul, int32_t storage_cell = 0);
void TakePedestalInternalG2(std::unique_lock<std::mutex> &ul, int32_t storage_cell = 0);
void ImportDetectorSettings(const DetectorSettings& input);
bool ImportDetectorSettings(const DetectorSettings& input);
void UpdateROIDefinition();
public:
JFJochStateMachine(JFJochServices &in_services, Logger &logger);
JFJochStateMachine(const DiffractionExperiment& experiment,
JFJochServices &in_services,
Logger &logger);
~JFJochStateMachine();
void Initialize();
void Pedestal();
void Deactivate();
void Start(const DatasetSettings& settings);
JFJochState WaitTillMeasurementDone();
JFJochState WaitTillMeasurementDone(std::chrono::milliseconds timeout);
BrokerStatus WaitTillMeasurementDone();
BrokerStatus WaitTillMeasurementDone(std::chrono::milliseconds timeout);
void Trigger();
void Cancel();
@@ -133,6 +170,9 @@ public:
InstrumentMetadata GetInstrumentMetadata() const;
void LoadInstrumentMetadata(const InstrumentMetadata& settings);
FileWriterSettings GetFileWriterSettings() const;
void LoadFileWriterSettings(const FileWriterSettings& settings);
ImageFormatSettings GetImageFormatSettings() const;
void LoadImageFormatSettings(const ImageFormatSettings& settings);
void RawImageFormatSettings();
@@ -148,9 +188,6 @@ public:
void SetSpotFindingSettings(const SpotFindingSettings& settings);
SpotFindingSettings GetSpotFindingSettings() const;
JFJochState GetState() const;
void AddDetectorSetup(const DetectorSetup& setup);
DetectorList GetDetectorsList() const;
void SelectDetector(int64_t id);
std::optional<DetectorStatus> GetDetectorStatus() const;
@@ -158,24 +195,23 @@ public:
void SetRadialIntegrationSettings(const AzimuthalIntegrationSettings& settings);
AzimuthalIntegrationSettings GetRadialIntegrationSettings() const;
std::string GetPreviewJPEG(const PreviewJPEGSettings& settings) const;
std::string GetPreviewTIFF(bool calibration) const;
std::string GetPreviewJPEG(const PreviewImageSettings& settings, int64_t image_number) const;
std::string GetPreviewTIFF(int64_t image_number) const;
std::string GetPedestalTIFF(size_t gain_level, size_t sc) const;
void LoadInternalGeneratorImage(const void *data, size_t size, uint64_t image_number);
void LoadInternalGeneratorImageTIFF(const std::string &s, uint64_t image_number);
// Not thread safe - only for configuration in serial context
DiffractionExperiment& NotThreadSafe_Experiment();
DiffractionExperiment Experiment();
// Function for debug only - UNSAFE for real operation
void DebugOnly_SetState(JFJochState state);
void DebugOnly_SetState(JFJochState state,
const std::optional<std::string> &message = {},
BrokerStatus::MessageSeverity message_severity = BrokerStatus::MessageSeverity::Info);
void SetBoxROI(const std::vector<ROIBox>& input);
void SetCircleROI(const std::vector<ROICircle>& input);
std::vector<ROIBox> GetBoxROI() const;
std::vector<ROICircle> GetCircleROI() const;
void SetROIDefinition(const ROIDefinition& input);
ROIDefinition GetROIDefintion() const;
std::vector<uint64_t> GetXFELPulseID() const;
std::vector<uint64_t> GetXFELEventCode() const;
@@ -192,7 +228,20 @@ public:
void SetPreviewSocketSettings(const ZMQPreviewSettings &input);
ZMQPreviewSettings GetPreviewSocketSettings();
void SetMetadataSocketSettings(const ZMQMetadataSettings &input);
ZMQMetadataSettings GetMetadataSocketSettings();
void SetIndexingSettings(const IndexingSettings &input);
IndexingSettings GetIndexingSettings() const;
PixelMaskStatistics GetPixelMaskStatistics() const;
void GetStartMessageFromBuffer(std::vector<uint8_t> &v);
void GetImageFromBuffer(std::vector<uint8_t> &v, int64_t image_number = -1);
ImageBufferStatus GetImageBufferStatus() const;
void ClearImageBuffer() const;
void AddDetectorSetup(const DetectorSetup& setup); // Not thread safe, only during setup
std::optional<ScanResult> GetScanResult() const;
};

View File

@@ -1,4 +1,5 @@
// Copyright (2019-2024) Paul Scherrer Institute
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#include "OpenAPIConvert.h"
@@ -18,11 +19,9 @@ SpotFindingSettings Convert(const org::openapitools::server::model::Spot_finding
ret.low_resolution_limit = input.getLowResolutionLimit();
ret.enable = input.isEnable();
ret.indexing = input.isIndexing();
ret.indexing_tolerance = input.getIndexingTolerance();
if (input.filterPowderRingsIsSet())
ret.filter_spots_powder_ring = input.isFilterPowderRings();
if (input.minSpotCountPowderRingIsSet())
ret.min_spot_count_powder_ring = input.getMinSpotCountPowderRing();
ret.quick_integration = input.isQuickIntegration();
ret.cutoff_spot_count_low_res = input.getHighResolutionLimitForSpotCountLowRes();
return ret;
}
@@ -36,9 +35,8 @@ org::openapitools::server::model::Spot_finding_settings Convert(const SpotFindin
ret.setLowResolutionLimit(input.low_resolution_limit);
ret.setEnable(input.enable);
ret.setIndexing(input.indexing);
ret.setIndexingTolerance(input.indexing_tolerance);
ret.setFilterPowderRings(input.filter_spots_powder_ring);
ret.setMinSpotCountPowderRing(input.min_spot_count_powder_ring);
ret.setHighResolutionLimitForSpotCountLowRes(input.cutoff_spot_count_low_res);
ret.setQuickIntegration(input.quick_integration);
return ret;
}
@@ -60,12 +58,23 @@ org::openapitools::server::model::Measurement_statistics Convert(const Measureme
ret.setCompressionRatio(input.compression_ratio.value());
ret.setCancelled(input.cancelled);
ret.setMaxReceiverDelay(input.max_receive_delay);
if (input.max_receive_delay)
ret.setMaxReceiverDelay(input.max_receive_delay.value());
ret.setDetectorWidth(input.detector_width);
ret.setDetectorHeight(input.detector_height);
ret.setDetectorPixelDepth(input.detector_pixel_depth);
if (input.roi_beam_npixel)
ret.setRoiBeamPixels(input.roi_beam_npixel.value());
if (input.roi_beam_sum)
ret.setRoiBeamSum(input.roi_beam_sum.value());
if (input.error_pixels)
ret.setErrorPixels(input.error_pixels.value());
if (input.saturated_pixels)
ret.setSaturatedPixels(input.saturated_pixels.value());
if (input.indexing_rate)
ret.setIndexingRate(input.indexing_rate.value());
@@ -185,7 +194,7 @@ org::openapitools::server::model::Detector_settings Convert(const DetectorSettin
org::openapitools::server::model::Broker_status Convert(const BrokerStatus& input) {
org::openapitools::server::model::Broker_status ret;
switch (input.broker_state) {
switch (input.state) {
case JFJochState::Inactive:
ret.setState("Inactive");
break;
@@ -205,9 +214,28 @@ org::openapitools::server::model::Broker_status Convert(const BrokerStatus& inpu
ret.setState("Pedestal");
break;
}
if (input.message.has_value())
ret.setMessage(input.message.value());
switch (input.message_severity) {
case BrokerStatus::MessageSeverity::Info:
ret.setMessageSeverity("info");
break;
case BrokerStatus::MessageSeverity::Success:
ret.setMessageSeverity("success");
break;
case BrokerStatus::MessageSeverity::Warning:
ret.setMessageSeverity("warning");
break;
default:
ret.setMessageSeverity("error");
break;
}
if (input.progress.has_value())
ret.setProgress(input.progress.value());
ret.setGpuCount(input.gpu_count);
return ret;
}
@@ -241,6 +269,7 @@ org::openapitools::server::model::Instrument_metadata Convert(const InstrumentMe
output.setSourceName(input.GetSourceName());
output.setSourceType(input.GetSourceType());
output.setPulsedSource(input.IsPulsedSource());
output.setElectronSource(input.IsElectronSource());
return output;
}
@@ -249,7 +278,8 @@ InstrumentMetadata Convert(const org::openapitools::server::model::Instrument_me
output.InstrumentName(input.getInstrumentName())
.SourceName(input.getSourceName())
.SourceType(input.getSourceType())
.PulsedSource(input.isPulsedSource());
.PulsedSource(input.isPulsedSource())
.ElectronSource(input.isElectronSource());
return output;
}
@@ -305,11 +335,27 @@ org::openapitools::server::model::Detector_status Convert(const DetectorStatus &
return output;
}
org::openapitools::server::model::Detector_type Convert(const DetectorType &input) {
org::openapitools::server::model::Detector_type dt;
switch (input) {
case DetectorType::EIGER:
dt.setValue(org::openapitools::server::model::Detector_type::eDetector_type::EIGER);
break;
case DetectorType::JUNGFRAU:
dt.setValue(org::openapitools::server::model::Detector_type::eDetector_type::JUNGFRAU);
break;
case DetectorType::DECTRIS:
dt.setValue(org::openapitools::server::model::Detector_type::eDetector_type::DECTRIS);
break;
}
return dt;
}
org::openapitools::server::model::Detector_list Convert(const DetectorList &input) {
org::openapitools::server::model::Detector_list ret;
std::vector<org::openapitools::server::model::Detector_list_detectors_inner> dets;
std::vector<org::openapitools::server::model::Detector_list_element> dets;
for (int i = 0; i < input.detector.size(); i++) {
org::openapitools::server::model::Detector_list_detectors_inner d;
org::openapitools::server::model::Detector_list_element d;
d.setId(i);
d.setDescription(input.detector[i].description);
d.setNmodules(input.detector[i].nmodules);
@@ -318,6 +364,11 @@ org::openapitools::server::model::Detector_list Convert(const DetectorList &inpu
d.setSerialNumber(input.detector[i].serial_number);
d.setBaseIpv4Addr(input.detector[i].base_ipv4_addr);
d.setUdpInterfaceCount(input.detector[i].udp_interface_count);
d.setMinFrameTimeUs(input.detector[i].min_frame_time.count());
d.setMinCountTimeUs(input.detector[i].min_count_time.count());
d.setReadoutTimeUs(input.detector[i].readout_time.count());
d.setPixelSizeMm(input.detector[i].pixel_size_mm);
d.setType(Convert(input.detector[i].detector_type));
dets.emplace_back(std::move(d));
}
ret.setDetectors(dets);
@@ -326,52 +377,83 @@ org::openapitools::server::model::Detector_list Convert(const DetectorList &inpu
}
org::openapitools::server::model::Plots Convert(const MultiLinePlot& input) {
std::vector<org::openapitools::server::model::Plot> tmp(input.size());
for (int i = 0; i < input.size(); i++) {
tmp[i].setTitle(input[i].title);
tmp[i].setX(input[i].x);
tmp[i].setY(input[i].y);
std::vector<org::openapitools::server::model::Plot> tmp(input.GetPlots().size());
for (int i = 0; i < input.GetPlots().size(); i++) {
tmp[i].setTitle(input.GetPlots()[i].title);
tmp[i].setX(input.GetPlots()[i].x);
tmp[i].setY(input.GetPlots()[i].y);
tmp[i].setZ(input.GetPlots()[i].z);
}
org::openapitools::server::model::Plots output;
output.setPlot(tmp);
org::openapitools::server::model::Plot_unit_x unit;
switch (input.GetUnits()) {
case MultiLinePlotUnits::ImageNumber:
unit.setValue(org::openapitools::server::model::Plot_unit_x::ePlot_unit_x::IMAGE_NUMBER);
break;
case MultiLinePlotUnits::Angle_deg:
unit.setValue(org::openapitools::server::model::Plot_unit_x::ePlot_unit_x::ANGLE_DEG);
break;
case MultiLinePlotUnits::Q_recipA:
unit.setValue(org::openapitools::server::model::Plot_unit_x::ePlot_unit_x::Q_RECIPA);
break;
case MultiLinePlotUnits::ADU:
unit.setValue(org::openapitools::server::model::Plot_unit_x::ePlot_unit_x::ADU);
break;
case MultiLinePlotUnits::d_A:
unit.setValue(org::openapitools::server::model::Plot_unit_x::ePlot_unit_x::D_A);
break;
case MultiLinePlotUnits::Grid_um:
unit.setValue(org::openapitools::server::model::Plot_unit_x::ePlot_unit_x::GRID_UM);
break;
default:
break;
}
output.setUnitX(unit);
if (input.GetSizeX().has_value())
output.setSizeX(input.GetSizeX().value());
if (input.GetSizeY().has_value())
output.setSizeY(input.GetSizeY().value());
return output;
}
AzimuthalIntegrationSettings Convert(const org::openapitools::server::model::Azim_int_settings& input) {
AzimuthalIntegrationSettings ret{};
ret.SolidAngleCorrection(input.isSolidAngleCorr());
if (input.polarizationFactorIsSet())
ret.PolarizationFactor(input.getPolarizationFactor());
ret.PolarizationCorrection(input.isPolarizationCorr());
ret.QSpacing_recipA(input.getQSpacing());
ret.LowQ_recipA(input.getLowQRecipA());
ret.HighQ_recipA(input.getHighQRecipA());
ret.QRange_recipA(input.getLowQRecipA(), input.getHighQRecipA());
ret.AzimuthalBinCount(input.getAzimuthalBins());
return ret;
}
org::openapitools::server::model::Azim_int_settings Convert(const AzimuthalIntegrationSettings& settings) {
org::openapitools::server::model::Azim_int_settings ret{};
ret.setSolidAngleCorr(settings.IsSolidAngleCorrection());
if (settings.GetPolarizationFactor().has_value())
ret.setPolarizationFactor(settings.GetPolarizationFactor().value());
ret.setPolarizationCorr(settings.IsPolarizationCorrection());
ret.setHighQRecipA(settings.GetHighQ_recipA());
ret.setLowQRecipA(settings.GetLowQ_recipA());
ret.setQSpacing(settings.GetQSpacing_recipA());
ret.setAzimuthalBins(settings.GetAzimuthalBinCount());
return ret;
}
std::vector<ROIBox> Convert(const org::openapitools::server::model::Roi_box_list& input) {
std::vector<ROIBox> ret;
for (const auto &i: input.getRois())
ret.emplace_back(ROIBox(i.getName(), i.getMinXPxl(), i.getMaxXPxl(), i.getMinYPxl(), i.getMaxYPxl()));
return ret;
}
std::vector<ROICircle> Convert(const org::openapitools::server::model::Roi_circle_list& input) {
std::vector<ROICircle> ret;
for (const auto &i: input.getRois())
ret.emplace_back(ROICircle(i.getName(), i.getCenterXPxl(), i.getCenterYPxl(), i.getRadiusPxl()));
return ret;
ROIDefinition Convert(const org::openapitools::server::model::Roi_definitions& input) {
ROIDefinition output{};
for (const auto &i: input.getBox().getRois())
output.boxes.emplace_back(ROIBox(i.getName(), i.getMinXPxl(), i.getMaxXPxl(), i.getMinYPxl(), i.getMaxYPxl()));
for (const auto &i: input.getCircle().getRois())
output.circles.emplace_back(ROICircle(i.getName(), i.getCenterXPxl(), i.getCenterYPxl(), i.getRadiusPxl()));
for (const auto &i: input.getAzim().getRois())
output.azimuthal.emplace_back(ROIAzimuthal(i.getName(),
(i.getQMaxRecipA() == 0.0) ? 0.0 : 2.0f * M_PI / i.getQMaxRecipA(),
(i.getQMinRecipA() == 0.0) ? 0.0 : 2.0f * M_PI / i.getQMinRecipA()));
return output;
}
org::openapitools::server::model::Roi_circle_list Convert(const std::vector<ROICircle> &input) {
@@ -389,6 +471,19 @@ org::openapitools::server::model::Roi_circle_list Convert(const std::vector<ROIC
return ret;
}
org::openapitools::server::model::Roi_azim_list Convert(const std::vector<ROIAzimuthal> &input) {
org::openapitools::server::model::Roi_azim_list ret{};
std::vector<org::openapitools::server::model::Roi_azimuthal> tmp;
for (const auto &i: input) {
org::openapitools::server::model::Roi_azimuthal elem;
elem.setName(i.GetName());
elem.setQMinRecipA(i.GetQMin_recipA());
elem.setQMaxRecipA(i.GetQMax_recipA());
tmp.emplace_back(elem);
}
ret.setRois(tmp);
return ret;
}
org::openapitools::server::model::Roi_box_list Convert(const std::vector<ROIBox> &input) {
org::openapitools::server::model::Roi_box_list ret{};
@@ -406,16 +501,11 @@ org::openapitools::server::model::Roi_box_list Convert(const std::vector<ROIBox>
return ret;
}
PreviewJPEGSettings Convert(const org::openapitools::server::model::Preview_settings& input) {
PreviewJPEGSettings ret{};
ret.show_spots = input.isShowSpots();
ret.jpeg_quality = input.getJpegQuality();
ret.saturation_value = input.getSaturation();
ret.show_roi = input.isShowRoi();
ret.show_indexed = input.isShowIndexed();
ret.show_user_mask = input.isShowUserMask();
if (input.resolutionRingIsSet())
ret.resolution_ring = input.getResolutionRing();
org::openapitools::server::model::Roi_definitions Convert(const ROIDefinition &input) {
org::openapitools::server::model::Roi_definitions ret{};
ret.setCircle(Convert(input.circles));
ret.setBox(Convert(input.boxes));
ret.setAzim(Convert(input.azimuthal));
return ret;
}
@@ -457,6 +547,28 @@ org::openapitools::server::model::Image_format_settings Convert(const ImageForma
return ret;
}
Coord ConvertOpenAPI(const std::vector<float> &input) {
if (input.size() != 3)
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, "Wrong size of Coord array");
return {input[0], input[1], input[2]};
}
GoniometerAxis Convert(const org::openapitools::server::model::Rotation_axis& input) {
std::optional<Coord> helical;
if (input.helicalStepUmIsSet())
helical = ConvertOpenAPI(input.getHelicalStepUm());
GoniometerAxis axis{input.getName(), input.getStart(), input.getStep(),
ConvertOpenAPI(input.getVector()), helical};
if (input.screeningWedgeDegIsSet())
axis.ScreeningWedge(input.getScreeningWedgeDeg());
return axis;
}
GridScanSettings Convert(const org::openapitools::server::model::Grid_scan& input) {
return {input.getNFast(), input.getStepXUm(), input.getStepYUm(), input.isSnake(), input.isVertical()};
}
DatasetSettings Convert(const org::openapitools::server::model::Dataset_settings& input) {
DatasetSettings ret;
@@ -511,19 +623,11 @@ DatasetSettings Convert(const org::openapitools::server::model::Dataset_settings
ret.TotalFlux(input.getTotalFlux());
if (input.transmissionIsSet())
ret.AttenuatorTransmission(input.getTransmission());
if (input.goniometerIsSet())
ret.Goniometer(Convert(input.getGoniometer()));
else if (input.gridScanIsSet())
ret.GridScan(Convert(input.getGridScan()));
if (input.goniometerIsSet()) {
ret.Goniometer(GoniometerAxis{
.name = input.getGoniometer().getName(),
.increment = input.getGoniometer().getStep(),
.start = input.getGoniometer().getStart()
});
if (input.getGoniometer().getVector().size() == 3) {
auto v = input.getGoniometer().getVector();
ret.RotationAxis(Coord(v[0], v[1], v[2]));
} else
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, "Rotation axis must be provided");
}
if (input.spaceGroupNumberIsSet())
ret.SpaceGroupNumber(input.getSpaceGroupNumber());
ret.SampleName(input.getSampleName());
@@ -542,6 +646,21 @@ DatasetSettings Convert(const org::openapitools::server::model::Dataset_settings
ret.WriteNXmxHDF5Master(input.isWriteNxmxHdf5Master());
if (input.polarizationFactorIsSet())
ret.PolarizationFactor(input.getPolarizationFactor());
ret.PoniRot1_rad(input.getPoniRot1Rad());
ret.PoniRot2_rad(input.getPoniRot2Rad());
ret.PoniRot3_rad(input.getPoniRot3Rad());
if (input.ringCurrentMAIsSet())
ret.RingCurrent_mA(input.getRingCurrentMA());
if (input.sampleTemperatureKIsSet())
ret.SampleTemperature_K(input.getSampleTemperatureK());
ret.SpotFindingEnable(input.isSpotFinding());
ret.MaxSpotCount(input.getMaxSpotCount());
return ret;
}
@@ -562,6 +681,8 @@ std::vector<org::openapitools::server::model::Fpga_status_inner> Convert(const s
tmp.setPowerUsageW(static_cast<float>(d.fpga_pcie_12V_I_mA * d.fpga_pcie_12V_V_mV + d.fpga_pcie_3p3V_I_mA
* d.fpga_pcie_3p3V_V_mV) / (1000.0f * 1000.0f));
tmp.setIdle(d.idle);
tmp.setPcieLinkSpeed(d.pcie_link_speed);
tmp.setPcieLinkWidth(d.pcie_link_width);
ret.emplace_back(std::move(tmp));
}
return ret;
@@ -573,7 +694,16 @@ ZMQPreviewSettings Convert(const org::openapitools::server::model::Zeromq_previe
ret.period = std::chrono::milliseconds(input.getPeriodMs());
else
ret.period = {};
ret.send_start_message = input.isSendStartMessage();
ret.address = "";
return ret;
}
ZMQMetadataSettings Convert(const org::openapitools::server::model::Zeromq_metadata_settings &input) {
ZMQMetadataSettings ret;
if (input.isEnabled())
ret.period = std::chrono::milliseconds(input.getPeriodMs());
else
ret.period = {};
ret.address = "";
return ret;
}
@@ -584,7 +714,15 @@ org::openapitools::server::model::Zeromq_preview_settings Convert(const ZMQPrevi
if (settings.period.has_value())
ret.setPeriodMs(settings.period.value().count() / 1000);
ret.setSocketAddress(settings.address);
ret.setSendStartMessage(settings.send_start_message);
return ret;
}
org::openapitools::server::model::Zeromq_metadata_settings Convert(const ZMQMetadataSettings &settings) {
org::openapitools::server::model::Zeromq_metadata_settings ret;
ret.setEnabled(settings.period.has_value());
if (settings.period.has_value())
ret.setPeriodMs(settings.period.value().count() / 1000);
ret.setSocketAddress(settings.address);
return ret;
}
@@ -595,3 +733,272 @@ org::openapitools::server::model::Pixel_mask_statistics Convert(const PixelMaskS
ret.setTooHighPedestalRms(input.too_high_pedestal_rms);
return ret;
}
org::openapitools::server::model::Image_buffer_status Convert(const ImageBufferStatus& input) {
org::openapitools::server::model::Image_buffer_status ret;
ret.setAvailableSlots(input.available_slots);
ret.setTotalSlots(input.total_slots);
ret.setImageNumbers(input.images_in_the_buffer);
ret.setMaxImageNumber(input.max_image_number);
ret.setMinImageNumber(input.min_image_number);
return ret;
}
org::openapitools::server::model::File_writer_settings Convert(const FileWriterSettings& input) {
org::openapitools::server::model::File_writer_settings ret;
ret.setFormat(Convert(input.GetHDF5MasterFormatVersion()));
ret.setOverwrite(input.IsOverwriteExistingFiles());
return ret;
}
FileWriterSettings Convert(const org::openapitools::server::model::File_writer_settings &input) {
FileWriterSettings ret;
ret.OverwriteExistingFiles(input.isOverwrite());
ret.HDF5MasterFormatVersion(Convert(input.getFormat()));
return ret;
}
org::openapitools::server::model::File_writer_format Convert(FileWriterFormat input) {
org::openapitools::server::model::File_writer_format ret;
switch (input) {
case FileWriterFormat::DataOnly:
ret.setValue(org::openapitools::server::model::File_writer_format::eFile_writer_format::NONE);
break;
case FileWriterFormat::NXmxLegacy:
ret.setValue(org::openapitools::server::model::File_writer_format::eFile_writer_format::NXMXLEGACY);
break;
case FileWriterFormat::NXmxVDS:
ret.setValue(org::openapitools::server::model::File_writer_format::eFile_writer_format::NXMXVDS);
break;
case FileWriterFormat::CBF:
ret.setValue(org::openapitools::server::model::File_writer_format::eFile_writer_format::CBF);
break;
case FileWriterFormat::TIFF:
ret.setValue(org::openapitools::server::model::File_writer_format::eFile_writer_format::TIFF);
break;
default:
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, "Unknown file writer format enum value");
}
return ret;
}
FileWriterFormat Convert(const org::openapitools::server::model::File_writer_format& input) {
switch (input.getValue()) {
case org::openapitools::server::model::File_writer_format::eFile_writer_format::NONE:
return FileWriterFormat::DataOnly;
case org::openapitools::server::model::File_writer_format::eFile_writer_format::NXMXLEGACY:
return FileWriterFormat::NXmxLegacy;
case org::openapitools::server::model::File_writer_format::eFile_writer_format::NXMXVDS:
return FileWriterFormat::NXmxVDS;
case org::openapitools::server::model::File_writer_format::eFile_writer_format::CBF:
return FileWriterFormat::CBF;
case org::openapitools::server::model::File_writer_format::eFile_writer_format::TIFF:
return FileWriterFormat::TIFF;
default:
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
"Unknown file writer format enum value");
}
}
PlotType ConvertPlotType(const std::optional<std::string>& input) {
if (!input.has_value())
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
"Plot type is compulsory paramater");
if (input == "bkg_estimate") return PlotType::BkgEstimate;
if (input == "azint") return PlotType::AzInt;
if (input == "azint_1d") return PlotType::AzInt1D;
if (input == "spot_count") return PlotType::SpotCount;
if (input == "spot_count_low_res") return PlotType::SpotCountLowRes;
if (input == "spot_count_indexed") return PlotType::SpotCountIndexed;
if (input == "spot_count_ice") return PlotType::SpotCountIceRing;
if (input == "indexing_rate") return PlotType::IndexingRate;
if (input == "indexing_unit_cell_length") return PlotType::IndexingUnitCellLength;
if (input == "profile_radius") return PlotType::ProfileRadius;
if (input == "b_factor") return PlotType::BFactor;
if (input == "indexing_unit_cell_angle") return PlotType::IndexingUnitCellAngle;
if (input == "error_pixels") return PlotType::ErrorPixels;
if (input == "strong_pixels") return PlotType::StrongPixels;
if (input == "saturated_pixels") return PlotType::SaturatedPixels;
if (input == "image_collection_efficiency") return PlotType::ImageCollectionEfficiency;
if (input == "receiver_delay") return PlotType::ReceiverDelay;
if (input == "receiver_free_send_buf") return PlotType::ReceiverFreeSendBuf;
if (input == "roi_sum") return PlotType::ROISum;
if (input == "roi_mean") return PlotType::ROIMean;
if (input == "roi_max_count") return PlotType::ROIMaxCount;
if (input == "roi_pixels") return PlotType::ROIPixels;
if (input == "roi_weighted_x") return PlotType::ROIWeightedX;
if (input == "roi_weighted_y") return PlotType::ROIWeightedY;
if (input == "packets_received") return PlotType::PacketsReceived;
if (input == "max_pixel_value") return PlotType::MaxValue;
if (input == "resolution_estimate") return PlotType::ResolutionEstimate;
if (input == "indexing_time") return PlotType::IndexingTime;
if (input == "pixel_sum") return PlotType::PixelSum;
if (input == "processing_time") return PlotType::ImageProcessingTime;
if (input == "beam_center_x") return PlotType::RefinementBeamX;
if (input == "beam_center_y") return PlotType::RefinementBeamY;
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
"Plot type not recognized");
}
ColorScaleEnum ConvertColorScale(const std::optional<std::string>& input) {
std::string color = input.value_or("indigo");
if (color == "viridis")
return ColorScaleEnum::Viridis;
else if (color == "bw")
return ColorScaleEnum::BW;
else if (color == "heat")
return ColorScaleEnum::Heat;
else if (color == "indigo")
return ColorScaleEnum::Indigo;
else
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
"Color scale unknown");
}
IndexingSettings Convert(const org::openapitools::server::model::Indexing_settings &input) {
IndexingSettings ret;
switch (input.getAlgorithm().getValue()) {
case org::openapitools::server::model::Indexing_algorithm::eIndexing_algorithm::FFT:
ret.Algorithm(IndexingAlgorithmEnum::FFT);
break;
case org::openapitools::server::model::Indexing_algorithm::eIndexing_algorithm::NONE:
ret.Algorithm(IndexingAlgorithmEnum::None);
break;
case org::openapitools::server::model::Indexing_algorithm::eIndexing_algorithm::FFBIDX:
ret.Algorithm(IndexingAlgorithmEnum::FFBIDX);
break;
case org::openapitools::server::model::Indexing_algorithm::eIndexing_algorithm::AUTO:
ret.Algorithm(IndexingAlgorithmEnum::Auto);
break;
default:
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, "Unknown indexing algorithm");
}
switch (input.getGeomRefinementAlgorithm().getValue()) {
case org::openapitools::server::model::Geom_refinement_algorithm::eGeom_refinement_algorithm::INVALID_VALUE_OPENAPI_GENERATED:
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, "Unknown refinement algorithm");
break;
case org::openapitools::server::model::Geom_refinement_algorithm::eGeom_refinement_algorithm::BEAMCENTER:
ret.GeomRefinementAlgorithm(GeomRefinementAlgorithmEnum::BeamCenter);
break;
case org::openapitools::server::model::Geom_refinement_algorithm::eGeom_refinement_algorithm::BEAMCENTERSYMMETRY:
ret.GeomRefinementAlgorithm(GeomRefinementAlgorithmEnum::BeamCenterSymmetry);
break;
case org::openapitools::server::model::Geom_refinement_algorithm::eGeom_refinement_algorithm::NONE:
ret.GeomRefinementAlgorithm(GeomRefinementAlgorithmEnum::None);
break;
}
ret.FFT_HighResolution_A(input.getFftHighResolutionA());
ret.FFT_MaxUnitCell_A(input.getFftMaxUnitCellA());
ret.FFT_MinUnitCell_A(input.getFftMinUnitCellA());
ret.FFT_NumVectors(input.getFftNumVectors());
ret.Tolerance(input.getTolerance());
ret.IndexingThreads(input.getThreadCount());
ret.UnitCellDistTolerance(input.getUnitCellDistTolerance());
return ret;
}
org::openapitools::server::model::Indexing_settings Convert(const IndexingSettings &input) {
org::openapitools::server::model::Indexing_settings ret;
ret.setFftHighResolutionA(input.GetFFT_HighResolution_A());
ret.setFftMinUnitCellA(input.GetFFT_MinUnitCell_A());
ret.setFftMaxUnitCellA(input.GetFFT_MaxUnitCell_A());
ret.setFftNumVectors(input.GetFFT_NumVectors());
ret.setTolerance(input.GetTolerance());
ret.setThreadCount(input.GetIndexingThreads());
ret.setUnitCellDistTolerance(input.GetUnitCellDistTolerance());
org::openapitools::server::model::Geom_refinement_algorithm refinement;
switch (input.GetGeomRefinementAlgorithm()) {
case GeomRefinementAlgorithmEnum::None:
refinement.setValue(org::openapitools::server::model::Geom_refinement_algorithm::eGeom_refinement_algorithm::NONE);
break;
case GeomRefinementAlgorithmEnum::BeamCenter:
refinement.setValue(org::openapitools::server::model::Geom_refinement_algorithm::eGeom_refinement_algorithm::BEAMCENTER);
break;
case GeomRefinementAlgorithmEnum::BeamCenterSymmetry:
refinement.setValue(org::openapitools::server::model::Geom_refinement_algorithm::eGeom_refinement_algorithm::BEAMCENTERSYMMETRY);
break;
}
ret.setGeomRefinementAlgorithm(refinement);
org::openapitools::server::model::Indexing_algorithm tmp;
switch (input.GetAlgorithm()) {
case IndexingAlgorithmEnum::Auto:
tmp.setValue(org::openapitools::server::model::Indexing_algorithm::eIndexing_algorithm::AUTO);
break;
case IndexingAlgorithmEnum::FFBIDX:
tmp.setValue(org::openapitools::server::model::Indexing_algorithm::eIndexing_algorithm::FFBIDX);
break;
case IndexingAlgorithmEnum::FFT:
tmp.setValue(org::openapitools::server::model::Indexing_algorithm::eIndexing_algorithm::FFT);
break;
case IndexingAlgorithmEnum::None:
tmp.setValue(org::openapitools::server::model::Indexing_algorithm::eIndexing_algorithm::NONE);
break;
}
ret.setAlgorithm(tmp);
return ret;
}
org::openapitools::server::model::Scan_result Convert(const ScanResult& input) {
org::openapitools::server::model::Scan_result ret;
ret.setFilePrefix(input.file_prefix);
std::vector<org::openapitools::server::model::Scan_result_images_inner> v;
for (const auto &i : input.images) {
org::openapitools::server::model::Scan_result_images_inner tmp;
tmp.setEfficiency(i.collection_efficiency);
tmp.setNumber(i.number);
if (i.x.has_value())
tmp.setNx(i.x.value());
if (i.y.has_value())
tmp.setNy(i.y.value());
if (i.bkg.has_value())
tmp.setBkg(i.bkg.value());
std::optional<uint64_t> pixel_sum;
if (i.pixel_sum.has_value())
tmp.setPixelSum(i.pixel_sum.value());
if (i.max_viable_pixel.has_value())
tmp.setMax(i.max_viable_pixel.value());
if (i.sat_pixels.has_value())
tmp.setSat(i.sat_pixels.value());
if (i.spot_count.has_value())
tmp.setSpots(i.spot_count.value());
if (i.spot_count_ice.has_value())
tmp.setSpotsIce(i.spot_count_ice.value());
if (i.spot_count_low_res.has_value())
tmp.setSpotsLowRes(i.spot_count_low_res.value());
if (i.spot_count_indexed.has_value())
tmp.setSpotsIndexed(i.spot_count_indexed.value());
if (i.indexing_solution.has_value())
tmp.setIndex(i.indexing_solution.value());
if (i.profile_radius.has_value())
tmp.setPr(i.profile_radius.value());
if (i.b_factor.has_value())
tmp.setB(i.b_factor.value());
if (i.uc.has_value()) {
org::openapitools::server::model::Unit_cell uc;
uc.setA(i.uc->a);
uc.setB(i.uc->b);
uc.setC(i.uc->c);
uc.setAlpha(i.uc->alpha);
uc.setBeta(i.uc->beta);
uc.setGamma(i.uc->gamma);
tmp.setUc(uc);
}
if (i.xfel_pulse_id.has_value())
tmp.setXfelPulseid(i.xfel_pulse_id.value());
if (i.res.has_value())
tmp.setRes(i.res.value());
v.emplace_back(std::move(tmp));
}
ret.setImages(v);
return ret;
}

View File

@@ -1,4 +1,5 @@
// Copyright (2019-2024) Paul Scherrer Institute
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#ifndef JFJOCH_OPENAPICONVERT_H
#define JFJOCH_OPENAPICONVERT_H
@@ -14,26 +15,36 @@
#include "gen/model/Detector_status.h"
#include "gen/model/Plots.h"
#include "gen/model/Azim_int_settings.h"
#include "gen/model/Roi_box_list.h"
#include "gen/model/Roi_circle_list.h"
#include "gen/model/Roi_definitions.h"
#include "gen/model/Image_format_settings.h"
#include "gen/model/Preview_settings.h"
#include "gen/model/Dataset_settings.h"
#include "gen/model/Fpga_status_inner.h"
#include "gen/model/Pixel_mask_statistics.h"
#include "gen/model/Zeromq_preview_settings.h"
#include "gen/model/Zeromq_metadata_settings.h"
#include "gen/model/File_writer_settings.h"
#include "gen/model/Image_buffer_status.h"
#include "gen/model/Rotation_axis.h"
#include "gen/model/Grid_scan.h"
#include "gen/model/Indexing_settings.h"
#include "gen/model/Scan_result.h"
#include "../common/JFJochMessages.h"
#include "../common/DatasetSettings.h"
#include "../common/ImageFormatSettings.h"
#include "../image_analysis/SpotFindingSettings.h"
#include "../image_analysis/spot_finding/SpotFindingSettings.h"
#include "JFJochStateMachine.h"
#include "../common/DetectorSettings.h"
#include "../jungfrau/JFCalibration.h"
#include "../common/InstrumentMetadata.h"
#include "Zeromq_preview_settings.h"
#include "../common/ScanResult.h"
SpotFindingSettings Convert(const org::openapitools::server::model::Spot_finding_settings &input);
org::openapitools::server::model::Spot_finding_settings Convert(const SpotFindingSettings &input);
IndexingSettings Convert(const org::openapitools::server::model::Indexing_settings &input);
org::openapitools::server::model::Indexing_settings Convert(const IndexingSettings &input);
org::openapitools::server::model::Measurement_statistics Convert(const MeasurementStatistics &input);
DetectorSettings Convert(const org::openapitools::server::model::Detector_settings &input);
@@ -44,23 +55,37 @@ std::vector<org::openapitools::server::model::Calibration_statistics_inner> Conv
org::openapitools::server::model::Instrument_metadata Convert(const InstrumentMetadata& input);
InstrumentMetadata Convert(const org::openapitools::server::model::Instrument_metadata &input);
org::openapitools::server::model::File_writer_settings Convert(const FileWriterSettings& input);
FileWriterSettings Convert(const org::openapitools::server::model::File_writer_settings &input);
org::openapitools::server::model::Detector_status Convert(const DetectorStatus &input);
org::openapitools::server::model::Detector_list Convert(const DetectorList &input);
org::openapitools::server::model::Plots Convert(const MultiLinePlot& input);
AzimuthalIntegrationSettings Convert(const org::openapitools::server::model::Azim_int_settings& input);
org::openapitools::server::model::Azim_int_settings Convert(const AzimuthalIntegrationSettings& settings);
std::vector<ROIBox> Convert(const org::openapitools::server::model::Roi_box_list& input);
std::vector<ROICircle> Convert(const org::openapitools::server::model::Roi_circle_list& input);
org::openapitools::server::model::Roi_circle_list Convert(const std::vector<ROICircle> &input);
org::openapitools::server::model::Roi_box_list Convert(const std::vector<ROIBox> &input);
PreviewJPEGSettings Convert(const org::openapitools::server::model::Preview_settings& input);
ROIDefinition Convert(const org::openapitools::server::model::Roi_definitions& input);
org::openapitools::server::model::Roi_definitions Convert(const ROIDefinition &input);
ImageFormatSettings Convert(const org::openapitools::server::model::Image_format_settings& input);
org::openapitools::server::model::Image_format_settings Convert(const ImageFormatSettings& input);
GoniometerAxis Convert(const org::openapitools::server::model::Rotation_axis& input);
GridScanSettings Convert(const org::openapitools::server::model::Grid_scan& input);
DatasetSettings Convert(const org::openapitools::server::model::Dataset_settings& input);
std::vector<org::openapitools::server::model::Fpga_status_inner> Convert(const std::vector<DeviceStatus> &input);
org::openapitools::server::model::Pixel_mask_statistics Convert(const PixelMaskStatistics& input);
org::openapitools::server::model::Image_buffer_status Convert(const ImageBufferStatus& input);
org::openapitools::server::model::Zeromq_preview_settings Convert(const ZMQPreviewSettings& settings);
ZMQPreviewSettings Convert(const org::openapitools::server::model::Zeromq_preview_settings& input);
org::openapitools::server::model::Zeromq_metadata_settings Convert(const ZMQMetadataSettings& settings);
ZMQMetadataSettings Convert(const org::openapitools::server::model::Zeromq_metadata_settings& input);
org::openapitools::server::model::File_writer_format Convert(FileWriterFormat input);
FileWriterFormat Convert(const org::openapitools::server::model::File_writer_format& input);
PlotType ConvertPlotType(const std::optional<std::string>& input);
ColorScaleEnum ConvertColorScale(const std::optional<std::string>& input);
org::openapitools::server::model::Scan_result Convert(const ScanResult& input);
#endif //JFJOCH_OPENAPICONVERT_H

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -37,16 +37,19 @@
#include "Detector_settings.h"
#include "Detector_status.h"
#include "Error_message.h"
#include "File_writer_settings.h"
#include "Fpga_status_inner.h"
#include "Image_buffer_status.h"
#include "Image_format_settings.h"
#include "Indexing_settings.h"
#include "Instrument_metadata.h"
#include "Jfjoch_statistics.h"
#include "Measurement_statistics.h"
#include "Plots.h"
#include "Preview_settings.h"
#include "Roi_box_list.h"
#include "Roi_circle_list.h"
#include "Roi_definitions.h"
#include "Scan_result.h"
#include "Spot_finding_settings.h"
#include "Zeromq_metadata_settings.h"
#include "Zeromq_preview_settings.h"
#include <string>
#include <vector>
@@ -70,16 +73,22 @@ private:
void config_azim_int_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void config_detector_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void config_detector_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void config_file_writer_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void config_file_writer_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void config_image_format_conversion_post_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void config_image_format_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void config_image_format_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void config_image_format_raw_post_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void config_indexing_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void config_indexing_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void config_instrument_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void config_instrument_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void config_internal_generator_image_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void config_internal_generator_image_tiff_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void config_mask_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void config_mask_tiff_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void config_roi_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void config_roi_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void config_select_detector_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void config_select_detector_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void config_spot_finding_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
@@ -88,34 +97,25 @@ private:
void config_user_mask_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void config_user_mask_tiff_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void config_user_mask_tiff_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void config_zeromq_metadata_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void config_zeromq_metadata_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void config_zeromq_preview_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void config_zeromq_preview_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void deactivate_post_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void detector_status_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void fpga_status_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void image_buffer_clear_post_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void image_buffer_image_cbor_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void image_buffer_image_jpeg_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void image_buffer_image_png_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void image_buffer_image_tiff_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void image_buffer_start_cbor_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void image_buffer_status_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void initialize_post_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void pedestal_post_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void plot_azim_int_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void plot_bkg_estimate_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void plot_error_pixel_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void plot_image_collection_efficiency_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void plot_indexing_rate_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void plot_receiver_delay_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void plot_receiver_free_send_buffers_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void plot_roi_max_count_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void plot_roi_sum_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void plot_roi_valid_pixels_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void plot_spot_count_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void plot_strong_pixel_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void preview_calibration_tiff_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void preview_image_jpeg_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void preview_image_jpeg_post_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void preview_image_tiff_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void preview_pedestal_tiff_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void roi_box_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void roi_box_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void roi_circle_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void roi_circle_put_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void preview_plot_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void result_scan_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void start_post_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void statistics_calibration_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
void statistics_data_collection_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response);
@@ -164,14 +164,14 @@ private:
/// </remarks>
virtual void cancel_post(Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Get radial integration configuration
/// Get azimuthal integration configuration
/// </summary>
/// <remarks>
/// Can be done anytime
/// </remarks>
virtual void config_azim_int_get(Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Configure radial integration
/// Configure azimuthal integration
/// </summary>
/// <remarks>
/// Can be done when detector is Inactive or Idle
@@ -194,6 +194,21 @@ private:
/// <param name="detectorSettings"> (optional)</param>
virtual void config_detector_put(const org::openapitools::server::model::Detector_settings &detectorSettings, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Get file writer settings
/// </summary>
/// <remarks>
/// Can be done anytime
/// </remarks>
virtual void config_file_writer_get(Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Change file writer settings
/// </summary>
/// <remarks>
/// This can only be done when detector is &#x60;Idle&#x60;, &#x60;Error&#x60; or &#x60;Inactive&#x60; states.
/// </remarks>
/// <param name="fileWriterSettings"> (optional)</param>
virtual void config_file_writer_put(const org::openapitools::server::model::File_writer_settings &fileWriterSettings, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Configure format for data collection with full conversion
/// </summary>
/// <remarks>
@@ -223,6 +238,21 @@ private:
/// </remarks>
virtual void config_image_format_raw_post(Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Get indexing configuration
/// </summary>
/// <remarks>
/// Can be done anytime
/// </remarks>
virtual void config_indexing_get(Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Change indexing algorithm settings
/// </summary>
/// <remarks>
/// This can only be done when detector is &#x60;Idle&#x60;, &#x60;Error&#x60; or &#x60;Inactive&#x60; states.
/// </remarks>
/// <param name="indexingSettings"> (optional)</param>
virtual void config_indexing_put(const org::openapitools::server::model::Indexing_settings &indexingSettings, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Get instrument metadata
/// </summary>
/// <remarks>
@@ -255,17 +285,32 @@ private:
/// Get mask of the detector (binary)
/// </summary>
/// <remarks>
/// Get full pixel mask of the detector See NXmx standard for meaning of pixel values
/// Detector must be Initialized. Get full pixel mask of the detector. See NXmx standard for meaning of pixel values.
/// </remarks>
virtual void config_mask_get(Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Get mask of the detector (TIFF)
/// </summary>
/// <remarks>
/// Get full pixel mask of the detector See NXmx standard for meaning of pixel values
/// Should be in &#x60;Idle&#x60; state. Get full pixel mask of the detector See NXmx standard for meaning of pixel values
/// </remarks>
virtual void config_mask_tiff_get(Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Get ROI definitions
/// </summary>
/// <remarks>
///
/// </remarks>
virtual void config_roi_get(Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Upload ROI definitions
/// </summary>
/// <remarks>
///
/// </remarks>
/// <param name="roiDefinitions"> (optional)</param>
virtual void config_roi_put(const org::openapitools::server::model::Roi_definitions &roiDefinitions, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// List available detectors
/// </summary>
/// <remarks>
@@ -296,7 +341,7 @@ private:
/// <param name="spotFindingSettings"> (optional)</param>
virtual void config_spot_finding_put(const org::openapitools::server::model::Spot_finding_settings &spotFindingSettings, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Get user mask of the detector (binary)
/// Detector must be Initialized. Get user mask of the detector (binary)
/// </summary>
/// <remarks>
/// Get user pixel mask of the detector in the actual detector coordinates: 0 - good pixel, 1 - masked
@@ -310,7 +355,7 @@ private:
/// </remarks>
virtual void config_user_mask_put(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Get user mask of the detector (TIFF)
/// Detector must be Initialized. Get user mask of the detector (TIFF)
/// </summary>
/// <remarks>
/// Get user pixel mask of the detector in the actual detector coordinates: 0 - good pixel, 1 - masked
@@ -324,6 +369,21 @@ private:
/// </remarks>
virtual void config_user_mask_tiff_put(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Get ZeroMQ metadata socket settings
/// </summary>
/// <remarks>
///
/// </remarks>
virtual void config_zeromq_metadata_get(Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Set ZeroMQ metadata settings
/// </summary>
/// <remarks>
/// Jungfraujoch can generate metadata message stream on ZeroMQ PUB socket. This stream covers all images. Here settings of the socket can be adjusted. While the data structure contains also socket_address, this cannot be changed via HTTP and is ignore in PUT request.
/// </remarks>
/// <param name="zeromqMetadataSettings"> (optional)</param>
virtual void config_zeromq_metadata_put(const org::openapitools::server::model::Zeromq_metadata_settings &zeromqMetadataSettings, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Get ZeroMQ preview settings
/// </summary>
/// <remarks>
@@ -360,6 +420,75 @@ private:
/// </remarks>
virtual void fpga_status_get(Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Clear image buffer
/// </summary>
/// <remarks>
/// Turns off image buffer for the last data collection. Can be only run when Jungfraujoch is not collecting data.
/// </remarks>
virtual void image_buffer_clear_post(Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Get image message in CBOR format
/// </summary>
/// <remarks>
/// Contains full image data and metadata. The image must come from the latest data collection.
/// </remarks>
/// <param name="id">Image ID in the image buffer. Special values: -1 - last image in the buffer, -2: last indexed image in the buffer (optional, default to -1L)</param>
virtual void image_buffer_image_cbor_get(const std::optional<int64_t> &id, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Get preview image in JPEG format using custom settings
/// </summary>
/// <remarks>
///
/// </remarks>
/// <param name="id">Image ID in the image buffer. Special values: -1 - last image in the buffer, -2: last indexed image in the buffer (optional, default to -1L)</param>
/// <param name="showUserMask">Show user mask (optional, default to false)</param>
/// <param name="showRoi">Show ROI areas on the image (optional, default to false)</param>
/// <param name="showSpots">Show spot finding results on the image (optional, default to true)</param>
/// <param name="showBeamCenter">Show beam center on the image (optional, default to true)</param>
/// <param name="saturation">Saturation value to set contrast in the preview image (optional, default to 10.0f)</param>
/// <param name="jpegQuality">Quality of JPEG image (100 - highest; 0 - lowest) (optional, default to 100L)</param>
/// <param name="showResRing">Show resolution ring, provided in Angstrom (optional, default to 0.1f)</param>
/// <param name="color">Color scale for preview image: 0 - indigo, 1 - viridis, 2 - B/W, 3 - heat (optional, default to &quot;indigo&quot;)</param>
virtual void image_buffer_image_jpeg_get(const std::optional<int64_t> &id, const std::optional<bool> &showUserMask, const std::optional<bool> &showRoi, const std::optional<bool> &showSpots, const std::optional<bool> &showBeamCenter, const std::optional<float> &saturation, const std::optional<int64_t> &jpegQuality, const std::optional<float> &showResRing, const std::optional<std::string> &color, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Get preview image in PNG format using custom settings
/// </summary>
/// <remarks>
///
/// </remarks>
/// <param name="id">Image ID in the image buffer. Special values: -1 - last image in the buffer, -2: last indexed image in the buffer (optional, default to -1L)</param>
/// <param name="showUserMask">Show user mask (optional, default to false)</param>
/// <param name="showRoi">Show ROI areas on the image (optional, default to false)</param>
/// <param name="showSpots">Show spot finding results on the image (optional, default to true)</param>
/// <param name="showBeamCenter">Show beam center on the image (optional, default to true)</param>
/// <param name="saturation">Saturation value to set contrast in the preview image (optional, default to 10.0f)</param>
/// <param name="jpegQuality">Quality of JPEG image (100 - highest; 0 - lowest) (optional, default to 100L)</param>
/// <param name="showResRing">Show resolution ring, provided in Angstrom (optional, default to 0.1f)</param>
/// <param name="color">Color scale for preview image: 0 - indigo, 1 - viridis, 2 - B/W, 3 - heat (optional, default to &quot;indigo&quot;)</param>
virtual void image_buffer_image_png_get(const std::optional<int64_t> &id, const std::optional<bool> &showUserMask, const std::optional<bool> &showRoi, const std::optional<bool> &showSpots, const std::optional<bool> &showBeamCenter, const std::optional<float> &saturation, const std::optional<int64_t> &jpegQuality, const std::optional<float> &showResRing, const std::optional<std::string> &color, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Get preview image in TIFF format
/// </summary>
/// <remarks>
///
/// </remarks>
/// <param name="id">Image ID in the image buffer. Special values: -1 - last image in the buffer, -2: last indexed image in the buffer (optional, default to -1L)</param>
virtual void image_buffer_image_tiff_get(const std::optional<int64_t> &id, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Get Start message in CBOR format
/// </summary>
/// <remarks>
/// Contains metadata for a dataset (e.g., experimental geometry)
/// </remarks>
virtual void image_buffer_start_cbor_get(Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Get status of the image buffers
/// </summary>
/// <remarks>
/// Can be run at any stage of Jungfraujoch operation, including during data collection. The status of the image buffer is volatile during data collection - if data collection goes for more images than available buffer slots, then image might be replaced in the buffer between calling /images and /image.cbor.
/// </remarks>
virtual void image_buffer_status_get(Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Initialize detector and data acquisition
/// </summary>
/// <remarks>
@@ -374,142 +503,6 @@ private:
/// </remarks>
virtual void pedestal_post(Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Generate radial integration profile
/// </summary>
/// <remarks>
/// Generate average radial integration profile
/// </remarks>
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
virtual void plot_azim_int_get(const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Generate background estimate plot
/// </summary>
/// <remarks>
/// Mean intensity for d &#x3D; 3 - 5 A per image; binning is configurable
/// </remarks>
/// <param name="binning">Binning of frames for the plot (0 &#x3D; default binning) (optional, default to 0)</param>
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
virtual void plot_bkg_estimate_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Generate error pixels plot
/// </summary>
/// <remarks>
/// Count of error (mean) and saturated (mean/max) pixels per image; binning is configurable
/// </remarks>
/// <param name="binning">Binning of frames for the plot (0 &#x3D; default binning) (optional, default to 0)</param>
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
virtual void plot_error_pixel_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Generate image collection efficiency plot
/// </summary>
/// <remarks>
/// Ratio of collected and expected packets per image; binning is configurable
/// </remarks>
/// <param name="binning">Binning of frames for the plot (0 &#x3D; default binning) (optional, default to 0)</param>
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
virtual void plot_image_collection_efficiency_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Generate indexing rate plot
/// </summary>
/// <remarks>
/// Image indexing rate; binning is configurable
/// </remarks>
/// <param name="binning">Binning of frames for the plot (0 &#x3D; default binning) (optional, default to 0)</param>
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
virtual void plot_indexing_rate_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Generate receiver delay plot
/// </summary>
/// <remarks>
/// Amount of frames the receiver is behind the FPGA for each image - used for internal debugging; binning is configurable
/// </remarks>
/// <param name="binning">Binning of frames for the plot (0 &#x3D; default binning) (optional, default to 0)</param>
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
virtual void plot_receiver_delay_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Generate receiver free send buffer plot
/// </summary>
/// <remarks>
/// Amount of send buffers available during frame processing - used for internal debugging; binning is configurable
/// </remarks>
/// <param name="binning">Binning of frames for the plot (0 &#x3D; default binning) (optional, default to 0)</param>
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
virtual void plot_receiver_free_send_buffers_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Generate plot of ROI max count
/// </summary>
/// <remarks>
/// Max count of ROI per image; binning is configurable
/// </remarks>
/// <param name="binning">Binning of frames for the plot (0 &#x3D; default binning) (optional, default to 0)</param>
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
virtual void plot_roi_max_count_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Generate ROI sum plot
/// </summary>
/// <remarks>
/// Sum of ROI rectangle per image; binning is configurable
/// </remarks>
/// <param name="binning">Binning of frames for the plot (0 &#x3D; default binning) (optional, default to 0)</param>
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
virtual void plot_roi_sum_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Generate plot of ROI valid pixels
/// </summary>
/// <remarks>
/// Number of pixels within a ROI area; pixels with special values (overload, bad pixel) are excluded; multipixels are counted just once; binning is configurable
/// </remarks>
/// <param name="binning">Binning of frames for the plot (0 &#x3D; default binning) (optional, default to 0)</param>
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
virtual void plot_roi_valid_pixels_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Generate spot count plot
/// </summary>
/// <remarks>
/// Number of spots per image; binning is configurable
/// </remarks>
/// <param name="binning">Binning of frames for the plot (0 &#x3D; default binning) (optional, default to 0)</param>
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
virtual void plot_spot_count_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Generate strong pixels plot
/// </summary>
/// <remarks>
/// Count of strong pixels per image (from spot finding); binning is configurable
/// </remarks>
/// <param name="binning">Binning of frames for the plot (0 &#x3D; default binning) (optional, default to 0)</param>
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
virtual void plot_strong_pixel_get(const std::optional<int32_t> &binning, const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Get last preview image in TIFF format for calibration with PyFAI/Dioptas
/// </summary>
/// <remarks>
/// Image is reduced to unsigned 16-bit images, all bad pixels are set to 65535 and image is mirrored in vertical direction
/// </remarks>
virtual void preview_calibration_tiff_get(Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Get last preview image in JPEG format using default settings
/// </summary>
/// <remarks>
///
/// </remarks>
virtual void preview_image_jpeg_get(Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Get last preview image in JPEG format using custom settings
/// </summary>
/// <remarks>
///
/// </remarks>
/// <param name="previewSettings"> (optional)</param>
virtual void preview_image_jpeg_post(const org::openapitools::server::model::Preview_settings &previewSettings, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Get last preview image in TIFF format
/// </summary>
/// <remarks>
///
/// </remarks>
virtual void preview_image_tiff_get(Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Get pedestal in TIFF format
/// </summary>
/// <remarks>
@@ -519,35 +512,25 @@ private:
/// <param name="sc">Storage cell number (optional, default to 0)</param>
virtual void preview_pedestal_tiff_get(const std::optional<int32_t> &gainLevel, const std::optional<int32_t> &sc, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Get box ROIs
/// Generate 1D plot from Jungfraujoch
/// </summary>
/// <remarks>
///
/// </remarks>
virtual void roi_box_get(Pistache::Http::ResponseWriter &response) = 0;
/// <param name="type">Type of requested plot</param>
/// <param name="binning">Binning of frames for the plot (0 &#x3D; default binning) (optional, default to 0)</param>
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to false)</param>
/// <param name="fill">Fill value for elements that were missed during data collection (optional, default to 0.0f)</param>
/// <param name="experimentalCoord">If measurement has goniometer axis defined, plot X-axis will represent rotation angle If measurement has grid scan defined, plot X-axis and Y-axis will represent grid position, Z will be used as the final value For still measurement the number is ignored (optional, default to false)</param>
/// <param name="azintUnit">Unit used for azim int. (optional, default to &quot;Q_recipA&quot;)</param>
virtual void preview_plot_get(const std::optional<std::string> &type, const std::optional<int32_t> &binning, const std::optional<bool> &compression, const std::optional<float> &fill, const std::optional<bool> &experimentalCoord, const std::optional<std::string> &azintUnit, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Upload box ROIs
/// Get full scan result
/// </summary>
/// <remarks>
///
/// </remarks>
/// <param name="roiBoxList"> (optional)</param>
virtual void roi_box_put(const org::openapitools::server::model::Roi_box_list &roiBoxList, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Get circular ROI
/// </summary>
/// <remarks>
///
/// </remarks>
virtual void roi_circle_get(Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Upload circular ROI
/// </summary>
/// <remarks>
///
/// </remarks>
/// <param name="roiCircleList"> (optional)</param>
virtual void roi_circle_put(const org::openapitools::server::model::Roi_circle_list &roiCircleList, Pistache::Http::ResponseWriter &response) = 0;
virtual void result_scan_get(Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Start detector
/// </summary>
@@ -576,7 +559,7 @@ private:
/// <remarks>
///
/// </remarks>
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to true)</param>
/// <param name="compression">Enable DEFLATE compression of output data. (optional, default to false)</param>
virtual void statistics_get(const std::optional<bool> &compression, Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
/// Get Jungfraujoch status
@@ -593,7 +576,7 @@ private:
/// </remarks>
virtual void trigger_post(Pistache::Http::ResponseWriter &response) = 0;
/// <summary>
///
/// Get Jungfraujoch version of jfjoch_broker
/// </summary>
/// <remarks>
///

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -21,12 +21,13 @@ namespace org::openapitools::server::model
Azim_int_settings::Azim_int_settings()
{
m_Polarization_factor = 0.0f;
m_Polarization_factorIsSet = false;
m_Polarization_corr = true;
m_Solid_angle_corr = true;
m_High_q_recipA = 0.0f;
m_Low_q_recipA = 0.0f;
m_Q_spacing = 0.0f;
m_Azimuthal_bins = 1L;
m_Azimuthal_binsIsSet = false;
}
@@ -49,26 +50,26 @@ bool Azim_int_settings::validate(std::stringstream& msg, const std::string& path
bool success = true;
const std::string _pathPrefix = pathPrefix.empty() ? "Azim_int_settings" : pathPrefix;
if (polarizationFactorIsSet())
if (azimuthalBinsIsSet())
{
const float& value = m_Polarization_factor;
const std::string currentValuePath = _pathPrefix + ".polarizationFactor";
const int64_t& value = m_Azimuthal_bins;
const std::string currentValuePath = _pathPrefix + ".azimuthalBins";
if (value < static_cast<float>(-1.0))
if (value < 1ll)
{
success = false;
msg << currentValuePath << ": must be greater than or equal to -1.0;";
msg << currentValuePath << ": must be greater than or equal to 1;";
}
if (value > static_cast<float>(1.0))
if (value > 256ll)
{
success = false;
msg << currentValuePath << ": must be less than or equal to 1.0;";
msg << currentValuePath << ": must be less than or equal to 256;";
}
}
return success;
}
@@ -77,8 +78,8 @@ bool Azim_int_settings::operator==(const Azim_int_settings& rhs) const
return
((!polarizationFactorIsSet() && !rhs.polarizationFactorIsSet()) || (polarizationFactorIsSet() && rhs.polarizationFactorIsSet() && getPolarizationFactor() == rhs.getPolarizationFactor())) &&
(isPolarizationCorr() == rhs.isPolarizationCorr())
&&
(isSolidAngleCorr() == rhs.isSolidAngleCorr())
&&
@@ -90,8 +91,11 @@ bool Azim_int_settings::operator==(const Azim_int_settings& rhs) const
&&
(getQSpacing() == rhs.getQSpacing())
&&
((!azimuthalBinsIsSet() && !rhs.azimuthalBinsIsSet()) || (azimuthalBinsIsSet() && rhs.azimuthalBinsIsSet() && getAzimuthalBins() == rhs.getAzimuthalBins()))
;
}
@@ -103,45 +107,38 @@ bool Azim_int_settings::operator!=(const Azim_int_settings& rhs) const
void to_json(nlohmann::json& j, const Azim_int_settings& o)
{
j = nlohmann::json::object();
if(o.polarizationFactorIsSet())
j["polarization_factor"] = o.m_Polarization_factor;
j["polarization_corr"] = o.m_Polarization_corr;
j["solid_angle_corr"] = o.m_Solid_angle_corr;
j["high_q_recipA"] = o.m_High_q_recipA;
j["low_q_recipA"] = o.m_Low_q_recipA;
j["q_spacing"] = o.m_Q_spacing;
if(o.azimuthalBinsIsSet())
j["azimuthal_bins"] = o.m_Azimuthal_bins;
}
void from_json(const nlohmann::json& j, Azim_int_settings& o)
{
if(j.find("polarization_factor") != j.end())
{
j.at("polarization_factor").get_to(o.m_Polarization_factor);
o.m_Polarization_factorIsSet = true;
}
j.at("polarization_corr").get_to(o.m_Polarization_corr);
j.at("solid_angle_corr").get_to(o.m_Solid_angle_corr);
j.at("high_q_recipA").get_to(o.m_High_q_recipA);
j.at("low_q_recipA").get_to(o.m_Low_q_recipA);
j.at("q_spacing").get_to(o.m_Q_spacing);
if(j.find("azimuthal_bins") != j.end())
{
j.at("azimuthal_bins").get_to(o.m_Azimuthal_bins);
o.m_Azimuthal_binsIsSet = true;
}
}
float Azim_int_settings::getPolarizationFactor() const
bool Azim_int_settings::isPolarizationCorr() const
{
return m_Polarization_factor;
return m_Polarization_corr;
}
void Azim_int_settings::setPolarizationFactor(float const value)
void Azim_int_settings::setPolarizationCorr(bool const value)
{
m_Polarization_factor = value;
m_Polarization_factorIsSet = true;
}
bool Azim_int_settings::polarizationFactorIsSet() const
{
return m_Polarization_factorIsSet;
}
void Azim_int_settings::unsetPolarization_factor()
{
m_Polarization_factorIsSet = false;
m_Polarization_corr = value;
}
bool Azim_int_settings::isSolidAngleCorr() const
{
@@ -175,6 +172,23 @@ void Azim_int_settings::setQSpacing(float const value)
{
m_Q_spacing = value;
}
int64_t Azim_int_settings::getAzimuthalBins() const
{
return m_Azimuthal_bins;
}
void Azim_int_settings::setAzimuthalBins(int64_t const value)
{
m_Azimuthal_bins = value;
m_Azimuthal_binsIsSet = true;
}
bool Azim_int_settings::azimuthalBinsIsSet() const
{
return m_Azimuthal_binsIsSet;
}
void Azim_int_settings::unsetAzimuthal_bins()
{
m_Azimuthal_binsIsSet = false;
}
} // namespace org::openapitools::server::model

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -58,14 +58,12 @@ public:
/// Azim_int_settings members
/// <summary>
/// If polarization factor is provided, than polarization correction is enabled.
/// Apply polarization correction for azimuthal integration (polarization factor must be configured in dataset settings)
/// </summary>
float getPolarizationFactor() const;
void setPolarizationFactor(float const value);
bool polarizationFactorIsSet() const;
void unsetPolarization_factor();
bool isPolarizationCorr() const;
void setPolarizationCorr(bool const value);
/// <summary>
/// Apply solid angle correction for radial integration
/// Apply solid angle correction for azimuthal integration
/// </summary>
bool isSolidAngleCorr() const;
void setSolidAngleCorr(bool const value);
@@ -84,12 +82,19 @@ public:
/// </summary>
float getQSpacing() const;
void setQSpacing(float const value);
/// <summary>
/// Numer of azimuthal (phi) bins; 1 &#x3D; standard 1D azimuthal integration
/// </summary>
int64_t getAzimuthalBins() const;
void setAzimuthalBins(int64_t const value);
bool azimuthalBinsIsSet() const;
void unsetAzimuthal_bins();
friend void to_json(nlohmann::json& j, const Azim_int_settings& o);
friend void from_json(const nlohmann::json& j, Azim_int_settings& o);
protected:
float m_Polarization_factor;
bool m_Polarization_factorIsSet;
bool m_Polarization_corr;
bool m_Solid_angle_corr;
float m_High_q_recipA;
@@ -98,6 +103,8 @@ protected:
float m_Q_spacing;
int64_t m_Azimuthal_bins;
bool m_Azimuthal_binsIsSet;
};

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -24,6 +24,12 @@ Broker_status::Broker_status()
m_State = "";
m_Progress = 0.0f;
m_ProgressIsSet = false;
m_Message = "";
m_MessageIsSet = false;
m_Message_severity = "error";
m_Message_severityIsSet = false;
m_Gpu_count = 0;
m_Gpu_countIsSet = false;
}
@@ -65,7 +71,7 @@ bool Broker_status::validate(std::stringstream& msg, const std::string& pathPref
}
}
return success;
}
@@ -78,7 +84,16 @@ bool Broker_status::operator==(const Broker_status& rhs) const
&&
((!progressIsSet() && !rhs.progressIsSet()) || (progressIsSet() && rhs.progressIsSet() && getProgress() == rhs.getProgress()))
((!progressIsSet() && !rhs.progressIsSet()) || (progressIsSet() && rhs.progressIsSet() && getProgress() == rhs.getProgress())) &&
((!messageIsSet() && !rhs.messageIsSet()) || (messageIsSet() && rhs.messageIsSet() && getMessage() == rhs.getMessage())) &&
((!messageSeverityIsSet() && !rhs.messageSeverityIsSet()) || (messageSeverityIsSet() && rhs.messageSeverityIsSet() && getMessageSeverity() == rhs.getMessageSeverity())) &&
((!gpuCountIsSet() && !rhs.gpuCountIsSet()) || (gpuCountIsSet() && rhs.gpuCountIsSet() && getGpuCount() == rhs.getGpuCount()))
;
}
@@ -94,6 +109,12 @@ void to_json(nlohmann::json& j, const Broker_status& o)
j["state"] = o.m_State;
if(o.progressIsSet())
j["progress"] = o.m_Progress;
if(o.messageIsSet())
j["message"] = o.m_Message;
if(o.messageSeverityIsSet())
j["message_severity"] = o.m_Message_severity;
if(o.gpuCountIsSet())
j["gpu_count"] = o.m_Gpu_count;
}
@@ -105,6 +126,21 @@ void from_json(const nlohmann::json& j, Broker_status& o)
j.at("progress").get_to(o.m_Progress);
o.m_ProgressIsSet = true;
}
if(j.find("message") != j.end())
{
j.at("message").get_to(o.m_Message);
o.m_MessageIsSet = true;
}
if(j.find("message_severity") != j.end())
{
j.at("message_severity").get_to(o.m_Message_severity);
o.m_Message_severityIsSet = true;
}
if(j.find("gpu_count") != j.end())
{
j.at("gpu_count").get_to(o.m_Gpu_count);
o.m_Gpu_countIsSet = true;
}
}
@@ -133,6 +169,57 @@ void Broker_status::unsetProgress()
{
m_ProgressIsSet = false;
}
std::string Broker_status::getMessage() const
{
return m_Message;
}
void Broker_status::setMessage(std::string const& value)
{
m_Message = value;
m_MessageIsSet = true;
}
bool Broker_status::messageIsSet() const
{
return m_MessageIsSet;
}
void Broker_status::unsetMessage()
{
m_MessageIsSet = false;
}
std::string Broker_status::getMessageSeverity() const
{
return m_Message_severity;
}
void Broker_status::setMessageSeverity(std::string const& value)
{
m_Message_severity = value;
m_Message_severityIsSet = true;
}
bool Broker_status::messageSeverityIsSet() const
{
return m_Message_severityIsSet;
}
void Broker_status::unsetMessage_severity()
{
m_Message_severityIsSet = false;
}
int32_t Broker_status::getGpuCount() const
{
return m_Gpu_count;
}
void Broker_status::setGpuCount(int32_t const value)
{
m_Gpu_count = value;
m_Gpu_countIsSet = true;
}
bool Broker_status::gpuCountIsSet() const
{
return m_Gpu_countIsSet;
}
void Broker_status::unsetGpu_count()
{
m_Gpu_countIsSet = false;
}
} // namespace org::openapitools::server::model

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -70,6 +70,27 @@ public:
void setProgress(float const value);
bool progressIsSet() const;
void unsetProgress();
/// <summary>
/// Message to display besides state of the jfjoch_broker; mostly used for errors and warnings This matters especially for async functions (start/initialize), where API won&#39;t return reason for the error during async operation.
/// </summary>
std::string getMessage() const;
void setMessage(std::string const& value);
bool messageIsSet() const;
void unsetMessage();
/// <summary>
/// Level of the message to display
/// </summary>
std::string getMessageSeverity() const;
void setMessageSeverity(std::string const& value);
bool messageSeverityIsSet() const;
void unsetMessage_severity();
/// <summary>
/// Number of installed GPUs
/// </summary>
int32_t getGpuCount() const;
void setGpuCount(int32_t const value);
bool gpuCountIsSet() const;
void unsetGpu_count();
friend void to_json(nlohmann::json& j, const Broker_status& o);
friend void from_json(const nlohmann::json& j, Broker_status& o);
@@ -78,6 +99,12 @@ protected:
float m_Progress;
bool m_ProgressIsSet;
std::string m_Message;
bool m_MessageIsSet;
std::string m_Message_severity;
bool m_Message_severityIsSet;
int32_t m_Gpu_count;
bool m_Gpu_countIsSet;
};

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -46,6 +46,7 @@ Dataset_settings::Dataset_settings()
m_Transmission = 0.0f;
m_TransmissionIsSet = false;
m_GoniometerIsSet = false;
m_Grid_scanIsSet = false;
m_Header_appendixIsSet = false;
m_Image_appendixIsSet = false;
m_Data_reduction_factor_serialmx = 1.0f;
@@ -64,7 +65,23 @@ Dataset_settings::Dataset_settings()
m_Write_nxmx_hdf5_masterIsSet = false;
m_Save_calibration = false;
m_Save_calibrationIsSet = false;
m_Polarization_factor = 0.0f;
m_Polarization_factorIsSet = false;
m_Ring_current_mA = 0.0f;
m_Ring_current_mAIsSet = false;
m_Sample_temperature_K = 0.0f;
m_Sample_temperature_KIsSet = false;
m_Poni_rot1_rad = 0.0f;
m_Poni_rot1_radIsSet = false;
m_Poni_rot2_rad = 0.0f;
m_Poni_rot2_radIsSet = false;
m_Poni_rot3_rad = 0.0f;
m_Poni_rot3_radIsSet = false;
m_Unit_cellIsSet = false;
m_Spot_finding = true;
m_Spot_findingIsSet = false;
m_Max_spot_count = 250;
m_Max_spot_countIsSet = false;
}
@@ -183,10 +200,10 @@ bool Dataset_settings::validate(std::stringstream& msg, const std::string& pathP
const std::string currentValuePath = _pathPrefix + ".spaceGroupNumber";
if (value < 0ll)
if (value < 1ll)
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 0;";
msg << currentValuePath << ": must be greater than or equal to 1;";
}
if (value > 194ll)
{
@@ -214,7 +231,7 @@ bool Dataset_settings::validate(std::stringstream& msg, const std::string& pathP
}
}
if (dataReductionFactorSerialmxIsSet())
{
const float& value = m_Data_reduction_factor_serialmx;
@@ -280,7 +297,130 @@ bool Dataset_settings::validate(std::stringstream& msg, const std::string& pathP
}
}
if (polarizationFactorIsSet())
{
const float& value = m_Polarization_factor;
const std::string currentValuePath = _pathPrefix + ".polarizationFactor";
if (value < static_cast<float>(-1.0))
{
success = false;
msg << currentValuePath << ": must be greater than or equal to -1.0;";
}
if (value > static_cast<float>(1.0))
{
success = false;
msg << currentValuePath << ": must be less than or equal to 1.0;";
}
}
if (ringCurrentMAIsSet())
{
const float& value = m_Ring_current_mA;
const std::string currentValuePath = _pathPrefix + ".ringCurrentMA";
if (value < static_cast<float>(0.0))
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 0.0;";
}
}
if (sampleTemperatureKIsSet())
{
const float& value = m_Sample_temperature_K;
const std::string currentValuePath = _pathPrefix + ".sampleTemperatureK";
if (value < static_cast<float>(0.0))
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 0.0;";
}
}
if (poniRot1RadIsSet())
{
const float& value = m_Poni_rot1_rad;
const std::string currentValuePath = _pathPrefix + ".poniRot1Rad";
if (value < static_cast<float>(-6.28318530718))
{
success = false;
msg << currentValuePath << ": must be greater than or equal to -6.28318530718;";
}
if (value > static_cast<float>(6.28318530718))
{
success = false;
msg << currentValuePath << ": must be less than or equal to 6.28318530718;";
}
}
if (poniRot2RadIsSet())
{
const float& value = m_Poni_rot2_rad;
const std::string currentValuePath = _pathPrefix + ".poniRot2Rad";
if (value < static_cast<float>(-6.28318530718))
{
success = false;
msg << currentValuePath << ": must be greater than or equal to -6.28318530718;";
}
if (value > static_cast<float>(6.28318530718))
{
success = false;
msg << currentValuePath << ": must be less than or equal to 6.28318530718;";
}
}
if (poniRot3RadIsSet())
{
const float& value = m_Poni_rot3_rad;
const std::string currentValuePath = _pathPrefix + ".poniRot3Rad";
if (value < static_cast<float>(-6.28318530718))
{
success = false;
msg << currentValuePath << ": must be greater than or equal to -6.28318530718;";
}
if (value > static_cast<float>(6.28318530718))
{
success = false;
msg << currentValuePath << ": must be less than or equal to 6.28318530718;";
}
}
if (maxSpotCountIsSet())
{
const int32_t& value = m_Max_spot_count;
const std::string currentValuePath = _pathPrefix + ".maxSpotCount";
if (value < 10)
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 10;";
}
if (value > 2000)
{
success = false;
msg << currentValuePath << ": must be less than or equal to 2000;";
}
}
return success;
}
@@ -335,6 +475,9 @@ bool Dataset_settings::operator==(const Dataset_settings& rhs) const
((!goniometerIsSet() && !rhs.goniometerIsSet()) || (goniometerIsSet() && rhs.goniometerIsSet() && getGoniometer() == rhs.getGoniometer())) &&
((!gridScanIsSet() && !rhs.gridScanIsSet()) || (gridScanIsSet() && rhs.gridScanIsSet() && getGridScan() == rhs.getGridScan())) &&
((!headerAppendixIsSet() && !rhs.headerAppendixIsSet()) || (headerAppendixIsSet() && rhs.headerAppendixIsSet() && getHeaderAppendix() == rhs.getHeaderAppendix())) &&
@@ -365,7 +508,31 @@ bool Dataset_settings::operator==(const Dataset_settings& rhs) const
((!saveCalibrationIsSet() && !rhs.saveCalibrationIsSet()) || (saveCalibrationIsSet() && rhs.saveCalibrationIsSet() && isSaveCalibration() == rhs.isSaveCalibration())) &&
((!unitCellIsSet() && !rhs.unitCellIsSet()) || (unitCellIsSet() && rhs.unitCellIsSet() && getUnitCell() == rhs.getUnitCell()))
((!polarizationFactorIsSet() && !rhs.polarizationFactorIsSet()) || (polarizationFactorIsSet() && rhs.polarizationFactorIsSet() && getPolarizationFactor() == rhs.getPolarizationFactor())) &&
((!ringCurrentMAIsSet() && !rhs.ringCurrentMAIsSet()) || (ringCurrentMAIsSet() && rhs.ringCurrentMAIsSet() && getRingCurrentMA() == rhs.getRingCurrentMA())) &&
((!sampleTemperatureKIsSet() && !rhs.sampleTemperatureKIsSet()) || (sampleTemperatureKIsSet() && rhs.sampleTemperatureKIsSet() && getSampleTemperatureK() == rhs.getSampleTemperatureK())) &&
((!poniRot1RadIsSet() && !rhs.poniRot1RadIsSet()) || (poniRot1RadIsSet() && rhs.poniRot1RadIsSet() && getPoniRot1Rad() == rhs.getPoniRot1Rad())) &&
((!poniRot2RadIsSet() && !rhs.poniRot2RadIsSet()) || (poniRot2RadIsSet() && rhs.poniRot2RadIsSet() && getPoniRot2Rad() == rhs.getPoniRot2Rad())) &&
((!poniRot3RadIsSet() && !rhs.poniRot3RadIsSet()) || (poniRot3RadIsSet() && rhs.poniRot3RadIsSet() && getPoniRot3Rad() == rhs.getPoniRot3Rad())) &&
((!unitCellIsSet() && !rhs.unitCellIsSet()) || (unitCellIsSet() && rhs.unitCellIsSet() && getUnitCell() == rhs.getUnitCell())) &&
((!spotFindingIsSet() && !rhs.spotFindingIsSet()) || (spotFindingIsSet() && rhs.spotFindingIsSet() && isSpotFinding() == rhs.isSpotFinding())) &&
((!maxSpotCountIsSet() && !rhs.maxSpotCountIsSet()) || (maxSpotCountIsSet() && rhs.maxSpotCountIsSet() && getMaxSpotCount() == rhs.getMaxSpotCount()))
;
}
@@ -404,6 +571,8 @@ void to_json(nlohmann::json& j, const Dataset_settings& o)
j["transmission"] = o.m_Transmission;
if(o.goniometerIsSet())
j["goniometer"] = o.m_Goniometer;
if(o.gridScanIsSet())
j["grid_scan"] = o.m_Grid_scan;
if(o.headerAppendixIsSet())
j["header_appendix"] = o.m_Header_appendix;
if(o.imageAppendixIsSet())
@@ -424,8 +593,24 @@ void to_json(nlohmann::json& j, const Dataset_settings& o)
j["write_nxmx_hdf5_master"] = o.m_Write_nxmx_hdf5_master;
if(o.saveCalibrationIsSet())
j["save_calibration"] = o.m_Save_calibration;
if(o.polarizationFactorIsSet())
j["polarization_factor"] = o.m_Polarization_factor;
if(o.ringCurrentMAIsSet())
j["ring_current_mA"] = o.m_Ring_current_mA;
if(o.sampleTemperatureKIsSet())
j["sample_temperature_K"] = o.m_Sample_temperature_K;
if(o.poniRot1RadIsSet())
j["poni_rot1_rad"] = o.m_Poni_rot1_rad;
if(o.poniRot2RadIsSet())
j["poni_rot2_rad"] = o.m_Poni_rot2_rad;
if(o.poniRot3RadIsSet())
j["poni_rot3_rad"] = o.m_Poni_rot3_rad;
if(o.unitCellIsSet())
j["unit_cell"] = o.m_Unit_cell;
if(o.spotFindingIsSet())
j["spot_finding"] = o.m_Spot_finding;
if(o.maxSpotCountIsSet())
j["max_spot_count"] = o.m_Max_spot_count;
}
@@ -490,6 +675,11 @@ void from_json(const nlohmann::json& j, Dataset_settings& o)
j.at("goniometer").get_to(o.m_Goniometer);
o.m_GoniometerIsSet = true;
}
if(j.find("grid_scan") != j.end())
{
j.at("grid_scan").get_to(o.m_Grid_scan);
o.m_Grid_scanIsSet = true;
}
if(j.find("header_appendix") != j.end())
{
j.at("header_appendix").get_to(o.m_Header_appendix);
@@ -540,11 +730,51 @@ void from_json(const nlohmann::json& j, Dataset_settings& o)
j.at("save_calibration").get_to(o.m_Save_calibration);
o.m_Save_calibrationIsSet = true;
}
if(j.find("polarization_factor") != j.end())
{
j.at("polarization_factor").get_to(o.m_Polarization_factor);
o.m_Polarization_factorIsSet = true;
}
if(j.find("ring_current_mA") != j.end())
{
j.at("ring_current_mA").get_to(o.m_Ring_current_mA);
o.m_Ring_current_mAIsSet = true;
}
if(j.find("sample_temperature_K") != j.end())
{
j.at("sample_temperature_K").get_to(o.m_Sample_temperature_K);
o.m_Sample_temperature_KIsSet = true;
}
if(j.find("poni_rot1_rad") != j.end())
{
j.at("poni_rot1_rad").get_to(o.m_Poni_rot1_rad);
o.m_Poni_rot1_radIsSet = true;
}
if(j.find("poni_rot2_rad") != j.end())
{
j.at("poni_rot2_rad").get_to(o.m_Poni_rot2_rad);
o.m_Poni_rot2_radIsSet = true;
}
if(j.find("poni_rot3_rad") != j.end())
{
j.at("poni_rot3_rad").get_to(o.m_Poni_rot3_rad);
o.m_Poni_rot3_radIsSet = true;
}
if(j.find("unit_cell") != j.end())
{
j.at("unit_cell").get_to(o.m_Unit_cell);
o.m_Unit_cellIsSet = true;
}
if(j.find("spot_finding") != j.end())
{
j.at("spot_finding").get_to(o.m_Spot_finding);
o.m_Spot_findingIsSet = true;
}
if(j.find("max_spot_count") != j.end())
{
j.at("max_spot_count").get_to(o.m_Max_spot_count);
o.m_Max_spot_countIsSet = true;
}
}
@@ -767,6 +997,23 @@ void Dataset_settings::unsetGoniometer()
{
m_GoniometerIsSet = false;
}
org::openapitools::server::model::Grid_scan Dataset_settings::getGridScan() const
{
return m_Grid_scan;
}
void Dataset_settings::setGridScan(org::openapitools::server::model::Grid_scan const& value)
{
m_Grid_scan = value;
m_Grid_scanIsSet = true;
}
bool Dataset_settings::gridScanIsSet() const
{
return m_Grid_scanIsSet;
}
void Dataset_settings::unsetGrid_scan()
{
m_Grid_scanIsSet = false;
}
nlohmann::json Dataset_settings::getHeaderAppendix() const
{
return m_Header_appendix;
@@ -937,11 +1184,113 @@ void Dataset_settings::unsetSave_calibration()
{
m_Save_calibrationIsSet = false;
}
org::openapitools::server::model::Dataset_settings_unit_cell Dataset_settings::getUnitCell() const
float Dataset_settings::getPolarizationFactor() const
{
return m_Polarization_factor;
}
void Dataset_settings::setPolarizationFactor(float const value)
{
m_Polarization_factor = value;
m_Polarization_factorIsSet = true;
}
bool Dataset_settings::polarizationFactorIsSet() const
{
return m_Polarization_factorIsSet;
}
void Dataset_settings::unsetPolarization_factor()
{
m_Polarization_factorIsSet = false;
}
float Dataset_settings::getRingCurrentMA() const
{
return m_Ring_current_mA;
}
void Dataset_settings::setRingCurrentMA(float const value)
{
m_Ring_current_mA = value;
m_Ring_current_mAIsSet = true;
}
bool Dataset_settings::ringCurrentMAIsSet() const
{
return m_Ring_current_mAIsSet;
}
void Dataset_settings::unsetRing_current_mA()
{
m_Ring_current_mAIsSet = false;
}
float Dataset_settings::getSampleTemperatureK() const
{
return m_Sample_temperature_K;
}
void Dataset_settings::setSampleTemperatureK(float const value)
{
m_Sample_temperature_K = value;
m_Sample_temperature_KIsSet = true;
}
bool Dataset_settings::sampleTemperatureKIsSet() const
{
return m_Sample_temperature_KIsSet;
}
void Dataset_settings::unsetSample_temperature_K()
{
m_Sample_temperature_KIsSet = false;
}
float Dataset_settings::getPoniRot1Rad() const
{
return m_Poni_rot1_rad;
}
void Dataset_settings::setPoniRot1Rad(float const value)
{
m_Poni_rot1_rad = value;
m_Poni_rot1_radIsSet = true;
}
bool Dataset_settings::poniRot1RadIsSet() const
{
return m_Poni_rot1_radIsSet;
}
void Dataset_settings::unsetPoni_rot1_rad()
{
m_Poni_rot1_radIsSet = false;
}
float Dataset_settings::getPoniRot2Rad() const
{
return m_Poni_rot2_rad;
}
void Dataset_settings::setPoniRot2Rad(float const value)
{
m_Poni_rot2_rad = value;
m_Poni_rot2_radIsSet = true;
}
bool Dataset_settings::poniRot2RadIsSet() const
{
return m_Poni_rot2_radIsSet;
}
void Dataset_settings::unsetPoni_rot2_rad()
{
m_Poni_rot2_radIsSet = false;
}
float Dataset_settings::getPoniRot3Rad() const
{
return m_Poni_rot3_rad;
}
void Dataset_settings::setPoniRot3Rad(float const value)
{
m_Poni_rot3_rad = value;
m_Poni_rot3_radIsSet = true;
}
bool Dataset_settings::poniRot3RadIsSet() const
{
return m_Poni_rot3_radIsSet;
}
void Dataset_settings::unsetPoni_rot3_rad()
{
m_Poni_rot3_radIsSet = false;
}
org::openapitools::server::model::Unit_cell Dataset_settings::getUnitCell() const
{
return m_Unit_cell;
}
void Dataset_settings::setUnitCell(org::openapitools::server::model::Dataset_settings_unit_cell const& value)
void Dataset_settings::setUnitCell(org::openapitools::server::model::Unit_cell const& value)
{
m_Unit_cell = value;
m_Unit_cellIsSet = true;
@@ -954,6 +1303,40 @@ void Dataset_settings::unsetUnit_cell()
{
m_Unit_cellIsSet = false;
}
bool Dataset_settings::isSpotFinding() const
{
return m_Spot_finding;
}
void Dataset_settings::setSpotFinding(bool const value)
{
m_Spot_finding = value;
m_Spot_findingIsSet = true;
}
bool Dataset_settings::spotFindingIsSet() const
{
return m_Spot_findingIsSet;
}
void Dataset_settings::unsetSpot_finding()
{
m_Spot_findingIsSet = false;
}
int32_t Dataset_settings::getMaxSpotCount() const
{
return m_Max_spot_count;
}
void Dataset_settings::setMaxSpotCount(int32_t const value)
{
m_Max_spot_count = value;
m_Max_spot_countIsSet = true;
}
bool Dataset_settings::maxSpotCountIsSet() const
{
return m_Max_spot_countIsSet;
}
void Dataset_settings::unsetMax_spot_count()
{
m_Max_spot_countIsSet = false;
}
} // namespace org::openapitools::server::model

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -19,10 +19,11 @@
#define Dataset_settings_H_
#include "Grid_scan.h"
#include <nlohmann/json.hpp>
#include "Rotation_axis.h"
#include "Unit_cell.h"
#include <string>
#include "Dataset_settings_unit_cell.h"
#include <nlohmann/json.hpp>
namespace org::openapitools::server::model
@@ -76,7 +77,7 @@ public:
bool ntriggerIsSet() const;
void unsetNtrigger();
/// <summary>
/// Image time. If not provided (or zero value) the frame time is assumed as default. Image time must be multiple of frame time; max value is 256 * frame_time. In XFEL mode: summation happens for frames collected with multiple triggers. Ignored for storage cells and if raw data are saved.
/// Image time. If not provided (or zero value) the frame time is assumed as default. For JUNGFRAU image time must be multiple of frame time and max value is 256 * frame_time. In XFEL mode: summation happens for frames collected with multiple triggers. Ignored for storage cells and if raw data are saved.
/// </summary>
int64_t getImageTimeUs() const;
void setImageTimeUs(int64_t const value);
@@ -159,6 +160,13 @@ public:
bool goniometerIsSet() const;
void unsetGoniometer();
/// <summary>
///
/// </summary>
org::openapitools::server::model::Grid_scan getGridScan() const;
void setGridScan(org::openapitools::server::model::Grid_scan const& value);
bool gridScanIsSet() const;
void unsetGrid_scan();
/// <summary>
/// Header appendix, added as user_data/user to start ZeroMQ message (can be any valid JSON) In general, it is not saved in HDF5 file. However, if values are placed in \&quot;hdf5\&quot; object, &#x60;jfjoch_writer&#x60; will write them in /entry/data of the HDF5 file. This applies solely to string and number (double floating-point). No arrays/sub-objects is allowed. For example {\&quot;hdf5\&quot;: {\&quot;val1\&quot;:1, \&quot;val2\&quot;:\&quot;xyz\&quot;}}, will write /entry/user/val1 and /entry/user/val2.
/// </summary>
nlohmann::json getHeaderAppendix() const;
@@ -222,19 +230,75 @@ public:
bool writeNxmxHdf5MasterIsSet() const;
void unsetWrite_nxmx_hdf5_master();
/// <summary>
/// Forward image calibration (at the moment pedestal and pedestal RMS for JUNGFRAU) using the ZeroMQ stream to writer. If parameter is not provided calibration will be saved only if more than 4 images are recorded.
/// Forward image calibration (at the moment pedestal and pedestal RMS for JUNGFRAU) using the ZeroMQ stream to writer. If parameter is not provided calibration will be saved only if more than 4 images are recorded.
/// </summary>
bool isSaveCalibration() const;
void setSaveCalibration(bool const value);
bool saveCalibrationIsSet() const;
void unsetSave_calibration();
/// <summary>
/// Polarization factor for integration; 1.0 is horizontal polarization; -1.0 is vertical polarization
/// </summary>
float getPolarizationFactor() const;
void setPolarizationFactor(float const value);
bool polarizationFactorIsSet() const;
void unsetPolarization_factor();
/// <summary>
/// Ring current at the beginning of the data collection
/// </summary>
float getRingCurrentMA() const;
void setRingCurrentMA(float const value);
bool ringCurrentMAIsSet() const;
void unsetRing_current_mA();
/// <summary>
/// Sample temperature in Kelvin
/// </summary>
float getSampleTemperatureK() const;
void setSampleTemperatureK(float const value);
bool sampleTemperatureKIsSet() const;
void unsetSample_temperature_K();
/// <summary>
/// PONI angle rot1 (see PyFAI documentation for details) in radians
/// </summary>
float getPoniRot1Rad() const;
void setPoniRot1Rad(float const value);
bool poniRot1RadIsSet() const;
void unsetPoni_rot1_rad();
/// <summary>
/// PONI angle rot2 (see PyFAI documentation for details) in radians
/// </summary>
float getPoniRot2Rad() const;
void setPoniRot2Rad(float const value);
bool poniRot2RadIsSet() const;
void unsetPoni_rot2_rad();
/// <summary>
/// PONI angle rot3 (see PyFAI documentation for details) in radians
/// </summary>
float getPoniRot3Rad() const;
void setPoniRot3Rad(float const value);
bool poniRot3RadIsSet() const;
void unsetPoni_rot3_rad();
/// <summary>
///
/// </summary>
org::openapitools::server::model::Dataset_settings_unit_cell getUnitCell() const;
void setUnitCell(org::openapitools::server::model::Dataset_settings_unit_cell const& value);
org::openapitools::server::model::Unit_cell getUnitCell() const;
void setUnitCell(org::openapitools::server::model::Unit_cell const& value);
bool unitCellIsSet() const;
void unsetUnit_cell();
/// <summary>
/// Enable spot finding and save spots
/// </summary>
bool isSpotFinding() const;
void setSpotFinding(bool const value);
bool spotFindingIsSet() const;
void unsetSpot_finding();
/// <summary>
/// Maximum number of spots that are saved/used for indexing; spots with highest intensity are selected
/// </summary>
int32_t getMaxSpotCount() const;
void setMaxSpotCount(int32_t const value);
bool maxSpotCountIsSet() const;
void unsetMax_spot_count();
friend void to_json(nlohmann::json& j, const Dataset_settings& o);
friend void from_json(const nlohmann::json& j, Dataset_settings& o);
@@ -269,6 +333,8 @@ protected:
bool m_TransmissionIsSet;
org::openapitools::server::model::Rotation_axis m_Goniometer;
bool m_GoniometerIsSet;
org::openapitools::server::model::Grid_scan m_Grid_scan;
bool m_Grid_scanIsSet;
nlohmann::json m_Header_appendix;
bool m_Header_appendixIsSet;
nlohmann::json m_Image_appendix;
@@ -289,8 +355,24 @@ protected:
bool m_Write_nxmx_hdf5_masterIsSet;
bool m_Save_calibration;
bool m_Save_calibrationIsSet;
org::openapitools::server::model::Dataset_settings_unit_cell m_Unit_cell;
float m_Polarization_factor;
bool m_Polarization_factorIsSet;
float m_Ring_current_mA;
bool m_Ring_current_mAIsSet;
float m_Sample_temperature_K;
bool m_Sample_temperature_KIsSet;
float m_Poni_rot1_rad;
bool m_Poni_rot1_radIsSet;
float m_Poni_rot2_rad;
bool m_Poni_rot2_radIsSet;
float m_Poni_rot3_rad;
bool m_Poni_rot3_radIsSet;
org::openapitools::server::model::Unit_cell m_Unit_cell;
bool m_Unit_cellIsSet;
bool m_Spot_finding;
bool m_Spot_findingIsSet;
int32_t m_Max_spot_count;
bool m_Max_spot_countIsSet;
};

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -22,7 +22,8 @@ namespace org::openapitools::server::model
Detector::Detector()
{
m_Description = "";
m_Serial_number = "";
m_Serial_number = "Unknown";
m_Serial_numberIsSet = false;
m_TypeIsSet = false;
m_High_voltage_V = 0L;
m_High_voltage_VIsSet = false;
@@ -32,6 +33,12 @@ Detector::Detector()
m_Module_syncIsSet = false;
m_Sensor_thickness_um = 320.0f;
m_Sensor_thickness_umIsSet = false;
m_Readout_time_us = 0L;
m_Readout_time_usIsSet = false;
m_Minimum_count_time_us = 0L;
m_Minimum_count_time_usIsSet = false;
m_Minimum_frame_time_us = 0L;
m_Minimum_frame_time_usIsSet = false;
m_Calibration_fileIsSet = false;
m_HostnameIsSet = false;
m_Sensor_material = "Si";
@@ -41,8 +48,13 @@ Detector::Detector()
m_Base_data_ipv4_addressIsSet = false;
m_Standard_geometryIsSet = false;
m_Custom_geometryIsSet = false;
m_Roi_mode = "";
m_Roi_modeIsSet = false;
m_Mirror_y = true;
m_Mirror_yIsSet = false;
m_Temp_thresold_degC = 55L;
m_Temp_thresold_degCIsSet = false;
m_Default_settingsIsSet = false;
}
@@ -80,8 +92,8 @@ bool Detector::validate(std::stringstream& msg, const std::string& pathPrefix) c
}
/* Serial_number */ {
if (serialNumberIsSet())
{
const std::string& value = m_Serial_number;
const std::string currentValuePath = _pathPrefix + ".serialNumber";
@@ -146,6 +158,48 @@ bool Detector::validate(std::stringstream& msg, const std::string& pathPrefix) c
}
if (readoutTimeUsIsSet())
{
const int64_t& value = m_Readout_time_us;
const std::string currentValuePath = _pathPrefix + ".readoutTimeUs";
if (value < 1ll)
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 1;";
}
}
if (minimumCountTimeUsIsSet())
{
const int64_t& value = m_Minimum_count_time_us;
const std::string currentValuePath = _pathPrefix + ".minimumCountTimeUs";
if (value < 0ll)
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 0;";
}
}
if (minimumFrameTimeUsIsSet())
{
const int64_t& value = m_Minimum_frame_time_us;
const std::string currentValuePath = _pathPrefix + ".minimumFrameTimeUs";
if (value < 0ll)
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 0;";
}
}
if (calibrationFileIsSet())
{
const std::vector<std::string>& value = m_Calibration_file;
@@ -229,6 +283,25 @@ bool Detector::validate(std::stringstream& msg, const std::string& pathPrefix) c
}
}
if (tempThresoldDegCIsSet())
{
const int64_t& value = m_Temp_thresold_degC;
const std::string currentValuePath = _pathPrefix + ".tempThresoldDegC";
if (value < 40ll)
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 40;";
}
if (value > 70ll)
{
success = false;
msg << currentValuePath << ": must be less than or equal to 70;";
}
}
return success;
}
@@ -241,8 +314,8 @@ bool Detector::operator==(const Detector& rhs) const
(getDescription() == rhs.getDescription())
&&
(getSerialNumber() == rhs.getSerialNumber())
&&
((!serialNumberIsSet() && !rhs.serialNumberIsSet()) || (serialNumberIsSet() && rhs.serialNumberIsSet() && getSerialNumber() == rhs.getSerialNumber())) &&
((!typeIsSet() && !rhs.typeIsSet()) || (typeIsSet() && rhs.typeIsSet() && getType() == rhs.getType())) &&
@@ -260,6 +333,15 @@ bool Detector::operator==(const Detector& rhs) const
((!sensorThicknessUmIsSet() && !rhs.sensorThicknessUmIsSet()) || (sensorThicknessUmIsSet() && rhs.sensorThicknessUmIsSet() && getSensorThicknessUm() == rhs.getSensorThicknessUm())) &&
((!readoutTimeUsIsSet() && !rhs.readoutTimeUsIsSet()) || (readoutTimeUsIsSet() && rhs.readoutTimeUsIsSet() && getReadoutTimeUs() == rhs.getReadoutTimeUs())) &&
((!minimumCountTimeUsIsSet() && !rhs.minimumCountTimeUsIsSet()) || (minimumCountTimeUsIsSet() && rhs.minimumCountTimeUsIsSet() && getMinimumCountTimeUs() == rhs.getMinimumCountTimeUs())) &&
((!minimumFrameTimeUsIsSet() && !rhs.minimumFrameTimeUsIsSet()) || (minimumFrameTimeUsIsSet() && rhs.minimumFrameTimeUsIsSet() && getMinimumFrameTimeUs() == rhs.getMinimumFrameTimeUs())) &&
((!calibrationFileIsSet() && !rhs.calibrationFileIsSet()) || (calibrationFileIsSet() && rhs.calibrationFileIsSet() && getCalibrationFile() == rhs.getCalibrationFile())) &&
@@ -281,7 +363,16 @@ bool Detector::operator==(const Detector& rhs) const
((!customGeometryIsSet() && !rhs.customGeometryIsSet()) || (customGeometryIsSet() && rhs.customGeometryIsSet() && getCustomGeometry() == rhs.getCustomGeometry())) &&
((!mirrorYIsSet() && !rhs.mirrorYIsSet()) || (mirrorYIsSet() && rhs.mirrorYIsSet() && isMirrorY() == rhs.isMirrorY()))
((!roiModeIsSet() && !rhs.roiModeIsSet()) || (roiModeIsSet() && rhs.roiModeIsSet() && getRoiMode() == rhs.getRoiMode())) &&
((!mirrorYIsSet() && !rhs.mirrorYIsSet()) || (mirrorYIsSet() && rhs.mirrorYIsSet() && isMirrorY() == rhs.isMirrorY())) &&
((!tempThresoldDegCIsSet() && !rhs.tempThresoldDegCIsSet()) || (tempThresoldDegCIsSet() && rhs.tempThresoldDegCIsSet() && getTempThresoldDegC() == rhs.getTempThresoldDegC())) &&
((!defaultSettingsIsSet() && !rhs.defaultSettingsIsSet()) || (defaultSettingsIsSet() && rhs.defaultSettingsIsSet() && getDefaultSettings() == rhs.getDefaultSettings()))
;
}
@@ -295,7 +386,8 @@ void to_json(nlohmann::json& j, const Detector& o)
{
j = nlohmann::json::object();
j["description"] = o.m_Description;
j["serial_number"] = o.m_Serial_number;
if(o.serialNumberIsSet())
j["serial_number"] = o.m_Serial_number;
if(o.typeIsSet())
j["type"] = o.m_Type;
if(o.highVoltageVIsSet())
@@ -306,6 +398,12 @@ void to_json(nlohmann::json& j, const Detector& o)
j["module_sync"] = o.m_Module_sync;
if(o.sensorThicknessUmIsSet())
j["sensor_thickness_um"] = o.m_Sensor_thickness_um;
if(o.readoutTimeUsIsSet())
j["readout_time_us"] = o.m_Readout_time_us;
if(o.minimumCountTimeUsIsSet())
j["minimum_count_time_us"] = o.m_Minimum_count_time_us;
if(o.minimumFrameTimeUsIsSet())
j["minimum_frame_time_us"] = o.m_Minimum_frame_time_us;
if(o.calibrationFileIsSet() || !o.m_Calibration_file.empty())
j["calibration_file"] = o.m_Calibration_file;
if(o.hostnameIsSet() || !o.m_Hostname.empty())
@@ -320,15 +418,25 @@ void to_json(nlohmann::json& j, const Detector& o)
j["standard_geometry"] = o.m_Standard_geometry;
if(o.customGeometryIsSet() || !o.m_Custom_geometry.empty())
j["custom_geometry"] = o.m_Custom_geometry;
if(o.roiModeIsSet())
j["roi_mode"] = o.m_Roi_mode;
if(o.mirrorYIsSet())
j["mirror_y"] = o.m_Mirror_y;
if(o.tempThresoldDegCIsSet())
j["temp_thresold_degC"] = o.m_Temp_thresold_degC;
if(o.defaultSettingsIsSet())
j["default_settings"] = o.m_Default_settings;
}
void from_json(const nlohmann::json& j, Detector& o)
{
j.at("description").get_to(o.m_Description);
j.at("serial_number").get_to(o.m_Serial_number);
if(j.find("serial_number") != j.end())
{
j.at("serial_number").get_to(o.m_Serial_number);
o.m_Serial_numberIsSet = true;
}
if(j.find("type") != j.end())
{
j.at("type").get_to(o.m_Type);
@@ -354,6 +462,21 @@ void from_json(const nlohmann::json& j, Detector& o)
j.at("sensor_thickness_um").get_to(o.m_Sensor_thickness_um);
o.m_Sensor_thickness_umIsSet = true;
}
if(j.find("readout_time_us") != j.end())
{
j.at("readout_time_us").get_to(o.m_Readout_time_us);
o.m_Readout_time_usIsSet = true;
}
if(j.find("minimum_count_time_us") != j.end())
{
j.at("minimum_count_time_us").get_to(o.m_Minimum_count_time_us);
o.m_Minimum_count_time_usIsSet = true;
}
if(j.find("minimum_frame_time_us") != j.end())
{
j.at("minimum_frame_time_us").get_to(o.m_Minimum_frame_time_us);
o.m_Minimum_frame_time_usIsSet = true;
}
if(j.find("calibration_file") != j.end())
{
j.at("calibration_file").get_to(o.m_Calibration_file);
@@ -389,11 +512,26 @@ void from_json(const nlohmann::json& j, Detector& o)
j.at("custom_geometry").get_to(o.m_Custom_geometry);
o.m_Custom_geometryIsSet = true;
}
if(j.find("roi_mode") != j.end())
{
j.at("roi_mode").get_to(o.m_Roi_mode);
o.m_Roi_modeIsSet = true;
}
if(j.find("mirror_y") != j.end())
{
j.at("mirror_y").get_to(o.m_Mirror_y);
o.m_Mirror_yIsSet = true;
}
if(j.find("temp_thresold_degC") != j.end())
{
j.at("temp_thresold_degC").get_to(o.m_Temp_thresold_degC);
o.m_Temp_thresold_degCIsSet = true;
}
if(j.find("default_settings") != j.end())
{
j.at("default_settings").get_to(o.m_Default_settings);
o.m_Default_settingsIsSet = true;
}
}
@@ -412,6 +550,15 @@ std::string Detector::getSerialNumber() const
void Detector::setSerialNumber(std::string const& value)
{
m_Serial_number = value;
m_Serial_numberIsSet = true;
}
bool Detector::serialNumberIsSet() const
{
return m_Serial_numberIsSet;
}
void Detector::unsetSerial_number()
{
m_Serial_numberIsSet = false;
}
org::openapitools::server::model::Detector_type Detector::getType() const
{
@@ -498,6 +645,57 @@ void Detector::unsetSensor_thickness_um()
{
m_Sensor_thickness_umIsSet = false;
}
int64_t Detector::getReadoutTimeUs() const
{
return m_Readout_time_us;
}
void Detector::setReadoutTimeUs(int64_t const value)
{
m_Readout_time_us = value;
m_Readout_time_usIsSet = true;
}
bool Detector::readoutTimeUsIsSet() const
{
return m_Readout_time_usIsSet;
}
void Detector::unsetReadout_time_us()
{
m_Readout_time_usIsSet = false;
}
int64_t Detector::getMinimumCountTimeUs() const
{
return m_Minimum_count_time_us;
}
void Detector::setMinimumCountTimeUs(int64_t const value)
{
m_Minimum_count_time_us = value;
m_Minimum_count_time_usIsSet = true;
}
bool Detector::minimumCountTimeUsIsSet() const
{
return m_Minimum_count_time_usIsSet;
}
void Detector::unsetMinimum_count_time_us()
{
m_Minimum_count_time_usIsSet = false;
}
int64_t Detector::getMinimumFrameTimeUs() const
{
return m_Minimum_frame_time_us;
}
void Detector::setMinimumFrameTimeUs(int64_t const value)
{
m_Minimum_frame_time_us = value;
m_Minimum_frame_time_usIsSet = true;
}
bool Detector::minimumFrameTimeUsIsSet() const
{
return m_Minimum_frame_time_usIsSet;
}
void Detector::unsetMinimum_frame_time_us()
{
m_Minimum_frame_time_usIsSet = false;
}
std::vector<std::string> Detector::getCalibrationFile() const
{
return m_Calibration_file;
@@ -617,6 +815,23 @@ void Detector::unsetCustom_geometry()
{
m_Custom_geometryIsSet = false;
}
std::string Detector::getRoiMode() const
{
return m_Roi_mode;
}
void Detector::setRoiMode(std::string const& value)
{
m_Roi_mode = value;
m_Roi_modeIsSet = true;
}
bool Detector::roiModeIsSet() const
{
return m_Roi_modeIsSet;
}
void Detector::unsetRoi_mode()
{
m_Roi_modeIsSet = false;
}
bool Detector::isMirrorY() const
{
return m_Mirror_y;
@@ -634,6 +849,40 @@ void Detector::unsetMirror_y()
{
m_Mirror_yIsSet = false;
}
int64_t Detector::getTempThresoldDegC() const
{
return m_Temp_thresold_degC;
}
void Detector::setTempThresoldDegC(int64_t const value)
{
m_Temp_thresold_degC = value;
m_Temp_thresold_degCIsSet = true;
}
bool Detector::tempThresoldDegCIsSet() const
{
return m_Temp_thresold_degCIsSet;
}
void Detector::unsetTemp_thresold_degC()
{
m_Temp_thresold_degCIsSet = false;
}
org::openapitools::server::model::Detector_settings Detector::getDefaultSettings() const
{
return m_Default_settings;
}
void Detector::setDefaultSettings(org::openapitools::server::model::Detector_settings const& value)
{
m_Default_settings = value;
m_Default_settingsIsSet = true;
}
bool Detector::defaultSettingsIsSet() const
{
return m_Default_settingsIsSet;
}
void Detector::unsetDefault_settings()
{
m_Default_settingsIsSet = false;
}
} // namespace org::openapitools::server::model

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -21,6 +21,7 @@
#include "Detector_type.h"
#include <string>
#include "Detector_settings.h"
#include <vector>
#include "Standard_detector_geometry.h"
#include "Detector_module.h"
@@ -72,6 +73,8 @@ public:
/// </summary>
std::string getSerialNumber() const;
void setSerialNumber(std::string const& value);
bool serialNumberIsSet() const;
void unsetSerial_number();
/// <summary>
///
/// </summary>
@@ -108,7 +111,28 @@ public:
bool sensorThicknessUmIsSet() const;
void unsetSensor_thickness_um();
/// <summary>
/// Gain file (JUNGFRAU) or trimbit file (EIGER). One entry per module. Either empty or number of module entries.
/// Minimum difference between frame time and count time in microseconds Defaults are 3 us for EIGER and 20 us for JUNGFRAU
/// </summary>
int64_t getReadoutTimeUs() const;
void setReadoutTimeUs(int64_t const value);
bool readoutTimeUsIsSet() const;
void unsetReadout_time_us();
/// <summary>
/// Minimum count time available for the detector.
/// </summary>
int64_t getMinimumCountTimeUs() const;
void setMinimumCountTimeUs(int64_t const value);
bool minimumCountTimeUsIsSet() const;
void unsetMinimum_count_time_us();
/// <summary>
/// Minimum frame time available for the detector.
/// </summary>
int64_t getMinimumFrameTimeUs() const;
void setMinimumFrameTimeUs(int64_t const value);
bool minimumFrameTimeUsIsSet() const;
void unsetMinimum_frame_time_us();
/// <summary>
/// Can be empty for all detectors - default calibration used. For JUNGFRAU: list of gain files, one entry per module. For EIGER: one directory (with detector settings) or list of trim bit files, one entry per half-module.
/// </summary>
std::vector<std::string> getCalibrationFile() const;
void setCalibrationFile(std::vector<std::string> const& value);
@@ -157,12 +181,33 @@ public:
bool customGeometryIsSet() const;
void unsetCustom_geometry();
/// <summary>
/// ROI setting for DECTRIS detectors
/// </summary>
std::string getRoiMode() const;
void setRoiMode(std::string const& value);
bool roiModeIsSet() const;
void unsetRoi_mode();
/// <summary>
/// Mirror detector in Y direction to account for MX convention of (0,0) point in top left corner
/// </summary>
bool isMirrorY() const;
void setMirrorY(bool const value);
bool mirrorYIsSet() const;
void unsetMirror_y();
/// <summary>
/// Temperature threshold for JUNGFRAU detector modules
/// </summary>
int64_t getTempThresoldDegC() const;
void setTempThresoldDegC(int64_t const value);
bool tempThresoldDegCIsSet() const;
void unsetTemp_thresold_degC();
/// <summary>
///
/// </summary>
org::openapitools::server::model::Detector_settings getDefaultSettings() const;
void setDefaultSettings(org::openapitools::server::model::Detector_settings const& value);
bool defaultSettingsIsSet() const;
void unsetDefault_settings();
friend void to_json(nlohmann::json& j, const Detector& o);
friend void from_json(const nlohmann::json& j, Detector& o);
@@ -170,7 +215,7 @@ protected:
std::string m_Description;
std::string m_Serial_number;
bool m_Serial_numberIsSet;
org::openapitools::server::model::Detector_type m_Type;
bool m_TypeIsSet;
int64_t m_High_voltage_V;
@@ -181,6 +226,12 @@ protected:
bool m_Module_syncIsSet;
float m_Sensor_thickness_um;
bool m_Sensor_thickness_umIsSet;
int64_t m_Readout_time_us;
bool m_Readout_time_usIsSet;
int64_t m_Minimum_count_time_us;
bool m_Minimum_count_time_usIsSet;
int64_t m_Minimum_frame_time_us;
bool m_Minimum_frame_time_usIsSet;
std::vector<std::string> m_Calibration_file;
bool m_Calibration_fileIsSet;
std::vector<std::string> m_Hostname;
@@ -195,8 +246,14 @@ protected:
bool m_Standard_geometryIsSet;
std::vector<org::openapitools::server::model::Detector_module> m_Custom_geometry;
bool m_Custom_geometryIsSet;
std::string m_Roi_mode;
bool m_Roi_modeIsSet;
bool m_Mirror_y;
bool m_Mirror_yIsSet;
int64_t m_Temp_thresold_degC;
bool m_Temp_thresold_degCIsSet;
org::openapitools::server::model::Detector_settings m_Default_settings;
bool m_Default_settingsIsSet;
};

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -47,14 +47,14 @@ bool Detector_list::validate(std::stringstream& msg, const std::string& pathPref
/* Detectors */ {
const std::vector<org::openapitools::server::model::Detector_list_detectors_inner>& value = m_Detectors;
const std::vector<org::openapitools::server::model::Detector_list_element>& value = m_Detectors;
const std::string currentValuePath = _pathPrefix + ".detectors";
{ // Recursive validation of array elements
const std::string oldValuePath = currentValuePath;
int i = 0;
for (const org::openapitools::server::model::Detector_list_detectors_inner& value : value)
for (const org::openapitools::server::model::Detector_list_element& value : value)
{
const std::string currentValuePath = oldValuePath + "[" + std::to_string(i) + "]";
@@ -103,11 +103,11 @@ void from_json(const nlohmann::json& j, Detector_list& o)
}
std::vector<org::openapitools::server::model::Detector_list_detectors_inner> Detector_list::getDetectors() const
std::vector<org::openapitools::server::model::Detector_list_element> Detector_list::getDetectors() const
{
return m_Detectors;
}
void Detector_list::setDetectors(std::vector<org::openapitools::server::model::Detector_list_detectors_inner> const& value)
void Detector_list::setDetectors(std::vector<org::openapitools::server::model::Detector_list_element> const& value)
{
m_Detectors = value;
}

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -19,7 +19,7 @@
#define Detector_list_H_
#include "Detector_list_detectors_inner.h"
#include "Detector_list_element.h"
#include <vector>
#include <nlohmann/json.hpp>
@@ -62,8 +62,8 @@ public:
/// <summary>
///
/// </summary>
std::vector<org::openapitools::server::model::Detector_list_detectors_inner> getDetectors() const;
void setDetectors(std::vector<org::openapitools::server::model::Detector_list_detectors_inner> const& value);
std::vector<org::openapitools::server::model::Detector_list_element> getDetectors() const;
void setDetectors(std::vector<org::openapitools::server::model::Detector_list_element> const& value);
/// <summary>
///
/// </summary>
@@ -73,7 +73,7 @@ public:
friend void to_json(nlohmann::json& j, const Detector_list& o);
friend void from_json(const nlohmann::json& j, Detector_list& o);
protected:
std::vector<org::openapitools::server::model::Detector_list_detectors_inner> m_Detectors;
std::vector<org::openapitools::server::model::Detector_list_element> m_Detectors;
int64_t m_Current_id;

View File

@@ -1,203 +0,0 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include "Detector_list_detectors_inner.h"
#include "Helpers.h"
#include <sstream>
namespace org::openapitools::server::model
{
Detector_list_detectors_inner::Detector_list_detectors_inner()
{
m_Id = 0L;
m_Description = "";
m_Serial_number = "";
m_Base_ipv4_addr = "";
m_Udp_interface_count = 0L;
m_Nmodules = 0L;
m_Width = 0L;
m_Height = 0L;
}
void Detector_list_detectors_inner::validate() const
{
std::stringstream msg;
if (!validate(msg))
{
throw org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool Detector_list_detectors_inner::validate(std::stringstream& msg) const
{
return validate(msg, "");
}
bool Detector_list_detectors_inner::validate(std::stringstream& msg, const std::string& pathPrefix) const
{
bool success = true;
const std::string _pathPrefix = pathPrefix.empty() ? "Detector_list_detectors_inner" : pathPrefix;
/* Id */ {
const int64_t& value = m_Id;
const std::string currentValuePath = _pathPrefix + ".id";
if (value < 0ll)
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 0;";
}
}
return success;
}
bool Detector_list_detectors_inner::operator==(const Detector_list_detectors_inner& rhs) const
{
return
(getId() == rhs.getId())
&&
(getDescription() == rhs.getDescription())
&&
(getSerialNumber() == rhs.getSerialNumber())
&&
(getBaseIpv4Addr() == rhs.getBaseIpv4Addr())
&&
(getUdpInterfaceCount() == rhs.getUdpInterfaceCount())
&&
(getNmodules() == rhs.getNmodules())
&&
(getWidth() == rhs.getWidth())
&&
(getHeight() == rhs.getHeight())
;
}
bool Detector_list_detectors_inner::operator!=(const Detector_list_detectors_inner& rhs) const
{
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const Detector_list_detectors_inner& o)
{
j = nlohmann::json::object();
j["id"] = o.m_Id;
j["description"] = o.m_Description;
j["serial_number"] = o.m_Serial_number;
j["base_ipv4_addr"] = o.m_Base_ipv4_addr;
j["udp_interface_count"] = o.m_Udp_interface_count;
j["nmodules"] = o.m_Nmodules;
j["width"] = o.m_Width;
j["height"] = o.m_Height;
}
void from_json(const nlohmann::json& j, Detector_list_detectors_inner& o)
{
j.at("id").get_to(o.m_Id);
j.at("description").get_to(o.m_Description);
j.at("serial_number").get_to(o.m_Serial_number);
j.at("base_ipv4_addr").get_to(o.m_Base_ipv4_addr);
j.at("udp_interface_count").get_to(o.m_Udp_interface_count);
j.at("nmodules").get_to(o.m_Nmodules);
j.at("width").get_to(o.m_Width);
j.at("height").get_to(o.m_Height);
}
int64_t Detector_list_detectors_inner::getId() const
{
return m_Id;
}
void Detector_list_detectors_inner::setId(int64_t const value)
{
m_Id = value;
}
std::string Detector_list_detectors_inner::getDescription() const
{
return m_Description;
}
void Detector_list_detectors_inner::setDescription(std::string const& value)
{
m_Description = value;
}
std::string Detector_list_detectors_inner::getSerialNumber() const
{
return m_Serial_number;
}
void Detector_list_detectors_inner::setSerialNumber(std::string const& value)
{
m_Serial_number = value;
}
std::string Detector_list_detectors_inner::getBaseIpv4Addr() const
{
return m_Base_ipv4_addr;
}
void Detector_list_detectors_inner::setBaseIpv4Addr(std::string const& value)
{
m_Base_ipv4_addr = value;
}
int64_t Detector_list_detectors_inner::getUdpInterfaceCount() const
{
return m_Udp_interface_count;
}
void Detector_list_detectors_inner::setUdpInterfaceCount(int64_t const value)
{
m_Udp_interface_count = value;
}
int64_t Detector_list_detectors_inner::getNmodules() const
{
return m_Nmodules;
}
void Detector_list_detectors_inner::setNmodules(int64_t const value)
{
m_Nmodules = value;
}
int64_t Detector_list_detectors_inner::getWidth() const
{
return m_Width;
}
void Detector_list_detectors_inner::setWidth(int64_t const value)
{
m_Width = value;
}
int64_t Detector_list_detectors_inner::getHeight() const
{
return m_Height;
}
void Detector_list_detectors_inner::setHeight(int64_t const value)
{
m_Height = value;
}
} // namespace org::openapitools::server::model

View File

@@ -0,0 +1,302 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include "Detector_list_element.h"
#include "Helpers.h"
#include <sstream>
namespace org::openapitools::server::model
{
Detector_list_element::Detector_list_element()
{
m_Id = 0L;
m_Description = "";
m_Serial_number = "";
m_Base_ipv4_addr = "";
m_Udp_interface_count = 0L;
m_Nmodules = 0L;
m_Width = 0L;
m_Height = 0L;
m_Pixel_size_mm = 0.0f;
m_Pixel_size_mmIsSet = false;
m_Readout_time_us = 0L;
m_Min_frame_time_us = 0L;
m_Min_count_time_us = 0L;
m_TypeIsSet = false;
}
void Detector_list_element::validate() const
{
std::stringstream msg;
if (!validate(msg))
{
throw org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool Detector_list_element::validate(std::stringstream& msg) const
{
return validate(msg, "");
}
bool Detector_list_element::validate(std::stringstream& msg, const std::string& pathPrefix) const
{
bool success = true;
const std::string _pathPrefix = pathPrefix.empty() ? "Detector_list_element" : pathPrefix;
/* Id */ {
const int64_t& value = m_Id;
const std::string currentValuePath = _pathPrefix + ".id";
if (value < 0ll)
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 0;";
}
}
return success;
}
bool Detector_list_element::operator==(const Detector_list_element& rhs) const
{
return
(getId() == rhs.getId())
&&
(getDescription() == rhs.getDescription())
&&
(getSerialNumber() == rhs.getSerialNumber())
&&
(getBaseIpv4Addr() == rhs.getBaseIpv4Addr())
&&
(getUdpInterfaceCount() == rhs.getUdpInterfaceCount())
&&
(getNmodules() == rhs.getNmodules())
&&
(getWidth() == rhs.getWidth())
&&
(getHeight() == rhs.getHeight())
&&
((!pixelSizeMmIsSet() && !rhs.pixelSizeMmIsSet()) || (pixelSizeMmIsSet() && rhs.pixelSizeMmIsSet() && getPixelSizeMm() == rhs.getPixelSizeMm())) &&
(getReadoutTimeUs() == rhs.getReadoutTimeUs())
&&
(getMinFrameTimeUs() == rhs.getMinFrameTimeUs())
&&
(getMinCountTimeUs() == rhs.getMinCountTimeUs())
&&
((!typeIsSet() && !rhs.typeIsSet()) || (typeIsSet() && rhs.typeIsSet() && getType() == rhs.getType()))
;
}
bool Detector_list_element::operator!=(const Detector_list_element& rhs) const
{
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const Detector_list_element& o)
{
j = nlohmann::json::object();
j["id"] = o.m_Id;
j["description"] = o.m_Description;
j["serial_number"] = o.m_Serial_number;
j["base_ipv4_addr"] = o.m_Base_ipv4_addr;
j["udp_interface_count"] = o.m_Udp_interface_count;
j["nmodules"] = o.m_Nmodules;
j["width"] = o.m_Width;
j["height"] = o.m_Height;
if(o.pixelSizeMmIsSet())
j["pixel_size_mm"] = o.m_Pixel_size_mm;
j["readout_time_us"] = o.m_Readout_time_us;
j["min_frame_time_us"] = o.m_Min_frame_time_us;
j["min_count_time_us"] = o.m_Min_count_time_us;
if(o.typeIsSet())
j["type"] = o.m_Type;
}
void from_json(const nlohmann::json& j, Detector_list_element& o)
{
j.at("id").get_to(o.m_Id);
j.at("description").get_to(o.m_Description);
j.at("serial_number").get_to(o.m_Serial_number);
j.at("base_ipv4_addr").get_to(o.m_Base_ipv4_addr);
j.at("udp_interface_count").get_to(o.m_Udp_interface_count);
j.at("nmodules").get_to(o.m_Nmodules);
j.at("width").get_to(o.m_Width);
j.at("height").get_to(o.m_Height);
if(j.find("pixel_size_mm") != j.end())
{
j.at("pixel_size_mm").get_to(o.m_Pixel_size_mm);
o.m_Pixel_size_mmIsSet = true;
}
j.at("readout_time_us").get_to(o.m_Readout_time_us);
j.at("min_frame_time_us").get_to(o.m_Min_frame_time_us);
j.at("min_count_time_us").get_to(o.m_Min_count_time_us);
if(j.find("type") != j.end())
{
j.at("type").get_to(o.m_Type);
o.m_TypeIsSet = true;
}
}
int64_t Detector_list_element::getId() const
{
return m_Id;
}
void Detector_list_element::setId(int64_t const value)
{
m_Id = value;
}
std::string Detector_list_element::getDescription() const
{
return m_Description;
}
void Detector_list_element::setDescription(std::string const& value)
{
m_Description = value;
}
std::string Detector_list_element::getSerialNumber() const
{
return m_Serial_number;
}
void Detector_list_element::setSerialNumber(std::string const& value)
{
m_Serial_number = value;
}
std::string Detector_list_element::getBaseIpv4Addr() const
{
return m_Base_ipv4_addr;
}
void Detector_list_element::setBaseIpv4Addr(std::string const& value)
{
m_Base_ipv4_addr = value;
}
int64_t Detector_list_element::getUdpInterfaceCount() const
{
return m_Udp_interface_count;
}
void Detector_list_element::setUdpInterfaceCount(int64_t const value)
{
m_Udp_interface_count = value;
}
int64_t Detector_list_element::getNmodules() const
{
return m_Nmodules;
}
void Detector_list_element::setNmodules(int64_t const value)
{
m_Nmodules = value;
}
int64_t Detector_list_element::getWidth() const
{
return m_Width;
}
void Detector_list_element::setWidth(int64_t const value)
{
m_Width = value;
}
int64_t Detector_list_element::getHeight() const
{
return m_Height;
}
void Detector_list_element::setHeight(int64_t const value)
{
m_Height = value;
}
float Detector_list_element::getPixelSizeMm() const
{
return m_Pixel_size_mm;
}
void Detector_list_element::setPixelSizeMm(float const value)
{
m_Pixel_size_mm = value;
m_Pixel_size_mmIsSet = true;
}
bool Detector_list_element::pixelSizeMmIsSet() const
{
return m_Pixel_size_mmIsSet;
}
void Detector_list_element::unsetPixel_size_mm()
{
m_Pixel_size_mmIsSet = false;
}
int64_t Detector_list_element::getReadoutTimeUs() const
{
return m_Readout_time_us;
}
void Detector_list_element::setReadoutTimeUs(int64_t const value)
{
m_Readout_time_us = value;
}
int64_t Detector_list_element::getMinFrameTimeUs() const
{
return m_Min_frame_time_us;
}
void Detector_list_element::setMinFrameTimeUs(int64_t const value)
{
m_Min_frame_time_us = value;
}
int64_t Detector_list_element::getMinCountTimeUs() const
{
return m_Min_count_time_us;
}
void Detector_list_element::setMinCountTimeUs(int64_t const value)
{
m_Min_count_time_us = value;
}
org::openapitools::server::model::Detector_type Detector_list_element::getType() const
{
return m_Type;
}
void Detector_list_element::setType(org::openapitools::server::model::Detector_type const& value)
{
m_Type = value;
m_TypeIsSet = true;
}
bool Detector_list_element::typeIsSet() const
{
return m_TypeIsSet;
}
void Detector_list_element::unsetType()
{
m_TypeIsSet = false;
}
} // namespace org::openapitools::server::model

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -10,15 +10,16 @@
* Do not edit the class manually.
*/
/*
* Detector_list_detectors_inner.h
* Detector_list_element.h
*
*
*/
#ifndef Detector_list_detectors_inner_H_
#define Detector_list_detectors_inner_H_
#ifndef Detector_list_element_H_
#define Detector_list_element_H_
#include "Detector_type.h"
#include <string>
#include <nlohmann/json.hpp>
@@ -28,11 +29,11 @@ namespace org::openapitools::server::model
/// <summary>
///
/// </summary>
class Detector_list_detectors_inner
class Detector_list_element
{
public:
Detector_list_detectors_inner();
virtual ~Detector_list_detectors_inner() = default;
Detector_list_element();
virtual ~Detector_list_element() = default;
/// <summary>
@@ -52,11 +53,11 @@ public:
/// </summary>
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
bool operator==(const Detector_list_detectors_inner& rhs) const;
bool operator!=(const Detector_list_detectors_inner& rhs) const;
bool operator==(const Detector_list_element& rhs) const;
bool operator!=(const Detector_list_element& rhs) const;
/////////////////////////////////////////////
/// Detector_list_detectors_inner members
/// Detector_list_element members
/// <summary>
///
@@ -98,9 +99,38 @@ public:
/// </summary>
int64_t getHeight() const;
void setHeight(int64_t const value);
/// <summary>
///
/// </summary>
float getPixelSizeMm() const;
void setPixelSizeMm(float const value);
bool pixelSizeMmIsSet() const;
void unsetPixel_size_mm();
/// <summary>
///
/// </summary>
int64_t getReadoutTimeUs() const;
void setReadoutTimeUs(int64_t const value);
/// <summary>
///
/// </summary>
int64_t getMinFrameTimeUs() const;
void setMinFrameTimeUs(int64_t const value);
/// <summary>
///
/// </summary>
int64_t getMinCountTimeUs() const;
void setMinCountTimeUs(int64_t const value);
/// <summary>
///
/// </summary>
org::openapitools::server::model::Detector_type getType() const;
void setType(org::openapitools::server::model::Detector_type const& value);
bool typeIsSet() const;
void unsetType();
friend void to_json(nlohmann::json& j, const Detector_list_detectors_inner& o);
friend void from_json(const nlohmann::json& j, Detector_list_detectors_inner& o);
friend void to_json(nlohmann::json& j, const Detector_list_element& o);
friend void from_json(const nlohmann::json& j, Detector_list_element& o);
protected:
int64_t m_Id;
@@ -118,9 +148,19 @@ protected:
int64_t m_Height;
float m_Pixel_size_mm;
bool m_Pixel_size_mmIsSet;
int64_t m_Readout_time_us;
int64_t m_Min_frame_time_us;
int64_t m_Min_count_time_us;
org::openapitools::server::model::Detector_type m_Type;
bool m_TypeIsSet;
};
} // namespace org::openapitools::server::model
#endif /* Detector_list_detectors_inner_H_ */
#endif /* Detector_list_element_H_ */

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -80,10 +80,10 @@ bool Detector_settings::validate(std::stringstream& msg, const std::string& path
const std::string currentValuePath = _pathPrefix + ".frameTimeUs";
if (value < 450ll)
if (value < 1ll)
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 450;";
msg << currentValuePath << ": must be greater than or equal to 1;";
}
}

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -81,6 +81,9 @@ void to_json(nlohmann::json& j, const Detector_type& o)
case Detector_type::eDetector_type::JUNGFRAU:
j = "JUNGFRAU";
break;
case Detector_type::eDetector_type::DECTRIS:
j = "DECTRIS";
break;
}
}
@@ -93,6 +96,9 @@ void from_json(const nlohmann::json& j, Detector_type& o)
}
else if (s == "JUNGFRAU") {
o.setValue(Detector_type::eDetector_type::JUNGFRAU);
}
else if (s == "DECTRIS") {
o.setValue(Detector_type::eDetector_type::DECTRIS);
} else {
std::stringstream ss;
ss << "Unexpected value " << s << " in json"

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -39,7 +39,8 @@ public:
// enum values
INVALID_VALUE_OPENAPI_GENERATED = 0,
EIGER,
JUNGFRAU
JUNGFRAU,
DECTRIS
};
/// <summary>

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -0,0 +1,134 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include "File_writer_format.h"
#include "Helpers.h"
#include <stdexcept>
#include <sstream>
namespace org::openapitools::server::model
{
File_writer_format::File_writer_format()
{
}
void File_writer_format::validate() const
{
std::stringstream msg;
if (!validate(msg))
{
throw org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool File_writer_format::validate(std::stringstream& msg) const
{
return validate(msg, "");
}
bool File_writer_format::validate(std::stringstream& msg, const std::string& pathPrefix) const
{
bool success = true;
const std::string _pathPrefix = pathPrefix.empty() ? "File_writer_format" : pathPrefix;
if (m_value == File_writer_format::eFile_writer_format::INVALID_VALUE_OPENAPI_GENERATED)
{
success = false;
msg << _pathPrefix << ": has no value;";
}
return success;
}
bool File_writer_format::operator==(const File_writer_format& rhs) const
{
return
getValue() == rhs.getValue()
;
}
bool File_writer_format::operator!=(const File_writer_format& rhs) const
{
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const File_writer_format& o)
{
j = nlohmann::json::object();
switch (o.getValue())
{
case File_writer_format::eFile_writer_format::INVALID_VALUE_OPENAPI_GENERATED:
j = "INVALID_VALUE_OPENAPI_GENERATED";
break;
case File_writer_format::eFile_writer_format::NONE:
j = "None";
break;
case File_writer_format::eFile_writer_format::NXMXLEGACY:
j = "NXmxLegacy";
break;
case File_writer_format::eFile_writer_format::NXMXVDS:
j = "NXmxVDS";
break;
case File_writer_format::eFile_writer_format::CBF:
j = "CBF";
break;
case File_writer_format::eFile_writer_format::TIFF:
j = "TIFF";
break;
}
}
void from_json(const nlohmann::json& j, File_writer_format& o)
{
auto s = j.get<std::string>();
if (s == "None") {
o.setValue(File_writer_format::eFile_writer_format::NONE);
}
else if (s == "NXmxLegacy") {
o.setValue(File_writer_format::eFile_writer_format::NXMXLEGACY);
}
else if (s == "NXmxVDS") {
o.setValue(File_writer_format::eFile_writer_format::NXMXVDS);
}
else if (s == "CBF") {
o.setValue(File_writer_format::eFile_writer_format::CBF);
}
else if (s == "TIFF") {
o.setValue(File_writer_format::eFile_writer_format::TIFF);
} else {
std::stringstream ss;
ss << "Unexpected value " << s << " in json"
<< " cannot be converted to enum of type"
<< " File_writer_format::eFile_writer_format";
throw std::invalid_argument(ss.str());
}
}
File_writer_format::eFile_writer_format File_writer_format::getValue() const
{
return m_value;
}
void File_writer_format::setValue(File_writer_format::eFile_writer_format value)
{
m_value = value;
}
} // namespace org::openapitools::server::model

View File

@@ -0,0 +1,82 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/*
* File_writer_format.h
*
* None - no master file written NXmxLegacy - legacy format with soft links to data files in the master file; necessary for DECTRIS Albula 4.0 and DECTRIS Neggia NXmxVDS - newer format with virtual dataset linking data files in the master file, also includes better metadata handling
*/
#ifndef File_writer_format_H_
#define File_writer_format_H_
#include <nlohmann/json.hpp>
namespace org::openapitools::server::model
{
/// <summary>
/// None - no master file written NXmxLegacy - legacy format with soft links to data files in the master file; necessary for DECTRIS Albula 4.0 and DECTRIS Neggia NXmxVDS - newer format with virtual dataset linking data files in the master file, also includes better metadata handling
/// </summary>
class File_writer_format
{
public:
File_writer_format();
virtual ~File_writer_format() = default;
enum class eFile_writer_format {
// To have a valid default value.
// Avoiding name clashes with user defined
// enum values
INVALID_VALUE_OPENAPI_GENERATED = 0,
NONE,
NXMXLEGACY,
NXMXVDS,
CBF,
TIFF
};
/// <summary>
/// Validate the current data in the model. Throws a ValidationException on failure.
/// </summary>
void validate() const;
/// <summary>
/// Validate the current data in the model. Returns false on error and writes an error
/// message into the given stringstream.
/// </summary>
bool validate(std::stringstream& msg) const;
/// <summary>
/// Helper overload for validate. Used when one model stores another model and calls it's validate.
/// Not meant to be called outside that case.
/// </summary>
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
bool operator==(const File_writer_format& rhs) const;
bool operator!=(const File_writer_format& rhs) const;
/////////////////////////////////////////////
/// File_writer_format members
File_writer_format::eFile_writer_format getValue() const;
void setValue(File_writer_format::eFile_writer_format value);
friend void to_json(nlohmann::json& j, const File_writer_format& o);
friend void from_json(const nlohmann::json& j, File_writer_format& o);
protected:
File_writer_format::eFile_writer_format m_value = File_writer_format::eFile_writer_format::INVALID_VALUE_OPENAPI_GENERATED;
};
} // namespace org::openapitools::server::model
#endif /* File_writer_format_H_ */

View File

@@ -0,0 +1,134 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include "File_writer_settings.h"
#include "Helpers.h"
#include <sstream>
namespace org::openapitools::server::model
{
File_writer_settings::File_writer_settings()
{
m_Overwrite = false;
m_OverwriteIsSet = false;
m_FormatIsSet = false;
}
void File_writer_settings::validate() const
{
std::stringstream msg;
if (!validate(msg))
{
throw org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool File_writer_settings::validate(std::stringstream& msg) const
{
return validate(msg, "");
}
bool File_writer_settings::validate(std::stringstream& msg, const std::string& pathPrefix) const
{
bool success = true;
const std::string _pathPrefix = pathPrefix.empty() ? "File_writer_settings" : pathPrefix;
return success;
}
bool File_writer_settings::operator==(const File_writer_settings& rhs) const
{
return
((!overwriteIsSet() && !rhs.overwriteIsSet()) || (overwriteIsSet() && rhs.overwriteIsSet() && isOverwrite() == rhs.isOverwrite())) &&
((!formatIsSet() && !rhs.formatIsSet()) || (formatIsSet() && rhs.formatIsSet() && getFormat() == rhs.getFormat()))
;
}
bool File_writer_settings::operator!=(const File_writer_settings& rhs) const
{
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const File_writer_settings& o)
{
j = nlohmann::json::object();
if(o.overwriteIsSet())
j["overwrite"] = o.m_Overwrite;
if(o.formatIsSet())
j["format"] = o.m_Format;
}
void from_json(const nlohmann::json& j, File_writer_settings& o)
{
if(j.find("overwrite") != j.end())
{
j.at("overwrite").get_to(o.m_Overwrite);
o.m_OverwriteIsSet = true;
}
if(j.find("format") != j.end())
{
j.at("format").get_to(o.m_Format);
o.m_FormatIsSet = true;
}
}
bool File_writer_settings::isOverwrite() const
{
return m_Overwrite;
}
void File_writer_settings::setOverwrite(bool const value)
{
m_Overwrite = value;
m_OverwriteIsSet = true;
}
bool File_writer_settings::overwriteIsSet() const
{
return m_OverwriteIsSet;
}
void File_writer_settings::unsetOverwrite()
{
m_OverwriteIsSet = false;
}
org::openapitools::server::model::File_writer_format File_writer_settings::getFormat() const
{
return m_Format;
}
void File_writer_settings::setFormat(org::openapitools::server::model::File_writer_format const& value)
{
m_Format = value;
m_FormatIsSet = true;
}
bool File_writer_settings::formatIsSet() const
{
return m_FormatIsSet;
}
void File_writer_settings::unsetFormat()
{
m_FormatIsSet = false;
}
} // namespace org::openapitools::server::model

View File

@@ -0,0 +1,88 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/*
* File_writer_settings.h
*
*
*/
#ifndef File_writer_settings_H_
#define File_writer_settings_H_
#include "File_writer_format.h"
#include <nlohmann/json.hpp>
namespace org::openapitools::server::model
{
/// <summary>
///
/// </summary>
class File_writer_settings
{
public:
File_writer_settings();
virtual ~File_writer_settings() = default;
/// <summary>
/// Validate the current data in the model. Throws a ValidationException on failure.
/// </summary>
void validate() const;
/// <summary>
/// Validate the current data in the model. Returns false on error and writes an error
/// message into the given stringstream.
/// </summary>
bool validate(std::stringstream& msg) const;
/// <summary>
/// Helper overload for validate. Used when one model stores another model and calls it's validate.
/// Not meant to be called outside that case.
/// </summary>
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
bool operator==(const File_writer_settings& rhs) const;
bool operator!=(const File_writer_settings& rhs) const;
/////////////////////////////////////////////
/// File_writer_settings members
/// <summary>
/// Inform jfjoch_write to overwrite existing files. Otherwise files would be saved with .h5.{timestamp}.tmp suffix.
/// </summary>
bool isOverwrite() const;
void setOverwrite(bool const value);
bool overwriteIsSet() const;
void unsetOverwrite();
/// <summary>
///
/// </summary>
org::openapitools::server::model::File_writer_format getFormat() const;
void setFormat(org::openapitools::server::model::File_writer_format const& value);
bool formatIsSet() const;
void unsetFormat();
friend void to_json(nlohmann::json& j, const File_writer_settings& o);
friend void from_json(const nlohmann::json& j, File_writer_settings& o);
protected:
bool m_Overwrite;
bool m_OverwriteIsSet;
org::openapitools::server::model::File_writer_format m_Format;
bool m_FormatIsSet;
};
} // namespace org::openapitools::server::model
#endif /* File_writer_settings_H_ */

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -33,6 +33,8 @@ Fpga_status_inner::Fpga_status_inner()
m_Packets_udp = 0L;
m_Packets_sls = 0L;
m_Idle = false;
m_Pcie_link_speed = 0L;
m_Pcie_link_width = 0L;
}
@@ -55,7 +57,7 @@ bool Fpga_status_inner::validate(std::stringstream& msg, const std::string& path
bool success = true;
const std::string _pathPrefix = pathPrefix.empty() ? "Fpga_status_inner" : pathPrefix;
return success;
}
@@ -98,6 +100,12 @@ bool Fpga_status_inner::operator==(const Fpga_status_inner& rhs) const
&&
(isIdle() == rhs.isIdle())
&&
(getPcieLinkSpeed() == rhs.getPcieLinkSpeed())
&&
(getPcieLinkWidth() == rhs.getPcieLinkWidth())
;
@@ -123,6 +131,8 @@ void to_json(nlohmann::json& j, const Fpga_status_inner& o)
j["packets_udp"] = o.m_Packets_udp;
j["packets_sls"] = o.m_Packets_sls;
j["idle"] = o.m_Idle;
j["pcie_link_speed"] = o.m_Pcie_link_speed;
j["pcie_link_width"] = o.m_Pcie_link_width;
}
@@ -140,6 +150,8 @@ void from_json(const nlohmann::json& j, Fpga_status_inner& o)
j.at("packets_udp").get_to(o.m_Packets_udp);
j.at("packets_sls").get_to(o.m_Packets_sls);
j.at("idle").get_to(o.m_Idle);
j.at("pcie_link_speed").get_to(o.m_Pcie_link_speed);
j.at("pcie_link_width").get_to(o.m_Pcie_link_width);
}
@@ -239,6 +251,22 @@ void Fpga_status_inner::setIdle(bool const value)
{
m_Idle = value;
}
int64_t Fpga_status_inner::getPcieLinkSpeed() const
{
return m_Pcie_link_speed;
}
void Fpga_status_inner::setPcieLinkSpeed(int64_t const value)
{
m_Pcie_link_speed = value;
}
int64_t Fpga_status_inner::getPcieLinkWidth() const
{
return m_Pcie_link_width;
}
void Fpga_status_inner::setPcieLinkWidth(int64_t const value)
{
m_Pcie_link_width = value;
}
} // namespace org::openapitools::server::model

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -118,6 +118,16 @@ public:
/// </summary>
bool isIdle() const;
void setIdle(bool const value);
/// <summary>
/// PCIe link speed measured by generation (expected value is 4 &#x3D;&#x3D; PCIe Gen4)
/// </summary>
int64_t getPcieLinkSpeed() const;
void setPcieLinkSpeed(int64_t const value);
/// <summary>
/// PCIe link width (expected value is 8 &#x3D;&#x3D; x8)
/// </summary>
int64_t getPcieLinkWidth() const;
void setPcieLinkWidth(int64_t const value);
friend void to_json(nlohmann::json& j, const Fpga_status_inner& o);
friend void from_json(const nlohmann::json& j, Fpga_status_inner& o);
@@ -146,6 +156,10 @@ protected:
bool m_Idle;
int64_t m_Pcie_link_speed;
int64_t m_Pcie_link_width;
};

View File

@@ -0,0 +1,122 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include "Geom_refinement_algorithm.h"
#include "Helpers.h"
#include <stdexcept>
#include <sstream>
namespace org::openapitools::server::model
{
Geom_refinement_algorithm::Geom_refinement_algorithm()
{
}
void Geom_refinement_algorithm::validate() const
{
std::stringstream msg;
if (!validate(msg))
{
throw org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool Geom_refinement_algorithm::validate(std::stringstream& msg) const
{
return validate(msg, "");
}
bool Geom_refinement_algorithm::validate(std::stringstream& msg, const std::string& pathPrefix) const
{
bool success = true;
const std::string _pathPrefix = pathPrefix.empty() ? "Geom_refinement_algorithm" : pathPrefix;
if (m_value == Geom_refinement_algorithm::eGeom_refinement_algorithm::INVALID_VALUE_OPENAPI_GENERATED)
{
success = false;
msg << _pathPrefix << ": has no value;";
}
return success;
}
bool Geom_refinement_algorithm::operator==(const Geom_refinement_algorithm& rhs) const
{
return
getValue() == rhs.getValue()
;
}
bool Geom_refinement_algorithm::operator!=(const Geom_refinement_algorithm& rhs) const
{
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const Geom_refinement_algorithm& o)
{
j = nlohmann::json::object();
switch (o.getValue())
{
case Geom_refinement_algorithm::eGeom_refinement_algorithm::INVALID_VALUE_OPENAPI_GENERATED:
j = "INVALID_VALUE_OPENAPI_GENERATED";
break;
case Geom_refinement_algorithm::eGeom_refinement_algorithm::BEAMCENTER:
j = "BeamCenter";
break;
case Geom_refinement_algorithm::eGeom_refinement_algorithm::BEAMCENTERSYMMETRY:
j = "BeamCenterSymmetry";
break;
case Geom_refinement_algorithm::eGeom_refinement_algorithm::NONE:
j = "None";
break;
}
}
void from_json(const nlohmann::json& j, Geom_refinement_algorithm& o)
{
auto s = j.get<std::string>();
if (s == "BeamCenter") {
o.setValue(Geom_refinement_algorithm::eGeom_refinement_algorithm::BEAMCENTER);
}
else if (s == "BeamCenterSymmetry") {
o.setValue(Geom_refinement_algorithm::eGeom_refinement_algorithm::BEAMCENTERSYMMETRY);
}
else if (s == "None") {
o.setValue(Geom_refinement_algorithm::eGeom_refinement_algorithm::NONE);
} else {
std::stringstream ss;
ss << "Unexpected value " << s << " in json"
<< " cannot be converted to enum of type"
<< " Geom_refinement_algorithm::eGeom_refinement_algorithm";
throw std::invalid_argument(ss.str());
}
}
Geom_refinement_algorithm::eGeom_refinement_algorithm Geom_refinement_algorithm::getValue() const
{
return m_value;
}
void Geom_refinement_algorithm::setValue(Geom_refinement_algorithm::eGeom_refinement_algorithm value)
{
m_value = value;
}
} // namespace org::openapitools::server::model

View File

@@ -0,0 +1,80 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/*
* Geom_refinement_algorithm.h
*
* Selection of an post-indexing detector geometry refinement algorithm used by Jungfraujoch. This option is using non-linear least squares optimization to find unit cell and beam center. BeamCenterSymmetry is adding constraints for high-symmetry space groups: orthorhombic, tetragonal, cubic, and hexagonal. For the moment we recommend to use BeamCenterSymmetry only if unit cell is provided, given that the algorithm is not guessing centering properly at the moment.
*/
#ifndef Geom_refinement_algorithm_H_
#define Geom_refinement_algorithm_H_
#include <nlohmann/json.hpp>
namespace org::openapitools::server::model
{
/// <summary>
/// Selection of an post-indexing detector geometry refinement algorithm used by Jungfraujoch. This option is using non-linear least squares optimization to find unit cell and beam center. BeamCenterSymmetry is adding constraints for high-symmetry space groups: orthorhombic, tetragonal, cubic, and hexagonal. For the moment we recommend to use BeamCenterSymmetry only if unit cell is provided, given that the algorithm is not guessing centering properly at the moment.
/// </summary>
class Geom_refinement_algorithm
{
public:
Geom_refinement_algorithm();
virtual ~Geom_refinement_algorithm() = default;
enum class eGeom_refinement_algorithm {
// To have a valid default value.
// Avoiding name clashes with user defined
// enum values
INVALID_VALUE_OPENAPI_GENERATED = 0,
BEAMCENTER,
BEAMCENTERSYMMETRY,
NONE
};
/// <summary>
/// Validate the current data in the model. Throws a ValidationException on failure.
/// </summary>
void validate() const;
/// <summary>
/// Validate the current data in the model. Returns false on error and writes an error
/// message into the given stringstream.
/// </summary>
bool validate(std::stringstream& msg) const;
/// <summary>
/// Helper overload for validate. Used when one model stores another model and calls it's validate.
/// Not meant to be called outside that case.
/// </summary>
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
bool operator==(const Geom_refinement_algorithm& rhs) const;
bool operator!=(const Geom_refinement_algorithm& rhs) const;
/////////////////////////////////////////////
/// Geom_refinement_algorithm members
Geom_refinement_algorithm::eGeom_refinement_algorithm getValue() const;
void setValue(Geom_refinement_algorithm::eGeom_refinement_algorithm value);
friend void to_json(nlohmann::json& j, const Geom_refinement_algorithm& o);
friend void from_json(const nlohmann::json& j, Geom_refinement_algorithm& o);
protected:
Geom_refinement_algorithm::eGeom_refinement_algorithm m_value = Geom_refinement_algorithm::eGeom_refinement_algorithm::INVALID_VALUE_OPENAPI_GENERATED;
};
} // namespace org::openapitools::server::model
#endif /* Geom_refinement_algorithm_H_ */

View File

@@ -0,0 +1,191 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include "Grid_scan.h"
#include "Helpers.h"
#include <sstream>
namespace org::openapitools::server::model
{
Grid_scan::Grid_scan()
{
m_N_fast = 0L;
m_Step_x_um = 0.0f;
m_Step_y_um = 0.0f;
m_Vertical = false;
m_VerticalIsSet = false;
m_Snake = false;
m_SnakeIsSet = false;
}
void Grid_scan::validate() const
{
std::stringstream msg;
if (!validate(msg))
{
throw org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool Grid_scan::validate(std::stringstream& msg) const
{
return validate(msg, "");
}
bool Grid_scan::validate(std::stringstream& msg, const std::string& pathPrefix) const
{
bool success = true;
const std::string _pathPrefix = pathPrefix.empty() ? "Grid_scan" : pathPrefix;
/* N_fast */ {
const int64_t& value = m_N_fast;
const std::string currentValuePath = _pathPrefix + ".nFast";
if (value < 1ll)
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 1;";
}
}
return success;
}
bool Grid_scan::operator==(const Grid_scan& rhs) const
{
return
(getNFast() == rhs.getNFast())
&&
(getStepXUm() == rhs.getStepXUm())
&&
(getStepYUm() == rhs.getStepYUm())
&&
((!verticalIsSet() && !rhs.verticalIsSet()) || (verticalIsSet() && rhs.verticalIsSet() && isVertical() == rhs.isVertical())) &&
((!snakeIsSet() && !rhs.snakeIsSet()) || (snakeIsSet() && rhs.snakeIsSet() && isSnake() == rhs.isSnake()))
;
}
bool Grid_scan::operator!=(const Grid_scan& rhs) const
{
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const Grid_scan& o)
{
j = nlohmann::json::object();
j["n_fast"] = o.m_N_fast;
j["step_x_um"] = o.m_Step_x_um;
j["step_y_um"] = o.m_Step_y_um;
if(o.verticalIsSet())
j["vertical"] = o.m_Vertical;
if(o.snakeIsSet())
j["snake"] = o.m_Snake;
}
void from_json(const nlohmann::json& j, Grid_scan& o)
{
j.at("n_fast").get_to(o.m_N_fast);
j.at("step_x_um").get_to(o.m_Step_x_um);
j.at("step_y_um").get_to(o.m_Step_y_um);
if(j.find("vertical") != j.end())
{
j.at("vertical").get_to(o.m_Vertical);
o.m_VerticalIsSet = true;
}
if(j.find("snake") != j.end())
{
j.at("snake").get_to(o.m_Snake);
o.m_SnakeIsSet = true;
}
}
int64_t Grid_scan::getNFast() const
{
return m_N_fast;
}
void Grid_scan::setNFast(int64_t const value)
{
m_N_fast = value;
}
float Grid_scan::getStepXUm() const
{
return m_Step_x_um;
}
void Grid_scan::setStepXUm(float const value)
{
m_Step_x_um = value;
}
float Grid_scan::getStepYUm() const
{
return m_Step_y_um;
}
void Grid_scan::setStepYUm(float const value)
{
m_Step_y_um = value;
}
bool Grid_scan::isVertical() const
{
return m_Vertical;
}
void Grid_scan::setVertical(bool const value)
{
m_Vertical = value;
m_VerticalIsSet = true;
}
bool Grid_scan::verticalIsSet() const
{
return m_VerticalIsSet;
}
void Grid_scan::unsetVertical()
{
m_VerticalIsSet = false;
}
bool Grid_scan::isSnake() const
{
return m_Snake;
}
void Grid_scan::setSnake(bool const value)
{
m_Snake = value;
m_SnakeIsSet = true;
}
bool Grid_scan::snakeIsSet() const
{
return m_SnakeIsSet;
}
void Grid_scan::unsetSnake()
{
m_SnakeIsSet = false;
}
} // namespace org::openapitools::server::model

View File

@@ -0,0 +1,108 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/*
* Grid_scan.h
*
* Definition of a grid scan (mutually exclusive with &#x60;rotation_axis&#x60;)
*/
#ifndef Grid_scan_H_
#define Grid_scan_H_
#include <nlohmann/json.hpp>
namespace org::openapitools::server::model
{
/// <summary>
/// Definition of a grid scan (mutually exclusive with &#x60;rotation_axis&#x60;)
/// </summary>
class Grid_scan
{
public:
Grid_scan();
virtual ~Grid_scan() = default;
/// <summary>
/// Validate the current data in the model. Throws a ValidationException on failure.
/// </summary>
void validate() const;
/// <summary>
/// Validate the current data in the model. Returns false on error and writes an error
/// message into the given stringstream.
/// </summary>
bool validate(std::stringstream& msg) const;
/// <summary>
/// Helper overload for validate. Used when one model stores another model and calls it's validate.
/// Not meant to be called outside that case.
/// </summary>
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
bool operator==(const Grid_scan& rhs) const;
bool operator!=(const Grid_scan& rhs) const;
/////////////////////////////////////////////
/// Grid_scan members
/// <summary>
/// Number of elements in the fast direction
/// </summary>
int64_t getNFast() const;
void setNFast(int64_t const value);
/// <summary>
/// Step in grid along the fast direction. Can be negative. Positive number: left to right Negative number: right to left
/// </summary>
float getStepXUm() const;
void setStepXUm(float const value);
/// <summary>
/// Step in grid along the slow direction. Can be negative. Positive number: top to bottom Negative number: bottom to top
/// </summary>
float getStepYUm() const;
void setStepYUm(float const value);
/// <summary>
/// If disabled: fast direction &#x3D; X, slow direction &#x3D; Y If enabled: fast direction &#x3D; Y, slow direction &#x3D; X
/// </summary>
bool isVertical() const;
void setVertical(bool const value);
bool verticalIsSet() const;
void unsetVertical();
/// <summary>
/// Flip fast direction for every second row
/// </summary>
bool isSnake() const;
void setSnake(bool const value);
bool snakeIsSet() const;
void unsetSnake();
friend void to_json(nlohmann::json& j, const Grid_scan& o);
friend void from_json(const nlohmann::json& j, Grid_scan& o);
protected:
int64_t m_N_fast;
float m_Step_x_um;
float m_Step_y_um;
bool m_Vertical;
bool m_VerticalIsSet;
bool m_Snake;
bool m_SnakeIsSet;
};
} // namespace org::openapitools::server::model
#endif /* Grid_scan_H_ */

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -0,0 +1,195 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include "Image_buffer_status.h"
#include "Helpers.h"
#include <sstream>
namespace org::openapitools::server::model
{
Image_buffer_status::Image_buffer_status()
{
m_Min_image_number = 0L;
m_Max_image_number = 0L;
m_Total_slots = 0L;
m_Available_slots = 0L;
}
void Image_buffer_status::validate() const
{
std::stringstream msg;
if (!validate(msg))
{
throw org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool Image_buffer_status::validate(std::stringstream& msg) const
{
return validate(msg, "");
}
bool Image_buffer_status::validate(std::stringstream& msg, const std::string& pathPrefix) const
{
bool success = true;
const std::string _pathPrefix = pathPrefix.empty() ? "Image_buffer_status" : pathPrefix;
/* Min_image_number */ {
const int64_t& value = m_Min_image_number;
const std::string currentValuePath = _pathPrefix + ".minImageNumber";
if (value < 0ll)
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 0;";
}
}
/* Max_image_number */ {
const int64_t& value = m_Max_image_number;
const std::string currentValuePath = _pathPrefix + ".maxImageNumber";
if (value < 0ll)
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 0;";
}
}
/* Image_numbers */ {
const std::vector<int64_t>& value = m_Image_numbers;
const std::string currentValuePath = _pathPrefix + ".imageNumbers";
{ // Recursive validation of array elements
const std::string oldValuePath = currentValuePath;
int i = 0;
for (const int64_t& value : value)
{
const std::string currentValuePath = oldValuePath + "[" + std::to_string(i) + "]";
i++;
}
}
}
return success;
}
bool Image_buffer_status::operator==(const Image_buffer_status& rhs) const
{
return
(getMinImageNumber() == rhs.getMinImageNumber())
&&
(getMaxImageNumber() == rhs.getMaxImageNumber())
&&
(getImageNumbers() == rhs.getImageNumbers())
&&
(getTotalSlots() == rhs.getTotalSlots())
&&
(getAvailableSlots() == rhs.getAvailableSlots())
;
}
bool Image_buffer_status::operator!=(const Image_buffer_status& rhs) const
{
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const Image_buffer_status& o)
{
j = nlohmann::json::object();
j["min_image_number"] = o.m_Min_image_number;
j["max_image_number"] = o.m_Max_image_number;
j["image_numbers"] = o.m_Image_numbers;
j["total_slots"] = o.m_Total_slots;
j["available_slots"] = o.m_Available_slots;
}
void from_json(const nlohmann::json& j, Image_buffer_status& o)
{
j.at("min_image_number").get_to(o.m_Min_image_number);
j.at("max_image_number").get_to(o.m_Max_image_number);
j.at("image_numbers").get_to(o.m_Image_numbers);
j.at("total_slots").get_to(o.m_Total_slots);
j.at("available_slots").get_to(o.m_Available_slots);
}
int64_t Image_buffer_status::getMinImageNumber() const
{
return m_Min_image_number;
}
void Image_buffer_status::setMinImageNumber(int64_t const value)
{
m_Min_image_number = value;
}
int64_t Image_buffer_status::getMaxImageNumber() const
{
return m_Max_image_number;
}
void Image_buffer_status::setMaxImageNumber(int64_t const value)
{
m_Max_image_number = value;
}
std::vector<int64_t> Image_buffer_status::getImageNumbers() const
{
return m_Image_numbers;
}
void Image_buffer_status::setImageNumbers(std::vector<int64_t> const value)
{
m_Image_numbers = value;
}
int64_t Image_buffer_status::getTotalSlots() const
{
return m_Total_slots;
}
void Image_buffer_status::setTotalSlots(int64_t const value)
{
m_Total_slots = value;
}
int64_t Image_buffer_status::getAvailableSlots() const
{
return m_Available_slots;
}
void Image_buffer_status::setAvailableSlots(int64_t const value)
{
m_Available_slots = value;
}
} // namespace org::openapitools::server::model

View File

@@ -0,0 +1,105 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/*
* Image_buffer_status.h
*
*
*/
#ifndef Image_buffer_status_H_
#define Image_buffer_status_H_
#include <vector>
#include <nlohmann/json.hpp>
namespace org::openapitools::server::model
{
/// <summary>
///
/// </summary>
class Image_buffer_status
{
public:
Image_buffer_status();
virtual ~Image_buffer_status() = default;
/// <summary>
/// Validate the current data in the model. Throws a ValidationException on failure.
/// </summary>
void validate() const;
/// <summary>
/// Validate the current data in the model. Returns false on error and writes an error
/// message into the given stringstream.
/// </summary>
bool validate(std::stringstream& msg) const;
/// <summary>
/// Helper overload for validate. Used when one model stores another model and calls it's validate.
/// Not meant to be called outside that case.
/// </summary>
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
bool operator==(const Image_buffer_status& rhs) const;
bool operator!=(const Image_buffer_status& rhs) const;
/////////////////////////////////////////////
/// Image_buffer_status members
/// <summary>
/// Smallest image number available in the buffer
/// </summary>
int64_t getMinImageNumber() const;
void setMinImageNumber(int64_t const value);
/// <summary>
/// Largest image number available in the buffer
/// </summary>
int64_t getMaxImageNumber() const;
void setMaxImageNumber(int64_t const value);
/// <summary>
/// Image numbers currently present in the buffer.
/// </summary>
std::vector<int64_t> getImageNumbers() const;
void setImageNumbers(std::vector<int64_t> const value);
/// <summary>
/// Number of slots in the image buffer. This number, compared to number of images in data collection and frame rate will determine \&quot;retention\&quot; rate of the image buffer.
/// </summary>
int64_t getTotalSlots() const;
void setTotalSlots(int64_t const value);
/// <summary>
/// Slots available for the data collection
/// </summary>
int64_t getAvailableSlots() const;
void setAvailableSlots(int64_t const value);
friend void to_json(nlohmann::json& j, const Image_buffer_status& o);
friend void from_json(const nlohmann::json& j, Image_buffer_status& o);
protected:
int64_t m_Min_image_number;
int64_t m_Max_image_number;
std::vector<int64_t> m_Image_numbers;
int64_t m_Total_slots;
int64_t m_Available_slots;
};
} // namespace org::openapitools::server::model
#endif /* Image_buffer_status_H_ */

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View File

@@ -0,0 +1,128 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include "Indexing_algorithm.h"
#include "Helpers.h"
#include <stdexcept>
#include <sstream>
namespace org::openapitools::server::model
{
Indexing_algorithm::Indexing_algorithm()
{
}
void Indexing_algorithm::validate() const
{
std::stringstream msg;
if (!validate(msg))
{
throw org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool Indexing_algorithm::validate(std::stringstream& msg) const
{
return validate(msg, "");
}
bool Indexing_algorithm::validate(std::stringstream& msg, const std::string& pathPrefix) const
{
bool success = true;
const std::string _pathPrefix = pathPrefix.empty() ? "Indexing_algorithm" : pathPrefix;
if (m_value == Indexing_algorithm::eIndexing_algorithm::INVALID_VALUE_OPENAPI_GENERATED)
{
success = false;
msg << _pathPrefix << ": has no value;";
}
return success;
}
bool Indexing_algorithm::operator==(const Indexing_algorithm& rhs) const
{
return
getValue() == rhs.getValue()
;
}
bool Indexing_algorithm::operator!=(const Indexing_algorithm& rhs) const
{
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const Indexing_algorithm& o)
{
j = nlohmann::json::object();
switch (o.getValue())
{
case Indexing_algorithm::eIndexing_algorithm::INVALID_VALUE_OPENAPI_GENERATED:
j = "INVALID_VALUE_OPENAPI_GENERATED";
break;
case Indexing_algorithm::eIndexing_algorithm::FFBIDX:
j = "FFBIDX";
break;
case Indexing_algorithm::eIndexing_algorithm::FFT:
j = "FFT";
break;
case Indexing_algorithm::eIndexing_algorithm::AUTO:
j = "Auto";
break;
case Indexing_algorithm::eIndexing_algorithm::NONE:
j = "None";
break;
}
}
void from_json(const nlohmann::json& j, Indexing_algorithm& o)
{
auto s = j.get<std::string>();
if (s == "FFBIDX") {
o.setValue(Indexing_algorithm::eIndexing_algorithm::FFBIDX);
}
else if (s == "FFT") {
o.setValue(Indexing_algorithm::eIndexing_algorithm::FFT);
}
else if (s == "Auto") {
o.setValue(Indexing_algorithm::eIndexing_algorithm::AUTO);
}
else if (s == "None") {
o.setValue(Indexing_algorithm::eIndexing_algorithm::NONE);
} else {
std::stringstream ss;
ss << "Unexpected value " << s << " in json"
<< " cannot be converted to enum of type"
<< " Indexing_algorithm::eIndexing_algorithm";
throw std::invalid_argument(ss.str());
}
}
Indexing_algorithm::eIndexing_algorithm Indexing_algorithm::getValue() const
{
return m_value;
}
void Indexing_algorithm::setValue(Indexing_algorithm::eIndexing_algorithm value)
{
m_value = value;
}
} // namespace org::openapitools::server::model

View File

@@ -0,0 +1,81 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/*
* Indexing_algorithm.h
*
* Selection of an indexing algorithm used by Jungfraujoch
*/
#ifndef Indexing_algorithm_H_
#define Indexing_algorithm_H_
#include <nlohmann/json.hpp>
namespace org::openapitools::server::model
{
/// <summary>
/// Selection of an indexing algorithm used by Jungfraujoch
/// </summary>
class Indexing_algorithm
{
public:
Indexing_algorithm();
virtual ~Indexing_algorithm() = default;
enum class eIndexing_algorithm {
// To have a valid default value.
// Avoiding name clashes with user defined
// enum values
INVALID_VALUE_OPENAPI_GENERATED = 0,
FFBIDX,
FFT,
AUTO,
NONE
};
/// <summary>
/// Validate the current data in the model. Throws a ValidationException on failure.
/// </summary>
void validate() const;
/// <summary>
/// Validate the current data in the model. Returns false on error and writes an error
/// message into the given stringstream.
/// </summary>
bool validate(std::stringstream& msg) const;
/// <summary>
/// Helper overload for validate. Used when one model stores another model and calls it's validate.
/// Not meant to be called outside that case.
/// </summary>
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
bool operator==(const Indexing_algorithm& rhs) const;
bool operator!=(const Indexing_algorithm& rhs) const;
/////////////////////////////////////////////
/// Indexing_algorithm members
Indexing_algorithm::eIndexing_algorithm getValue() const;
void setValue(Indexing_algorithm::eIndexing_algorithm value);
friend void to_json(nlohmann::json& j, const Indexing_algorithm& o);
friend void from_json(const nlohmann::json& j, Indexing_algorithm& o);
protected:
Indexing_algorithm::eIndexing_algorithm m_value = Indexing_algorithm::eIndexing_algorithm::INVALID_VALUE_OPENAPI_GENERATED;
};
} // namespace org::openapitools::server::model
#endif /* Indexing_algorithm_H_ */

View File

@@ -0,0 +1,329 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include "Indexing_settings.h"
#include "Helpers.h"
#include <sstream>
namespace org::openapitools::server::model
{
Indexing_settings::Indexing_settings()
{
m_Fft_max_unit_cell_A = 250.0f;
m_Fft_min_unit_cell_A = 10.0f;
m_Fft_high_resolution_A = 2.0f;
m_Fft_num_vectors = 16384L;
m_Tolerance = 0.0f;
m_Thread_count = 0L;
m_Unit_cell_dist_tolerance = 0.05f;
}
void Indexing_settings::validate() const
{
std::stringstream msg;
if (!validate(msg))
{
throw org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool Indexing_settings::validate(std::stringstream& msg) const
{
return validate(msg, "");
}
bool Indexing_settings::validate(std::stringstream& msg, const std::string& pathPrefix) const
{
bool success = true;
const std::string _pathPrefix = pathPrefix.empty() ? "Indexing_settings" : pathPrefix;
/* Fft_max_unit_cell_A */ {
const float& value = m_Fft_max_unit_cell_A;
const std::string currentValuePath = _pathPrefix + ".fftMaxUnitCellA";
if (value < static_cast<float>(50))
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 50;";
}
if (value > static_cast<float>(500))
{
success = false;
msg << currentValuePath << ": must be less than or equal to 500;";
}
}
/* Fft_min_unit_cell_A */ {
const float& value = m_Fft_min_unit_cell_A;
const std::string currentValuePath = _pathPrefix + ".fftMinUnitCellA";
if (value < static_cast<float>(5))
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 5;";
}
if (value > static_cast<float>(40))
{
success = false;
msg << currentValuePath << ": must be less than or equal to 40;";
}
}
/* Fft_high_resolution_A */ {
const float& value = m_Fft_high_resolution_A;
const std::string currentValuePath = _pathPrefix + ".fftHighResolutionA";
if (value < static_cast<float>(0.5))
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 0.5;";
}
if (value > static_cast<float>(6.0))
{
success = false;
msg << currentValuePath << ": must be less than or equal to 6.0;";
}
}
/* Fft_num_vectors */ {
const int64_t& value = m_Fft_num_vectors;
const std::string currentValuePath = _pathPrefix + ".fftNumVectors";
if (value < 128ll)
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 128;";
}
}
/* Tolerance */ {
const float& value = m_Tolerance;
const std::string currentValuePath = _pathPrefix + ".tolerance";
if (value < static_cast<float>(0.0))
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 0.0;";
}
if (value > static_cast<float>(0.5))
{
success = false;
msg << currentValuePath << ": must be less than or equal to 0.5;";
}
}
/* Thread_count */ {
const int64_t& value = m_Thread_count;
const std::string currentValuePath = _pathPrefix + ".threadCount";
if (value < 1ll)
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 1;";
}
if (value > 64ll)
{
success = false;
msg << currentValuePath << ": must be less than or equal to 64;";
}
}
/* Unit_cell_dist_tolerance */ {
const float& value = m_Unit_cell_dist_tolerance;
const std::string currentValuePath = _pathPrefix + ".unitCellDistTolerance";
if (value < static_cast<float>(0.00010))
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 0.00010;";
}
if (value > static_cast<float>(0.2001))
{
success = false;
msg << currentValuePath << ": must be less than or equal to 0.2001;";
}
}
return success;
}
bool Indexing_settings::operator==(const Indexing_settings& rhs) const
{
return
(getAlgorithm() == rhs.getAlgorithm())
&&
(getFftMaxUnitCellA() == rhs.getFftMaxUnitCellA())
&&
(getFftMinUnitCellA() == rhs.getFftMinUnitCellA())
&&
(getFftHighResolutionA() == rhs.getFftHighResolutionA())
&&
(getFftNumVectors() == rhs.getFftNumVectors())
&&
(getTolerance() == rhs.getTolerance())
&&
(getThreadCount() == rhs.getThreadCount())
&&
(getGeomRefinementAlgorithm() == rhs.getGeomRefinementAlgorithm())
&&
(getUnitCellDistTolerance() == rhs.getUnitCellDistTolerance())
;
}
bool Indexing_settings::operator!=(const Indexing_settings& rhs) const
{
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const Indexing_settings& o)
{
j = nlohmann::json::object();
j["algorithm"] = o.m_Algorithm;
j["fft_max_unit_cell_A"] = o.m_Fft_max_unit_cell_A;
j["fft_min_unit_cell_A"] = o.m_Fft_min_unit_cell_A;
j["fft_high_resolution_A"] = o.m_Fft_high_resolution_A;
j["fft_num_vectors"] = o.m_Fft_num_vectors;
j["tolerance"] = o.m_Tolerance;
j["thread_count"] = o.m_Thread_count;
j["geom_refinement_algorithm"] = o.m_Geom_refinement_algorithm;
j["unit_cell_dist_tolerance"] = o.m_Unit_cell_dist_tolerance;
}
void from_json(const nlohmann::json& j, Indexing_settings& o)
{
j.at("algorithm").get_to(o.m_Algorithm);
j.at("fft_max_unit_cell_A").get_to(o.m_Fft_max_unit_cell_A);
j.at("fft_min_unit_cell_A").get_to(o.m_Fft_min_unit_cell_A);
j.at("fft_high_resolution_A").get_to(o.m_Fft_high_resolution_A);
j.at("fft_num_vectors").get_to(o.m_Fft_num_vectors);
j.at("tolerance").get_to(o.m_Tolerance);
j.at("thread_count").get_to(o.m_Thread_count);
j.at("geom_refinement_algorithm").get_to(o.m_Geom_refinement_algorithm);
j.at("unit_cell_dist_tolerance").get_to(o.m_Unit_cell_dist_tolerance);
}
org::openapitools::server::model::Indexing_algorithm Indexing_settings::getAlgorithm() const
{
return m_Algorithm;
}
void Indexing_settings::setAlgorithm(org::openapitools::server::model::Indexing_algorithm const& value)
{
m_Algorithm = value;
}
float Indexing_settings::getFftMaxUnitCellA() const
{
return m_Fft_max_unit_cell_A;
}
void Indexing_settings::setFftMaxUnitCellA(float const value)
{
m_Fft_max_unit_cell_A = value;
}
float Indexing_settings::getFftMinUnitCellA() const
{
return m_Fft_min_unit_cell_A;
}
void Indexing_settings::setFftMinUnitCellA(float const value)
{
m_Fft_min_unit_cell_A = value;
}
float Indexing_settings::getFftHighResolutionA() const
{
return m_Fft_high_resolution_A;
}
void Indexing_settings::setFftHighResolutionA(float const value)
{
m_Fft_high_resolution_A = value;
}
int64_t Indexing_settings::getFftNumVectors() const
{
return m_Fft_num_vectors;
}
void Indexing_settings::setFftNumVectors(int64_t const value)
{
m_Fft_num_vectors = value;
}
float Indexing_settings::getTolerance() const
{
return m_Tolerance;
}
void Indexing_settings::setTolerance(float const value)
{
m_Tolerance = value;
}
int64_t Indexing_settings::getThreadCount() const
{
return m_Thread_count;
}
void Indexing_settings::setThreadCount(int64_t const value)
{
m_Thread_count = value;
}
org::openapitools::server::model::Geom_refinement_algorithm Indexing_settings::getGeomRefinementAlgorithm() const
{
return m_Geom_refinement_algorithm;
}
void Indexing_settings::setGeomRefinementAlgorithm(org::openapitools::server::model::Geom_refinement_algorithm const& value)
{
m_Geom_refinement_algorithm = value;
}
float Indexing_settings::getUnitCellDistTolerance() const
{
return m_Unit_cell_dist_tolerance;
}
void Indexing_settings::setUnitCellDistTolerance(float const value)
{
m_Unit_cell_dist_tolerance = value;
}
} // namespace org::openapitools::server::model

View File

@@ -0,0 +1,134 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/*
* Indexing_settings.h
*
* Settings for crystallography indexing
*/
#ifndef Indexing_settings_H_
#define Indexing_settings_H_
#include "Indexing_algorithm.h"
#include "Geom_refinement_algorithm.h"
#include <nlohmann/json.hpp>
namespace org::openapitools::server::model
{
/// <summary>
/// Settings for crystallography indexing
/// </summary>
class Indexing_settings
{
public:
Indexing_settings();
virtual ~Indexing_settings() = default;
/// <summary>
/// Validate the current data in the model. Throws a ValidationException on failure.
/// </summary>
void validate() const;
/// <summary>
/// Validate the current data in the model. Returns false on error and writes an error
/// message into the given stringstream.
/// </summary>
bool validate(std::stringstream& msg) const;
/// <summary>
/// Helper overload for validate. Used when one model stores another model and calls it's validate.
/// Not meant to be called outside that case.
/// </summary>
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
bool operator==(const Indexing_settings& rhs) const;
bool operator!=(const Indexing_settings& rhs) const;
/////////////////////////////////////////////
/// Indexing_settings members
/// <summary>
///
/// </summary>
org::openapitools::server::model::Indexing_algorithm getAlgorithm() const;
void setAlgorithm(org::openapitools::server::model::Indexing_algorithm const& value);
/// <summary>
/// Largest unit cell to be indexed by FFT algorithm; parameter value affects execution time of FFT
/// </summary>
float getFftMaxUnitCellA() const;
void setFftMaxUnitCellA(float const value);
/// <summary>
/// Smallest unit cell to be indexed by FFT algorithm; parameter value affects execution time of FFT
/// </summary>
float getFftMinUnitCellA() const;
void setFftMinUnitCellA(float const value);
/// <summary>
/// Highest resolution of spots used for FFT algorithm; parameter value affects execution time of FFT. There is also correlation between smallest unit cell and max resolution, which need to be checked for very small systems.
/// </summary>
float getFftHighResolutionA() const;
void setFftHighResolutionA(float const value);
/// <summary>
/// Number of search directions for the FFT algorithm; parameter value affects execution time of FFT.
/// </summary>
int64_t getFftNumVectors() const;
void setFftNumVectors(int64_t const value);
/// <summary>
/// Acceptance tolerance for spots after the indexing run - the larger the number, the more spots will be accepted
/// </summary>
float getTolerance() const;
void setTolerance(float const value);
/// <summary>
/// Thread count for indexing algorithm
/// </summary>
int64_t getThreadCount() const;
void setThreadCount(int64_t const value);
/// <summary>
///
/// </summary>
org::openapitools::server::model::Geom_refinement_algorithm getGeomRefinementAlgorithm() const;
void setGeomRefinementAlgorithm(org::openapitools::server::model::Geom_refinement_algorithm const& value);
/// <summary>
/// Relative distance tolerance for unit cell vs. reference; Lattices outside given tolerance will be ignored
/// </summary>
float getUnitCellDistTolerance() const;
void setUnitCellDistTolerance(float const value);
friend void to_json(nlohmann::json& j, const Indexing_settings& o);
friend void from_json(const nlohmann::json& j, Indexing_settings& o);
protected:
org::openapitools::server::model::Indexing_algorithm m_Algorithm;
float m_Fft_max_unit_cell_A;
float m_Fft_min_unit_cell_A;
float m_Fft_high_resolution_A;
int64_t m_Fft_num_vectors;
float m_Tolerance;
int64_t m_Thread_count;
org::openapitools::server::model::Geom_refinement_algorithm m_Geom_refinement_algorithm;
float m_Unit_cell_dist_tolerance;
};
} // namespace org::openapitools::server::model
#endif /* Indexing_settings_H_ */

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -27,6 +27,8 @@ Instrument_metadata::Instrument_metadata()
m_Instrument_name = "";
m_Pulsed_source = false;
m_Pulsed_sourceIsSet = false;
m_Electron_source = false;
m_Electron_sourceIsSet = false;
}
@@ -49,7 +51,7 @@ bool Instrument_metadata::validate(std::stringstream& msg, const std::string& pa
bool success = true;
const std::string _pathPrefix = pathPrefix.empty() ? "Instrument_metadata" : pathPrefix;
return success;
}
@@ -68,7 +70,10 @@ bool Instrument_metadata::operator==(const Instrument_metadata& rhs) const
&&
((!pulsedSourceIsSet() && !rhs.pulsedSourceIsSet()) || (pulsedSourceIsSet() && rhs.pulsedSourceIsSet() && isPulsedSource() == rhs.isPulsedSource()))
((!pulsedSourceIsSet() && !rhs.pulsedSourceIsSet()) || (pulsedSourceIsSet() && rhs.pulsedSourceIsSet() && isPulsedSource() == rhs.isPulsedSource())) &&
((!electronSourceIsSet() && !rhs.electronSourceIsSet()) || (electronSourceIsSet() && rhs.electronSourceIsSet() && isElectronSource() == rhs.isElectronSource()))
;
}
@@ -87,6 +92,8 @@ void to_json(nlohmann::json& j, const Instrument_metadata& o)
j["instrument_name"] = o.m_Instrument_name;
if(o.pulsedSourceIsSet())
j["pulsed_source"] = o.m_Pulsed_source;
if(o.electronSourceIsSet())
j["electron_source"] = o.m_Electron_source;
}
@@ -104,6 +111,11 @@ void from_json(const nlohmann::json& j, Instrument_metadata& o)
j.at("pulsed_source").get_to(o.m_Pulsed_source);
o.m_Pulsed_sourceIsSet = true;
}
if(j.find("electron_source") != j.end())
{
j.at("electron_source").get_to(o.m_Electron_source);
o.m_Electron_sourceIsSet = true;
}
}
@@ -157,6 +169,23 @@ void Instrument_metadata::unsetPulsed_source()
{
m_Pulsed_sourceIsSet = false;
}
bool Instrument_metadata::isElectronSource() const
{
return m_Electron_source;
}
void Instrument_metadata::setElectronSource(bool const value)
{
m_Electron_source = value;
m_Electron_sourceIsSet = true;
}
bool Instrument_metadata::electronSourceIsSet() const
{
return m_Electron_sourceIsSet;
}
void Instrument_metadata::unsetElectron_source()
{
m_Electron_sourceIsSet = false;
}
} // namespace org::openapitools::server::model

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -76,12 +76,19 @@ public:
std::string getInstrumentName() const;
void setInstrumentName(std::string const& value);
/// <summary>
/// Settings specific to XFEL (e.g., every image has to come from TTL trigger, save pulse ID and event code)
/// Settings specific to XFEL (e.g., every image has to come from TTL trigger, save pulse ID and event code)
/// </summary>
bool isPulsedSource() const;
void setPulsedSource(bool const value);
bool pulsedSourceIsSet() const;
void unsetPulsed_source();
/// <summary>
/// Settings specific to electron source (e.g., wavelength definition)
/// </summary>
bool isElectronSource() const;
void setElectronSource(bool const value);
bool electronSourceIsSet() const;
void unsetElectron_source();
friend void to_json(nlohmann::json& j, const Instrument_metadata& o);
friend void from_json(const nlohmann::json& j, Instrument_metadata& o);
@@ -94,6 +101,8 @@ protected:
bool m_Pulsed_source;
bool m_Pulsed_sourceIsSet;
bool m_Electron_source;
bool m_Electron_sourceIsSet;
};

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -24,17 +24,23 @@ Jfjoch_settings::Jfjoch_settings()
m_PcieIsSet = false;
m_ZeromqIsSet = false;
m_InstrumentIsSet = false;
m_File_writerIsSet = false;
m_IndexingIsSet = false;
m_Detector_settingsIsSet = false;
m_Azim_intIsSet = false;
m_Image_formatIsSet = false;
m_Image_buffer_MiB = 2048;
m_Image_buffer_MiBIsSet = false;
m_Verbose = false;
m_VerboseIsSet = false;
m_Receiver_threads = 64;
m_Receiver_threadsIsSet = false;
m_Numa_policy = "";
m_Numa_policyIsSet = false;
m_Frontend_directory = "";
m_SslIsSet = false;
m_Zeromq_previewIsSet = false;
m_Zeromq_metadataIsSet = false;
}
@@ -78,7 +84,7 @@ bool Jfjoch_settings::validate(std::stringstream& msg, const std::string& pathPr
}
}
/* Detector */ {
const std::vector<org::openapitools::server::model::Detector>& value = m_Detector;
@@ -99,7 +105,7 @@ bool Jfjoch_settings::validate(std::stringstream& msg, const std::string& pathPr
}
}
if (imageBufferMiBIsSet())
{
const int32_t& value = m_Image_buffer_MiB;
@@ -113,7 +119,7 @@ bool Jfjoch_settings::validate(std::stringstream& msg, const std::string& pathPr
}
}
if (receiverThreadsIsSet())
{
const int32_t& value = m_Receiver_threads;
@@ -132,7 +138,7 @@ bool Jfjoch_settings::validate(std::stringstream& msg, const std::string& pathPr
}
}
return success;
}
@@ -150,10 +156,16 @@ bool Jfjoch_settings::operator==(const Jfjoch_settings& rhs) const
((!instrumentIsSet() && !rhs.instrumentIsSet()) || (instrumentIsSet() && rhs.instrumentIsSet() && getInstrument() == rhs.getInstrument())) &&
((!fileWriterIsSet() && !rhs.fileWriterIsSet()) || (fileWriterIsSet() && rhs.fileWriterIsSet() && getFileWriter() == rhs.getFileWriter())) &&
(getDetector() == rhs.getDetector())
&&
((!indexingIsSet() && !rhs.indexingIsSet()) || (indexingIsSet() && rhs.indexingIsSet() && getIndexing() == rhs.getIndexing())) &&
((!detectorSettingsIsSet() && !rhs.detectorSettingsIsSet()) || (detectorSettingsIsSet() && rhs.detectorSettingsIsSet() && getDetectorSettings() == rhs.getDetectorSettings())) &&
@@ -166,6 +178,9 @@ bool Jfjoch_settings::operator==(const Jfjoch_settings& rhs) const
((!imageBufferMiBIsSet() && !rhs.imageBufferMiBIsSet()) || (imageBufferMiBIsSet() && rhs.imageBufferMiBIsSet() && getImageBufferMiB() == rhs.getImageBufferMiB())) &&
((!verboseIsSet() && !rhs.verboseIsSet()) || (verboseIsSet() && rhs.verboseIsSet() && isVerbose() == rhs.isVerbose())) &&
((!receiverThreadsIsSet() && !rhs.receiverThreadsIsSet()) || (receiverThreadsIsSet() && rhs.receiverThreadsIsSet() && getReceiverThreads() == rhs.getReceiverThreads())) &&
@@ -174,11 +189,17 @@ bool Jfjoch_settings::operator==(const Jfjoch_settings& rhs) const
(getFrontendDirectory() == rhs.getFrontendDirectory())
&&
((!sslIsSet() && !rhs.sslIsSet()) || (sslIsSet() && rhs.sslIsSet() && getSsl() == rhs.getSsl())) &&
(getImagePusher() == rhs.getImagePusher())
&&
((!zeromqPreviewIsSet() && !rhs.zeromqPreviewIsSet()) || (zeromqPreviewIsSet() && rhs.zeromqPreviewIsSet() && getZeromqPreview() == rhs.getZeromqPreview()))
((!zeromqPreviewIsSet() && !rhs.zeromqPreviewIsSet()) || (zeromqPreviewIsSet() && rhs.zeromqPreviewIsSet() && getZeromqPreview() == rhs.getZeromqPreview())) &&
((!zeromqMetadataIsSet() && !rhs.zeromqMetadataIsSet()) || (zeromqMetadataIsSet() && rhs.zeromqMetadataIsSet() && getZeromqMetadata() == rhs.getZeromqMetadata()))
;
}
@@ -197,7 +218,11 @@ void to_json(nlohmann::json& j, const Jfjoch_settings& o)
j["zeromq"] = o.m_Zeromq;
if(o.instrumentIsSet())
j["instrument"] = o.m_Instrument;
if(o.fileWriterIsSet())
j["file_writer"] = o.m_File_writer;
j["detector"] = o.m_Detector;
if(o.indexingIsSet())
j["indexing"] = o.m_Indexing;
if(o.detectorSettingsIsSet())
j["detector_settings"] = o.m_Detector_settings;
if(o.azimIntIsSet())
@@ -206,14 +231,20 @@ void to_json(nlohmann::json& j, const Jfjoch_settings& o)
j["image_format"] = o.m_Image_format;
if(o.imageBufferMiBIsSet())
j["image_buffer_MiB"] = o.m_Image_buffer_MiB;
if(o.verboseIsSet())
j["verbose"] = o.m_Verbose;
if(o.receiverThreadsIsSet())
j["receiver_threads"] = o.m_Receiver_threads;
if(o.numaPolicyIsSet())
j["numa_policy"] = o.m_Numa_policy;
j["frontend_directory"] = o.m_Frontend_directory;
if(o.sslIsSet())
j["ssl"] = o.m_Ssl;
j["image_pusher"] = o.m_Image_pusher;
if(o.zeromqPreviewIsSet())
j["zeromq_preview"] = o.m_Zeromq_preview;
if(o.zeromqMetadataIsSet())
j["zeromq_metadata"] = o.m_Zeromq_metadata;
}
@@ -234,7 +265,17 @@ void from_json(const nlohmann::json& j, Jfjoch_settings& o)
j.at("instrument").get_to(o.m_Instrument);
o.m_InstrumentIsSet = true;
}
if(j.find("file_writer") != j.end())
{
j.at("file_writer").get_to(o.m_File_writer);
o.m_File_writerIsSet = true;
}
j.at("detector").get_to(o.m_Detector);
if(j.find("indexing") != j.end())
{
j.at("indexing").get_to(o.m_Indexing);
o.m_IndexingIsSet = true;
}
if(j.find("detector_settings") != j.end())
{
j.at("detector_settings").get_to(o.m_Detector_settings);
@@ -255,6 +296,11 @@ void from_json(const nlohmann::json& j, Jfjoch_settings& o)
j.at("image_buffer_MiB").get_to(o.m_Image_buffer_MiB);
o.m_Image_buffer_MiBIsSet = true;
}
if(j.find("verbose") != j.end())
{
j.at("verbose").get_to(o.m_Verbose);
o.m_VerboseIsSet = true;
}
if(j.find("receiver_threads") != j.end())
{
j.at("receiver_threads").get_to(o.m_Receiver_threads);
@@ -266,12 +312,22 @@ void from_json(const nlohmann::json& j, Jfjoch_settings& o)
o.m_Numa_policyIsSet = true;
}
j.at("frontend_directory").get_to(o.m_Frontend_directory);
if(j.find("ssl") != j.end())
{
j.at("ssl").get_to(o.m_Ssl);
o.m_SslIsSet = true;
}
j.at("image_pusher").get_to(o.m_Image_pusher);
if(j.find("zeromq_preview") != j.end())
{
j.at("zeromq_preview").get_to(o.m_Zeromq_preview);
o.m_Zeromq_previewIsSet = true;
}
if(j.find("zeromq_metadata") != j.end())
{
j.at("zeromq_metadata").get_to(o.m_Zeromq_metadata);
o.m_Zeromq_metadataIsSet = true;
}
}
@@ -326,6 +382,23 @@ void Jfjoch_settings::unsetInstrument()
{
m_InstrumentIsSet = false;
}
org::openapitools::server::model::File_writer_settings Jfjoch_settings::getFileWriter() const
{
return m_File_writer;
}
void Jfjoch_settings::setFileWriter(org::openapitools::server::model::File_writer_settings const& value)
{
m_File_writer = value;
m_File_writerIsSet = true;
}
bool Jfjoch_settings::fileWriterIsSet() const
{
return m_File_writerIsSet;
}
void Jfjoch_settings::unsetFile_writer()
{
m_File_writerIsSet = false;
}
std::vector<org::openapitools::server::model::Detector> Jfjoch_settings::getDetector() const
{
return m_Detector;
@@ -334,6 +407,23 @@ void Jfjoch_settings::setDetector(std::vector<org::openapitools::server::model::
{
m_Detector = value;
}
org::openapitools::server::model::Indexing_settings Jfjoch_settings::getIndexing() const
{
return m_Indexing;
}
void Jfjoch_settings::setIndexing(org::openapitools::server::model::Indexing_settings const& value)
{
m_Indexing = value;
m_IndexingIsSet = true;
}
bool Jfjoch_settings::indexingIsSet() const
{
return m_IndexingIsSet;
}
void Jfjoch_settings::unsetIndexing()
{
m_IndexingIsSet = false;
}
org::openapitools::server::model::Detector_settings Jfjoch_settings::getDetectorSettings() const
{
return m_Detector_settings;
@@ -402,6 +492,23 @@ void Jfjoch_settings::unsetImage_buffer_MiB()
{
m_Image_buffer_MiBIsSet = false;
}
bool Jfjoch_settings::isVerbose() const
{
return m_Verbose;
}
void Jfjoch_settings::setVerbose(bool const value)
{
m_Verbose = value;
m_VerboseIsSet = true;
}
bool Jfjoch_settings::verboseIsSet() const
{
return m_VerboseIsSet;
}
void Jfjoch_settings::unsetVerbose()
{
m_VerboseIsSet = false;
}
int32_t Jfjoch_settings::getReceiverThreads() const
{
return m_Receiver_threads;
@@ -444,6 +551,23 @@ void Jfjoch_settings::setFrontendDirectory(std::string const& value)
{
m_Frontend_directory = value;
}
org::openapitools::server::model::Jfjoch_settings_ssl Jfjoch_settings::getSsl() const
{
return m_Ssl;
}
void Jfjoch_settings::setSsl(org::openapitools::server::model::Jfjoch_settings_ssl const& value)
{
m_Ssl = value;
m_SslIsSet = true;
}
bool Jfjoch_settings::sslIsSet() const
{
return m_SslIsSet;
}
void Jfjoch_settings::unsetSsl()
{
m_SslIsSet = false;
}
org::openapitools::server::model::Image_pusher_type Jfjoch_settings::getImagePusher() const
{
return m_Image_pusher;
@@ -469,6 +593,23 @@ void Jfjoch_settings::unsetZeromq_preview()
{
m_Zeromq_previewIsSet = false;
}
org::openapitools::server::model::Zeromq_metadata_settings Jfjoch_settings::getZeromqMetadata() const
{
return m_Zeromq_metadata;
}
void Jfjoch_settings::setZeromqMetadata(org::openapitools::server::model::Zeromq_metadata_settings const& value)
{
m_Zeromq_metadata = value;
m_Zeromq_metadataIsSet = true;
}
bool Jfjoch_settings::zeromqMetadataIsSet() const
{
return m_Zeromq_metadataIsSet;
}
void Jfjoch_settings::unsetZeromq_metadata()
{
m_Zeromq_metadataIsSet = false;
}
} // namespace org::openapitools::server::model

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -19,17 +19,21 @@
#define Jfjoch_settings_H_
#include "Detector.h"
#include "Zeromq_preview_settings.h"
#include "Image_pusher_type.h"
#include "Pcie_devices_inner.h"
#include <string>
#include "Zeromq_settings.h"
#include "File_writer_settings.h"
#include "Azim_int_settings.h"
#include "Image_format_settings.h"
#include "Zeromq_metadata_settings.h"
#include "Detector_settings.h"
#include "Instrument_metadata.h"
#include <vector>
#include "Indexing_settings.h"
#include "Detector.h"
#include "Image_pusher_type.h"
#include "Zeromq_settings.h"
#include "Instrument_metadata.h"
#include "Jfjoch_settings_ssl.h"
#include <nlohmann/json.hpp>
namespace org::openapitools::server::model
@@ -92,11 +96,25 @@ public:
/// <summary>
///
/// </summary>
org::openapitools::server::model::File_writer_settings getFileWriter() const;
void setFileWriter(org::openapitools::server::model::File_writer_settings const& value);
bool fileWriterIsSet() const;
void unsetFile_writer();
/// <summary>
///
/// </summary>
std::vector<org::openapitools::server::model::Detector> getDetector() const;
void setDetector(std::vector<org::openapitools::server::model::Detector> const& value);
/// <summary>
///
/// </summary>
org::openapitools::server::model::Indexing_settings getIndexing() const;
void setIndexing(org::openapitools::server::model::Indexing_settings const& value);
bool indexingIsSet() const;
void unsetIndexing();
/// <summary>
///
/// </summary>
org::openapitools::server::model::Detector_settings getDetectorSettings() const;
void setDetectorSettings(org::openapitools::server::model::Detector_settings const& value);
bool detectorSettingsIsSet() const;
@@ -123,6 +141,13 @@ public:
bool imageBufferMiBIsSet() const;
void unsetImage_buffer_MiB();
/// <summary>
/// Print extra debug information
/// </summary>
bool isVerbose() const;
void setVerbose(bool const value);
bool verboseIsSet() const;
void unsetVerbose();
/// <summary>
/// Number of threads used by the receiver
/// </summary>
int32_t getReceiverThreads() const;
@@ -144,6 +169,13 @@ public:
/// <summary>
///
/// </summary>
org::openapitools::server::model::Jfjoch_settings_ssl getSsl() const;
void setSsl(org::openapitools::server::model::Jfjoch_settings_ssl const& value);
bool sslIsSet() const;
void unsetSsl();
/// <summary>
///
/// </summary>
org::openapitools::server::model::Image_pusher_type getImagePusher() const;
void setImagePusher(org::openapitools::server::model::Image_pusher_type const& value);
/// <summary>
@@ -153,6 +185,13 @@ public:
void setZeromqPreview(org::openapitools::server::model::Zeromq_preview_settings const& value);
bool zeromqPreviewIsSet() const;
void unsetZeromq_preview();
/// <summary>
///
/// </summary>
org::openapitools::server::model::Zeromq_metadata_settings getZeromqMetadata() const;
void setZeromqMetadata(org::openapitools::server::model::Zeromq_metadata_settings const& value);
bool zeromqMetadataIsSet() const;
void unsetZeromq_metadata();
friend void to_json(nlohmann::json& j, const Jfjoch_settings& o);
friend void from_json(const nlohmann::json& j, Jfjoch_settings& o);
@@ -163,8 +202,12 @@ protected:
bool m_ZeromqIsSet;
org::openapitools::server::model::Instrument_metadata m_Instrument;
bool m_InstrumentIsSet;
org::openapitools::server::model::File_writer_settings m_File_writer;
bool m_File_writerIsSet;
std::vector<org::openapitools::server::model::Detector> m_Detector;
org::openapitools::server::model::Indexing_settings m_Indexing;
bool m_IndexingIsSet;
org::openapitools::server::model::Detector_settings m_Detector_settings;
bool m_Detector_settingsIsSet;
org::openapitools::server::model::Azim_int_settings m_Azim_int;
@@ -173,16 +216,22 @@ protected:
bool m_Image_formatIsSet;
int32_t m_Image_buffer_MiB;
bool m_Image_buffer_MiBIsSet;
bool m_Verbose;
bool m_VerboseIsSet;
int32_t m_Receiver_threads;
bool m_Receiver_threadsIsSet;
std::string m_Numa_policy;
bool m_Numa_policyIsSet;
std::string m_Frontend_directory;
org::openapitools::server::model::Jfjoch_settings_ssl m_Ssl;
bool m_SslIsSet;
org::openapitools::server::model::Image_pusher_type m_Image_pusher;
org::openapitools::server::model::Zeromq_preview_settings m_Zeromq_preview;
bool m_Zeromq_previewIsSet;
org::openapitools::server::model::Zeromq_metadata_settings m_Zeromq_metadata;
bool m_Zeromq_metadataIsSet;
};

View File

@@ -0,0 +1,133 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include "Jfjoch_settings_ssl.h"
#include "Helpers.h"
#include <sstream>
namespace org::openapitools::server::model
{
Jfjoch_settings_ssl::Jfjoch_settings_ssl()
{
m_Certificate = "";
m_Key = "";
}
void Jfjoch_settings_ssl::validate() const
{
std::stringstream msg;
if (!validate(msg))
{
throw org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool Jfjoch_settings_ssl::validate(std::stringstream& msg) const
{
return validate(msg, "");
}
bool Jfjoch_settings_ssl::validate(std::stringstream& msg, const std::string& pathPrefix) const
{
bool success = true;
const std::string _pathPrefix = pathPrefix.empty() ? "Jfjoch_settings_ssl" : pathPrefix;
/* Certificate */ {
const std::string& value = m_Certificate;
const std::string currentValuePath = _pathPrefix + ".certificate";
if (value.length() < 1)
{
success = false;
msg << currentValuePath << ": must be at least 1 characters long;";
}
}
/* Key */ {
const std::string& value = m_Key;
const std::string currentValuePath = _pathPrefix + ".key";
if (value.length() < 1)
{
success = false;
msg << currentValuePath << ": must be at least 1 characters long;";
}
}
return success;
}
bool Jfjoch_settings_ssl::operator==(const Jfjoch_settings_ssl& rhs) const
{
return
(getCertificate() == rhs.getCertificate())
&&
(getKey() == rhs.getKey())
;
}
bool Jfjoch_settings_ssl::operator!=(const Jfjoch_settings_ssl& rhs) const
{
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const Jfjoch_settings_ssl& o)
{
j = nlohmann::json::object();
j["certificate"] = o.m_Certificate;
j["key"] = o.m_Key;
}
void from_json(const nlohmann::json& j, Jfjoch_settings_ssl& o)
{
j.at("certificate").get_to(o.m_Certificate);
j.at("key").get_to(o.m_Key);
}
std::string Jfjoch_settings_ssl::getCertificate() const
{
return m_Certificate;
}
void Jfjoch_settings_ssl::setCertificate(std::string const& value)
{
m_Certificate = value;
}
std::string Jfjoch_settings_ssl::getKey() const
{
return m_Key;
}
void Jfjoch_settings_ssl::setKey(std::string const& value)
{
m_Key = value;
}
} // namespace org::openapitools::server::model

View File

@@ -0,0 +1,84 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/*
* Jfjoch_settings_ssl.h
*
*
*/
#ifndef Jfjoch_settings_ssl_H_
#define Jfjoch_settings_ssl_H_
#include <string>
#include <nlohmann/json.hpp>
namespace org::openapitools::server::model
{
/// <summary>
///
/// </summary>
class Jfjoch_settings_ssl
{
public:
Jfjoch_settings_ssl();
virtual ~Jfjoch_settings_ssl() = default;
/// <summary>
/// Validate the current data in the model. Throws a ValidationException on failure.
/// </summary>
void validate() const;
/// <summary>
/// Validate the current data in the model. Returns false on error and writes an error
/// message into the given stringstream.
/// </summary>
bool validate(std::stringstream& msg) const;
/// <summary>
/// Helper overload for validate. Used when one model stores another model and calls it's validate.
/// Not meant to be called outside that case.
/// </summary>
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
bool operator==(const Jfjoch_settings_ssl& rhs) const;
bool operator!=(const Jfjoch_settings_ssl& rhs) const;
/////////////////////////////////////////////
/// Jfjoch_settings_ssl members
/// <summary>
///
/// </summary>
std::string getCertificate() const;
void setCertificate(std::string const& value);
/// <summary>
///
/// </summary>
std::string getKey() const;
void setKey(std::string const& value);
friend void to_json(nlohmann::json& j, const Jfjoch_settings_ssl& o);
friend void from_json(const nlohmann::json& j, Jfjoch_settings_ssl& o);
protected:
std::string m_Certificate;
std::string m_Key;
};
} // namespace org::openapitools::server::model
#endif /* Jfjoch_settings_ssl_H_ */

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -26,13 +26,19 @@ Jfjoch_statistics::Jfjoch_statistics()
m_Detector_settingsIsSet = false;
m_Image_format_settingsIsSet = false;
m_Instrument_metadataIsSet = false;
m_File_writer_settingsIsSet = false;
m_Data_processing_settingsIsSet = false;
m_MeasurementIsSet = false;
m_BrokerIsSet = false;
m_FpgaIsSet = false;
m_CalibrationIsSet = false;
m_Zeromq_previewIsSet = false;
m_Zeromq_metadataIsSet = false;
m_Pixel_maskIsSet = false;
m_RoiIsSet = false;
m_Az_intIsSet = false;
m_BufferIsSet = false;
m_IndexingIsSet = false;
}
@@ -55,7 +61,7 @@ bool Jfjoch_statistics::validate(std::stringstream& msg, const std::string& path
bool success = true;
const std::string _pathPrefix = pathPrefix.empty() ? "Jfjoch_statistics" : pathPrefix;
if (fpgaIsSet())
{
const std::vector<org::openapitools::server::model::Fpga_status_inner>& value = m_Fpga;
@@ -97,7 +103,7 @@ bool Jfjoch_statistics::validate(std::stringstream& msg, const std::string& path
}
}
return success;
}
@@ -122,6 +128,9 @@ bool Jfjoch_statistics::operator==(const Jfjoch_statistics& rhs) const
((!instrumentMetadataIsSet() && !rhs.instrumentMetadataIsSet()) || (instrumentMetadataIsSet() && rhs.instrumentMetadataIsSet() && getInstrumentMetadata() == rhs.getInstrumentMetadata())) &&
((!fileWriterSettingsIsSet() && !rhs.fileWriterSettingsIsSet()) || (fileWriterSettingsIsSet() && rhs.fileWriterSettingsIsSet() && getFileWriterSettings() == rhs.getFileWriterSettings())) &&
((!dataProcessingSettingsIsSet() && !rhs.dataProcessingSettingsIsSet()) || (dataProcessingSettingsIsSet() && rhs.dataProcessingSettingsIsSet() && getDataProcessingSettings() == rhs.getDataProcessingSettings())) &&
@@ -140,7 +149,22 @@ bool Jfjoch_statistics::operator==(const Jfjoch_statistics& rhs) const
((!zeromqPreviewIsSet() && !rhs.zeromqPreviewIsSet()) || (zeromqPreviewIsSet() && rhs.zeromqPreviewIsSet() && getZeromqPreview() == rhs.getZeromqPreview())) &&
((!pixelMaskIsSet() && !rhs.pixelMaskIsSet()) || (pixelMaskIsSet() && rhs.pixelMaskIsSet() && getPixelMask() == rhs.getPixelMask()))
((!zeromqMetadataIsSet() && !rhs.zeromqMetadataIsSet()) || (zeromqMetadataIsSet() && rhs.zeromqMetadataIsSet() && getZeromqMetadata() == rhs.getZeromqMetadata())) &&
((!pixelMaskIsSet() && !rhs.pixelMaskIsSet()) || (pixelMaskIsSet() && rhs.pixelMaskIsSet() && getPixelMask() == rhs.getPixelMask())) &&
((!roiIsSet() && !rhs.roiIsSet()) || (roiIsSet() && rhs.roiIsSet() && getRoi() == rhs.getRoi())) &&
((!azIntIsSet() && !rhs.azIntIsSet()) || (azIntIsSet() && rhs.azIntIsSet() && getAzInt() == rhs.getAzInt())) &&
((!bufferIsSet() && !rhs.bufferIsSet()) || (bufferIsSet() && rhs.bufferIsSet() && getBuffer() == rhs.getBuffer())) &&
((!indexingIsSet() && !rhs.indexingIsSet()) || (indexingIsSet() && rhs.indexingIsSet() && getIndexing() == rhs.getIndexing()))
;
}
@@ -163,6 +187,8 @@ void to_json(nlohmann::json& j, const Jfjoch_statistics& o)
j["image_format_settings"] = o.m_Image_format_settings;
if(o.instrumentMetadataIsSet())
j["instrument_metadata"] = o.m_Instrument_metadata;
if(o.fileWriterSettingsIsSet())
j["file_writer_settings"] = o.m_File_writer_settings;
if(o.dataProcessingSettingsIsSet())
j["data_processing_settings"] = o.m_Data_processing_settings;
if(o.measurementIsSet())
@@ -175,8 +201,18 @@ void to_json(nlohmann::json& j, const Jfjoch_statistics& o)
j["calibration"] = o.m_Calibration;
if(o.zeromqPreviewIsSet())
j["zeromq_preview"] = o.m_Zeromq_preview;
if(o.zeromqMetadataIsSet())
j["zeromq_metadata"] = o.m_Zeromq_metadata;
if(o.pixelMaskIsSet())
j["pixel_mask"] = o.m_Pixel_mask;
if(o.roiIsSet())
j["roi"] = o.m_Roi;
if(o.azIntIsSet())
j["az_int"] = o.m_Az_int;
if(o.bufferIsSet())
j["buffer"] = o.m_Buffer;
if(o.indexingIsSet())
j["indexing"] = o.m_Indexing;
}
@@ -207,6 +243,11 @@ void from_json(const nlohmann::json& j, Jfjoch_statistics& o)
j.at("instrument_metadata").get_to(o.m_Instrument_metadata);
o.m_Instrument_metadataIsSet = true;
}
if(j.find("file_writer_settings") != j.end())
{
j.at("file_writer_settings").get_to(o.m_File_writer_settings);
o.m_File_writer_settingsIsSet = true;
}
if(j.find("data_processing_settings") != j.end())
{
j.at("data_processing_settings").get_to(o.m_Data_processing_settings);
@@ -237,11 +278,36 @@ void from_json(const nlohmann::json& j, Jfjoch_statistics& o)
j.at("zeromq_preview").get_to(o.m_Zeromq_preview);
o.m_Zeromq_previewIsSet = true;
}
if(j.find("zeromq_metadata") != j.end())
{
j.at("zeromq_metadata").get_to(o.m_Zeromq_metadata);
o.m_Zeromq_metadataIsSet = true;
}
if(j.find("pixel_mask") != j.end())
{
j.at("pixel_mask").get_to(o.m_Pixel_mask);
o.m_Pixel_maskIsSet = true;
}
if(j.find("roi") != j.end())
{
j.at("roi").get_to(o.m_Roi);
o.m_RoiIsSet = true;
}
if(j.find("az_int") != j.end())
{
j.at("az_int").get_to(o.m_Az_int);
o.m_Az_intIsSet = true;
}
if(j.find("buffer") != j.end())
{
j.at("buffer").get_to(o.m_Buffer);
o.m_BufferIsSet = true;
}
if(j.find("indexing") != j.end())
{
j.at("indexing").get_to(o.m_Indexing);
o.m_IndexingIsSet = true;
}
}
@@ -330,6 +396,23 @@ void Jfjoch_statistics::unsetInstrument_metadata()
{
m_Instrument_metadataIsSet = false;
}
org::openapitools::server::model::File_writer_settings Jfjoch_statistics::getFileWriterSettings() const
{
return m_File_writer_settings;
}
void Jfjoch_statistics::setFileWriterSettings(org::openapitools::server::model::File_writer_settings const& value)
{
m_File_writer_settings = value;
m_File_writer_settingsIsSet = true;
}
bool Jfjoch_statistics::fileWriterSettingsIsSet() const
{
return m_File_writer_settingsIsSet;
}
void Jfjoch_statistics::unsetFile_writer_settings()
{
m_File_writer_settingsIsSet = false;
}
org::openapitools::server::model::Spot_finding_settings Jfjoch_statistics::getDataProcessingSettings() const
{
return m_Data_processing_settings;
@@ -432,6 +515,23 @@ void Jfjoch_statistics::unsetZeromq_preview()
{
m_Zeromq_previewIsSet = false;
}
org::openapitools::server::model::Zeromq_metadata_settings Jfjoch_statistics::getZeromqMetadata() const
{
return m_Zeromq_metadata;
}
void Jfjoch_statistics::setZeromqMetadata(org::openapitools::server::model::Zeromq_metadata_settings const& value)
{
m_Zeromq_metadata = value;
m_Zeromq_metadataIsSet = true;
}
bool Jfjoch_statistics::zeromqMetadataIsSet() const
{
return m_Zeromq_metadataIsSet;
}
void Jfjoch_statistics::unsetZeromq_metadata()
{
m_Zeromq_metadataIsSet = false;
}
org::openapitools::server::model::Pixel_mask_statistics Jfjoch_statistics::getPixelMask() const
{
return m_Pixel_mask;
@@ -449,6 +549,74 @@ void Jfjoch_statistics::unsetPixel_mask()
{
m_Pixel_maskIsSet = false;
}
org::openapitools::server::model::Roi_definitions Jfjoch_statistics::getRoi() const
{
return m_Roi;
}
void Jfjoch_statistics::setRoi(org::openapitools::server::model::Roi_definitions const& value)
{
m_Roi = value;
m_RoiIsSet = true;
}
bool Jfjoch_statistics::roiIsSet() const
{
return m_RoiIsSet;
}
void Jfjoch_statistics::unsetRoi()
{
m_RoiIsSet = false;
}
org::openapitools::server::model::Azim_int_settings Jfjoch_statistics::getAzInt() const
{
return m_Az_int;
}
void Jfjoch_statistics::setAzInt(org::openapitools::server::model::Azim_int_settings const& value)
{
m_Az_int = value;
m_Az_intIsSet = true;
}
bool Jfjoch_statistics::azIntIsSet() const
{
return m_Az_intIsSet;
}
void Jfjoch_statistics::unsetAz_int()
{
m_Az_intIsSet = false;
}
org::openapitools::server::model::Image_buffer_status Jfjoch_statistics::getBuffer() const
{
return m_Buffer;
}
void Jfjoch_statistics::setBuffer(org::openapitools::server::model::Image_buffer_status const& value)
{
m_Buffer = value;
m_BufferIsSet = true;
}
bool Jfjoch_statistics::bufferIsSet() const
{
return m_BufferIsSet;
}
void Jfjoch_statistics::unsetBuffer()
{
m_BufferIsSet = false;
}
org::openapitools::server::model::Indexing_settings Jfjoch_statistics::getIndexing() const
{
return m_Indexing;
}
void Jfjoch_statistics::setIndexing(org::openapitools::server::model::Indexing_settings const& value)
{
m_Indexing = value;
m_IndexingIsSet = true;
}
bool Jfjoch_statistics::indexingIsSet() const
{
return m_IndexingIsSet;
}
void Jfjoch_statistics::unsetIndexing()
{
m_IndexingIsSet = false;
}
} // namespace org::openapitools::server::model

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -26,11 +26,17 @@
#include "Spot_finding_settings.h"
#include "Zeromq_preview_settings.h"
#include "Detector_list.h"
#include "File_writer_settings.h"
#include "Azim_int_settings.h"
#include "Image_format_settings.h"
#include "Zeromq_metadata_settings.h"
#include "Detector_settings.h"
#include <vector>
#include "Indexing_settings.h"
#include "Detector_status.h"
#include "Roi_definitions.h"
#include "Fpga_status_inner.h"
#include "Image_buffer_status.h"
#include "Instrument_metadata.h"
#include <nlohmann/json.hpp>
@@ -108,6 +114,13 @@ public:
/// <summary>
///
/// </summary>
org::openapitools::server::model::File_writer_settings getFileWriterSettings() const;
void setFileWriterSettings(org::openapitools::server::model::File_writer_settings const& value);
bool fileWriterSettingsIsSet() const;
void unsetFile_writer_settings();
/// <summary>
///
/// </summary>
org::openapitools::server::model::Spot_finding_settings getDataProcessingSettings() const;
void setDataProcessingSettings(org::openapitools::server::model::Spot_finding_settings const& value);
bool dataProcessingSettingsIsSet() const;
@@ -150,10 +163,45 @@ public:
/// <summary>
///
/// </summary>
org::openapitools::server::model::Zeromq_metadata_settings getZeromqMetadata() const;
void setZeromqMetadata(org::openapitools::server::model::Zeromq_metadata_settings const& value);
bool zeromqMetadataIsSet() const;
void unsetZeromq_metadata();
/// <summary>
///
/// </summary>
org::openapitools::server::model::Pixel_mask_statistics getPixelMask() const;
void setPixelMask(org::openapitools::server::model::Pixel_mask_statistics const& value);
bool pixelMaskIsSet() const;
void unsetPixel_mask();
/// <summary>
///
/// </summary>
org::openapitools::server::model::Roi_definitions getRoi() const;
void setRoi(org::openapitools::server::model::Roi_definitions const& value);
bool roiIsSet() const;
void unsetRoi();
/// <summary>
///
/// </summary>
org::openapitools::server::model::Azim_int_settings getAzInt() const;
void setAzInt(org::openapitools::server::model::Azim_int_settings const& value);
bool azIntIsSet() const;
void unsetAz_int();
/// <summary>
///
/// </summary>
org::openapitools::server::model::Image_buffer_status getBuffer() const;
void setBuffer(org::openapitools::server::model::Image_buffer_status const& value);
bool bufferIsSet() const;
void unsetBuffer();
/// <summary>
///
/// </summary>
org::openapitools::server::model::Indexing_settings getIndexing() const;
void setIndexing(org::openapitools::server::model::Indexing_settings const& value);
bool indexingIsSet() const;
void unsetIndexing();
friend void to_json(nlohmann::json& j, const Jfjoch_statistics& o);
friend void from_json(const nlohmann::json& j, Jfjoch_statistics& o);
@@ -168,6 +216,8 @@ protected:
bool m_Image_format_settingsIsSet;
org::openapitools::server::model::Instrument_metadata m_Instrument_metadata;
bool m_Instrument_metadataIsSet;
org::openapitools::server::model::File_writer_settings m_File_writer_settings;
bool m_File_writer_settingsIsSet;
org::openapitools::server::model::Spot_finding_settings m_Data_processing_settings;
bool m_Data_processing_settingsIsSet;
org::openapitools::server::model::Measurement_statistics m_Measurement;
@@ -180,8 +230,18 @@ protected:
bool m_CalibrationIsSet;
org::openapitools::server::model::Zeromq_preview_settings m_Zeromq_preview;
bool m_Zeromq_previewIsSet;
org::openapitools::server::model::Zeromq_metadata_settings m_Zeromq_metadata;
bool m_Zeromq_metadataIsSet;
org::openapitools::server::model::Pixel_mask_statistics m_Pixel_mask;
bool m_Pixel_maskIsSet;
org::openapitools::server::model::Roi_definitions m_Roi;
bool m_RoiIsSet;
org::openapitools::server::model::Azim_int_settings m_Az_int;
bool m_Az_intIsSet;
org::openapitools::server::model::Image_buffer_status m_Buffer;
bool m_BufferIsSet;
org::openapitools::server::model::Indexing_settings m_Indexing;
bool m_IndexingIsSet;
};

View File

@@ -1,8 +1,8 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates.
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.24
* The version of the OpenAPI document: 1.0.0-rc.78
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -57,6 +57,14 @@ Measurement_statistics::Measurement_statistics()
m_Bkg_estimateIsSet = false;
m_Unit_cell = "";
m_Unit_cellIsSet = false;
m_Error_pixels = 0.0f;
m_Error_pixelsIsSet = false;
m_Saturated_pixels = 0.0f;
m_Saturated_pixelsIsSet = false;
m_Roi_beam_pixels = 0.0f;
m_Roi_beam_pixelsIsSet = false;
m_Roi_beam_sum = 0.0f;
m_Roi_beam_sumIsSet = false;
}
@@ -112,7 +120,7 @@ bool Measurement_statistics::validate(std::stringstream& msg, const std::string&
}
}
return success;
}
@@ -173,7 +181,19 @@ bool Measurement_statistics::operator==(const Measurement_statistics& rhs) const
((!bkgEstimateIsSet() && !rhs.bkgEstimateIsSet()) || (bkgEstimateIsSet() && rhs.bkgEstimateIsSet() && getBkgEstimate() == rhs.getBkgEstimate())) &&
((!unitCellIsSet() && !rhs.unitCellIsSet()) || (unitCellIsSet() && rhs.unitCellIsSet() && getUnitCell() == rhs.getUnitCell()))
((!unitCellIsSet() && !rhs.unitCellIsSet()) || (unitCellIsSet() && rhs.unitCellIsSet() && getUnitCell() == rhs.getUnitCell())) &&
((!errorPixelsIsSet() && !rhs.errorPixelsIsSet()) || (errorPixelsIsSet() && rhs.errorPixelsIsSet() && getErrorPixels() == rhs.getErrorPixels())) &&
((!saturatedPixelsIsSet() && !rhs.saturatedPixelsIsSet()) || (saturatedPixelsIsSet() && rhs.saturatedPixelsIsSet() && getSaturatedPixels() == rhs.getSaturatedPixels())) &&
((!roiBeamPixelsIsSet() && !rhs.roiBeamPixelsIsSet()) || (roiBeamPixelsIsSet() && rhs.roiBeamPixelsIsSet() && getRoiBeamPixels() == rhs.getRoiBeamPixels())) &&
((!roiBeamSumIsSet() && !rhs.roiBeamSumIsSet()) || (roiBeamSumIsSet() && rhs.roiBeamSumIsSet() && getRoiBeamSum() == rhs.getRoiBeamSum()))
;
}
@@ -222,6 +242,14 @@ void to_json(nlohmann::json& j, const Measurement_statistics& o)
j["bkg_estimate"] = o.m_Bkg_estimate;
if(o.unitCellIsSet())
j["unit_cell"] = o.m_Unit_cell;
if(o.errorPixelsIsSet())
j["error_pixels"] = o.m_Error_pixels;
if(o.saturatedPixelsIsSet())
j["saturated_pixels"] = o.m_Saturated_pixels;
if(o.roiBeamPixelsIsSet())
j["roi_beam_pixels"] = o.m_Roi_beam_pixels;
if(o.roiBeamSumIsSet())
j["roi_beam_sum"] = o.m_Roi_beam_sum;
}
@@ -317,6 +345,26 @@ void from_json(const nlohmann::json& j, Measurement_statistics& o)
j.at("unit_cell").get_to(o.m_Unit_cell);
o.m_Unit_cellIsSet = true;
}
if(j.find("error_pixels") != j.end())
{
j.at("error_pixels").get_to(o.m_Error_pixels);
o.m_Error_pixelsIsSet = true;
}
if(j.find("saturated_pixels") != j.end())
{
j.at("saturated_pixels").get_to(o.m_Saturated_pixels);
o.m_Saturated_pixelsIsSet = true;
}
if(j.find("roi_beam_pixels") != j.end())
{
j.at("roi_beam_pixels").get_to(o.m_Roi_beam_pixels);
o.m_Roi_beam_pixelsIsSet = true;
}
if(j.find("roi_beam_sum") != j.end())
{
j.at("roi_beam_sum").get_to(o.m_Roi_beam_sum);
o.m_Roi_beam_sumIsSet = true;
}
}
@@ -626,6 +674,74 @@ void Measurement_statistics::unsetUnit_cell()
{
m_Unit_cellIsSet = false;
}
float Measurement_statistics::getErrorPixels() const
{
return m_Error_pixels;
}
void Measurement_statistics::setErrorPixels(float const value)
{
m_Error_pixels = value;
m_Error_pixelsIsSet = true;
}
bool Measurement_statistics::errorPixelsIsSet() const
{
return m_Error_pixelsIsSet;
}
void Measurement_statistics::unsetError_pixels()
{
m_Error_pixelsIsSet = false;
}
float Measurement_statistics::getSaturatedPixels() const
{
return m_Saturated_pixels;
}
void Measurement_statistics::setSaturatedPixels(float const value)
{
m_Saturated_pixels = value;
m_Saturated_pixelsIsSet = true;
}
bool Measurement_statistics::saturatedPixelsIsSet() const
{
return m_Saturated_pixelsIsSet;
}
void Measurement_statistics::unsetSaturated_pixels()
{
m_Saturated_pixelsIsSet = false;
}
float Measurement_statistics::getRoiBeamPixels() const
{
return m_Roi_beam_pixels;
}
void Measurement_statistics::setRoiBeamPixels(float const value)
{
m_Roi_beam_pixels = value;
m_Roi_beam_pixelsIsSet = true;
}
bool Measurement_statistics::roiBeamPixelsIsSet() const
{
return m_Roi_beam_pixelsIsSet;
}
void Measurement_statistics::unsetRoi_beam_pixels()
{
m_Roi_beam_pixelsIsSet = false;
}
float Measurement_statistics::getRoiBeamSum() const
{
return m_Roi_beam_sum;
}
void Measurement_statistics::setRoiBeamSum(float const value)
{
m_Roi_beam_sum = value;
m_Roi_beam_sumIsSet = true;
}
bool Measurement_statistics::roiBeamSumIsSet() const
{
return m_Roi_beam_sumIsSet;
}
void Measurement_statistics::unsetRoi_beam_sum()
{
m_Roi_beam_sumIsSet = false;
}
} // namespace org::openapitools::server::model

Some files were not shown because too many files have changed in this diff Show More