Compare commits
248 Commits
jf_h5reade
...
developer
| Author | SHA1 | Date | |
|---|---|---|---|
| 497b3ed00e | |||
| 300a296c20 | |||
| 01e392b112 | |||
| 5409cec73e | |||
|
|
1c31a85a43 | ||
| 134137ead0 | |||
| 6d3922f487 | |||
| f14cfb0b31 | |||
| cf4e6b65c1 | |||
| 0da80cd898 | |||
| 8e7921ae45 | |||
| b90851a855 | |||
| 683accd914 | |||
| 30e82e4740 | |||
| 08486b9812 | |||
| a5c661ce22 | |||
| 50448cefb4 | |||
| c1e5cfa101 | |||
| ae8c9175bf | |||
| e7f5a2aa11 | |||
| cad44943c3 | |||
| d4f8049623 | |||
| 925cd55b1c | |||
| ec11ba5a54 | |||
| eea4dca449 | |||
| 3285221e8a | |||
|
|
f32fcf1e88 | ||
| 3ff199822d | |||
| 0ba9a269a1 | |||
| afc51c9771 | |||
| 1cf9dc21ab | |||
| 3b92ffb902 | |||
|
|
0490c0ef23 | ||
| af2c6eca0c | |||
|
|
d3dc92b18b | ||
|
|
e243af045d | ||
|
|
1d66f1d26d | ||
|
|
9d40220274 | ||
|
|
41989836e7 | ||
|
|
db91f06c02 | ||
| 5041fd7fef | |||
|
|
d2560aa7f1 | ||
| 13e648ce42 | |||
| f9fdcca028 | |||
| 3684f29e1a | |||
| 9b411ffa25 | |||
| 965f8ab9f2 | |||
|
|
2d8f93a426 | ||
|
|
e7a91d38f2 | ||
| 6e006665ef | |||
| 26846f7c33 | |||
| 5eb8fa07db | |||
| 3387e22796 | |||
| be3749f493 | |||
| c39bd98f2d | |||
| 028bae82e9 | |||
| ddc44e1065 | |||
| 284472b48f | |||
| 6e3acbdf79 | |||
| 5b069d85a8 | |||
| 9af571ea0e | |||
| fff5fa73be | |||
| 15cbaa509e | |||
| 72056ff813 | |||
| 776338a3d4 | |||
| 89fe2a6329 | |||
| 6b763797df | |||
| 92991de5a8 | |||
| efe6124675 | |||
| 292e057004 | |||
| f468c20c57 | |||
| 975caaf813 | |||
| db4a8b9db7 | |||
| 595bf38605 | |||
| d83e9385ed | |||
| 8ca251bbb7 | |||
| f594826e95 | |||
| 071b142b10 | |||
| 956103bbd4 | |||
| f714aa22c5 | |||
| dff2be6cdc | |||
| 35a7458657 | |||
| 6e92acceb2 | |||
| 69dc463b56 | |||
| 953e29a383 | |||
| 3faa7097d3 | |||
| 1eb401d65f | |||
| 6389692c16 | |||
| d64ae91453 | |||
| c8fc7fd6c1 | |||
| 21da221417 | |||
| aa20ceaac1 | |||
| 6bebafa25a | |||
| ebabd37622 | |||
| 55b62f4654 | |||
| 912cf0e671 | |||
| ea01457e1d | |||
| fc5d870583 | |||
| f74bc36984 | |||
| 92648bf5bb | |||
| ee27f0bc1b | |||
| 047793766a | |||
| d91585a39f | |||
| 09709f0f96 | |||
| 2698087efa | |||
| 1bf3d5e67a | |||
| fa508e0376 | |||
| af51776eef | |||
| ef8d8a5fd2 | |||
| d8ee0c2279 | |||
| e1f8c4012f | |||
| d210b0956e | |||
| 3426ca9d32 | |||
| 6b79fcc552 | |||
| e0aadbcc0f | |||
| 767555c5cc | |||
| 45f2dce3fc | |||
| f0c6575a60 | |||
| 2926904cf7 | |||
| fb4a25ecee | |||
| 318b19ad79 | |||
| 9a37cee4e9 | |||
| d18ea00b85 | |||
| 4ff29161d4 | |||
| e0810d973d | |||
| 1caf88858b | |||
| 396ef0a298 | |||
| c3012ec06c | |||
| 34002f5be0 | |||
| b1c6b4b078 | |||
| f9d41f1d66 | |||
| 94a9476550 | |||
| 313fc75950 | |||
| 66ee7954db | |||
| 67042e8315 | |||
| 3bc594862c | |||
| 6c4c60ca71 | |||
| 92fd3f0609 | |||
| 929e441dc6 | |||
| a28c78c47f | |||
| f8a06d78f3 | |||
| 274a338520 | |||
| 36ed20117d | |||
| cd06ea1e31 | |||
| 98d0612314 | |||
| e274524c55 | |||
| f42609b66f | |||
| 5def4bdfc4 | |||
| da3037a8ea | |||
| ba02094c4e | |||
| 5d31d86b83 | |||
| cbd0aed8e5 | |||
| b775dd0efa | |||
| 72bf1fa257 | |||
| 8e20d08af2 | |||
| 856ca1e558 | |||
| 25e4070168 | |||
| ca3311da4c | |||
| 3d4eaec178 | |||
| 91f33edcf8 | |||
| 707bf023c6 | |||
| 23f8981346 | |||
| 8f0c946393 | |||
| 24fcfb3f9d | |||
| 7258adfe15 | |||
| 28792ea7e7 | |||
| 686eebd69b | |||
| 83482c8285 | |||
| 953c3f1587 | |||
| 230d43d1fe | |||
| 24f878a17b | |||
| aac3f8904b | |||
| 8dd9165078 | |||
| 982383980f | |||
| 56aa96e9b5 | |||
| 06f06cfbf4 | |||
| e97eae88bc | |||
| 925176b661 | |||
| e4f329466c | |||
| d19fe8b66a | |||
|
|
f4345a91a1 | ||
| ec67617e5c | |||
|
|
bab6a5e9e1 | ||
|
|
f84454fbc1 | ||
| c92830f854 | |||
| e77fd8d85d | |||
| cd0fb1b7bb | |||
| 50ab20317d | |||
| d0a946a919 | |||
|
|
ed142aa34e | ||
| 1227574590 | |||
|
|
3ac7b579a0 | ||
|
|
feb1b0868e | ||
|
|
6d2f34ef1d | ||
| b36a5b9933 | |||
|
|
d8ce5eabb8 | ||
|
|
ceecb0ca27 | ||
| ac3670dcd2 | |||
| 1c7bc61531 | |||
| 58245a62a4 | |||
| a464262558 | |||
| 995d3e0034 | |||
| 90d57cb6a9 | |||
|
|
30eab42294 | ||
| 1d0eeea7ee | |||
| d7c012d306 | |||
| 1665937540 | |||
|
|
9343e3c667 | ||
|
|
b4c8fc1765 | ||
|
|
3ad4e01a5d | ||
| 015b4add65 | |||
| 9051dae787 | |||
| 68bdd75c9c | |||
| a53873b695 | |||
| 77a39b4ef2 | |||
| 64be8b1e89 | |||
| 68bd9fb4f7 | |||
| 0d5d851585 | |||
| eb3d51d20c | |||
| 9f4298ac15 | |||
| fb79ba768c | |||
| 7bc48e3111 | |||
| 53b90d92d7 | |||
| fb6ef8b818 | |||
| 8bb9de0de1 | |||
| 451b50dfed | |||
| 22f2662e3b | |||
| ce3f555c08 | |||
|
|
dedab6010d | ||
| 62a5fda33f | |||
| 5073769403 | |||
| aabec193ff | |||
| d4a1044fce | |||
| dca0edcfcc | |||
| 5a24a79bf7 | |||
| 91f9c4fa83 | |||
| 3940d6f56e | |||
| f09879a46c | |||
| adf0124ea3 | |||
| ae19c1b102 | |||
| 6e6b1b64e4 | |||
| 9d0ae22981 | |||
| ec3cfc1138 | |||
| 8ec0d37cc6 | |||
| c1406efec6 | |||
| 7844216812 | |||
| 89726ab3ff | |||
| f313f602ba |
33
.gitea/workflows/rh8-local.yml
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
name: Build on local RHEL8
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- developer
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: "detectors-software-RH8"
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Build library
|
||||||
|
run: |
|
||||||
|
source /home/gitea_runner/.bashrc
|
||||||
|
conda activate det
|
||||||
|
mkdir build && cd build
|
||||||
|
conda activate det
|
||||||
|
cmake .. -DSLS_USE_PYTHON=ON
|
||||||
|
make -j 2
|
||||||
|
cd ../pyctbgui
|
||||||
|
make
|
||||||
|
|
||||||
|
- name: Deploy to NFS update server
|
||||||
|
if: gitea.ref == 'refs/heads/developer'
|
||||||
|
run: |
|
||||||
|
sftp -r gitea_runner@mpc2935:/slsDetectorSoftware/RH8 <<< $'put build/bin'
|
||||||
|
sftp -r gitea_runner@mpc2935:/slsDetectorSoftware/RH8 <<< $'put pyctbgui'
|
||||||
@@ -21,9 +21,9 @@ jobs:
|
|||||||
- name: Build library
|
- name: Build library
|
||||||
run: |
|
run: |
|
||||||
mkdir build && cd build
|
mkdir build && cd build
|
||||||
cmake .. -DSLS_USE_PYTHON=ON -DSLS_USE_TESTS=ON
|
cmake .. -DSLS_USE_PYTHON=ON -DSLS_USE_TESTS=ON -DSLS_USE_SIMULATOR=ON
|
||||||
make -j 2
|
make -j 2
|
||||||
|
|
||||||
- name: C++ unit tests
|
- name: C++ unit tests
|
||||||
working-directory: ${{gitea.workspace}}/build
|
working-directory: ${{gitea.workspace}}/build
|
||||||
run: ctest
|
run: ctest -j1 --rerun-failed --output-on-failure
|
||||||
30
.gitea/workflows/rh9-local.yml
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
name: Build on local RHEL9
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- developer
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: "detectors-software-RH9"
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Build library
|
||||||
|
run: |
|
||||||
|
mkdir build && cd build
|
||||||
|
cmake -DSLS_USE_PYTHON=ON -DPython_EXECUTABLE=/usr/bin/python3.13 -DPython_INCLUDE_DIR=/usr/include/python3.13 -DPython_LIBRARY=/usr/lib64/libpython3.13.so ..
|
||||||
|
make -j 2
|
||||||
|
cd ../pyctbgui
|
||||||
|
make
|
||||||
|
|
||||||
|
- name: Deploy to NFS update server
|
||||||
|
if: gitea.ref == 'refs/heads/developer'
|
||||||
|
run: |
|
||||||
|
sftp -r gitea_runner@mpc2935:/slsDetectorSoftware/RH9 <<< $'put build/bin'
|
||||||
|
sftp -r gitea_runner@mpc2935:/slsDetectorSoftware/RH9 <<< $'put pyctbgui'
|
||||||
@@ -19,9 +19,9 @@ jobs:
|
|||||||
- name: Build library
|
- name: Build library
|
||||||
run: |
|
run: |
|
||||||
mkdir build && cd build
|
mkdir build && cd build
|
||||||
cmake .. -DSLS_USE_PYTHON=ON -DSLS_USE_TESTS=ON
|
cmake .. -DSLS_USE_PYTHON=ON -DSLS_USE_TESTS=ON -DSLS_USE_SIMULATOR=ON
|
||||||
make -j 2
|
make -j 2
|
||||||
|
|
||||||
- name: C++ unit tests
|
- name: C++ unit tests
|
||||||
working-directory: ${{gitea.workspace}}/build
|
working-directory: ${{gitea.workspace}}/build
|
||||||
run: ctest
|
run: ctest -j1 --rerun-failed --output-on-failure
|
||||||
64
.github/workflows/build_wheel.yml
vendored
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
name: Build wheel
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
release:
|
||||||
|
types:
|
||||||
|
- published
|
||||||
|
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build_wheels:
|
||||||
|
name: Build wheels on ${{ matrix.os }}
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest,]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Build wheels
|
||||||
|
run: pipx run cibuildwheel==3.2.1
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
|
||||||
|
path: ./wheelhouse/*.whl
|
||||||
|
|
||||||
|
build_sdist:
|
||||||
|
name: Build source distribution
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Build sdist
|
||||||
|
run: pipx run build --sdist
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: cibw-sdist
|
||||||
|
path: dist/*.tar.gz
|
||||||
|
|
||||||
|
upload_pypi:
|
||||||
|
needs: [build_wheels, build_sdist]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
environment: pypi
|
||||||
|
permissions:
|
||||||
|
id-token: write
|
||||||
|
if: github.event_name == 'release' && github.event.action == 'published'
|
||||||
|
# or, alternatively, upload to PyPI on every tag starting with 'v' (remove on: release above to use this)
|
||||||
|
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
|
||||||
|
steps:
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
# unpacks all CIBW artifacts into dist/
|
||||||
|
pattern: cibw-*
|
||||||
|
path: dist
|
||||||
|
merge-multiple: true
|
||||||
|
|
||||||
|
- uses: pypa/gh-action-pypi-publish@release/v1
|
||||||
4
.github/workflows/cmake.yaml
vendored
@@ -19,7 +19,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
python-version: 3.12
|
python-version: 3.12
|
||||||
cache: 'pip'
|
cache: 'pip'
|
||||||
- run: pip install pytest numpy
|
- run: pip install pytest numpy colorama
|
||||||
|
|
||||||
- uses: awalsh128/cache-apt-pkgs-action@latest
|
- uses: awalsh128/cache-apt-pkgs-action@latest
|
||||||
with:
|
with:
|
||||||
@@ -37,7 +37,7 @@ jobs:
|
|||||||
|
|
||||||
- name: C++ unit tests
|
- name: C++ unit tests
|
||||||
working-directory: ${{github.workspace}}/build
|
working-directory: ${{github.workspace}}/build
|
||||||
run: ctest -C ${{env.BUILD_TYPE}} -j1
|
run: ctest -C ${{env.BUILD_TYPE}} -j1 --rerun-failed --output-on-failure
|
||||||
|
|
||||||
- name: Python unit tests
|
- name: Python unit tests
|
||||||
working-directory: ${{github.workspace}}/build/bin
|
working-directory: ${{github.workspace}}/build/bin
|
||||||
|
|||||||
47
.github/workflows/conda_deploy_library.yaml
vendored
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
name: Build and deploy slsdetlib
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types:
|
||||||
|
- published
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
platform: [ubuntu-latest, ] # macos-12, windows-2019]
|
||||||
|
python-version: ["3.12",]
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.platform }}
|
||||||
|
|
||||||
|
# The setup-miniconda action needs this to activate miniconda
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: "bash -l {0}"
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Get conda
|
||||||
|
uses: conda-incubator/setup-miniconda@v3.0.4
|
||||||
|
with:
|
||||||
|
python-version: ${{ matrix.python-version }}
|
||||||
|
channels: conda-forge
|
||||||
|
|
||||||
|
- name: Prepare
|
||||||
|
run: conda install conda-build conda-verify pytest anaconda-client
|
||||||
|
|
||||||
|
- name: Enable upload
|
||||||
|
run: conda config --set anaconda_upload yes
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
env:
|
||||||
|
CONDA_TOKEN: ${{ secrets.CONDA_TOKEN }}
|
||||||
|
run: conda build conda-recipes/main-library --user slsdetectorgroup --token ${CONDA_TOKEN} --output-folder build_output
|
||||||
|
|
||||||
|
- name: Upload all Conda to github as artifacts
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: conda-packages
|
||||||
|
path: build_output/** # Uploads all packages
|
||||||
47
.github/workflows/conda_deploy_slsdet.yaml
vendored
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
name: deploy slsdet
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types:
|
||||||
|
- published
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
platform: [ubuntu-latest, ] # macos-12, windows-2019]
|
||||||
|
python-version: ["3.12",]
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.platform }}
|
||||||
|
|
||||||
|
# The setup-miniconda action needs this to activate miniconda
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: "bash -l {0}"
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Get conda
|
||||||
|
uses: conda-incubator/setup-miniconda@v3.0.4
|
||||||
|
with:
|
||||||
|
python-version: ${{ matrix.python-version }}
|
||||||
|
channels: conda-forge
|
||||||
|
|
||||||
|
- name: Prepare
|
||||||
|
run: conda install conda-build conda-verify pytest anaconda-client
|
||||||
|
|
||||||
|
- name: Enable upload
|
||||||
|
run: conda config --set anaconda_upload yes
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
env:
|
||||||
|
CONDA_TOKEN: ${{ secrets.CONDA_TOKEN }}
|
||||||
|
run: conda build conda-recipes/python-client --user slsdetectorgroup --token ${CONDA_TOKEN} --output-folder build_output
|
||||||
|
|
||||||
|
- name: Upload all Conda packages
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: conda-packages
|
||||||
|
path: build_output/** # Uploads all packages
|
||||||
126
CMakeLists.txt
@@ -21,8 +21,19 @@ if (${CMAKE_VERSION} VERSION_GREATER "3.24")
|
|||||||
endif()
|
endif()
|
||||||
include(cmake/project_version.cmake)
|
include(cmake/project_version.cmake)
|
||||||
include(cmake/SlsAddFlag.cmake)
|
include(cmake/SlsAddFlag.cmake)
|
||||||
|
include(cmake/helpers.cmake)
|
||||||
|
|
||||||
|
|
||||||
|
find_package(Threads REQUIRED)
|
||||||
|
|
||||||
|
# POSIX threads are required for the moment but we use CMake to find them
|
||||||
|
# Once migrated to std::thread this can be removed
|
||||||
|
if(NOT CMAKE_USE_PTHREADS_INIT)
|
||||||
|
message(FATAL_ERROR "A POSIX threads (pthread) implementation is required, but was not found.")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
option(SLS_USE_SYSTEM_ZMQ "Use system installed libzmq" OFF)
|
||||||
|
|
||||||
# Using FetchContent to get libzmq
|
# Using FetchContent to get libzmq
|
||||||
include(FetchContent)
|
include(FetchContent)
|
||||||
@@ -49,7 +60,67 @@ if(NOT PATCH_EXECUTABLE)
|
|||||||
message(FATAL_ERROR "The 'patch' tool is required for patching lib zeromq. Please install it.")
|
message(FATAL_ERROR "The 'patch' tool is required for patching lib zeromq. Please install it.")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(SLS_FETCH_ZMQ_FROM_GITHUB)
|
if(SLS_USE_SYSTEM_ZMQ)
|
||||||
|
# find_package(ZeroMQ REQUIRED)
|
||||||
|
# 1) Try a CMake package config if available (vcpkg, Homebrew, source builds)
|
||||||
|
# Many installs export either ZeroMQ::libzmq or libzmq.
|
||||||
|
find_package(ZeroMQ QUIET CONFIG)
|
||||||
|
|
||||||
|
set(ZEROMQ_TARGET "")
|
||||||
|
|
||||||
|
if (TARGET ZeroMQ::libzmq)
|
||||||
|
set(ZEROMQ_TARGET ZeroMQ::libzmq)
|
||||||
|
message(STATUS "Found target: ${ZEROMQ_TARGET} version: ${ZeroMQ_VERSION}")
|
||||||
|
elseif (TARGET libzmq)
|
||||||
|
set(ZEROMQ_TARGET libzmq)
|
||||||
|
message(STATUS "Found target: ${ZEROMQ_TARGET} version: ${ZeroMQ_VERSION}")
|
||||||
|
elseif (TARGET ZeroMQ::ZeroMQ) # rare older naming
|
||||||
|
set(ZEROMQ_TARGET ZeroMQ::ZeroMQ)
|
||||||
|
message(STATUS "Found target: ${ZEROMQ_TARGET} version: ${ZeroMQ_VERSION}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# 2) Fallback: use pkg-config hints + manual find_* to create an imported target
|
||||||
|
if (NOT ZEROMQ_TARGET)
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
if (PkgConfig_FOUND)
|
||||||
|
pkg_check_modules(PC_ZeroMQ QUIET libzmq)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_path(ZEROMQ_INCLUDE_DIR
|
||||||
|
NAMES zmq.h
|
||||||
|
HINTS ${PC_ZeroMQ_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
find_library(ZEROMQ_LIBRARY
|
||||||
|
NAMES zmq libzmq
|
||||||
|
HINTS ${PC_ZeroMQ_LIBRARY_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
if (ZEROMQ_INCLUDE_DIR AND ZEROMQ_LIBRARY)
|
||||||
|
add_library(libzmq UNKNOWN IMPORTED)
|
||||||
|
set_target_properties(libzmq PROPERTIES
|
||||||
|
IMPORTED_LOCATION "${ZEROMQ_LIBRARY}"
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES "${ZEROMQ_INCLUDE_DIR}"
|
||||||
|
)
|
||||||
|
set(ZEROMQ_TARGET libzmq)
|
||||||
|
endif()
|
||||||
|
message(STATUS "ZeroMQ version (pkg-config): ${PC_ZeroMQ_VERSION}")
|
||||||
|
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# 3) Error out if still not found, with a helpful message
|
||||||
|
if (NOT ZEROMQ_TARGET)
|
||||||
|
message(FATAL_ERROR "ZeroMQ (libzmq) not found. Please install ZeroMQ development files.")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Use it
|
||||||
|
# target_link_libraries(your_target PRIVATE ${ZEROMQ_TARGET})
|
||||||
|
|
||||||
|
message(STATUS "Using system installed libzmq: ${ZeroMQ_LIBRARIES}")
|
||||||
|
message(STATUS "ZeroMQ target: ${ZEROMQ_TARGET}")
|
||||||
|
message(STATUS "ZeroMQ include dirs: ${ZeroMQ_INCLUDE_DIRS}")
|
||||||
|
else()
|
||||||
|
if(SLS_FETCH_ZMQ_FROM_GITHUB)
|
||||||
# Opt in to pull down a zmq version from github instead of
|
# Opt in to pull down a zmq version from github instead of
|
||||||
# using the bundled version
|
# using the bundled version
|
||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
@@ -59,7 +130,7 @@ if(SLS_FETCH_ZMQ_FROM_GITHUB)
|
|||||||
PATCH_COMMAND ${CMAKE_COMMAND} -E chdir <SOURCE_DIR> patch -p1 < ${CMAKE_CURRENT_SOURCE_DIR}/libs/libzmq/libzmq_cmake_version.patch
|
PATCH_COMMAND ${CMAKE_COMMAND} -E chdir <SOURCE_DIR> patch -p1 < ${CMAKE_CURRENT_SOURCE_DIR}/libs/libzmq/libzmq_cmake_version.patch
|
||||||
UPDATE_DISCONNECTED 1
|
UPDATE_DISCONNECTED 1
|
||||||
)
|
)
|
||||||
else()
|
else()
|
||||||
# Standard behaviour use libzmq included in this repo (libs/libzmq)
|
# Standard behaviour use libzmq included in this repo (libs/libzmq)
|
||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
libzmq
|
libzmq
|
||||||
@@ -68,32 +139,32 @@ else()
|
|||||||
PATCH_COMMAND ${CMAKE_COMMAND} -E chdir <SOURCE_DIR> patch -p1 < ${CMAKE_CURRENT_SOURCE_DIR}/libs/libzmq/libzmq_cmake_version.patch
|
PATCH_COMMAND ${CMAKE_COMMAND} -E chdir <SOURCE_DIR> patch -p1 < ${CMAKE_CURRENT_SOURCE_DIR}/libs/libzmq/libzmq_cmake_version.patch
|
||||||
UPDATE_DISCONNECTED 1
|
UPDATE_DISCONNECTED 1
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Disable unwanted options from libzmq
|
|
||||||
set(BUILD_TESTS OFF CACHE BOOL "Switch off libzmq test build")
|
|
||||||
set(BUILD_SHARED OFF CACHE BOOL "Switch off libzmq shared libs")
|
|
||||||
set(WITH_PERF_TOOL OFF CACHE BOOL "")
|
|
||||||
set(ENABLE_CPACK OFF CACHE BOOL "")
|
|
||||||
set(ENABLE_CLANG OFF CACHE BOOL "")
|
|
||||||
set(ENABLE_CURVE OFF CACHE BOOL "")
|
|
||||||
set(ENABLE_DRAFTS OFF CACHE BOOL "")
|
|
||||||
set(ENABLE_PRECOMPILED OFF CACHE BOOL "")
|
|
||||||
set(WITH_DOC OFF CACHE BOOL "")
|
|
||||||
set(WITH_DOCS OFF CACHE BOOL "")
|
|
||||||
|
|
||||||
|
|
||||||
|
# Disable unwanted options from libzmq
|
||||||
|
set(BUILD_TESTS OFF CACHE BOOL "Switch off libzmq test build")
|
||||||
|
set(BUILD_SHARED OFF CACHE BOOL "Switch off libzmq shared libs")
|
||||||
|
set(WITH_PERF_TOOL OFF CACHE BOOL "")
|
||||||
|
set(ENABLE_CPACK OFF CACHE BOOL "")
|
||||||
|
set(ENABLE_CLANG OFF CACHE BOOL "")
|
||||||
|
set(ENABLE_CURVE OFF CACHE BOOL "")
|
||||||
|
set(ENABLE_DRAFTS OFF CACHE BOOL "")
|
||||||
|
set(ENABLE_PRECOMPILED OFF CACHE BOOL "")
|
||||||
|
set(WITH_DOC OFF CACHE BOOL "")
|
||||||
|
set(WITH_DOCS OFF CACHE BOOL "")
|
||||||
|
|
||||||
# Using GetProperties and Populate to be able to exclude zmq
|
|
||||||
# from install (not possible with FetchContent_MakeAvailable(libzmq))
|
# Using GetProperties and Populate to be able to exclude zmq
|
||||||
FetchContent_GetProperties(libzmq)
|
# from install (not possible with FetchContent_MakeAvailable(libzmq))
|
||||||
if(NOT libzmq_POPULATED)
|
FetchContent_GetProperties(libzmq)
|
||||||
|
if(NOT libzmq_POPULATED)
|
||||||
FetchContent_Populate(libzmq)
|
FetchContent_Populate(libzmq)
|
||||||
add_subdirectory(${libzmq_SOURCE_DIR} ${libzmq_BINARY_DIR} EXCLUDE_FROM_ALL)
|
add_subdirectory(${libzmq_SOURCE_DIR} ${libzmq_BINARY_DIR} EXCLUDE_FROM_ALL)
|
||||||
|
endif()
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
# If conda build, always set lib dir to 'lib'
|
# If conda build, always set lib dir to 'lib'
|
||||||
@@ -121,7 +192,7 @@ endif()
|
|||||||
|
|
||||||
|
|
||||||
option(SLS_USE_HDF5 "HDF5 File format" OFF)
|
option(SLS_USE_HDF5 "HDF5 File format" OFF)
|
||||||
option(SLS_BUILD_SHARED_LIBRARIES "Build shared libaries" ON)
|
option(SLS_BUILD_SHARED_LIBRARIES "Build shared libaries" OFF)
|
||||||
option(SLS_USE_TEXTCLIENT "Text Client" ON)
|
option(SLS_USE_TEXTCLIENT "Text Client" ON)
|
||||||
option(SLS_USE_DETECTOR "Detector libs" ON)
|
option(SLS_USE_DETECTOR "Detector libs" ON)
|
||||||
option(SLS_USE_RECEIVER "Receiver" ON)
|
option(SLS_USE_RECEIVER "Receiver" ON)
|
||||||
@@ -193,11 +264,9 @@ find_package(ClangFormat)
|
|||||||
|
|
||||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||||
|
|
||||||
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
default_build_type("Release")
|
||||||
message(STATUS "No build type selected, default to Release")
|
set_std_fs_lib()
|
||||||
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build type (default Release)" FORCE)
|
message(STATUS "Extra linking to fs lib:${STD_FS_LIB}")
|
||||||
endif()
|
|
||||||
|
|
||||||
|
|
||||||
#Enable LTO if available
|
#Enable LTO if available
|
||||||
include(CheckIPOSupported)
|
include(CheckIPOSupported)
|
||||||
@@ -272,6 +341,9 @@ if (NOT TARGET slsProjectCSettings)
|
|||||||
-Wno-format-truncation
|
-Wno-format-truncation
|
||||||
)
|
)
|
||||||
sls_disable_c_warning("-Wstringop-truncation")
|
sls_disable_c_warning("-Wstringop-truncation")
|
||||||
|
target_link_libraries(slsProjectCSettings INTERFACE
|
||||||
|
Threads::Threads
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
54
README.md
@@ -1,24 +1,33 @@
|
|||||||
## Dependencies
|
## Dependencies
|
||||||
Before building from source make sure that you have the [software wiki](https://slsdetectorgroup.github.io/devdoc/dependencies.html) installed. If installing using conda, conda will manage the dependencies. Avoid also installing packages with pip.
|
Before building from source make sure that you have the [dependencies](https://slsdetectorgroup.github.io/devdoc/dependencies.html) installed. If installing using conda, conda will manage the dependencies. Avoid also installing dependency packages with pip.
|
||||||
|
|
||||||
## Documentaion
|
## Documentaion
|
||||||
Detailed documentation including installation can be found in the [software wiki](https://slsdetectorgroup.github.io/devdoc/index.html).
|
Detailed documentation including installation can be found in the [software wiki](https://slsdetectorgroup.github.io/devdoc/index.html).
|
||||||
|
|
||||||
Different releases can be found on the [official site](https://www.psi.ch/en/lxn/software-releases).
|
List of releases can be found on the [official site](https://www.psi.ch/en/lxn/software-releases).
|
||||||
|
|
||||||
Firmware compatiblity can be found in [firmware page](https://github.com/slsdetectorgroup/slsDetectorFirmware)
|
Firmware compatiblity can be found in [firmware page](https://github.com/slsdetectorgroup/slsDetectorFirmware)
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
### 1. Install binaries using conda
|
The slsDetectorPackage provides core detector software implemented in C++, along with Python bindings packaged as the slsdet Python extension module. Choose the option that best fits your environment and use case.
|
||||||
|
|
||||||
|
1. **Install pre-built binaries using conda (Recommended)**: Install pre-built binaries for the C++ client, receiver, GUI and the Python API (`slsdet`), simplifying setup across platforms.
|
||||||
|
|
||||||
|
2. **Pip**: Install only the Python extension module, either by downloading the pre-built library from PyPI or by building the extension locally from source. Available only from v9.2.0 onwards.
|
||||||
|
|
||||||
|
3. **Build from source**: Compile the entire package yourself, including both the C++ core and the Python bindings, for maximum control and customization. However, make sure that you have the dependencies installed. If installing using conda, conda will manage the dependencies. Avoid installing packages with pip and conda simultaneously.
|
||||||
|
|
||||||
|
### 1. Install pre-built binaries using conda (Recommended)
|
||||||
Conda is not only useful to manage python environments but can also
|
Conda is not only useful to manage python environments but can also
|
||||||
be used as a user space package manager. Dates in the tag (for eg. 2020.07.23.dev0)
|
be used as a user space package manager. Dates in the tag (for eg. 2020.07.23.dev0)
|
||||||
are from the developer branch. Please use released tags for stability.
|
are from the developer branch. Please use released tags for stability.
|
||||||
|
|
||||||
We have three different packages available:
|
We have three different packages available:
|
||||||
* **slsdetlib** shared libraries and command line utilities
|
* **slsdetlib** Shared libraries and command line utilities
|
||||||
* **slsdetgui** GUI
|
* **slsdetgui** GUI
|
||||||
* **slsdet** Python bindings
|
* **slsdet** Python bindings
|
||||||
|
* **moenchzmq** Moench
|
||||||
|
|
||||||
```
|
```
|
||||||
#Add channels for dependencies and our library
|
#Add channels for dependencies and our library
|
||||||
@@ -44,11 +53,26 @@ conda search slsdetlib
|
|||||||
conda search slsdet
|
conda search slsdet
|
||||||
# gui
|
# gui
|
||||||
conda search slsdetgui
|
conda search slsdetgui
|
||||||
|
# moench
|
||||||
|
conda search moenchzmq
|
||||||
```
|
```
|
||||||
|
|
||||||
## 2. Build from source
|
## 2. Pip
|
||||||
|
The Python extension module `slsdet` can be installed using pip. This is available from v9.2.0 onwards.
|
||||||
|
|
||||||
### 2.1 Download Source Code from github
|
```
|
||||||
|
#Install the Python extension module from PyPI
|
||||||
|
pip install slsdet
|
||||||
|
|
||||||
|
# or install the python extension locally from source
|
||||||
|
git clone https://github.com/slsdetectorgroup/slsDetectorPackage.git --branch 9.2.0
|
||||||
|
cd slsDetectorPackage
|
||||||
|
pip install .
|
||||||
|
```
|
||||||
|
|
||||||
|
## 3. Build from source
|
||||||
|
|
||||||
|
### 3.1. Download Source Code from github
|
||||||
```
|
```
|
||||||
git clone https://github.com/slsdetectorgroup/slsDetectorPackage.git --branch 7.0.0
|
git clone https://github.com/slsdetectorgroup/slsDetectorPackage.git --branch 7.0.0
|
||||||
```
|
```
|
||||||
@@ -56,10 +80,11 @@ git clone https://github.com/slsdetectorgroup/slsDetectorPackage.git --branch 7.
|
|||||||
> **Note:** For v6.x.x of slsDetectorPackage and older, refer [pybind11 notes on cloning](#Pybind-and-Zeromq).
|
> **Note:** For v6.x.x of slsDetectorPackage and older, refer [pybind11 notes on cloning](#Pybind-and-Zeromq).
|
||||||
|
|
||||||
|
|
||||||
### 2.2 Build from source
|
### 3.2. Build from source
|
||||||
|
|
||||||
|
One can either build using cmake or use the in-built cmk.sh script.
|
||||||
|
|
||||||
### Build using CMake
|
### 3.2.1. Build using CMake
|
||||||
|
|
||||||
```
|
```
|
||||||
# outside slsDetecorPackage folder
|
# outside slsDetecorPackage folder
|
||||||
@@ -99,7 +124,7 @@ ccmake ..
|
|||||||
|
|
||||||
> **Note:** For v7.x.x of slsDetectorPackage and older, refer [zeromq notes for cmake option to hint library location](#Pybind-and-Zeromq).
|
> **Note:** For v7.x.x of slsDetectorPackage and older, refer [zeromq notes for cmake option to hint library location](#Pybind-and-Zeromq).
|
||||||
|
|
||||||
### Build using in-built cmk.sh script
|
### 3.2.2. Build using in-built cmk.sh script
|
||||||
|
|
||||||
```
|
```
|
||||||
The binaries are generated in slsDetectorPackage/build/bin directory.
|
The binaries are generated in slsDetectorPackage/build/bin directory.
|
||||||
@@ -144,9 +169,9 @@ Usage: $0 [-b] [-c] [-d <HDF5 directory>] [-e] [-g] [-h] [-i]
|
|||||||
|
|
||||||
> **Note:** For v7.x.x of slsDetectorPackage and older, refer [zeromq notes for cmk script option to hint library location](#Pybind-and-Zeromq).
|
> **Note:** For v7.x.x of slsDetectorPackage and older, refer [zeromq notes for cmk script option to hint library location](#Pybind-and-Zeromq).
|
||||||
|
|
||||||
### Build on old distributions
|
### 3.3. Build on old distributions using conda
|
||||||
|
|
||||||
If your linux distribution doesn't come with a C++11 compiler (gcc>4.8) then
|
If your linux distribution doesn't come with a C++17 compiler (gcc>8) then
|
||||||
it's possible to install a newer gcc using conda and build the slsDetectorPackage
|
it's possible to install a newer gcc using conda and build the slsDetectorPackage
|
||||||
using this compiler
|
using this compiler
|
||||||
|
|
||||||
@@ -164,7 +189,7 @@ make -j12
|
|||||||
> **Note:** For v7.x.x of slsDetectorPackage and older, refer [zeromq notes for dependencies for conda](#Pybind-and-Zeromq).
|
> **Note:** For v7.x.x of slsDetectorPackage and older, refer [zeromq notes for dependencies for conda](#Pybind-and-Zeromq).
|
||||||
|
|
||||||
|
|
||||||
### Build slsDetectorGui (Qt5)
|
### 3.4. Build slsDetectorGui (Qt5)
|
||||||
|
|
||||||
1. Using pre-built binary on conda
|
1. Using pre-built binary on conda
|
||||||
```
|
```
|
||||||
@@ -215,7 +240,7 @@ cd slsDetectorPackage
|
|||||||
|
|
||||||
> **Note:** For v7.x.x of slsDetectorPackage and older, refer [zeromq notes for dependencies for conda](#Pybind-and-Zeromq).
|
> **Note:** For v7.x.x of slsDetectorPackage and older, refer [zeromq notes for dependencies for conda](#Pybind-and-Zeromq).
|
||||||
|
|
||||||
### Build documentation from package
|
### 3.5. Build documentation from package
|
||||||
The documentation for the slsDetectorPackage is build using a combination
|
The documentation for the slsDetectorPackage is build using a combination
|
||||||
of Doxygen, Sphinx and Breathe. The easiest way to install the dependencies
|
of Doxygen, Sphinx and Breathe. The easiest way to install the dependencies
|
||||||
is to use conda
|
is to use conda
|
||||||
@@ -236,7 +261,7 @@ make rst # rst only, saves time in case the API did not change
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Pybind and Zeromq
|
## 4. Pybind and Zeromq
|
||||||
|
|
||||||
### Pybind11 for Python
|
### Pybind11 for Python
|
||||||
**v8.0.0+**:
|
**v8.0.0+**:
|
||||||
@@ -279,3 +304,4 @@ zeromq-devel must be installed and one can hint its location using
|
|||||||
## Support
|
## Support
|
||||||
dhanya.thattil@psi.ch
|
dhanya.thattil@psi.ch
|
||||||
erik.frojdh@psi.ch
|
erik.frojdh@psi.ch
|
||||||
|
alice.mazzoleni@psi.ch
|
||||||
47
RELEASE.txt
@@ -1,7 +1,7 @@
|
|||||||
SLS Detector Package Major Release x.x.x released on xx.xx.202x
|
SLS Detector Package Major Release x.x.x released on xx.xx.202x
|
||||||
===============================================================
|
===============================================================
|
||||||
|
|
||||||
This document describes the differences between vx.x.x and vx.0.2
|
This document describes the differences between vx.x.x and v10.0.0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -23,23 +23,29 @@ This document describes the differences between vx.x.x and vx.0.2
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
1 New, Changed or Resolved Features
|
1 New, Changed or Resolved Features
|
||||||
=====================================
|
=====================================
|
||||||
|
|
||||||
|
Building shared libraries is disabled by default. If you need to link
|
||||||
|
against any of the libSls*.so libraries, you can enable this by passing
|
||||||
|
-DSLS_BUILD_SHARED_LIBRARIES=ON to CMake.
|
||||||
|
|
||||||
|
Added SLS_USE_SYSTEM_ZMQ option (default OFF) to use the libzmq of the host
|
||||||
|
instead of the one included in our repo.
|
||||||
|
|
||||||
|
Experimental support for building the detector client (including python bindings) on macOS
|
||||||
|
|
||||||
|
``rx_dbitlist`` keeps the order of the passed bit list
|
||||||
|
|
||||||
2 On-board Detector Server Compatibility
|
2 On-board Detector Server Compatibility
|
||||||
==========================================
|
==========================================
|
||||||
|
|
||||||
|
|
||||||
Eiger 9.0.0
|
Eiger 10.0.0
|
||||||
Jungfrau 9.0.0
|
Jungfrau 10.0.0
|
||||||
Mythen3 9.0.0
|
Mythen3 10.0.0
|
||||||
Gotthard2 9.0.0
|
Gotthard2 10.0.0
|
||||||
Moench 9.0.0
|
Moench 10.0.0
|
||||||
|
|
||||||
|
|
||||||
On-board Detector Server Upgrade
|
On-board Detector Server Upgrade
|
||||||
@@ -62,17 +68,16 @@ This document describes the differences between vx.x.x and vx.0.2
|
|||||||
3 Firmware Requirements
|
3 Firmware Requirements
|
||||||
========================
|
========================
|
||||||
|
|
||||||
|
|
||||||
Eiger 02.10.2023 (v32) (updated in 7.0.3)
|
Eiger 02.10.2023 (v32) (updated in 7.0.3)
|
||||||
|
|
||||||
Jungfrau 20.09.2023 (v1.5, HW v1.0) (updated in 8.0.0)
|
Jungfrau 09.02.2025 (v1.6, HW v1.0) (updated in 9.1.0)
|
||||||
21.09.2023 (v2.5, HW v2.0) (updated in 8.0.0)
|
08.02.2025 (v2.6, HW v2.0) (updated in 9.1.0)
|
||||||
|
|
||||||
Mythen3 11.10.2024 (v1.5) (updated in 9.0.0)
|
Mythen3 13.11.2024 (v2.0) (updated in 9.0.0)
|
||||||
|
|
||||||
Gotthard2 03.10.2024 (v1.0) (updated in 9.0.0)
|
Gotthard2 03.10.2024 (v1.0) (updated in 9.0.0)
|
||||||
|
|
||||||
Moench 26.10.2023 (v2.0) (updated in 9.0.0)
|
Moench 26.10.2023 (v2.0) (updated in 8.0.2)
|
||||||
|
|
||||||
|
|
||||||
Detector Upgrade
|
Detector Upgrade
|
||||||
@@ -161,6 +166,15 @@ This document describes the differences between vx.x.x and vx.0.2
|
|||||||
Consuming slsDetectorPackage:
|
Consuming slsDetectorPackage:
|
||||||
https://slsdetectorgroup.github.io/devdoc/consuming.html
|
https://slsdetectorgroup.github.io/devdoc/consuming.html
|
||||||
|
|
||||||
|
Software Architecture
|
||||||
|
https://slsdetectorgroup.github.io/devdoc/softwarearchitecture.html
|
||||||
|
|
||||||
|
Set up commands in config file
|
||||||
|
https://slsdetectorgroup.github.io/devdoc/configcommands.html
|
||||||
|
|
||||||
|
Image Size and Output Characteristics
|
||||||
|
https://slsdetectorgroup.github.io/devdoc/dataformat.html
|
||||||
|
|
||||||
API Examples:
|
API Examples:
|
||||||
https://github.com/slsdetectorgroup/api-examples
|
https://github.com/slsdetectorgroup/api-examples
|
||||||
|
|
||||||
@@ -187,6 +201,14 @@ This document describes the differences between vx.x.x and vx.0.2
|
|||||||
https://slsdetectorgroup.github.io/devdoc/udpheader.html
|
https://slsdetectorgroup.github.io/devdoc/udpheader.html
|
||||||
https://slsdetectorgroup.github.io/devdoc/udpdetspec.html
|
https://slsdetectorgroup.github.io/devdoc/udpdetspec.html
|
||||||
|
|
||||||
|
Output Data:
|
||||||
|
https://slsdetectorgroup.github.io/devdoc/dataformat.html
|
||||||
|
https://slsdetectorgroup.github.io/devdoc/fileformat.html
|
||||||
|
https://slsdetectorgroup.github.io/devdoc/slsreceiverheaderformat.html
|
||||||
|
https://slsdetectorgroup.github.io/devdoc/masterfileattributes.html
|
||||||
|
https://slsdetectorgroup.github.io/devdoc/binaryfileformat.html
|
||||||
|
https://slsdetectorgroup.github.io/devdoc/hdf5fileformat.html
|
||||||
|
|
||||||
slsReceiver Zmq Format:
|
slsReceiver Zmq Format:
|
||||||
https://slsdetectorgroup.github.io/devdoc/slsreceiver.html#zmq-json-header-format
|
https://slsdetectorgroup.github.io/devdoc/slsreceiver.html#zmq-json-header-format
|
||||||
|
|
||||||
@@ -206,3 +228,4 @@ This document describes the differences between vx.x.x and vx.0.2
|
|||||||
|
|
||||||
dhanya.thattil@psi.ch
|
dhanya.thattil@psi.ch
|
||||||
erik.frojdh@psi.ch
|
erik.frojdh@psi.ch
|
||||||
|
alice.mazzoleni@psi.ch
|
||||||
|
|||||||
@@ -25,7 +25,9 @@ mark_as_advanced(
|
|||||||
ClangFormat_BIN)
|
ClangFormat_BIN)
|
||||||
|
|
||||||
if(ClangFormat_FOUND)
|
if(ClangFormat_FOUND)
|
||||||
exec_program(${ClangFormat_BIN} ${CMAKE_CURRENT_SOURCE_DIR} ARGS --version OUTPUT_VARIABLE CLANG_VERSION_TEXT)
|
execute_process(COMMAND ${ClangFormat_BIN} --version
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
OUTPUT_VARIABLE CLANG_VERSION_TEXT)
|
||||||
string(REGEX MATCH "([0-9]+)\\.[0-9]+\\.[0-9]+" CLANG_VERSION ${CLANG_VERSION_TEXT})
|
string(REGEX MATCH "([0-9]+)\\.[0-9]+\\.[0-9]+" CLANG_VERSION ${CLANG_VERSION_TEXT})
|
||||||
if((${CLANG_VERSION} GREATER "9") OR (${CLANG_VERSION} EQUAL "9"))
|
if((${CLANG_VERSION} GREATER "9") OR (${CLANG_VERSION} EQUAL "9"))
|
||||||
# A CMake script to find all source files and setup clang-format targets for them
|
# A CMake script to find all source files and setup clang-format targets for them
|
||||||
|
|||||||
46
cmake/helpers.cmake
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
function(default_build_type val)
|
||||||
|
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||||
|
message(STATUS "No build type selected, default to Release")
|
||||||
|
set(CMAKE_BUILD_TYPE ${val} CACHE STRING "Build type (default ${val})" FORCE)
|
||||||
|
endif()
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
function(set_std_fs_lib)
|
||||||
|
# from pybind11
|
||||||
|
# Check if we need to add -lstdc++fs or -lc++fs or nothing
|
||||||
|
if(DEFINED CMAKE_CXX_STANDARD AND CMAKE_CXX_STANDARD LESS 17)
|
||||||
|
set(STD_FS_NO_LIB_NEEDED TRUE)
|
||||||
|
elseif(MSVC)
|
||||||
|
set(STD_FS_NO_LIB_NEEDED TRUE)
|
||||||
|
else()
|
||||||
|
file(
|
||||||
|
WRITE ${CMAKE_CURRENT_BINARY_DIR}/main.cpp
|
||||||
|
"#include <filesystem>\nint main(int argc, char ** argv) {\n std::filesystem::path p(argv[0]);\n return p.string().length();\n}"
|
||||||
|
)
|
||||||
|
try_compile(
|
||||||
|
STD_FS_NO_LIB_NEEDED ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
SOURCES ${CMAKE_CURRENT_BINARY_DIR}/main.cpp
|
||||||
|
COMPILE_DEFINITIONS -std=c++17)
|
||||||
|
try_compile(
|
||||||
|
STD_FS_NEEDS_STDCXXFS ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
SOURCES ${CMAKE_CURRENT_BINARY_DIR}/main.cpp
|
||||||
|
COMPILE_DEFINITIONS -std=c++17
|
||||||
|
LINK_LIBRARIES stdc++fs)
|
||||||
|
try_compile(
|
||||||
|
STD_FS_NEEDS_CXXFS ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
SOURCES ${CMAKE_CURRENT_BINARY_DIR}/main.cpp
|
||||||
|
COMPILE_DEFINITIONS -std=c++17
|
||||||
|
LINK_LIBRARIES c++fs)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(${STD_FS_NEEDS_STDCXXFS})
|
||||||
|
set(STD_FS_LIB stdc++fs PARENT_SCOPE)
|
||||||
|
elseif(${STD_FS_NEEDS_CXXFS})
|
||||||
|
set(STD_FS_LIB c++fs PARENT_SCOPE)
|
||||||
|
elseif(${STD_FS_NO_LIB_NEEDED})
|
||||||
|
set(STD_FS_LIB "" PARENT_SCOPE)
|
||||||
|
else()
|
||||||
|
message(WARNING "Unknown C++17 compiler - not passing -lstdc++fs")
|
||||||
|
set(STD_FS_LIB "")
|
||||||
|
endif()
|
||||||
|
endfunction()
|
||||||
@@ -19,6 +19,7 @@ cmake .. -G Ninja \
|
|||||||
-DSLS_USE_PYTHON=OFF \
|
-DSLS_USE_PYTHON=OFF \
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
-DSLS_USE_HDF5=OFF \
|
-DSLS_USE_HDF5=OFF \
|
||||||
|
-DSLS_USE_SYSTEM_ZMQ=ON \
|
||||||
|
|
||||||
NCORES=$(getconf _NPROCESSORS_ONLN)
|
NCORES=$(getconf _NPROCESSORS_ONLN)
|
||||||
echo "Building using: ${NCORES} cores"
|
echo "Building using: ${NCORES} cores"
|
||||||
|
|||||||
@@ -28,6 +28,8 @@ requirements:
|
|||||||
- libgl-devel # [linux]
|
- libgl-devel # [linux]
|
||||||
- libtiff
|
- libtiff
|
||||||
- zlib
|
- zlib
|
||||||
|
- expat
|
||||||
|
- zeromq
|
||||||
|
|
||||||
run:
|
run:
|
||||||
- libstdcxx-ng
|
- libstdcxx-ng
|
||||||
@@ -58,6 +60,7 @@ outputs:
|
|||||||
- {{compiler('cxx')}}
|
- {{compiler('cxx')}}
|
||||||
- {{ pin_subpackage('slsdetlib', exact=True) }}
|
- {{ pin_subpackage('slsdetlib', exact=True) }}
|
||||||
|
|
||||||
|
|
||||||
run:
|
run:
|
||||||
- {{ pin_subpackage('slsdetlib', exact=True) }}
|
- {{ pin_subpackage('slsdetlib', exact=True) }}
|
||||||
- qt 5.*
|
- qt 5.*
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ python:
|
|||||||
- 3.11
|
- 3.11
|
||||||
- 3.12
|
- 3.12
|
||||||
- 3.13
|
- 3.13
|
||||||
|
- 3.14
|
||||||
|
|
||||||
|
|
||||||
c_compiler:
|
c_compiler:
|
||||||
- gcc # [linux]
|
- gcc # [linux]
|
||||||
|
|||||||
@@ -9,11 +9,11 @@ package:
|
|||||||
build:
|
build:
|
||||||
number: 0
|
number: 0
|
||||||
script:
|
script:
|
||||||
- unset CMAKE_GENERATOR && {{ PYTHON }} -m pip install . -vv # [not win]
|
- unset CMAKE_GENERATOR && {{ PYTHON }} -m pip install . -vv --config-settings=cmake.define.SLS_USE_SYSTEM_ZMQ=ON # [not win]
|
||||||
|
|
||||||
requirements:
|
requirements:
|
||||||
build:
|
build:
|
||||||
- python {{python}}
|
- python
|
||||||
- {{ compiler('c') }}
|
- {{ compiler('c') }}
|
||||||
- {{ stdlib("c") }}
|
- {{ stdlib("c") }}
|
||||||
- {{ compiler('cxx') }}
|
- {{ compiler('cxx') }}
|
||||||
@@ -21,7 +21,7 @@ requirements:
|
|||||||
host:
|
host:
|
||||||
- cmake
|
- cmake
|
||||||
- ninja
|
- ninja
|
||||||
- python {{python}}
|
- python
|
||||||
- pip
|
- pip
|
||||||
- scikit-build-core
|
- scikit-build-core
|
||||||
- pybind11 >=2.13.0
|
- pybind11 >=2.13.0
|
||||||
@@ -31,7 +31,7 @@ requirements:
|
|||||||
- catch2
|
- catch2
|
||||||
|
|
||||||
run:
|
run:
|
||||||
- python {{python}}
|
- python
|
||||||
- numpy
|
- numpy
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ set(SPHINX_SOURCE_FILES
|
|||||||
src/pyexamples.rst
|
src/pyexamples.rst
|
||||||
src/pyPatternGenerator.rst
|
src/pyPatternGenerator.rst
|
||||||
src/servers.rst
|
src/servers.rst
|
||||||
|
src/multidet.rst
|
||||||
src/receiver_api.rst
|
src/receiver_api.rst
|
||||||
src/result.rst
|
src/result.rst
|
||||||
src/type_traits.rst
|
src/type_traits.rst
|
||||||
@@ -66,6 +67,9 @@ set(SPHINX_SOURCE_FILES
|
|||||||
src/binaryfileformat.rst
|
src/binaryfileformat.rst
|
||||||
src/hdf5fileformat.rst
|
src/hdf5fileformat.rst
|
||||||
src/zmqjsonheaderformat.rst
|
src/zmqjsonheaderformat.rst
|
||||||
|
src/dataformat.rst
|
||||||
|
src/softwarearchitecture.rst
|
||||||
|
src/configcommands.rst
|
||||||
)
|
)
|
||||||
|
|
||||||
foreach(filename ${SPHINX_SOURCE_FILES})
|
foreach(filename ${SPHINX_SOURCE_FILES})
|
||||||
@@ -83,11 +87,16 @@ configure_file(
|
|||||||
"${SPHINX_BUILD}/gen_server_doc.py"
|
"${SPHINX_BUILD}/gen_server_doc.py"
|
||||||
@ONLY)
|
@ONLY)
|
||||||
|
|
||||||
configure_file(
|
configure_file(
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/static/extra.css"
|
"${CMAKE_CURRENT_SOURCE_DIR}/static/extra.css"
|
||||||
"${SPHINX_BUILD}/static/css/extra.css"
|
"${SPHINX_BUILD}/static/css/extra.css"
|
||||||
@ONLY)
|
@ONLY)
|
||||||
|
|
||||||
|
|
||||||
|
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/src/images
|
||||||
|
DESTINATION ${SPHINX_BUILD}/src)
|
||||||
|
|
||||||
|
|
||||||
add_custom_target(server_rst python gen_server_doc.py)
|
add_custom_target(server_rst python gen_server_doc.py)
|
||||||
|
|
||||||
add_custom_target(docs
|
add_custom_target(docs
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ print(sys.path)
|
|||||||
|
|
||||||
# -- Project information -----------------------------------------------------
|
# -- Project information -----------------------------------------------------
|
||||||
|
|
||||||
project = 'slsDetectorPackage'
|
project = 'slsDetectorPackage @PROJECT_VERSION@'
|
||||||
copyright = '2020, PSD Detector Group'
|
copyright = '2020, PSD Detector Group'
|
||||||
author = 'PSD Detector Group'
|
author = 'PSD Detector Group'
|
||||||
version = '@PROJECT_VERSION@'
|
version = '@PROJECT_VERSION@'
|
||||||
|
|||||||
1309
docs/images_src/detector_data_format.drawio
Normal file
787
docs/images_src/system_communication_architecture.drawio
Normal file
@@ -0,0 +1,787 @@
|
|||||||
|
<mxfile host="app.diagrams.net" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36" version="28.1.0">
|
||||||
|
<diagram name="Page-1" id="SqHbah1k9D3XqnipfQD4">
|
||||||
|
<mxGraphModel grid="0" page="0" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
|
||||||
|
<root>
|
||||||
|
<mxCell id="0" />
|
||||||
|
<mxCell id="1" parent="0" />
|
||||||
|
<mxCell id="kpcteDQP5Q-WdnKVJ5EM-1" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#BBDDFF;strokeColor=#BBEEFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="459" y="71" width="171" height="134" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="QgYz-w7MwsADk0cZRM1J-27" value="<p><font face="Courier New" style="">Client listening to&nbsp;<br><font style="">zmqport</font> : <font style=""><b style="">30001</b></font><br><font style="">zmqip</font>&nbsp; &nbsp;: <font style=""><b style="">129.129.100.115</b></font></font></p>" style="text;html=1;align=left;verticalAlign=middle;resizable=1;points=[];autosize=1;strokeColor=#4A7B72;fillColor=default;fontColor=#4A7B72;movable=1;rotatable=1;deletable=1;editable=1;locked=0;connectable=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-351.99" y="2247" width="186.49" height="51" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="IUwO_ccEPv4BRx6tuxwP-13" value="<font face="Comic Sans MS">Client/ GUI</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#AAAAFF;strokeColor=#AAAAFF;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="457.65" y="2121" width="132" height="68" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-164" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#E6E6E6;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-340" y="4949" width="810" height="621" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-162" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#DDEEDD;fontColor=#333333;strokeColor=#E6E6E6;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-240" y="5215" width="680" height="325" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-149" value="<font face="Courier New">&lt;&lt;class&gt;&gt; Module</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#AAEEEE;strokeColor=#77BBBB;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="58.870000000000005" y="5418" width="196" height="84" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-148" value="<font face="Courier New">&lt;&lt;class&gt;&gt; Module</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#99DDDD;strokeColor=#77BBBB;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="47.629999999999995" y="5405" width="196" height="84" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-147" value="<font face="Courier New">&lt;&lt;class&gt;&gt; Module</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#88CCCC;strokeColor=#77BBBB;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="37.129999999999995" y="5392" width="196" height="84" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-146" value="<font face="Courier New">&lt;&lt;class&gt;&gt; Module (s)</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#77BBBB;strokeColor=#77BBBB;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="25.239999999999995" y="5381" width="196" height="84" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-80" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#E6E6E6;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-277" y="4445" width="732" height="426" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-123" value="<font face="Courier New">Data Streamer</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#9AC7BF;strokeColor=#77BBBB;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;dashed=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="197.2" y="4642.5" width="179.12" height="84" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-122" value="Data Processor" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#AAAAFF;strokeColor=#9999FF;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;dashed=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-7.720000000000024" y="4643" width="167.88" height="84" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-119" value="<font face="Courier New">Listener</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#99BBEE;strokeColor=#77AADD;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;dashed=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-192" y="4651" width="146" height="84" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-62" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#E6E6E6;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-242.75" y="4184" width="762.75" height="176" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-54" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#E6E6E6;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-119" y="3595" width="547" height="397" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-36" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#EEEEFF;fontColor=#333333;strokeColor=#E6E6E6;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="157.39" y="3717" width="200.61" height="243" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-33" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#CCE5FF;fontColor=#333333;strokeColor=#E6E6E6;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-67" y="3727" width="187" height="233" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="OOa9Ru9pQldXh4IZuxHQ-7" value="Module 3" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#99CCFF;strokeColor=#99CCFF;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="490" y="128" width="132" height="68" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="OOa9Ru9pQldXh4IZuxHQ-2" value="Module 2" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#88BBEE;strokeColor=#88BBEE;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="482" y="121" width="132" height="68" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="OOa9Ru9pQldXh4IZuxHQ-6" value="Module 1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#77AADD;strokeColor=#77AADD;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="474" y="113" width="132" height="68" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="OOa9Ru9pQldXh4IZuxHQ-3" value="Module (s)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#6699CC;strokeColor=#6699CC;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="466.29999999999995" y="106" width="132" height="68" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="J8_Ag6N0oFm1g001oKw5-6" value="TCP" style="shape=doubleArrow;whiteSpace=wrap;html=1;strokeColor=#BBBBFF;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=12;fontColor=#FFFFFF;fillColor=#BBBBFF;gradientColor=none;arrowWidth=0.39080459770114734;arrowSize=0.11650485436893204;rotation=15;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="197" y="889" width="241.01" height="30" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="OOa9Ru9pQldXh4IZuxHQ-63" value="" style="shape=doubleArrow;whiteSpace=wrap;html=1;strokeColor=#CCCCFF;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=12;fontColor=default;fillColor=#CCCCFF;gradientColor=none;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="298.5" y="137" width="150" height="30" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="OOa9Ru9pQldXh4IZuxHQ-62" value="" style="shape=doubleArrow;whiteSpace=wrap;html=1;strokeColor=#BBBBFF;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=12;fontColor=default;fillColor=#BBBBFF;gradientColor=none;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="294.62" y="133" width="150" height="30" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="OOa9Ru9pQldXh4IZuxHQ-61" value="" style="shape=doubleArrow;whiteSpace=wrap;html=1;strokeColor=#AAAAFF;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=12;fontColor=default;fillColor=#AAAAFF;gradientColor=none;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="290.62" y="129" width="150" height="30" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="OOa9Ru9pQldXh4IZuxHQ-22" value="" style="shape=singleArrow;direction=south;whiteSpace=wrap;html=1;fillColor=#99CCFF;gradientColor=none;strokeColor=#99CCFF;arrowWidth=0.3473368342085482;arrowSize=0.26612903225806445;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="517" y="246.87" width="43" height="130" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="OOa9Ru9pQldXh4IZuxHQ-20" value="" style="shape=singleArrow;direction=south;whiteSpace=wrap;html=1;fillColor=#88BBEE;gradientColor=none;strokeColor=#88BBEE;arrowWidth=0.2813203300825186;arrowSize=0.28179723502304177;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="512" y="240" width="43" height="130" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="OOa9Ru9pQldXh4IZuxHQ-21" value="" style="shape=singleArrow;direction=south;whiteSpace=wrap;html=1;fillColor=#77AADD;gradientColor=none;strokeColor=#77AADD;arrowWidth=0.26856714178544006;arrowSize=0.24723502304147474;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="505.88" y="232" width="43" height="130" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="OOa9Ru9pQldXh4IZuxHQ-16" value="UDP" style="shape=singleArrow;direction=south;whiteSpace=wrap;html=1;fillColor=#6699CC;gradientColor=none;strokeColor=#6699CC;arrowWidth=0.2713178294573608;arrowSize=0.23333333333333386;fontColor=#FFFFFF;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;textDirection=vertical-lr;spacing=0;spacingBottom=0;spacingLeft=-2;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="499" y="224" width="43" height="130" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="OOa9Ru9pQldXh4IZuxHQ-5" value="Client / GUI" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#AAAAFF;strokeColor=#AAAAFF;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="125" y="109" width="132" height="68" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="OOa9Ru9pQldXh4IZuxHQ-1" value="" style="points=[[0.35,0,0],[0.98,0.51,0],[1,0.71,0],[0.67,1,0],[0,0.795,0],[0,0.65,0]];verticalLabelPosition=bottom;sketch=0;html=1;verticalAlign=top;aspect=fixed;align=center;pointerEvents=1;shape=mxgraph.cisco19.user;fillColor=#AAAAFF;strokeColor=none;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="166" y="59" width="50" height="50" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="OOa9Ru9pQldXh4IZuxHQ-35" value="" style="shape=singleArrow;direction=east;whiteSpace=wrap;html=1;fillColor=#BBFFDD;gradientColor=none;strokeColor=#BBFFDD;arrowWidth=0.3640710382513589;arrowSize=0.1682103825136619;flipH=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="255.375" y="433.625" width="150" height="30" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="OOa9Ru9pQldXh4IZuxHQ-36" value="" style="shape=singleArrow;direction=east;whiteSpace=wrap;html=1;fillColor=#AAEECC;gradientColor=none;strokeColor=#AAEECC;arrowWidth=0.39166666666667427;arrowSize=0.1850757575757575;flipH=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="256.625" y="428.375" width="150" height="30" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="OOa9Ru9pQldXh4IZuxHQ-37" value="" style="shape=singleArrow;direction=east;whiteSpace=wrap;html=1;fillColor=#99DDBB;gradientColor=none;strokeColor=#99DDBB;arrowWidth=0.3072404371584601;arrowSize=0.20247267759562873;flipH=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="260.875" y="424.625" width="150" height="30" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="OOa9Ru9pQldXh4IZuxHQ-38" value="ZMQ" style="shape=singleArrow;direction=east;whiteSpace=wrap;html=1;fillColor=#88CCAA;gradientColor=none;strokeColor=#88CCAA;arrowWidth=0.3015258215962414;arrowSize=0.21895539906103256;flipH=1;fontSize=10;fontColor=#FFFFFF;spacing=0;spacingBottom=2;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="264" y="416" width="150" height="35" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="OOa9Ru9pQldXh4IZuxHQ-43" value="" style="shape=singleArrow;direction=east;whiteSpace=wrap;html=1;fillColor=#BBFFDD;gradientColor=none;strokeColor=#BBFFDD;arrowWidth=0.30195728510032327;arrowSize=0.10804578407150964;rotation=45;flipV=0;flipH=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="188.495" y="295.625" width="270" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="OOa9Ru9pQldXh4IZuxHQ-44" value="" style="shape=singleArrow;direction=east;whiteSpace=wrap;html=1;fillColor=#AAEECC;gradientColor=none;strokeColor=#AAEECC;arrowWidth=0.3059021565555355;arrowSize=0.11059978613932724;rotation=45;flipV=0;flipH=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="187.745" y="288.375" width="270" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="OOa9Ru9pQldXh4IZuxHQ-45" value="" style="shape=singleArrow;direction=east;whiteSpace=wrap;html=1;fillColor=#99DDBB;gradientColor=none;strokeColor=#99DDBB;arrowWidth=0.2606119807565733;arrowSize=0.11229881466462685;rotation=45;flipV=0;flipH=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="185.995" y="281.625" width="270" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="OOa9Ru9pQldXh4IZuxHQ-46" value="ZMQ" style="shape=singleArrow;direction=east;whiteSpace=wrap;html=1;fillColor=#88CCAA;gradientColor=none;strokeColor=#88CCAA;arrowWidth=0.26899866177272147;arrowSize=0.11295618290402748;rotation=45;flipV=0;flipH=1;fontColor=#FFFFFF;fontSize=10;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="185.12" y="274" width="270" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="OOa9Ru9pQldXh4IZuxHQ-47" value="" style="shape=singleArrow;direction=north;whiteSpace=wrap;html=1;fillColor=#BBFFDD;gradientColor=none;strokeColor=#BBFFDD;arrowWidth=0.3881614350818457;arrowSize=0.13584129099660103;flipH=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="162.115" y="191.255" width="30" height="200" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="OOa9Ru9pQldXh4IZuxHQ-48" value="" style="shape=singleArrow;direction=north;whiteSpace=wrap;html=1;fillColor=#AAEECC;gradientColor=none;strokeColor=#AAEECC;arrowWidth=0.4039236188616011;arrowSize=0.13625893792486793;flipH=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="166.365" y="194.005" width="30" height="200" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="OOa9Ru9pQldXh4IZuxHQ-49" value="" style="shape=singleArrow;direction=north;whiteSpace=wrap;html=1;fillColor=#99DDBB;gradientColor=none;strokeColor=#99DDBB;arrowWidth=0.278008144362146;arrowSize=0.14744102244191368;flipH=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="170.615" y="196.255" width="30" height="200" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="OOa9Ru9pQldXh4IZuxHQ-50" value="ZMQ" style="shape=singleArrow;direction=north;whiteSpace=wrap;html=1;fillColor=#88CCAA;gradientColor=none;strokeColor=#88CCAA;arrowWidth=0.29264320269609984;arrowSize=0.15799814659217704;flipH=1;textDirection=vertical-lr;fontSize=10;fontColor=#FFFFFF;spacingLeft=-1;spacing=0;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="175" y="198.63" width="32.74" height="200" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="OOa9Ru9pQldXh4IZuxHQ-51" value="External&nbsp;<div>Processing</div><div>Chain</div>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#99DDBB;strokeColor=#99DDBB;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="126.99" y="409.37" width="115.01" height="85.63" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="OOa9Ru9pQldXh4IZuxHQ-56" value="" style="shape=doubleArrow;whiteSpace=wrap;html=1;rotation=45;arrowWidth=0.27989643421967686;arrowSize=0.14277638849485402;fillColor=#CCCCFF;strokeColor=#CCCCFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="244.9904832720494" y="263.6209665440989" width="250" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="OOa9Ru9pQldXh4IZuxHQ-57" value="" style="shape=doubleArrow;whiteSpace=wrap;html=1;rotation=45;arrowWidth=0.27989643421967686;arrowSize=0.14277638849485402;fillColor=#BBBBFF;strokeColor=#BBBBFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="245.7404832720494" y="257.8709665440989" width="250" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="OOa9Ru9pQldXh4IZuxHQ-58" value="" style="shape=doubleArrow;whiteSpace=wrap;html=1;rotation=45;arrowWidth=0.27989643421967686;arrowSize=0.14277638849485402;fillColor=#AAAAFF;strokeColor=#AAAAFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="245.9904832720494" y="251.8709665440989" width="250" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="OOa9Ru9pQldXh4IZuxHQ-59" value="TCP" style="shape=doubleArrow;whiteSpace=wrap;html=1;rotation=45;arrowWidth=0.27989643421967686;arrowSize=0.14277638849485402;fillColor=#9999FF;strokeColor=#9999FF;fontColor=#FFFFFF;fontSize=10;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="245.73999999999995" y="245.25048327204945" width="250" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="OOa9Ru9pQldXh4IZuxHQ-60" value="TCP" style="shape=doubleArrow;whiteSpace=wrap;html=1;strokeColor=#9999FF;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=10;fontColor=#FFFFFF;fillColor=#9999FF;gradientColor=none;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="285.62" y="125" width="150" height="30" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="OOa9Ru9pQldXh4IZuxHQ-67" value="Control 1:N" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontColor=#666666;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="325" y="114" width="79" height="26" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="OOa9Ru9pQldXh4IZuxHQ-68" value="Control 1:N" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;rotation=45;fontColor=#666666;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="343" y="243" width="79" height="26" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="OOa9Ru9pQldXh4IZuxHQ-69" value="Raw Data Packets&nbsp;<span style="background-color: transparent; color: light-dark(rgb(102, 102, 102), rgb(149, 149, 149));">1:1</span>" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;rotation=90;fontColor=#666666;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="499" y="285.25" width="137" height="26" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="OOa9Ru9pQldXh4IZuxHQ-70" value="Image Data 1:N" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;rotation=45;fontColor=#666666;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="285.00493141924176" y="277.62493141924176" width="102" height="26" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="OOa9Ru9pQldXh4IZuxHQ-71" value="Assembled Data 1:N" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;rotation=0;fontColor=#666666;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="289.6190475583121" y="407.6190475583121" width="128" height="26" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="OOa9Ru9pQldXh4IZuxHQ-72" value="Processed Data 1:1" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;rotation=90;fontColor=#666666;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="143.87" y="303.87" width="123" height="26" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="OOa9Ru9pQldXh4IZuxHQ-99" value="UDP" style="shape=singleArrow;direction=south;whiteSpace=wrap;html=1;fillColor=#77AADD;gradientColor=none;strokeColor=#77AADD;arrowWidth=0.2713178294573608;arrowSize=0.23333333333333386;fontColor=#FFFFFF;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;textDirection=vertical-lr;spacing=0;spacingBottom=0;spacingLeft=-2;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="295.39" y="1604" width="43" height="188" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="OOa9Ru9pQldXh4IZuxHQ-101" value="Client" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#AAAAFF;strokeColor=#AAAAFF;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="54.37" y="836" width="132" height="68" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="OOa9Ru9pQldXh4IZuxHQ-102" value="Module
1952 / 1953
bchip100" style="rounded=1;whiteSpace=wrap;fillColor=#88BBEE;strokeColor=#88BBEE;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="599" y="816" width="137" height="85" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="OOa9Ru9pQldXh4IZuxHQ-103" value="" style="points=[[0.35,0,0],[0.98,0.51,0],[1,0.71,0],[0.67,1,0],[0,0.795,0],[0,0.65,0]];verticalLabelPosition=bottom;sketch=0;html=1;verticalAlign=top;aspect=fixed;align=center;pointerEvents=1;shape=mxgraph.cisco19.user;fillColor=#AAAAFF;strokeColor=none;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="95.37" y="786" width="50" height="50" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="OOa9Ru9pQldXh4IZuxHQ-111" value="Receiver<div>pc1234</div><div><b><font style="color: rgb(0, 76, 153);">10.0.1</font></b>.100</div>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#88BBEE;strokeColor=#88BBEE;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="258.39" y="1811" width="132" height="95" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="OOa9Ru9pQldXh4IZuxHQ-117" value="ZMQ" style="shape=singleArrow;direction=east;whiteSpace=wrap;html=1;fillColor=#99DDBB;gradientColor=none;strokeColor=#99DDBB;arrowWidth=0.2417936862291299;arrowSize=0.08753046681068456;rotation=38;flipV=0;flipH=1;fontColor=#FFFFFF;fontSize=10;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-393.75" y="2375.63" width="285.05" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="OOa9Ru9pQldXh4IZuxHQ-122" value="<font face="Comic Sans MS">External&nbsp;</font><div><font face="Comic Sans MS">Process</font></div><div><span><font face="Comic Sans MS" style="color: rgb(0, 76, 153);">129.129.200.175</font></span></div>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#99DDBB;strokeColor=#99DDBB;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="449.19" y="2444" width="139.01" height="72.63" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="OOa9Ru9pQldXh4IZuxHQ-127" value="TCP" style="shape=doubleArrow;whiteSpace=wrap;html=1;strokeColor=#BBBBFF;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=10;fontColor=#FFFFFF;fillColor=#BBBBFF;gradientColor=none;arrowWidth=0.39080459770114734;arrowSize=0.11650485436893204;rotation=0;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="200" y="854" width="235" height="30" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="OOa9Ru9pQldXh4IZuxHQ-128" value="Control" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontColor=#666666;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="309" y="838" width="57" height="26" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="OOa9Ru9pQldXh4IZuxHQ-130" value="Raw Data&nbsp;<div>Packets</div>" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;rotation=0;fontColor=#666666;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="240.76" y="1654" width="74" height="41" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="OOa9Ru9pQldXh4IZuxHQ-133" value="Processed Data" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;rotation=0;fontColor=#004C99;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="472.15000000000003" y="2363" width="103" height="26" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="OOa9Ru9pQldXh4IZuxHQ-135" value="<font style="" face="Courier New">port&nbsp; &nbsp; &nbsp;= 1952<br>stopport = 1953<br>hostname = bchip100</font>" style="text;align=left;verticalAlign=middle;resizable=1;points=[];autosize=1;strokeColor=#8888FF;fillColor=default;movable=1;rotatable=1;deletable=1;editable=1;locked=0;connectable=1;html=1;fontColor=#6666DD;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="446" y="845" width="142" height="58" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="J8_Ag6N0oFm1g001oKw5-7" value="<pre style=""><pre>udp src port: hardcoded (32410)<br><span style="background-color: transparent;">udp_srcip&nbsp; : <b><font style="">10.0.1</font></b>.15</span></pre></pre>" style="text;html=1;align=left;verticalAlign=middle;resizable=1;points=[];autosize=1;strokeColor=#004C99;fillColor=default;fontColor=#004C99;movable=1;rotatable=1;deletable=1;editable=1;locked=0;connectable=1;fontFamily=Helvetica;fontSize=12;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="17.11" y="1530.5" width="226.52" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="J8_Ag6N0oFm1g001oKw5-10" value="Module<div>bchip100</div>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#88BBEE;strokeColor=#88BBEE;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="255.39" y="1520" width="132" height="68" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="J8_Ag6N0oFm1g001oKw5-14" value="<pre style="">udp_dstport: 50001<br><span style="background-color: transparent;">udp_dstip&nbsp; : <b><font style="">10.0.1</font></b>.100<br></span><span style="background-color: transparent;">udp_dstmac : (specify for<br></span><span style="background-color: transparent;"> custom receivers)</span></pre>" style="text;html=1;align=left;verticalAlign=middle;resizable=1;points=[];autosize=1;strokeColor=#004C99;fillColor=default;fontColor=#004C99;movable=1;rotatable=1;deletable=1;editable=1;locked=0;connectable=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="20.47" y="1831" width="225.52" height="64" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="J8_Ag6N0oFm1g001oKw5-16" value="UDP" style="shape=singleArrow;direction=south;whiteSpace=wrap;html=1;fillColor=#77AADD;gradientColor=none;strokeColor=#77AADD;arrowWidth=0.2713178294573608;arrowSize=0.23333333333333386;fontColor=#FFFFFF;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;textDirection=vertical-lr;spacing=0;spacingBottom=0;spacingLeft=-2;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="450.9" y="1602" width="43" height="188" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="J8_Ag6N0oFm1g001oKw5-17" value="Receiver<div>pc1234</div><div><font style="color: rgb(0, 76, 153);"><b style="">10.0.2</b></font>.100</div>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#88BBEE;strokeColor=#88BBEE;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="413.9" y="1809" width="132" height="95" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="J8_Ag6N0oFm1g001oKw5-18" value="Raw Data&nbsp;<div>Packets</div>" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;rotation=0;fontColor=#666666;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="396.27" y="1652" width="74" height="41" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="J8_Ag6N0oFm1g001oKw5-19" value="Module<div>bchip101</div>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#88BBEE;strokeColor=#88BBEE;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="410.9" y="1518" width="132" height="68" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="J8_Ag6N0oFm1g001oKw5-20" value="<pre style=""><pre>udp src port: hardcoded (32410)<br><span style="background-color: transparent;">udp_srcip&nbsp; : <b><font style="">10.0.2</font></b>.15</span></pre></pre>" style="text;html=1;align=left;verticalAlign=middle;resizable=1;points=[];autosize=1;strokeColor=#004C99;fillColor=default;fontColor=#004C99;movable=1;rotatable=1;deletable=1;editable=1;locked=0;connectable=1;fontFamily=Helvetica;fontSize=12;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="553.6999999999999" y="1533.5" width="227.61" height="37" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="J8_Ag6N0oFm1g001oKw5-21" value="<pre style="">udp_dstport: 50002<br><span style="background-color: transparent;">udp_dstip&nbsp; : <b><font style="">10.0.2</font></b>.100<br></span><span style="background-color: transparent;">udp_dstmac : (specify for<br></span><span style="background-color: transparent;"> custom receivers)</span></pre>" style="text;html=1;align=left;verticalAlign=middle;resizable=1;points=[];autosize=1;strokeColor=#004C99;fillColor=default;fontColor=#004C99;movable=1;rotatable=1;deletable=1;editable=1;locked=0;connectable=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="558" y="1820" width="227" height="68" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="J8_Ag6N0oFm1g001oKw5-24" value="TCP" style="shape=doubleArrow;whiteSpace=wrap;html=1;strokeColor=#BBBBFF;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=12;fontColor=#FFFFFF;fillColor=#BBBBFF;gradientColor=none;arrowWidth=0.3696597117203055;arrowSize=0.07695194442744;rotation=45;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="165.19" y="1269.62" width="328.51" height="30" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="J8_Ag6N0oFm1g001oKw5-25" value="Client" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#AAAAFF;strokeColor=#AAAAFF;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="62.99999999999999" y="1131" width="132" height="68" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="J8_Ag6N0oFm1g001oKw5-27" value="" style="points=[[0.35,0,0],[0.98,0.51,0],[1,0.71,0],[0.67,1,0],[0,0.795,0],[0,0.65,0]];verticalLabelPosition=bottom;sketch=0;html=1;verticalAlign=top;aspect=fixed;align=center;pointerEvents=1;shape=mxgraph.cisco19.user;fillColor=#AAAAFF;strokeColor=none;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="104" y="1081" width="50" height="50" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="J8_Ag6N0oFm1g001oKw5-28" value="TCP" style="shape=doubleArrow;whiteSpace=wrap;html=1;strokeColor=#BBBBFF;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=10;fontColor=#FFFFFF;fillColor=#BBBBFF;gradientColor=none;arrowWidth=0.3826240220923713;arrowSize=0.09377242087427196;rotation=32;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="190.48" y="1225.3" width="272.63" height="30" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="J8_Ag6N0oFm1g001oKw5-29" value="Control" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontColor=#666666;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="317.2" y="1199" width="57" height="26" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="J8_Ag6N0oFm1g001oKw5-33" value="Module
1952 / 1953
bchip101" style="rounded=1;whiteSpace=wrap;fillColor=#88BBEE;strokeColor=#88BBEE;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;fontFamily=Helvetica;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="599" y="912" width="137" height="85" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="J8_Ag6N0oFm1g001oKw5-34" value="<font face="Courier New">Receiver</font><div><span style="background-color: transparent; color: light-dark(rgb(255, 255, 255), rgb(18, 18, 18));">1954</span></div><div>pc1234<span style="background-color: transparent; color: light-dark(rgb(255, 255, 255), rgb(18, 18, 18));"></span></div>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#88BBEE;strokeColor=#88BBEE;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="648" y="1273.5" width="137" height="85" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="J8_Ag6N0oFm1g001oKw5-35" value="<font face="Courier New">Receiver<br></font><div><span style="background-color: transparent; color: light-dark(rgb(255, 255, 255), rgb(18, 18, 18));">1955</span></div><div>pc1234</div>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#88BBEE;strokeColor=#88BBEE;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;fontFamily=Helvetica;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="648" y="1369.5" width="137" height="85" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="J8_Ag6N0oFm1g001oKw5-43" value="ZMQ" style="shape=singleArrow;direction=east;whiteSpace=wrap;html=1;fillColor=#99DDBB;gradientColor=none;strokeColor=#99DDBB;arrowWidth=0.27577655701663845;arrowSize=0.06779431315598941;rotation=48;flipV=0;flipH=1;fontColor=#FFFFFF;fontSize=10;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-419.7" y="2435.9" width="336.9" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="IUwO_ccEPv4BRx6tuxwP-4" value="<font style="" face="Courier New">port&nbsp; &nbsp; &nbsp;= 1952<br>stopport = 1953<br>hostname = bchip101</font>" style="text;align=left;verticalAlign=middle;resizable=1;points=[];autosize=1;strokeColor=#8888FF;fillColor=default;movable=1;rotatable=1;deletable=1;editable=1;locked=0;connectable=1;html=1;fontColor=#6666DD;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="446" y="912" width="141" height="58" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="IUwO_ccEPv4BRx6tuxwP-5" value="<font face="Courier New" style="">rx_tcpport&nbsp; = 1954<br>rx_hostname = pc1234</font>" style="text;align=left;verticalAlign=middle;resizable=1;points=[];autosize=1;strokeColor=#8888FF;fillColor=default;movable=1;rotatable=1;deletable=1;editable=1;locked=0;connectable=1;html=1;fontColor=#6666DD;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="461.43" y="1294.5" width="150.45" height="43" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="IUwO_ccEPv4BRx6tuxwP-6" value="<font face="Courier New" style="">rx_tcpport&nbsp; = 1955<br>rx_hostname = pc1234</font>" style="text;align=left;verticalAlign=middle;resizable=1;points=[];autosize=1;strokeColor=#8888FF;fillColor=default;movable=1;rotatable=1;deletable=1;editable=1;locked=0;connectable=1;html=1;fontColor=#6666DD;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="458.5" y="1395" width="153.38" height="43" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="IUwO_ccEPv4BRx6tuxwP-7" value="<font>GUI:&nbsp;&nbsp;</font><div>rx_zmqport (30001)&nbsp;<span style="background-color: transparent; color: light-dark(rgb(136, 136, 255), rgb(105, 105, 207));">=&nbsp;</span><span style="background-color: transparent; color: light-dark(rgb(136, 136, 255), rgb(105, 105, 207));">zmqport (30001)</span></div>" style="text;html=1;align=left;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontColor=#8888FF;fontSize=17;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-135.12" y="2343.0000000000005" width="310" height="53" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="IUwO_ccEPv4BRx6tuxwP-11" value="" style="endArrow=classic;html=1;rounded=0;fontColor=#AAAAFF;strokeColor=#AAAAFF;exitX=0.296;exitY=0.054;exitDx=0;exitDy=0;exitPerimeter=0;entryX=1.002;entryY=0.486;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1" source="IUwO_ccEPv4BRx6tuxwP-7" target="QgYz-w7MwsADk0cZRM1J-27">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="-362.87" y="2530.63" as="sourcePoint" />
|
||||||
|
<mxPoint x="-463.99579291044756" y="2345" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="IUwO_ccEPv4BRx6tuxwP-12" value="" style="endArrow=classic;html=1;rounded=0;fontColor=#AAAAFF;strokeColor=#AAAAFF;exitX=0.48;exitY=1.008;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0.548;entryY=-0.039;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1" source="IUwO_ccEPv4BRx6tuxwP-7" target="QgYz-w7MwsADk0cZRM1J-18">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="-354.5" y="2562" as="sourcePoint" />
|
||||||
|
<mxPoint x="-146.5" y="2600" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="IUwO_ccEPv4BRx6tuxwP-14" value="" style="points=[[0.35,0,0],[0.98,0.51,0],[1,0.71,0],[0.67,1,0],[0,0.795,0],[0,0.65,0]];verticalLabelPosition=bottom;sketch=0;html=1;verticalAlign=top;aspect=fixed;align=center;pointerEvents=1;shape=mxgraph.cisco19.user;fillColor=#AAAAFF;strokeColor=none;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="498.64999999999986" y="2071" width="50" height="50" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="IUwO_ccEPv4BRx6tuxwP-15" value="ZMQ" style="shape=singleArrow;direction=east;whiteSpace=wrap;html=1;fillColor=#77AADD;gradientColor=none;strokeColor=#77AADD;arrowWidth=0.29750455482560484;arrowSize=0.24452443902291207;rotation=0;flipV=0;flipH=1;fontColor=#FFFFFF;fontSize=10;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="658" y="2504.9" width="90" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="IUwO_ccEPv4BRx6tuxwP-16" value="<pre style=""><span style="background-color: transparent;"><font style="">Receiver streaming out<br><font style="">rx_zmqport</font>&nbsp;= <font style=""><b style="">30001</b></font></font></span><br></pre>" style="text;html=1;align=left;verticalAlign=middle;resizable=1;points=[];autosize=1;strokeColor=#4A7B72;fillColor=default;fontColor=#4A7B72;movable=1;rotatable=1;deletable=1;editable=1;locked=0;connectable=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="755" y="2501.7000000000003" width="166" height="43.2" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="IUwO_ccEPv4BRx6tuxwP-17" value="<font face="Comic Sans MS">Receiver</font><div><font face="Comic Sans MS">pc1234</font></div><div><span><font style="color: rgb(74, 123, 114);" face="Comic Sans MS">129.129.100.115</font></span></div>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#88BBEE;strokeColor=#88BBEE;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="932" y="2459.9" width="137" height="85" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="IUwO_ccEPv4BRx6tuxwP-18" value="<font face="Comic Sans MS">Receiver</font><div><font face="Comic Sans MS">pc1234</font></div><div><span><font face="Comic Sans MS" style="color: rgb(74, 123, 114);">129.129.100.115</font></span></div>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#88BBEE;strokeColor=#88BBEE;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;fontFamily=Helvetica;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="932" y="2561" width="137" height="85" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="IUwO_ccEPv4BRx6tuxwP-19" value="<pre style=""><pre><span style="background-color: transparent;"><font style="">Receiver streaming out<br><font style="">rx_zmqport</font>&nbsp;= <font style=""><b style="">30002</b></font></font></span></pre></pre>" style="text;html=1;align=left;verticalAlign=middle;resizable=1;points=[];autosize=1;strokeColor=#4A7B72;fillColor=default;fontColor=#4A7B72;movable=1;rotatable=1;deletable=1;editable=1;locked=0;connectable=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="755" y="2561" width="166" height="44" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="IUwO_ccEPv4BRx6tuxwP-20" value="ZMQ" style="shape=singleArrow;direction=east;whiteSpace=wrap;html=1;fillColor=#77AADD;gradientColor=none;strokeColor=#77AADD;arrowWidth=0.3650504445573688;arrowSize=0.19810994147613833;rotation=0;flipV=0;flipH=1;fontColor=#FFFFFF;fontSize=10;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="656" y="2561" width="90" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="IUwO_ccEPv4BRx6tuxwP-22" value="<p><font face="Courier New" style="">Client listening to&nbsp;<br><font>zmqport</font> : <font style=""><b style="">30004</b></font><br><font>zmqip</font>&nbsp; &nbsp;: <font style=""><b style="">129.129.200.175 </b></font></font></p>" style="text;html=1;align=left;verticalAlign=middle;resizable=1;points=[];autosize=1;strokeColor=#004C99;fillColor=default;fontColor=#004C99;movable=1;rotatable=1;deletable=1;editable=1;locked=0;connectable=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="320.39" y="2204" width="198" height="49" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="IUwO_ccEPv4BRx6tuxwP-23" value="<font style="font-size: 17px;">External Process:</font><div><font style="font-size: 17px;">rx_zmqport (30001)&nbsp;</font><span style="font-size: 17px; background-color: transparent; color: light-dark(rgb(136, 136, 255), rgb(105, 105, 207));">!=&nbsp;</span><span style="font-size: 17px; background-color: transparent; color: light-dark(rgb(136, 136, 255), rgb(105, 105, 207));">zmqport (30004)</span></div>" style="text;html=1;align=left;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontColor=#8888FF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="754" y="2312.0000000000005" width="315" height="53" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="IUwO_ccEPv4BRx6tuxwP-25" value="" style="endArrow=classic;html=1;rounded=0;fontColor=#AAAAFF;strokeColor=#AAAAFF;exitX=0.497;exitY=0.986;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0.482;entryY=0.009;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1" source="IUwO_ccEPv4BRx6tuxwP-23" target="IUwO_ccEPv4BRx6tuxwP-16">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="612.31" y="2482" as="sourcePoint" />
|
||||||
|
<mxPoint x="820.31" y="2520" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="IUwO_ccEPv4BRx6tuxwP-27" value="ZMQ" style="shape=singleArrow;direction=north;whiteSpace=wrap;html=1;fillColor=#99DDBB;gradientColor=none;strokeColor=#99DDBB;arrowWidth=0.26530437257911216;arrowSize=0.11592009478500508;rotation=0;flipV=0;flipH=1;fontColor=#FFFFFF;fontSize=10;textDirection=vertical-lr;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="527.5699999999999" y="2258.1" width="40" height="100" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="IUwO_ccEPv4BRx6tuxwP-28" value="<p><font style="" face="Courier New">Client listening to&nbsp;<br><font>zmqport</font> : <font style=""><b style="">30003</b></font><br><font>zmqip</font>&nbsp; &nbsp;: <font style=""><b style="">129.129.200.175 </b></font></font></p>" style="text;html=1;align=left;verticalAlign=middle;resizable=1;points=[];autosize=1;strokeColor=#004C99;fillColor=default;fontColor=#004C99;movable=1;rotatable=1;deletable=1;editable=1;locked=0;connectable=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="528.9" y="2204" width="198" height="49" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="IUwO_ccEPv4BRx6tuxwP-30" value="ZMQ" style="shape=singleArrow;direction=north;whiteSpace=wrap;html=1;fillColor=#99DDBB;gradientColor=none;strokeColor=#99DDBB;arrowWidth=0.3197480273847759;arrowSize=0.13373882001308657;rotation=0;flipV=0;flipH=1;fontColor=#FFFFFF;fontSize=10;textDirection=vertical-lr;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="478.2" y="2258.1" width="40" height="100" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="IUwO_ccEPv4BRx6tuxwP-31" value="Assembled Data" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;rotation=-90;fontColor=#4A7B72;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="594" y="2535" width="106" height="26" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="IUwO_ccEPv4BRx6tuxwP-33" value="<p><font face="Courier New" style="">External Process&nbsp;listening to&nbsp;<br>Ports : <font style=""><b>30001, 30002</b></font><br>Ip&nbsp; &nbsp; : <font style=""><b style="">129.129.100.115 </b></font></font></p>" style="text;align=left;verticalAlign=middle;resizable=1;points=[];autosize=1;strokeColor=#4A7B72;fillColor=default;fontColor=#4A7B72;movable=1;rotatable=1;deletable=1;editable=1;locked=0;connectable=1;html=1;spacing=0;spacingLeft=5;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="414" y="2525.63" width="221" height="51.37" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="IUwO_ccEPv4BRx6tuxwP-37" value="" style="endArrow=classic;html=1;rounded=0;fontColor=#AAAAFF;strokeColor=#AAAAFF;entryX=1.005;entryY=0.41;entryDx=0;entryDy=0;entryPerimeter=0;exitX=0.476;exitY=-0.014;exitDx=0;exitDy=0;exitPerimeter=0;" edge="1" parent="1" source="IUwO_ccEPv4BRx6tuxwP-23" target="IUwO_ccEPv4BRx6tuxwP-28">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="803" y="2313" as="sourcePoint" />
|
||||||
|
<mxPoint x="519.31" y="2373.93" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="IUwO_ccEPv4BRx6tuxwP-46" value="<p><font style="" face="Courier New">External Process&nbsp;streaming out&nbsp;<br>Ports : <b>30003, 30004</b></font></p>" style="text;align=left;verticalAlign=middle;resizable=1;points=[];autosize=1;strokeColor=#004C99;fillColor=default;fontColor=#004C99;movable=1;rotatable=1;deletable=1;editable=1;locked=0;connectable=1;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="418.9" y="2396" width="222.1" height="36" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="IUwO_ccEPv4BRx6tuxwP-50" value="" style="shape=image;editableCssRules=.*;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image=data:image/svg+xml,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9Ii0wLjUgLTAuNSAyOCAyOCIgaGVpZ2h0PSIyOCIgd2lkdGg9IjI4IiBzdHlsZT0iY29sb3Itc2NoZW1lOiBsaWdodCBkYXJrOyI+JiN4YTsJICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPi5zdDAgeyBzdG9wLWNvbG9yOiBsaWdodC1kYXJrKHJnYigxNzAsIDE3MCwgMjU1KSwgcmdiKDAsIDIwNiwgMTcyKSk7IH0gLnN0MSB7IHN0b3AtY29sb3I6IGxpZ2h0LWRhcmsocmdiKDE3OCwgMTAyLCAyNTUpLCByZ2IoNywgMTMxLCAxNDMpKTsgfSA8L3N0eWxlPiYjeGE7CTxkZWZzPiYjeGE7CQk8bGluZWFyR3JhZGllbnQgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIHkyPSIyNS4zMDkiIHgyPSIyMy40NTQiIHkxPSIzLjQ3NCIgeDE9IjIuMDM5IiBpZD0iQSI+JiN4YTsJCQk8c3RvcCBjbGFzcz0ic3QwIi8+JiN4YTsJCQk8c3RvcCBjbGFzcz0ic3QxIiBvZmZzZXQ9IjEiLz4mI3hhOwkJPC9saW5lYXJHcmFkaWVudD4mI3hhOwk8L2RlZnM+JiN4YTsJPHBhdGggZmlsbD0idXJsKCNBKSIgZD0iTTE1LjI1IDEzLjE3M2ExLjcgMS43IDAgMCAwLS4xMTYtLjY4Yy0uMDg1LS4yMTYtLjIxMy0uNDEzLS4zNzYtLjU3OHMtLjM2Mi0uMjkxLS41NzgtLjM3Ni0uNDQ4LS4xMjQtLjY4LS4xMTZjLS4yMzItLjAwOC0uNDY0LjAzMS0uNjguMTE2cy0uNDEzLjIxMy0uNTc4LjM3Ni0uMjkxLjM2Mi0uMzc2LjU3OGExLjcgMS43IDAgMCAwLS4xMTYuNjh2N2MwIC40NzIuMTY1Ljg5Mi40OTIgMS4yNTguMTY1LjE2My4zNjIuMjkxLjU3OS4zNzVzLjQ0OC4xMjMuNjguMTE1YTEuNyAxLjcgMCAwIDAgMS4yNTgtLjQ5Yy4zMjctLjM2Ni40OTItLjc4NC40OTItMS4yNnYtN3pNMTMuNS0uNWMxLjkzMiAwIDMuNzM2LjM2NiA1LjQxNCAxLjA5NCAxLjcxMy43MyAzLjIwOCAxLjczMiA0LjQ4MyAzLjAwOCAxLjI4MyAxLjI4NyAyLjMwNSAyLjgxIDMuMDA4IDQuNDg1LjczIDEuNjc2IDEuMDk0IDMuNDgyIDEuMDk0IDUuNDEzYTEzLjgyIDEzLjgyIDAgMCAxLTEuMDk0IDUuNDY5Yy0uNzEzIDEuNjU0LTEuNzM0IDMuMTU4LTMuMDA4IDQuNDMxLTEuMjg2IDEuMjgyLTIuODA5IDIuMzAzLTQuNDgzIDMuMDA2LTEuNzEuNzM2LTMuNTUzIDEuMTA4LTUuNDE0IDEuMDk0LTEuODc4LjAxMS0zLjczOS0uMzYxLTUuNDY5LTEuMDk0YTE0LjIzIDE0LjIzIDAgMCAxLTcuNDM3LTcuNDM3QTEzLjgyIDEzLjgyIDAgMCAxLS41IDEzLjVjMC0xLjkzMi4zNjQtMy43MzYgMS4wOTQtNS40MTMuNzMtMS43MTUgMS43MzItMy4yMDkgMy4wMDgtNC40ODVTNi4zNzggMS4zMDcgOC4wMzEuNTk0QTEzLjgyIDEzLjgyIDAgMCAxIDEzLjUtLjV6bTAgOS43MzVhMi4wMSAyLjAxIDAgMCAwIDEuNDc3LS42MDIgMi4wMSAyLjAxIDAgMCAwIC42MDItMS40NzdjMC0uNTgzLS4yMDEtMS4wNzQtLjYwMi0xLjQ3NS0uMTg0LS4yMS0uNDExLS4zNzctLjY2Ni0uNDkxcy0uNTMyLS4xNy0uODExLS4xNjZjLS4yNzktLjAwNC0uNTU2LjA1Mi0uODExLjE2NnMtLjQ4Mi4yODEtLjY2Ni40OTFjLS40MDEuNDAxLS42Ljg5Mi0uNiAxLjQ3NXMuMiAxLjA3Ni42IDEuNDc3Ljg5My42MDIgMS40NzcuNjAyeiIvPiYjeGE7PC9zdmc+;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-169" y="2355.5" width="28" height="28" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="IUwO_ccEPv4BRx6tuxwP-52" value="" style="shape=image;editableCssRules=.*;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image=data:image/svg+xml,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9Ii0wLjUgLTAuNSAyOCAyOCIgaGVpZ2h0PSIyOCIgd2lkdGg9IjI4IiBzdHlsZT0iY29sb3Itc2NoZW1lOiBsaWdodCBkYXJrOyI+JiN4YTsJICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPi5zdDAgeyBzdG9wLWNvbG9yOiBsaWdodC1kYXJrKHJnYigxNzAsIDE3MCwgMjU1KSwgcmdiKDAsIDIwNiwgMTcyKSk7IH0gLnN0MSB7IHN0b3AtY29sb3I6IGxpZ2h0LWRhcmsocmdiKDE3OCwgMTAyLCAyNTUpLCByZ2IoNywgMTMxLCAxNDMpKTsgfSA8L3N0eWxlPiYjeGE7CTxkZWZzPiYjeGE7CQk8bGluZWFyR3JhZGllbnQgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIHkyPSIyNS4zMDkiIHgyPSIyMy40NTQiIHkxPSIzLjQ3NCIgeDE9IjIuMDM5IiBpZD0iQSI+JiN4YTsJCQk8c3RvcCBjbGFzcz0ic3QwIi8+JiN4YTsJCQk8c3RvcCBjbGFzcz0ic3QxIiBvZmZzZXQ9IjEiLz4mI3hhOwkJPC9saW5lYXJHcmFkaWVudD4mI3hhOwk8L2RlZnM+JiN4YTsJPHBhdGggZmlsbD0idXJsKCNBKSIgZD0iTTE1LjI1IDEzLjE3M2ExLjcgMS43IDAgMCAwLS4xMTYtLjY4Yy0uMDg1LS4yMTYtLjIxMy0uNDEzLS4zNzYtLjU3OHMtLjM2Mi0uMjkxLS41NzgtLjM3Ni0uNDQ4LS4xMjQtLjY4LS4xMTZjLS4yMzItLjAwOC0uNDY0LjAzMS0uNjguMTE2cy0uNDEzLjIxMy0uNTc4LjM3Ni0uMjkxLjM2Mi0uMzc2LjU3OGExLjcgMS43IDAgMCAwLS4xMTYuNjh2N2MwIC40NzIuMTY1Ljg5Mi40OTIgMS4yNTguMTY1LjE2My4zNjIuMjkxLjU3OS4zNzVzLjQ0OC4xMjMuNjguMTE1YTEuNyAxLjcgMCAwIDAgMS4yNTgtLjQ5Yy4zMjctLjM2Ni40OTItLjc4NC40OTItMS4yNnYtN3pNMTMuNS0uNWMxLjkzMiAwIDMuNzM2LjM2NiA1LjQxNCAxLjA5NCAxLjcxMy43MyAzLjIwOCAxLjczMiA0LjQ4MyAzLjAwOCAxLjI4MyAxLjI4NyAyLjMwNSAyLjgxIDMuMDA4IDQuNDg1LjczIDEuNjc2IDEuMDk0IDMuNDgyIDEuMDk0IDUuNDEzYTEzLjgyIDEzLjgyIDAgMCAxLTEuMDk0IDUuNDY5Yy0uNzEzIDEuNjU0LTEuNzM0IDMuMTU4LTMuMDA4IDQuNDMxLTEuMjg2IDEuMjgyLTIuODA5IDIuMzAzLTQuNDgzIDMuMDA2LTEuNzEuNzM2LTMuNTUzIDEuMTA4LTUuNDE0IDEuMDk0LTEuODc4LjAxMS0zLjczOS0uMzYxLTUuNDY5LTEuMDk0YTE0LjIzIDE0LjIzIDAgMCAxLTcuNDM3LTcuNDM3QTEzLjgyIDEzLjgyIDAgMCAxLS41IDEzLjVjMC0xLjkzMi4zNjQtMy43MzYgMS4wOTQtNS40MTMuNzMtMS43MTUgMS43MzItMy4yMDkgMy4wMDgtNC40ODVTNi4zNzggMS4zMDcgOC4wMzEuNTk0QTEzLjgyIDEzLjgyIDAgMCAxIDEzLjUtLjV6bTAgOS43MzVhMi4wMSAyLjAxIDAgMCAwIDEuNDc3LS42MDIgMi4wMSAyLjAxIDAgMCAwIC42MDItMS40NzdjMC0uNTgzLS4yMDEtMS4wNzQtLjYwMi0xLjQ3NS0uMTg0LS4yMS0uNDExLS4zNzctLjY2Ni0uNDkxcy0uNTMyLS4xNy0uODExLS4xNjZjLS4yNzktLjAwNC0uNTU2LjA1Mi0uODExLjE2NnMtLjQ4Mi4yODEtLjY2Ni40OTFjLS40MDEuNDAxLS42Ljg5Mi0uNiAxLjQ3NXMuMiAxLjA3Ni42IDEuNDc3Ljg5My42MDIgMS40NzcuNjAyeiIvPiYjeGE7PC9zdmc+;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="726" y="2324.5" width="28" height="28" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="IUwO_ccEPv4BRx6tuxwP-57" value="Module 3" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#99CCFF;strokeColor=#99CCFF;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="475.70000000000005" y="413.27" width="132" height="68" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="IUwO_ccEPv4BRx6tuxwP-58" value="Module 2" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#88BBEE;strokeColor=#88BBEE;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="467.70000000000005" y="406.27" width="132" height="68" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="IUwO_ccEPv4BRx6tuxwP-59" value="Module 1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#77AADD;strokeColor=#77AADD;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="459.70000000000005" y="398.27" width="132" height="68" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="IUwO_ccEPv4BRx6tuxwP-60" value="Receiver (s)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#6699CC;strokeColor=#6699CC;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="452" y="391.27" width="132" height="68" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="IUwO_ccEPv4BRx6tuxwP-61" value="Option 1: Directly&nbsp;" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontColor=#666666;rotation=45;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="255.39" y="309.63" width="113" height="26" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="IUwO_ccEPv4BRx6tuxwP-62" value="Option 2: Indirectly" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontColor=#666666;rotation=0;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="291.99605691619604" y="446.99605691619604" width="118" height="26" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-14" value="Client" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontColor=#666666;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-173" y="3875.5" width="47" height="26" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-15" value="" style="endArrow=classic;startArrow=classic;html=1;rounded=0;entryX=0.016;entryY=0.505;entryDx=0;entryDy=0;entryPerimeter=0;fontColor=#666666;strokeColor=#666666;" edge="1" parent="1">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="-132" y="3889" as="sourcePoint" />
|
||||||
|
<mxPoint x="-46.998000000000104" y="3889.405" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-57" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;strokeColor=#666666;" edge="1" parent="1" source="hmBfKhxy8mBhXzrh4bXw-27" target="hmBfKhxy8mBhXzrh4bXw-28">
|
||||||
|
<mxGeometry relative="1" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-27" value="<div><font face="Courier New">Control Server</font></div><div><font face="Courier New">( C 98 )</font></div>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#77AADD;strokeColor=#77AADD;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-47" y="3750" width="146" height="60" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-28" value="<div><font face="Courier New">Stop Server</font></div><div><font face="Courier New">( C 98 )</font></div>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#77AADD;strokeColor=#77AADD;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-47" y="3853" width="146" height="60" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-29" value="Client&nbsp;" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontColor=#666666;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-173" y="3766.5" width="50" height="26" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-30" value="" style="endArrow=classic;startArrow=classic;html=1;rounded=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontColor=#666666;strokeColor=#666666;" edge="1" parent="1" target="hmBfKhxy8mBhXzrh4bXw-27">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="-133" y="3780" as="sourcePoint" />
|
||||||
|
<mxPoint x="-48" y="3783" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-34" value="On-board CPU" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=17;fontColor=#666666;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-34" y="3921" width="120" height="32" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-35" value="Registers" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#AAAAFF;strokeColor=#AAAAFF;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="182.34000000000003" y="3872.5" width="152" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-37" value="FPGA ( VHDL )" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=17;fontColor=#666666;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="184.00000000000003" y="3921" width="131" height="32" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-38" value="UDP Generator" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#AAAAFF;strokeColor=#AAAAFF;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="182.75" y="3820" width="152" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-39" value="Readout and Processing Logic" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#AAAAFF;strokeColor=#AAAAFF;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="183.5" y="3740" width="152" height="70" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-40" value="" style="endArrow=classic;startArrow=classic;html=1;rounded=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;fontColor=#666666;strokeColor=#666666;" edge="1" parent="1" source="hmBfKhxy8mBhXzrh4bXw-28" target="hmBfKhxy8mBhXzrh4bXw-35">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="64.37" y="3696" as="sourcePoint" />
|
||||||
|
<mxPoint x="176.37" y="3696" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-41" value="<span style="background-color: transparent;">Stop</span>" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontColor=#666666;rotation=5;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="117.61000000000001" y="3867" width="40" height="26" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-42" value="" style="endArrow=classic;startArrow=classic;html=1;rounded=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;fontColor=#666666;strokeColor=#666666;" edge="1" parent="1" source="hmBfKhxy8mBhXzrh4bXw-27" target="hmBfKhxy8mBhXzrh4bXw-35">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="69.37" y="3580" as="sourcePoint" />
|
||||||
|
<mxPoint x="176.37" y="3696" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-43" value="<span style="background-color: transparent;">Control</span>" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;rotation=53;fontColor=#666666;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="113" y="3811" width="55" height="26" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-46" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.75;exitDx=0;exitDy=0;fontColor=#666666;strokeColor=#666666;dashed=1;" edge="1" parent="1" source="hmBfKhxy8mBhXzrh4bXw-38">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="446" y="3849" as="targetPoint" />
|
||||||
|
<mxPoint x="350.27" y="3843" as="sourcePoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-48" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#FFFFDD;fontColor=#333333;strokeColor=#E6E6E6;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="157" y="3626" width="202" height="57" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-49" value="Sensor &amp; Chip" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=17;fontColor=#666666;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="198.2" y="3638.5" width="119" height="32" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-50" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.25;exitY=0;exitDx=0;exitDy=0;entryX=0.25;entryY=1;entryDx=0;entryDy=0;fontColor=#666666;strokeColor=#666666;" edge="1" parent="1" source="hmBfKhxy8mBhXzrh4bXw-36" target="hmBfKhxy8mBhXzrh4bXw-48">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="213.19" y="3721" as="sourcePoint" />
|
||||||
|
<mxPoint x="212.19" y="3689" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-51" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.644;exitY=0.993;exitDx=0;exitDy=0;entryX=0.65;entryY=0.007;entryDx=0;entryDy=0;entryPerimeter=0;exitPerimeter=0;fontColor=#666666;strokeColor=#666666;" edge="1" parent="1" source="hmBfKhxy8mBhXzrh4bXw-48" target="hmBfKhxy8mBhXzrh4bXw-36">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="281.19" y="3689" as="sourcePoint" />
|
||||||
|
<mxPoint x="281.19" y="3721" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-52" value="Control" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontColor=#666666;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="154.39000000000001" y="3686" width="55" height="26" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-53" value="Data" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontColor=#666666;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="285.62" y="3686" width="41" height="26" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-55" value="MODULE" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=17;fontColor=#666666;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-19" y="3642" width="91" height="32" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-58" value="<span style="background-color: transparent;">Spawns</span>" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontColor=#666666;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="22" y="3817" width="55" height="26" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-59" value="<font face="Courier New">On-board&nbsp;</font><div><font face="Courier New">Detector&nbsp;</font><span style="font-family: &quot;Courier New&quot;; background-color: transparent; color: light-dark(rgb(255, 255, 255), rgb(18, 18, 18));">Server</span></div>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#77AADD;strokeColor=#77AADD;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-202.75" y="4236" width="160" height="84" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-60" value="Firmware&nbsp;<div>( *.bit, *.pof, *.rbf )</div>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#9999FF;strokeColor=#9999FF;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="37.86" y="4236" width="160" height="84" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-61" value="<font face="Courier New">slsDetectorPackage</font><div><font face="Courier New">( Client /&amp; Receiver )</font></div>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#77BBBB;strokeColor=#77BBBB;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="278.75" y="4236" width="200" height="84" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-64" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.25;exitDx=0;exitDy=0;fontColor=#666666;strokeColor=#666666;" edge="1" parent="1" source="hmBfKhxy8mBhXzrh4bXw-38">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="447" y="3830" as="targetPoint" />
|
||||||
|
<mxPoint x="356" y="3811" as="sourcePoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-66" value="UDP Port" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontColor=#666666;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="350.12" y="3810" width="65" height="26" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-67" value="UDP Port 2" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontColor=#666666;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="349.62" y="3829" width="74" height="26" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-68" value="TCP Port<div><span style="background-color: transparent; color: light-dark(rgb(102, 102, 102), rgb(149, 149, 149));">Control</span></div>" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontColor=#666666;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-124" y="3759" width="63" height="41" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-69" value="<span style="background-color: transparent; color: light-dark(rgb(102, 102, 102), rgb(149, 149, 149));">TCP Port</span><div><span style="background-color: transparent; color: light-dark(rgb(102, 102, 102), rgb(149, 149, 149));">Stop</span></div>" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontColor=#666666;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-125" y="3868" width="63" height="41" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-71" value="Receiver" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontColor=#666666;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="438.20000000000005" y="3817" width="61" height="26" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-72" value="Receiver" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontColor=#666666;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="438.38" y="3836" width="61" height="26" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-75" value="<font face="Courier New">Listener</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#77AADD;strokeColor=#77AADD;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-208" y="4630.5" width="146" height="84" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-77" value="Data Processor" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#9999FF;strokeColor=#9999FF;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-22.51" y="4628" width="167.88" height="84" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-79" value="<font face="Courier New">Data Streamer</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#77BBBB;strokeColor=#77BBBB;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="182.34" y="4628" width="179.12" height="84" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-82" value="" style="endArrow=classic;startArrow=classic;html=1;rounded=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontColor=#666666;strokeColor=#666666;" edge="1" parent="1" target="hmBfKhxy8mBhXzrh4bXw-84">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="-289" y="4550" as="sourcePoint" />
|
||||||
|
<mxPoint x="-253" y="4554.5" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-106" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;strokeColor=#666666;" edge="1" parent="1" source="hmBfKhxy8mBhXzrh4bXw-84" target="hmBfKhxy8mBhXzrh4bXw-75">
|
||||||
|
<mxGeometry relative="1" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-107" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;strokeColor=#666666;" edge="1" parent="1" source="hmBfKhxy8mBhXzrh4bXw-84" target="hmBfKhxy8mBhXzrh4bXw-77">
|
||||||
|
<mxGeometry relative="1" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-108" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.25;exitDx=0;exitDy=0;strokeColor=#666666;" edge="1" parent="1" source="hmBfKhxy8mBhXzrh4bXw-84" target="hmBfKhxy8mBhXzrh4bXw-79">
|
||||||
|
<mxGeometry relative="1" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-84" value="<font face="Courier New">TCP Server</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#AAAADD;strokeColor=#77AADD;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-208" y="4508" width="146" height="84" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-85" value="Client&nbsp;" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontColor=#666666;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-330" y="4537" width="50" height="26" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-86" value="TCP Port<div><span style="background-color: transparent; color: light-dark(rgb(102, 102, 102), rgb(149, 149, 149));">Control</span></div>" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontColor=#666666;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-276" y="4529.5" width="63" height="41" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-87" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.01;entryY=0.83;entryDx=0;entryDy=0;strokeColor=#666666;entryPerimeter=0;" edge="1" parent="1" target="hmBfKhxy8mBhXzrh4bXw-75">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="-291" y="4700" as="sourcePoint" />
|
||||||
|
<mxPoint x="-265" y="4672" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-88" value="Module" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontColor=#666666;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-339" y="4686" width="55" height="26" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-89" value="UDP Port" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontColor=#666666;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-278" y="4679.5" width="65" height="26" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-91" value="Data" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontColor=#666666;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="351.12" y="3846.5" width="41" height="26" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-94" value="" style="endArrow=classic;html=1;rounded=0;strokeColor=#666666;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="hmBfKhxy8mBhXzrh4bXw-75" target="hmBfKhxy8mBhXzrh4bXw-95">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="-50" y="4739" as="sourcePoint" />
|
||||||
|
<mxPoint y="4689" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-95" value="Assembles&nbsp;<div><span style="background-color: transparent; color: light-dark(rgb(102, 102, 102), rgb(149, 149, 149));">into images in memory</span></div>" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=#666666;fillColor=none;fontColor=#666666;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-199" y="4754" width="129" height="41" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-96" value="Optional callbacks&nbsp;<div>for online processing</div>" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=#666666;fillColor=none;fontColor=#666666;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-39.62" y="4754" width="119" height="41" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-98" value="" style="endArrow=classic;html=1;rounded=0;strokeColor=#666666;exitX=0.25;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="hmBfKhxy8mBhXzrh4bXw-77" target="hmBfKhxy8mBhXzrh4bXw-96">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="54.370000000000005" y="4719" as="sourcePoint" />
|
||||||
|
<mxPoint x="54.370000000000005" y="4754" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-99" value="Optional File" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=#666666;fillColor=none;fontColor=#666666;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="63" y="4810" width="82" height="26" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-100" value="" style="endArrow=classic;html=1;rounded=0;strokeColor=#666666;exitX=0.754;exitY=0.979;exitDx=0;exitDy=0;exitPerimeter=0;" edge="1" parent="1" source="hmBfKhxy8mBhXzrh4bXw-77" target="hmBfKhxy8mBhXzrh4bXw-99">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="86.62" y="4759" as="sourcePoint" />
|
||||||
|
<mxPoint x="121.99000000000001" y="4801" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-101" value="Optional Data Streaming" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=#666666;fillColor=none;fontColor=#666666;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="203.5" y="4774" width="138" height="26" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-102" value="" style="endArrow=classic;html=1;rounded=0;strokeColor=#666666;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="hmBfKhxy8mBhXzrh4bXw-79" target="hmBfKhxy8mBhXzrh4bXw-101">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="275.12" y="4724" as="sourcePoint" />
|
||||||
|
<mxPoint x="310.49" y="4766" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-103" value="" style="endArrow=classic;html=1;rounded=0;entryX=-0.002;entryY=0.873;entryDx=0;entryDy=0;strokeColor=#666666;dashed=1;entryPerimeter=0;" edge="1" parent="1" target="hmBfKhxy8mBhXzrh4bXw-119">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="-291" y="4723" as="sourcePoint" />
|
||||||
|
<mxPoint x="-208" y="4723.5" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-104" value="Module" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontColor=#666666;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-339" y="4708" width="55" height="26" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-105" value="UDP Port 2" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontColor=#666666;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-284" y="4702.5" width="74" height="26" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-116" value="RECEIVER" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=17;fontColor=#666666;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="24.71" y="4472" width="101" height="32" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-117" value="UPGRADE COMPONENTS" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=17;fontColor=#666666;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="11.369999999999997" y="4196" width="218" height="32" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-121" value="<div><span style="background-color: transparent; color: light-dark(rgb(102, 102, 102), rgb(149, 149, 149));">Data packets</span></div>" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontColor=#666666;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-284" y="4657" width="80" height="26" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-124" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1.001;exitY=0.818;exitDx=0;exitDy=0;fontColor=#666666;strokeColor=#666666;dashed=1;exitPerimeter=0;" edge="1" parent="1" source="hmBfKhxy8mBhXzrh4bXw-123">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="469" y="4711" as="targetPoint" />
|
||||||
|
<mxPoint x="382.62" y="4711" as="sourcePoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-125" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.75;exitDx=0;exitDy=0;fontColor=#666666;strokeColor=#666666;" edge="1" parent="1" source="hmBfKhxy8mBhXzrh4bXw-79">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="470" y="4691" as="targetPoint" />
|
||||||
|
<mxPoint x="382.62" y="4691" as="sourcePoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-126" value="ZMQ Port" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontColor=#666666;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="370.74" y="4671" width="68" height="26" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-127" value="ZMQ Port 2" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontColor=#666666;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="369.24" y="4690" width="77" height="26" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-128" value="GUI" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontColor=#666666;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="462.82000000000005" y="4678" width="39" height="26" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-129" value="GUI" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontColor=#666666;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="462" y="4697" width="39" height="26" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-130" value="Images" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontColor=#666666;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="370.24" y="4653" width="53" height="26" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-131" value="<font face="Courier New">C++ API</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#77BBBB;strokeColor=#77BBBB;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-199" y="4999" width="146" height="84" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-132" value="<font face="Courier New">Python API</font><span style="color: rgba(0, 0, 0, 0); font-family: monospace; font-size: 0px; text-align: start; text-wrap-mode: nowrap;">%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22%26lt%3Bfont%20face%3D%26quot%3BCourier%20New%26quot%3B%26gt%3BC%2B%2B%20API%26lt%3B%2Ffont%26gt%3B%22%20style%3D%22rounded%3D1%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3BfillColor%3D%2377AADD%3BstrokeColor%3D%2377AADD%3BlabelPosition%3Dcenter%3BverticalLabelPosition%3Dmiddle%3Balign%3Dcenter%3BverticalAlign%3Dmiddle%3BfontSize%3D17%3BgradientColor%3Dnone%3BfontColor%3D%23FFFFFF%3B%22%20vertex%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20x%3D%22-180%22%20y%3D%224998%22%20width%3D%22146%22%20height%3D%2284%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3E</span>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#77BBBB;strokeColor=#77BBBB;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-202.75" y="5120" width="146" height="84" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-133" value="<font face="Courier New">CLI</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#77BBBB;strokeColor=#77BBBB;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-202.75" y="5240" width="146" height="84" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-134" value="<font face="Courier New">Qt GUI</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#77BBBB;strokeColor=#77BBBB;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-202.75" y="5360" width="146" height="84" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-135" value="" style="points=[[0.35,0,0],[0.98,0.51,0],[1,0.71,0],[0.67,1,0],[0,0.795,0],[0,0.65,0]];verticalLabelPosition=bottom;sketch=0;html=1;verticalAlign=top;aspect=fixed;align=center;pointerEvents=1;shape=mxgraph.cisco19.user;fillColor=#77BBBB;strokeColor=#77BBBB;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-336.5" y="5154" width="50" height="50" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-137" value="<font face="Courier New">&lt;&lt;class&gt;&gt; Detector</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#77BBBB;strokeColor=#77BBBB;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="24.710000000000004" y="5239" width="196" height="84" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-138" value="Module 3" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#99CCFF;strokeColor=#99CCFF;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-61.06999999999997" y="5622" width="132" height="68" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-139" value="Module 2" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#88BBEE;strokeColor=#88BBEE;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-72.06999999999996" y="5615" width="132" height="68" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-140" value="Module 1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#77AADD;strokeColor=#77AADD;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-80.06999999999996" y="5607" width="132" height="68" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-141" value="Module (s)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#6699CC;strokeColor=#6699CC;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-87.77000000000001" y="5600" width="132" height="68" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-142" value="Module 3" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#99CCFF;strokeColor=#99CCFF;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="132.00000000000006" y="5622" width="132" height="68" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-143" value="Module 2" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#88BBEE;strokeColor=#88BBEE;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="121.00000000000006" y="5615" width="132" height="68" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-144" value="Module 1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#77AADD;strokeColor=#77AADD;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="113.00000000000006" y="5607" width="132" height="68" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-145" value="Receiver (s)" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#6699CC;strokeColor=#6699CC;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="105.30000000000001" y="5600" width="132" height="68" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-150" value="" style="endArrow=classic;html=1;rounded=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=#666666;" edge="1" parent="1" target="hmBfKhxy8mBhXzrh4bXw-131">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="-284" y="5189" as="sourcePoint" />
|
||||||
|
<mxPoint x="-234" y="5139" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-151" value="" style="endArrow=classic;html=1;rounded=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=#666666;" edge="1" parent="1" target="hmBfKhxy8mBhXzrh4bXw-132">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="-284" y="5190" as="sourcePoint" />
|
||||||
|
<mxPoint x="-234" y="5140" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-152" value="" style="endArrow=classic;html=1;rounded=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=#666666;" edge="1" parent="1" target="hmBfKhxy8mBhXzrh4bXw-133">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="-284" y="5190" as="sourcePoint" />
|
||||||
|
<mxPoint x="-234" y="5140" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-153" value="" style="endArrow=classic;html=1;rounded=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=#666666;" edge="1" parent="1" target="hmBfKhxy8mBhXzrh4bXw-134">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="-284" y="5190" as="sourcePoint" />
|
||||||
|
<mxPoint x="-234" y="5140" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-154" value="" style="endArrow=classic;html=1;rounded=0;strokeColor=#666666;exitX=1;exitY=0.401;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="hmBfKhxy8mBhXzrh4bXw-131" target="hmBfKhxy8mBhXzrh4bXw-137">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="-30.629999999999995" y="5028" as="sourcePoint" />
|
||||||
|
<mxPoint x="10" y="5010" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-155" value="" style="endArrow=classic;html=1;rounded=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=#666666;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" edge="1" parent="1" source="hmBfKhxy8mBhXzrh4bXw-132" target="hmBfKhxy8mBhXzrh4bXw-137">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="-53" y="5162" as="sourcePoint" />
|
||||||
|
<mxPoint x="28" y="5134" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-156" value="" style="endArrow=classic;html=1;rounded=0;strokeColor=#666666;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="hmBfKhxy8mBhXzrh4bXw-133" target="hmBfKhxy8mBhXzrh4bXw-137">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="-40" y="5178" as="sourcePoint" />
|
||||||
|
<mxPoint x="20" y="5170" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-157" value="" style="endArrow=classic;html=1;rounded=0;strokeColor=#666666;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="hmBfKhxy8mBhXzrh4bXw-134" target="hmBfKhxy8mBhXzrh4bXw-137">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="-50" y="5328" as="sourcePoint" />
|
||||||
|
<mxPoint x="10" y="5040" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-159" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;strokeColor=#666666;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="hmBfKhxy8mBhXzrh4bXw-137" target="hmBfKhxy8mBhXzrh4bXw-146">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="-10" y="5606" as="sourcePoint" />
|
||||||
|
<mxPoint x="71" y="5578" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-160" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;strokeColor=#666666;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="hmBfKhxy8mBhXzrh4bXw-146" target="hmBfKhxy8mBhXzrh4bXw-141">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="150" y="5518" as="sourcePoint" />
|
||||||
|
<mxPoint x="231" y="5490" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-161" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;strokeColor=#666666;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="hmBfKhxy8mBhXzrh4bXw-146" target="hmBfKhxy8mBhXzrh4bXw-145">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="123" y="5470" as="sourcePoint" />
|
||||||
|
<mxPoint x="341" y="5430" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-163" value="slsDetectorPackage<div>Client ( C++17 )</div>" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=17;fontColor=#666666;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-191" y="5478" width="160" height="50" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-165" value="CLIENT" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=17;fontColor=#666666;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="172.38" y="5083" width="80" height="30" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-166" value="<font face="Courier New">Shared Memory (s)</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#77BBBB;strokeColor=#77BBBB;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="250" y="5311" width="169" height="70" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-167" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;strokeColor=#666666;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" edge="1" parent="1" source="hmBfKhxy8mBhXzrh4bXw-137" target="hmBfKhxy8mBhXzrh4bXw-166">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="120" y="5350" as="sourcePoint" />
|
||||||
|
<mxPoint x="120" y="5408" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="hmBfKhxy8mBhXzrh4bXw-168" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;strokeColor=#666666;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" edge="1" parent="1" source="hmBfKhxy8mBhXzrh4bXw-146" target="hmBfKhxy8mBhXzrh4bXw-166">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="260" y="5340" as="sourcePoint" />
|
||||||
|
<mxPoint x="260" y="5398" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="QgYz-w7MwsADk0cZRM1J-14" value="Assembled Data" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;rotation=40;fontColor=#666666;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-271.5" y="2438" width="106" height="26" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="QgYz-w7MwsADk0cZRM1J-18" value="<pre style=""><span style="background-color: transparent;"><font style="">Receiver streaming out<br><font style="">rx_zmqport</font>&nbsp;= <font style=""><b style="">30001</b></font></font></span><br></pre>" style="text;html=1;align=left;verticalAlign=middle;resizable=1;points=[];autosize=1;strokeColor=#4A7B72;fillColor=default;fontColor=#4A7B72;movable=1;rotatable=1;deletable=1;editable=1;locked=0;connectable=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-130.5" y="2471.13" width="166" height="43.2" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="QgYz-w7MwsADk0cZRM1J-19" value="<font face="Comic Sans MS">Receiver</font><div><font face="Comic Sans MS">pc1234</font></div><div><span><font style="color: rgb(74, 123, 114);" face="Comic Sans MS">129.129.100.115</font></span></div>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#88BBEE;strokeColor=#88BBEE;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="46.5" y="2448" width="137" height="85" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="QgYz-w7MwsADk0cZRM1J-20" value="<font face="Courier New">Receiver</font><div>pc1234</div><div><span><font style="color: rgb(74, 123, 114);">129.129.100.115</font></span></div>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#88BBEE;strokeColor=#88BBEE;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;fontFamily=Helvetica;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="46.5" y="2549.1" width="137" height="85" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="QgYz-w7MwsADk0cZRM1J-21" value="<pre style=""><pre><span style="background-color: transparent;"><font style="">Receiver streaming out<br><font style="">rx_zmqport</font>&nbsp;= <font style=""><b style="">30002</b></font></font></span></pre></pre>" style="text;html=1;align=left;verticalAlign=middle;resizable=1;points=[];autosize=1;strokeColor=#4A7B72;fillColor=default;fontColor=#4A7B72;movable=1;rotatable=1;deletable=1;editable=1;locked=0;connectable=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-130.5" y="2563.1" width="166" height="44" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="QgYz-w7MwsADk0cZRM1J-24" value="<font face="Comic Sans MS">Client/ GUI</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#AAAAFF;strokeColor=#AAAAFF;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=middle;fontSize=17;gradientColor=none;fontColor=#FFFFFF;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-498" y="2235" width="132" height="68" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="QgYz-w7MwsADk0cZRM1J-25" value="" style="points=[[0.35,0,0],[0.98,0.51,0],[1,0.71,0],[0.67,1,0],[0,0.795,0],[0,0.65,0]];verticalLabelPosition=bottom;sketch=0;html=1;verticalAlign=top;aspect=fixed;align=center;pointerEvents=1;shape=mxgraph.cisco19.user;fillColor=#AAAAFF;strokeColor=none;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-457.0000000000001" y="2185" width="50" height="50" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="QgYz-w7MwsADk0cZRM1J-26" value="<p><font face="Courier New" style="">Client listening to&nbsp;<br><font style="">zmqport</font> : <font style=""><b style="">30001</b></font><br><font style="">zmqip</font>&nbsp; &nbsp;: <font style=""><b style="">129.129.100.115</b></font></font></p>" style="text;html=1;align=left;verticalAlign=middle;resizable=1;points=[];autosize=1;strokeColor=#4A7B72;fillColor=default;fontColor=#4A7B72;movable=1;rotatable=1;deletable=1;editable=1;locked=0;connectable=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-559" y="2319.63" width="187" height="56" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="kpcteDQP5Q-WdnKVJ5EM-2" value="<font style="font-size: 17px;" face="Comic Sans MS">Detector</font>" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontColor=#737373;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="499.15" y="71" width="77" height="32" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
</root>
|
||||||
|
</mxGraphModel>
|
||||||
|
</diagram>
|
||||||
|
</mxfile>
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
.. _binary file format:
|
||||||
|
|
||||||
Binary File Format
|
Binary File Format
|
||||||
====================
|
====================
|
||||||
|
|
||||||
@@ -31,6 +33,7 @@ Data File
|
|||||||
|
|
||||||
* Each frame includes a :ref:`**sls_receiver_header** <sls receiver header format>` structure, followed by the actual frame data.
|
* Each frame includes a :ref:`**sls_receiver_header** <sls receiver header format>` structure, followed by the actual frame data.
|
||||||
|
|
||||||
|
* More details on :ref:`slsReceiverHeader<sls receiver header format>` and the actual image data is described in the :ref:`Detector Image Size and Format <data format>` section.
|
||||||
|
|
||||||
|
|
||||||
.. _json master file examples:
|
.. _json master file examples:
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ Usage
|
|||||||
|
|
||||||
The syntax is *'[detector index]-[module index]:[command]'*, where the indices are by default '0', when not specified.
|
The syntax is *'[detector index]-[module index]:[command]'*, where the indices are by default '0', when not specified.
|
||||||
|
|
||||||
|
.. _cl-module-index-label:
|
||||||
|
|
||||||
Module index
|
Module index
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
Modules are indexed based on their order in the hostname command. They are used to configure a specific module within a detector and are followed by a ':' in syntax.
|
Modules are indexed based on their order in the hostname command. They are used to configure a specific module within a detector and are followed by a ':' in syntax.
|
||||||
|
|||||||
242
docs/src/configcommands.rst
Normal file
@@ -0,0 +1,242 @@
|
|||||||
|
.. _setup commands:
|
||||||
|
|
||||||
|
Setup Commands
|
||||||
|
================================
|
||||||
|
|
||||||
|
|
||||||
|
Introduction
|
||||||
|
-------------
|
||||||
|
|
||||||
|
To connect to any device, one needs a unique combination of **IP address** (which identifies the device) and **port number** (which specifies the service).
|
||||||
|
|
||||||
|
This package typically deals with two types of network interfaces:
|
||||||
|
|
||||||
|
* **1 GbE public interface** - Accessible from anywhere on the network. Connectivity can be verified by pinging this interface from any PC.
|
||||||
|
|
||||||
|
* **10 GbE private interface** - Dedicated to high-speed data transfer with a specific PC. In addition to the 1 GbE public interface (MTU 1500), the device may include one or more private 10 GbE interfaces (MTU 9000), which are not accessible from other machines.
|
||||||
|
|
||||||
|
Client to Module
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
.. figure:: images/Client_module_commands.png
|
||||||
|
:target: _images/Client_module_commands.png
|
||||||
|
:width: 700px
|
||||||
|
:align: center
|
||||||
|
:alt: Client Module Commands
|
||||||
|
|
||||||
|
Client Module TCP Commands
|
||||||
|
|
||||||
|
The client configures and controls modules via the 1 GbE public TCP interface.
|
||||||
|
|
||||||
|
* Should be able to ping the module's hostname from any PC on the network.
|
||||||
|
* If one cannot ping, ensure that it is powered on.
|
||||||
|
* If the command cannot connect to the port (`hostname command <commandline.html#term-hostname>`_ failed), the onboard servers may not have started yet.
|
||||||
|
|
||||||
|
Each physical module has its own unique IP address. As the IPs are already different, all modules can share the same default ports:
|
||||||
|
|
||||||
|
* 1952 - Default Module TCP Control Port
|
||||||
|
* 1953 - Default Module TCP Stop port
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
# Therefore, one can use
|
||||||
|
hostname bchip100+bchip101+
|
||||||
|
# instead of
|
||||||
|
hostname bchip100:1952+bchip101:1954+
|
||||||
|
|
||||||
|
|
||||||
|
**Simulators**, however, usually run on the same PC. See `virtual servers <https://slsdetectorgroup.github.io/devdoc/virtualserver.html>`_ for more details. In that case, each instance must use a different port. By incrementing port numbers, you can also use the virtual command for convenience.
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
# Therefore, one can use
|
||||||
|
virtual 2 1952
|
||||||
|
# instead of
|
||||||
|
hostname localhost:1952+localhost:1954+
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Client to Receiver
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
.. figure:: images/Client_receiver_commands.png
|
||||||
|
:target: _images/Client_receiver_commands.png
|
||||||
|
:align: center
|
||||||
|
:alt: Client Receiver Commands
|
||||||
|
|
||||||
|
Client Receiver TCP Commands
|
||||||
|
|
||||||
|
Each module has a receiver, which can be either local or remote.
|
||||||
|
|
||||||
|
The client can configure and control receivers via the 1 GbE public TCP interface:
|
||||||
|
|
||||||
|
* Should be able to ping the receiver's hostname from any PC on the network.
|
||||||
|
* If one cannot ping, ensure that it is powered on.
|
||||||
|
* If the command cannot connect to the port (`rx_hostname command <commandline.html#term-rx_hostname-hostname-or-ip-address>`_ failed), the receivers may not have started yet.
|
||||||
|
|
||||||
|
|
||||||
|
Since multiple receiver processes typically run on the same PC, they share the same IP. Here, each receiver process must use a different TCP port for a unique connection.
|
||||||
|
|
||||||
|
* 1954 - Default Receiver TCP port
|
||||||
|
|
||||||
|
Configuring the receiver with the command `rx_hostname command <commandline.html#term-rx_hostname-hostname-or-ip-address>`_, sets up a receiver for every module in shared memory automatically ie. every module's receiver TCP port will automatically increment in shared memory. The starting port is defined by the command `rx_tcpport <commandline.html#term-rx_tcpport-port>`_ with the default being 1954.
|
||||||
|
|
||||||
|
|
||||||
|
A multi-module command (without colon or module index) sets incremental ports starting from the specified port number.
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
hostname bchip100+bchip101+bchip102+bchip103+
|
||||||
|
rx_tcport 2000 # sets the receiver port to 2000, 2001, 2002, 2003
|
||||||
|
|
||||||
|
|
||||||
|
For example, using default TCP ports (1954, 1955):
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
hostname bchip100+bchip101+
|
||||||
|
rx_hostname localhost
|
||||||
|
# Equivalent to:
|
||||||
|
rx_hostname localhost:1954+localhost:1955+
|
||||||
|
|
||||||
|
# or set to another set of ports (automatically incremented)
|
||||||
|
rx_tcpport 1984
|
||||||
|
rx_hostname localhost
|
||||||
|
# instead of
|
||||||
|
rx_hostname localhost:1984+localhost:1985+
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Module to Receiver
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
.. figure:: images/Module_receiver_commands.png
|
||||||
|
:target: _images/Module_receiver_commands.png
|
||||||
|
:align: center
|
||||||
|
:alt: Module Receiver Commands
|
||||||
|
|
||||||
|
Module Receiver UDP Commands
|
||||||
|
|
||||||
|
**10GbE Interface**
|
||||||
|
|
||||||
|
The module typically sends images to the receiver via a 10 GbE private interface on the receiver PC, which has an MTU of 9000 to support jumbo packets. The private interface is not reachable from other machines, so it cannot be pinged from anywhere.
|
||||||
|
|
||||||
|
**Multiple UDP Packets**
|
||||||
|
|
||||||
|
Images are split into UDP packets for transmission. Unlike TCP, UDP is connectionless and does not guarantee delivery. Therefore, the receiver PC must be tuned for reliable reception. See `Troubleshooting <https://slsdetectorgroup.github.io/devdoc/troubleshooting.html>`_.
|
||||||
|
|
||||||
|
**UDP Configuration**
|
||||||
|
|
||||||
|
Unlike TCP, the module (hardware) requires explicit configuration for sending images via UDP, including:
|
||||||
|
|
||||||
|
* Source and destination IPs
|
||||||
|
* Source and destination MAC addresses
|
||||||
|
* Source and destination ports
|
||||||
|
|
||||||
|
**UDP Destination**
|
||||||
|
|
||||||
|
Info on where to send the image from the module to.
|
||||||
|
|
||||||
|
**UDP Desination IP** - The IP of the receiver PC's 10 GbE interface, usually found via ``ifconfig``. Command: `udp_dstip <commandline.html#term-udp_dstip-x.x.x.x-or-auto>`_. For 1GbE interface and for this command, one can use 'auto' as an argument, which will pick up the IP from the `rx_hostname command <commandline.html#term-rx_hostname-hostname-or-ip-address>`_.
|
||||||
|
|
||||||
|
**UDP desintation MAC** - Also obtained from the interface using ``ifconfig``. For built-in receivers, the module configures this automatically from the ``UDP destination IP``. For custom receivers, it must be explicitly provided. Command: `udp_dstmac <commandline.html#term-udp_dstmac-x-x-x-x-x-x>`_
|
||||||
|
|
||||||
|
**UDP destination port** - Ensure uniqueness if multiple users share the interface. Command: `udp_dstport <commandline.html#term-udp_dstport-n>`_
|
||||||
|
|
||||||
|
* 50001 - Default Receiver UDP port
|
||||||
|
|
||||||
|
|
||||||
|
**UDP Source**
|
||||||
|
|
||||||
|
As it is a one-way communication (module to receiver with no reply or acknowledgements), info on the source of the image is more for debugging purposes and prevent packet rejection.
|
||||||
|
|
||||||
|
**UDP source IP** - Must be on the same subnet as the destination IP (same first three octets) to prevent packet rejection by the receiver interface. For 1GbE interface and for this command (except for Eiger), one can use ``auto`` as an argument, which will pick up the IP from the `hostname command <commandline.html#term-hostname>`_. Command: `udp_srcip <commandline.html#term-udp_srcip-x.x.x.x-or-auto>`_
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
# 10 GbE interface
|
||||||
|
hostname bchip100
|
||||||
|
udp_dstip 10.0.2.1
|
||||||
|
udp_srcip 10.0.2.19
|
||||||
|
rx_hostname localhost
|
||||||
|
|
||||||
|
# 1 GbE interface
|
||||||
|
hostname bchip100
|
||||||
|
rx_hostname localhost
|
||||||
|
udp_dstip auto # this command uses IP from rx_hostname. So, it comes after.
|
||||||
|
udp_srcip auto # this command uses IP from hostname
|
||||||
|
|
||||||
|
**UDP source MAC** - By default, it is set to ``aa:bb:cc:dd:xx:yy`` where ``xx`` and ``yy`` are module row and column indices to differentiate the modules while debugging. Command: `udp_srcmac <commandline.html#term-udp_srcmac-x-x-x-x-x-x>`_
|
||||||
|
|
||||||
|
|
||||||
|
**UDP source port** - This is hardcoded in every module to the same value in the detector server and cannot be changed.
|
||||||
|
|
||||||
|
Note: If there is a second UDP port on the module, use 'udp_dstport2' or 'udp_dstip2'etc. See `here <https://slsdetectorgroup.github.io/devdoc/dataformat.html>`_ for more detector specific info.
|
||||||
|
|
||||||
|
Receiver to GUI
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
.. figure:: images/Receiver_gui_commands.png
|
||||||
|
:target: _images/Receiver_gui_commands.png
|
||||||
|
:align: center
|
||||||
|
:alt: Receiver GUI Commands
|
||||||
|
|
||||||
|
Receiver GUI Commands
|
||||||
|
|
||||||
|
|
||||||
|
Enabling the GUI automatically streams images from the receiver via ZMQ sockets. Even without the GUI, streaming can be activated explicitly using the command `rx_zmqstream <commandline.html#term-rx_zmqstream-0-1>`_. ZMQ streaming uses TCP/IP, so the ports must be configured appropriately.
|
||||||
|
|
||||||
|
**Receiver ZMQ Port** - Port from which the receiver streams ZMQ packets. Command: `rx_zmqport <commandline.html#term-rx_zmqport-port>`_
|
||||||
|
|
||||||
|
* 30001 - Default Receiver ZMQ Port (stream out from)
|
||||||
|
|
||||||
|
**Client ZMQ Port** - Port that the client ZMQ socket listens to. Command: `zmqport <commandline.html#term-zmqport-port>`_
|
||||||
|
|
||||||
|
* 30001 - Default Client ZMQ Port (listens to)
|
||||||
|
|
||||||
|
**Client ZMQ IP** - IP address the client ZMQ socket listens to. Command: `zmqip <commandline.html#term-zmqip-x.x.x.x>`_. By default, this is set to the IP of ``rx_hostname``, but can be set to any IP address that the client can reach.
|
||||||
|
|
||||||
|
* Default: Receiver’s hostname (rx_hostname)
|
||||||
|
|
||||||
|
|
||||||
|
.. note ::
|
||||||
|
|
||||||
|
``zmqport`` and ``zmqip`` need to be set up in shared memory before starting up the Gui. If the Gui is already running, change it in the Advanced Tab directly in the Gui.
|
||||||
|
|
||||||
|
``rx_zmqstream`` is set to 1 when the GUI is started, but has to be manually set back to 0 to disable zmq streaming in the receiver for better performance when not using the Gui.
|
||||||
|
|
||||||
|
The GUI hwm (high water mark, which is like a measurement of the number of enqueued zmq packets) values are set to a low number (from library default of possibly 1000 to 2) to reduce the zmq buffer to display only some of the images. Resetting it back to -1 or 1000 should only matter if one plans to not use the Gui and still zmq stream without wanting to drop zmq images (eg. for external processing chain).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Receiver to External Processing
|
||||||
|
--------------------------------
|
||||||
|
|
||||||
|
.. figure:: images/Receiver_external_process_commands.png
|
||||||
|
:target: _images/Receiver_external_process_commands.png
|
||||||
|
:align: center
|
||||||
|
:alt: Click to zoom
|
||||||
|
|
||||||
|
Receiver External Process Commands
|
||||||
|
|
||||||
|
Images from the receiver can also be streamed to an external processing chain for further processing or storage. In this setup:
|
||||||
|
|
||||||
|
* The external processor listens to the ZMQ ports and IPs that the receiver streams from.
|
||||||
|
|
||||||
|
* The client ZMQ sockets now listen to the ports and IPs that the external processor streams from instead of the receiver.
|
||||||
|
|
||||||
|
**Receiver ZMQ Port** - Port from which the receiver streams ZMQ packets. Command: `rx_zmqport <commandline.html#term-rx_zmqport-port>`_
|
||||||
|
|
||||||
|
* 30001 - Default Receiver ZMQ Port (stream out from)
|
||||||
|
|
||||||
|
**Client ZMQ Port** - Port that the client ZMQ socket listens to. Command: `zmqport <commandline.html#term-zmqport-port>`_. In this set up, it should listen to the zmq port that the external process is streaming out from.
|
||||||
|
|
||||||
|
* 30001 - Default Client ZMQ Port (listens to)
|
||||||
|
|
||||||
|
**Client ZMQ IP** - IP address the client ZMQ socket listens to. Command: `zmqip <commandline.html#term-zmqip-x.x.x.x>`_. By default, this is set to the IP of ``rx_hostname``, but in this set up, it should listen to the zmq IP that the external process is streaming out from.
|
||||||
|
|
||||||
|
* Default: Receiver’s hostname (rx_hostname)
|
||||||
330
docs/src/dataformat.rst
Normal file
@@ -0,0 +1,330 @@
|
|||||||
|
.. _data format:
|
||||||
|
|
||||||
|
Detector Image Size and Format
|
||||||
|
================================
|
||||||
|
|
||||||
|
Each UDP port creates its own output file, which contains the data of the image transmitted over that port. More on number of files and naming for each file in the `File format <fileformat.html>`_ section.
|
||||||
|
|
||||||
|
Jungfrau
|
||||||
|
-------------
|
||||||
|
|
||||||
|
Single Port Configuration
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. image:: images/Jungfrau_module.png
|
||||||
|
:target: _images/Jungfrau_module.png
|
||||||
|
:width: 650px
|
||||||
|
:align: center
|
||||||
|
:alt: Jungfrau Module Single Port Configuration
|
||||||
|
|
||||||
|
By default, only the outer 10GbE interface is enabled, transmitting the full image over a single UDP port. This results in one file per module containing the complete image.
|
||||||
|
|
||||||
|
Total image size = 524,288 bytes
|
||||||
|
- 8 chips (2 x 4 grid)
|
||||||
|
- 256 x 256 pixels (chip size)
|
||||||
|
- 2 bytes (pixel width)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Double Port Configuration
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. image:: images/Jungfrau_two_port.png
|
||||||
|
:target: _images/Jungfrau_two_port.png
|
||||||
|
:width: 500px
|
||||||
|
:align: center
|
||||||
|
:alt: Jungfrau Module Two Port Configuration
|
||||||
|
|
||||||
|
If both interfaces are enabled using the `numinterfaces <commandline.html#term-numinterfaces-1-2>`_ command on compatible hardware and firmware, the image splits into top and bottom halves sent over two UDP ports:
|
||||||
|
|
||||||
|
- The top half transmits via the inner interface (`udp_dstport2 <commandline.html#term-udp_dstport2-n>`_ and `udp_dstip2 <commandline.html#term-udp_dstip2-x.x.x.x-or-auto>`_).
|
||||||
|
|
||||||
|
- The bottom half uses the outer interface(`udp_dstport <commandline.html#term-udp_dstport-n>`_ and `udp_dstip <commandline.html#term-udp_dstip-x.x.x.x-or-auto>`_).
|
||||||
|
|
||||||
|
The number of files per module equals the active UDP ports—two files per module when both interfaces are used.
|
||||||
|
|
||||||
|
Image size per UDP port or File = 262,144 bytes
|
||||||
|
- **Complete Image size / 2**
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Read Partial Rows
|
||||||
|
^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. image:: images/Jungfrau_read_rows.png
|
||||||
|
:target: _images/Jungfrau_read_rows.png
|
||||||
|
:width: 550px
|
||||||
|
:align: center
|
||||||
|
:alt: Jungfrau Module Read Partial Rows Configuration
|
||||||
|
|
||||||
|
|
||||||
|
The number of image rows per port can be adjusted using the `readnrows <commandline.html#term-readnrows>`_ command. By default, 512 rows are read, but a smaller value centers the readout vertically (e.g., 8 rows reads 4 above and 4 below the center). Increasing the value symmetrically expands the region toward the top and bottom. Permissible values are multiples of 8.
|
||||||
|
|
||||||
|
|
||||||
|
Total image size = 32,768 bytes
|
||||||
|
- 8 chips (2 x 4 grid)
|
||||||
|
- **8** x 256 pixels (chip size: **8 rows**)
|
||||||
|
- 2 bytes (pixel width)
|
||||||
|
|
||||||
|
Note: Still in prototype stage, writes complete image (padded or not depending on `rx_padding <commandline.html#term-rx_padding-0-1>`_ parameter) to file. Only the summary written to console in the receiver handles the `readnrows <commandline.html#term-readnrows>`_ to calculate to calculate complete images received. Only reduces network load, not file size. Use `rx_roi <commandline.html#term-rx_roi-xmin-xmax-ymin-ymax>`_ for file size.
|
||||||
|
|
||||||
|
Moench
|
||||||
|
-------------
|
||||||
|
|
||||||
|
Single Port Configuration
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. image:: images/Moench_module.png
|
||||||
|
:target: _images/Moench_module.png
|
||||||
|
:width: 550px
|
||||||
|
:align: center
|
||||||
|
:alt: Moench Module Single Port Configuration
|
||||||
|
|
||||||
|
By default, only the outer 10GbE interface is enabled, transmitting the full image over a single UDP port. This results in one file per module containing the complete image.
|
||||||
|
|
||||||
|
Total image size = 320,000 bytes
|
||||||
|
- 400 x 400 pixels (chip size)
|
||||||
|
- 2 bytes (pixel width)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Double Port Configuration
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. image:: images/Moench_two_port.png
|
||||||
|
:target: _images/Moench_two_port.png
|
||||||
|
:width: 400px
|
||||||
|
:align: center
|
||||||
|
:alt: Moench Module Two Port Configuration
|
||||||
|
|
||||||
|
If both interfaces are enabled using the `numinterfaces <commandline.html#term-numinterfaces-1-2>`_ command on compatible hardware and firmware, the image splits into top and bottom halves sent over two UDP ports:
|
||||||
|
|
||||||
|
- The top half transmits via the inner interface (`udp_dstport2 <commandline.html#term-udp_dstport2-n>`_ and `udp_dstip2 <commandline.html#term-udp_dstip2-x.x.x.x-or-auto>`_).
|
||||||
|
|
||||||
|
- The bottom half uses the outer interface(`udp_dstport <commandline.html#term-udp_dstport-n>`_ and `udp_dstip <commandline.html#term-udp_dstip-x.x.x.x-or-auto>`_).
|
||||||
|
|
||||||
|
The number of files per module equals the active UDP ports—two files per module when both interfaces are used.
|
||||||
|
|
||||||
|
Image size per UDP port or File = 160,000 bytes
|
||||||
|
- **Complete Image size / 2**
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Read Partial Rows
|
||||||
|
^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. image:: images/Moench_read_rows.png
|
||||||
|
:target: _images/Moench_read_rows.png
|
||||||
|
:width: 400px
|
||||||
|
:align: center
|
||||||
|
:alt: Moench Module Read Partial Rows Configuration
|
||||||
|
|
||||||
|
|
||||||
|
The number of image rows per port can be adjusted using the `readnrows <commandline.html#term-readnrows>`_ command. By default, 400 rows are read, but a smaller value centers the readout vertically (e.g., 16 rows reads 8 above and 8 below the center). Increasing the value symmetrically expands the region toward the top and bottom. Permissible values are multiples of 16.
|
||||||
|
|
||||||
|
|
||||||
|
Total image size = 12,800 bytes
|
||||||
|
- **16** x 400 pixels (chip size: **16 rows**)
|
||||||
|
- 2 bytes (pixel width)
|
||||||
|
|
||||||
|
Note: Still in prototype stage, writes complete image (padded or not depending on `rx_padding <commandline.html#term-rx_padding-0-1>`_ parameter) to file. Only the summary written to console in the receiver handles the read n rows to calculate complete images received. Only reduces network load, not file size. Use `rx_roi <commandline.html#term-rx_roi-xmin-xmax-ymin-ymax>`_ for file size.
|
||||||
|
|
||||||
|
Eiger
|
||||||
|
-------------
|
||||||
|
|
||||||
|
Default Configuration
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. image:: images/Eiger_module.png
|
||||||
|
:target: _images/Eiger_module.png
|
||||||
|
:width: 350px
|
||||||
|
:align: center
|
||||||
|
:alt: Eiger Module Default Configuration
|
||||||
|
|
||||||
|
|
||||||
|
Each Eiger module has two independent identical readout systems (other than firmware), each with its own control port and `hostname <commandline.html#term-hostname>`_ to be configured with. They are referred to as the 'top' and 'bottom' half modules. The bottom half module is flipped vertically.
|
||||||
|
|
||||||
|
Each half module has 2 parallel UDP ports for 2 chips each. The left UDP port is configured with `udp_dstport <commandline.html#term-udp_dstport-n>`_, while the right UDP port is configured with `udp_dstport2 <commandline.html#term-udp_dstport2-n>`_. This is vice versa for the bottom half module.
|
||||||
|
|
||||||
|
|
||||||
|
Image size per UDP port or File = 262,144 bytes
|
||||||
|
- 2 chips (1 x 2 grid)
|
||||||
|
- 256 x 256 pixels (chip size)
|
||||||
|
- 2 bytes (default pixel width)
|
||||||
|
|
||||||
|
|
||||||
|
The myth, the legend, the bottom ports: Demystifying them
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
|
||||||
|
.. figure:: images/Eiger_bottom_1.png
|
||||||
|
:target: _images/Eiger_bottom_1.png
|
||||||
|
:width: 350px
|
||||||
|
:align: center
|
||||||
|
:alt: Eiger Bottom as Firmware gets it
|
||||||
|
|
||||||
|
How the firmware gets the images
|
||||||
|
|
||||||
|
|
||||||
|
.. figure:: images/Eiger_bottom_2.png
|
||||||
|
:target: _images/Eiger_bottom_2.png
|
||||||
|
:width: 350px
|
||||||
|
:align: center
|
||||||
|
:alt: Eiger Bottom after the firmware flips it horizontally
|
||||||
|
|
||||||
|
After the firmware flips it horizontally
|
||||||
|
|
||||||
|
|
||||||
|
.. figure:: images/Eiger_bottom_3.png
|
||||||
|
:target: _images/Eiger_bottom_3.png
|
||||||
|
:width: 350px
|
||||||
|
:align: center
|
||||||
|
:alt: After the software swaps the udp ports
|
||||||
|
|
||||||
|
After the software swaps the udp ports
|
||||||
|
|
||||||
|
|
||||||
|
.. figure:: images/Eiger_bottom_4.png
|
||||||
|
:target: _images/Eiger_bottom_4.png
|
||||||
|
:width: 400px
|
||||||
|
:align: center
|
||||||
|
:alt: After the gui has flipped the bottom vertically
|
||||||
|
|
||||||
|
After the gui has flipped the bottom vertically
|
||||||
|
|
||||||
|
|
||||||
|
Note: The same process happens for the bottom 2 udp ports of the quad.
|
||||||
|
|
||||||
|
|
||||||
|
Pixel width
|
||||||
|
^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
The pixel width can be configured to 4, 8, 16 (default) or 32 bits using the command `dr <commandline.html#term-dr-value>`_. This affects image size per UDP port or file.
|
||||||
|
|
||||||
|
Flip rows
|
||||||
|
^^^^^^^^^^
|
||||||
|
|
||||||
|
One can use the command `fliprows <commandline.html#term-fliprows-0-1>`_ to flip the rows vertically for the bottom or top half module. It is sent out to the reciever, but does not flip rows in the output file itself, but rather streams out this info via the json header and thus instructs the GUI to display them correctly.
|
||||||
|
|
||||||
|
1GbE/ 10GbE Interfaces
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Both UDP ports `udp_dstport <commandline.html#term-udp_dstport-n>`_ and `udp_dstport2 <commandline.html#term-udp_dstport2-n>`_ are used in Eiger as shows in the figure. Both of them can be set to use either the 1GbE or the 10GbE interface for data. The 1GbE interface is used also for control and configuration. For data, the 1GbE interface is enabled by default. It can be disabled by enabling the `tengiga <commandline.html#term-tengiga-0-1>`_ command and updating both the `udp_dstport <commandline.html#term-udp_dstport-n>`_ , `udp_dstport2 <commandline.html#term-udp_dstport2-n>`_ , `udp_dstip <commandline.html#term-udp_dstip-x.x.x.x-or-auto>`_ commands to match the 1GbE or 10GbE interface. This setting only affects packetsize and number of packets, but does not affect the total image size.
|
||||||
|
|
||||||
|
Reducing network load
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
**Activate**: By default, the `hostname <commandline.html#term-hostname>`_ command activates the respective half module it connects to, enabling all UDP ports. To deactivate an entire half module (i.e., both UDP ports), use the `activate <commandline.html#term-activate-0-1>`_ command. This disables both UDP ports for that half module, so no data is transmitted from it — only half of the module is read out. To specify which half module to activate or deactivate, use the module index (for Eiger, each half module has its own module index).
|
||||||
|
|
||||||
|
|
||||||
|
**Datastream**: The `datastream <commandline.html#term-datastream-left-right-0-1>`_ command with arguments to specify which port can be used to disable the data streaming from one or both the two UDP ports in a half module. This allows for more flexible configurations, such as reading only two chips or one UDP port of a half module. To specify which half module to activate or deactivate, use the module index (for Eiger, each half module has its own module index).
|
||||||
|
|
||||||
|
Note: Only the activated ports will write data as it does not make sense to write an empty file.
|
||||||
|
|
||||||
|
**Read Partial Rows**: The number of image rows per port can be adjusted using the `readnrows <commandline.html#term-readnrows>`_ command. By default, 256 rows are read, but a smaller value centers the readout vertically (e.g., 8 rows reads 4 above and 4 below the center). Increasing the value symmetrically expands the region toward the top and bottom. Permissible values depend on dynamic range and 10GbE enable.
|
||||||
|
|
||||||
|
.. image:: images/Eiger_read_rows.png
|
||||||
|
:target: _images/Eiger_read_rows.png
|
||||||
|
:width: 400px
|
||||||
|
:align: center
|
||||||
|
:alt: Eiger Module Read Partial Rows Configuration
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Total image size per UDP Port = 8,192 bytes
|
||||||
|
- 2 chips (1 x 2 grid)
|
||||||
|
- **8** x 256 pixels (chip size: **8 rows**)
|
||||||
|
- 2 bytes (default pixel width)
|
||||||
|
|
||||||
|
Note: Still in prototype stage, writes complete image (padded or not depending on `rx_padding <commandline.html#term-rx_padding-0-1>`_ parameter) to file. Only the summary written to console in the receiver handles the `readnrows <commandline.html#term-readnrows>`_ to calculate complete images received. Only reduces network load, not file size. Use `rx_roi <commandline.html#term-rx_roi-xmin-xmax-ymin-ymax>`_ for file size.
|
||||||
|
|
||||||
|
Quad
|
||||||
|
^^^^^^
|
||||||
|
|
||||||
|
The Eiger quad is a special hardware configuration that uses only the top half-module to create a quad layout. In this setup, the second half of the top module—normally associated with the right-side UDP port—is used to represent the inverted bottom half of the quad.
|
||||||
|
|
||||||
|
As with any standard half-module, it includes one control TCP port (with a hostname) and two UDP data ports (top and bottom). When the quad option is enabled, the firmware automatically flips the second UDP port vertically.
|
||||||
|
|
||||||
|
In this configuration, the fliprows command cannot be used to flip the entire half-module. Instead, the receiver automatically includes row-flipping information only for the second UDP port in the JSON header, so the GUI can apply the correct orientation during display
|
||||||
|
|
||||||
|
.. image:: images/Eiger_quad.png
|
||||||
|
:target: _images/Eiger_quad.png
|
||||||
|
:width: 300px
|
||||||
|
:align: center
|
||||||
|
:alt: Eiger Quad Configuration
|
||||||
|
|
||||||
|
Image size per UDP port = same as a normal Eiger UDP port
|
||||||
|
|
||||||
|
Mythen3
|
||||||
|
-------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Default Configuration
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. image:: images/Mythen3_module.png
|
||||||
|
:target: _images/Mythen3_module.png
|
||||||
|
:align: center
|
||||||
|
:alt: Mythen3 Module Default Configuration
|
||||||
|
|
||||||
|
Each Mythen3 module is a 1D detector with 10 chips, each with 128 channels. Each channel has 3 counters that are enabled by default.
|
||||||
|
|
||||||
|
Image size = 15,360 bytes
|
||||||
|
- 10 chips (1 x 10 grid)
|
||||||
|
- 128 channels
|
||||||
|
- 3 counters
|
||||||
|
- 4 bytes (default pixel width)
|
||||||
|
|
||||||
|
Counters
|
||||||
|
^^^^^^^^^^^
|
||||||
|
|
||||||
|
If all 3 counters are enabeld, the frame size for each channel is multiplied by 3. The counters are stored consecutively per channel. One can disable one or more of the counters using the `counters <commandline.html#term-counters-i0-i1-i2-...>`_ command. The frame size will then be reduced accordingly.
|
||||||
|
|
||||||
|
Image size = 10,240 bytes
|
||||||
|
- 10 chips (1 x 10 grid)
|
||||||
|
- 128 channels
|
||||||
|
- 2 counters (0, 1 enabled)
|
||||||
|
- 4 bytes (default pixel width)
|
||||||
|
|
||||||
|
Pixel width
|
||||||
|
^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
The pixel width can be configured to 8, 16 or 32 (default) bits using the command `dr <commandline.html#term-dr-value>`_. 32 bits is actually 24 bits in the chip. This setting does affect image size.
|
||||||
|
|
||||||
|
1GbE/ 10GbE Interfaces
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
|
||||||
|
The UDP port can be set to use either the 1GbE or the 10GbE interface for data. The 1GbE interface is used also for control and configuration. For data, the 10GbE interface is enabled by default. It can be disabled by using the `tengiga <commandline.html#term-tengiga-0-1>`_ command and updating the `udp_dstport <commandline.html#term-udp_dstport-n>`_ and `udp_dstip <commandline.html#term-udp_dstip-x.x.x.x-or-auto>`_ commands to match the 1GbE or 10GbE interface. This setting only affects packetsize and number of packets, but does not affect the total image size.
|
||||||
|
|
||||||
|
|
||||||
|
Gotthard2
|
||||||
|
-------------
|
||||||
|
|
||||||
|
|
||||||
|
Default Configuration
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. image:: images/Gotthard2_module.png
|
||||||
|
:target: _images/Gotthard2_module.png
|
||||||
|
:align: center
|
||||||
|
:alt: Gotthard2 Module Default Configuration
|
||||||
|
|
||||||
|
Each Gotthard2 module is a 1D detector with 10 chips, each with 128 channels.
|
||||||
|
|
||||||
|
Image size = 2,560 bytes
|
||||||
|
- 10 chips (1 x 10 grid)
|
||||||
|
- 128 channels
|
||||||
|
- 2 bytes (pixel width)
|
||||||
|
|
||||||
|
Veto Info
|
||||||
|
^^^^^^^^^^^
|
||||||
|
|
||||||
|
One can enable veto data in the chip of the Gotthard2 module using the `veto <commandline.html#term-veto-0-1>`_ command. By default, this is disabled. This does not affect the image size as veto information is not sent out through the same 10GbE interface.
|
||||||
|
|
||||||
|
One can either stream out the veto info through the low latency link (2.5 gbps) or for debugging purposes through another 10GbE interface.
|
||||||
|
|
||||||
|
For debugging purposes, the veto info can be enabled using the `numinterfaces <commandline.html#term-numinterfaces-1-2>`_ command and the following parameters are updated: `udp_dstport2 <commandline.html#term-udp_dstport2-n>`_ and `udp_dstip2 <commandline.html#term-udp_dstip2-x.x.x.x-or-auto>`_. The veto data from this port is of course written to a separate file and is not combined in the virtual HDF5 file mapping (complete image mapped).
|
||||||
|
|
||||||
|
|
||||||
@@ -14,7 +14,12 @@ the shared libraries these are needed:
|
|||||||
|
|
||||||
* Linux, preferably recent kernel (currently no cross platform support)
|
* Linux, preferably recent kernel (currently no cross platform support)
|
||||||
* CMake >= 3.14
|
* CMake >= 3.14
|
||||||
* C++11 compatible compiler. (We test with gcc and clang)
|
* C++17 compatible compiler. (We test with gcc and clang)
|
||||||
|
|
||||||
|
.. note ::
|
||||||
|
|
||||||
|
For v9.x.x of slsDetectorPackage and older, C++11 compatible compiler.
|
||||||
|
|
||||||
|
|
||||||
-----------------------
|
-----------------------
|
||||||
Python bindings
|
Python bindings
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
.. _file format:
|
||||||
|
|
||||||
File format
|
File format
|
||||||
================================
|
================================
|
||||||
|
|
||||||
@@ -60,3 +62,14 @@ There are 2 file formats supported by the receiver:
|
|||||||
|
|
||||||
The default is binary. HDF5 can be enabled by compiling the package with HDF5 option enabled. The file format is set using the command `fformat <commandline.html#term-fformat-binary-hdf5>`_.
|
The default is binary. HDF5 can be enabled by compiling the package with HDF5 option enabled. The file format is set using the command `fformat <commandline.html#term-fformat-binary-hdf5>`_.
|
||||||
|
|
||||||
|
|
||||||
|
Content
|
||||||
|
--------
|
||||||
|
|
||||||
|
| `Master File`: Contains the metadata of the acquisition. The content is described in :ref:`master file attributes <master file attributes>`.
|
||||||
|
|
||||||
|
|
||||||
|
| `Data File`: Contains the metadata for each image (:ref:`slsReceiverHeader<sls receiver header format>`) and the `data of the image` transmitted over that port. The image data is described in :ref:`Detector Image Size and Format <data format>` section.
|
||||||
|
|
||||||
|
|
||||||
|
| More content and examples are found in the :ref:`HDF5 file format <hdf5 file format>` and :ref:`Binary file format <binary file format>` sections.
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
.. _firmware upgrade:
|
||||||
|
|
||||||
Firmware Upgrade
|
Firmware Upgrade
|
||||||
=================
|
=================
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
|
.. _hdf5 file format:
|
||||||
|
|
||||||
HDF5 File Format
|
HDF5 File Format
|
||||||
================================
|
================================
|
||||||
@@ -76,6 +76,8 @@ Data File
|
|||||||
|
|
||||||
* File Name: [fpath]/[fname]_dx_fy_[findex].h5 :ref:`Details here<file name format>`
|
* File Name: [fpath]/[fname]_dx_fy_[findex].h5 :ref:`Details here<file name format>`
|
||||||
|
|
||||||
|
* More details on :ref:`slsReceiverHeader<sls receiver header format>` and the actual image data is described in the :ref:`Detector Image Size and Format <data format>` section.
|
||||||
|
|
||||||
|
|
||||||
Virtual Data File
|
Virtual Data File
|
||||||
------------------
|
------------------
|
||||||
|
|||||||
BIN
docs/src/images/Client_architecture.png
Normal file
|
After Width: | Height: | Size: 111 KiB |
BIN
docs/src/images/Client_module_commands.png
Normal file
|
After Width: | Height: | Size: 45 KiB |
BIN
docs/src/images/Client_receiver_commands.png
Normal file
|
After Width: | Height: | Size: 43 KiB |
BIN
docs/src/images/Eiger_bottom_1.png
Normal file
|
After Width: | Height: | Size: 33 KiB |
BIN
docs/src/images/Eiger_bottom_2.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
docs/src/images/Eiger_bottom_3.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
docs/src/images/Eiger_bottom_4.png
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
docs/src/images/Eiger_module.png
Normal file
|
After Width: | Height: | Size: 118 KiB |
BIN
docs/src/images/Eiger_quad.png
Normal file
|
After Width: | Height: | Size: 35 KiB |
BIN
docs/src/images/Eiger_read_rows.png
Normal file
|
After Width: | Height: | Size: 96 KiB |
BIN
docs/src/images/Gotthard2_module.png
Normal file
|
After Width: | Height: | Size: 47 KiB |
BIN
docs/src/images/Jungfrau_module.png
Normal file
|
After Width: | Height: | Size: 42 KiB |
BIN
docs/src/images/Jungfrau_read_rows.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
docs/src/images/Jungfrau_two_port.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
docs/src/images/Module_architecture.png
Normal file
|
After Width: | Height: | Size: 73 KiB |
BIN
docs/src/images/Module_receiver_commands.png
Normal file
|
After Width: | Height: | Size: 88 KiB |
BIN
docs/src/images/Moench_module.png
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
docs/src/images/Moench_read_rows.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
docs/src/images/Moench_two_port.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
docs/src/images/Mythen3_module.png
Normal file
|
After Width: | Height: | Size: 43 KiB |
BIN
docs/src/images/Receiver_architecture.png
Normal file
|
After Width: | Height: | Size: 66 KiB |
BIN
docs/src/images/Receiver_external_process_commands.png
Normal file
|
After Width: | Height: | Size: 113 KiB |
BIN
docs/src/images/Receiver_gui_commands.png
Normal file
|
After Width: | Height: | Size: 95 KiB |
BIN
docs/src/images/Soft_upgrade_components.png
Normal file
|
After Width: | Height: | Size: 31 KiB |
BIN
docs/src/images/System_communication_architecture.png
Normal file
|
After Width: | Height: | Size: 71 KiB |
@@ -3,13 +3,13 @@
|
|||||||
You can adapt this file completely to your liking, but it should at least
|
You can adapt this file completely to your liking, but it should at least
|
||||||
contain the root `toctree` directive.
|
contain the root `toctree` directive.
|
||||||
|
|
||||||
Welcome to slsDetectorPackage's documentation!
|
slsDetectorPackage
|
||||||
==============================================
|
==============================================
|
||||||
|
|
||||||
.. note ::
|
.. note ::
|
||||||
|
|
||||||
This is the documentation for the latest development version of slsDetectorPackage.
|
This is the documentation for the latest development version of slsDetectorPackage.
|
||||||
For further documentation, visit the official page: https://www.psi.ch/en/detectors/documentation
|
For further detector specific documentation, visit `this page <https://www.psi.ch/en/detectors/documentation>`__.
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 3
|
:maxdepth: 3
|
||||||
@@ -19,6 +19,17 @@ Welcome to slsDetectorPackage's documentation!
|
|||||||
dependencies
|
dependencies
|
||||||
consuming
|
consuming
|
||||||
|
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:caption: how to
|
||||||
|
:maxdepth: 2
|
||||||
|
|
||||||
|
softwarearchitecture
|
||||||
|
configcommands
|
||||||
|
quick_start_guide
|
||||||
|
dataformat
|
||||||
|
multidet
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:caption: C++ API
|
:caption: C++ API
|
||||||
:maxdepth: 2
|
:maxdepth: 2
|
||||||
@@ -28,6 +39,9 @@ Welcome to slsDetectorPackage's documentation!
|
|||||||
receiver_api
|
receiver_api
|
||||||
examples
|
examples
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:caption: Python API
|
:caption: Python API
|
||||||
:maxdepth: 2
|
:maxdepth: 2
|
||||||
@@ -44,7 +58,7 @@ Welcome to slsDetectorPackage's documentation!
|
|||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
|
|
||||||
commandline
|
commandline
|
||||||
quick_start_guide
|
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:caption: Developer
|
:caption: Developer
|
||||||
@@ -81,8 +95,9 @@ Welcome to slsDetectorPackage's documentation!
|
|||||||
:caption: Receiver
|
:caption: Receiver
|
||||||
:maxdepth: 2
|
:maxdepth: 2
|
||||||
|
|
||||||
receivers
|
|
||||||
slsreceiver
|
slsreceiver
|
||||||
|
receivers
|
||||||
|
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:caption: Receiver Files
|
:caption: Receiver Files
|
||||||
@@ -90,6 +105,7 @@ Welcome to slsDetectorPackage's documentation!
|
|||||||
|
|
||||||
fileformat
|
fileformat
|
||||||
slsreceiverheaderformat
|
slsreceiverheaderformat
|
||||||
|
dataformat
|
||||||
masterfileattributes
|
masterfileattributes
|
||||||
binaryfileformat
|
binaryfileformat
|
||||||
hdf5fileformat
|
hdf5fileformat
|
||||||
|
|||||||
@@ -6,18 +6,33 @@
|
|||||||
Installation
|
Installation
|
||||||
===============
|
===============
|
||||||
|
|
||||||
One can either install pre-built binaries using conda or build from source.
|
.. contents::
|
||||||
|
:local:
|
||||||
|
:depth: 2
|
||||||
|
:backlinks: top
|
||||||
|
|
||||||
.. warning ::
|
|
||||||
|
|
||||||
Before building from source make sure that you have the
|
Overview
|
||||||
:doc:`dependencies <../dependencies>` installed. If installing using conda, conda will
|
--------------
|
||||||
manage the dependencies. Avoid also installing packages with pip.
|
|
||||||
|
The ``slsDetectorPackage`` provides core detector software implemented in C++, along with Python bindings packaged as the ``slsdet`` Python extension module. Choose the option that best fits your environment and use case.
|
||||||
|
|
||||||
|
:ref:`conda pre-built binaries`:
|
||||||
|
Install pre-built binaries for the C++ client, receiver, GUI and the Python API (``slsdet``), simplifying setup across platforms.
|
||||||
|
|
||||||
|
:ref:`pip`:
|
||||||
|
Install only the Python extension module, either by downloading the pre-built library from PyPI or by building the extension locally from source. Available only from v9.2.0 onwards.
|
||||||
|
|
||||||
|
:ref:`build from source`:
|
||||||
|
Compile the entire package yourself, including both the C++ core and the Python bindings, for maximum control and customization. However, make sure that you have the :doc:`dependencies <../dependencies>` installed. If installing using conda, conda will manage the dependencies. Avoid installing packages with pip and conda simultaneously.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Install binaries using conda
|
|
||||||
----------------------------------
|
.. _conda pre-built binaries:
|
||||||
|
|
||||||
|
1. Install pre-built binaries using conda (Recommended)
|
||||||
|
--------------------------------------------------------
|
||||||
|
|
||||||
Conda is not only useful to manage python environments but can also
|
Conda is not only useful to manage python environments but can also
|
||||||
be used as a user space package manager. Dates in the tag (for eg. 2020.07.23.dev0)
|
be used as a user space package manager. Dates in the tag (for eg. 2020.07.23.dev0)
|
||||||
@@ -63,12 +78,29 @@ We have four different packages available:
|
|||||||
conda search moenchzmq
|
conda search moenchzmq
|
||||||
|
|
||||||
|
|
||||||
|
.. _pip:
|
||||||
|
|
||||||
|
2. Pip
|
||||||
|
-------
|
||||||
|
The Python extension module ``slsdet`` can be installed using pip. This is available from v9.2.0 onwards.
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
#Install the Python extension module from PyPI
|
||||||
|
pip install slsdet
|
||||||
|
|
||||||
|
# or install the python extension locally from source
|
||||||
|
git clone https://github.com/slsdetectorgroup/slsDetectorPackage.git --branch 9.2.0
|
||||||
|
cd slsDetectorPackage
|
||||||
|
pip install .
|
||||||
|
|
||||||
|
|
||||||
Build from source
|
.. _build from source:
|
||||||
----------------------
|
|
||||||
|
|
||||||
1. Download Source Code from github
|
3. Build from source
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
3.1. Download Source Code from github
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
@@ -83,30 +115,53 @@ Build from source
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
2. Build from Source
|
3.2. Build from Source
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
One can either build using cmake or use the in-built cmk.sh script.
|
One can either build using cmake or use the in-built cmk.sh script.
|
||||||
|
|
||||||
Build using CMake
|
3.2.1. Build using CMake
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# outside slsDetecorPackage folder
|
# outside slsDetecorPackage folder
|
||||||
mkdir build && cd build
|
mkdir build && cd build
|
||||||
|
|
||||||
# configure & generate Makefiles using cmake
|
# configure & generate Makefiles using cmake by listing all your options
|
||||||
# by listing all your options (alternately use ccmake described below)
|
# (alternately use ccmake described below)
|
||||||
# cmake3 for some systems
|
# cmake3 instead of cmake for some systems
|
||||||
cmake ../slsDetectorPackage -DCMAKE_INSTALL_PREFIX=/your/install/path
|
|
||||||
|
# eg. enable gui option (without conda)
|
||||||
|
cmake ../slsDetectorPacakge -DSLS_USE_GUI=ON
|
||||||
|
# eg. enable python from virtual env, hdf5 and simulator options
|
||||||
|
cmake ../slsDetectorPackage -DSLS_USE_PYTHON=ON -DPython_FIND_VIRTUALENV=ONLY -DSLS_USE_HDF5=ON -DSLS_USE_SIMULATOR=ON
|
||||||
|
|
||||||
# compiled to the build/bin directory
|
# compiled to the build/bin directory
|
||||||
make -j12 #or whatever number of cores you are using to build
|
make -j12 #or whatever number of cores you are using to build
|
||||||
|
|
||||||
|
|
||||||
|
To install in a clean custom directory and to use the slsDetectorPackage
|
||||||
|
libraries and headers in your project, specify the install directory
|
||||||
|
(eg. /your/install/path).
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
# outside slsDetecorPackage folder
|
||||||
|
mkdir build && cd build
|
||||||
|
# configure & generate Makefiles
|
||||||
|
cmake ../slsDetectorPackage -DCMAKE_INSTALL_PREFIX=/your/install/path
|
||||||
|
# compile
|
||||||
|
make -j12
|
||||||
# install headers and libs in /your/install/path directory
|
# install headers and libs in /your/install/path directory
|
||||||
make install
|
make install
|
||||||
|
|
||||||
|
.. note ::
|
||||||
|
|
||||||
|
Please refer to `api examples <https://github.com/slsdetectorgroup/api-examples>`__
|
||||||
|
on how to compile your project using the installed headers and libs.
|
||||||
|
|
||||||
|
|
||||||
Instead of the cmake command, one can use ccmake to get a list of options to configure and generate Makefiles at ease.
|
Instead of the cmake command, one can use ccmake to get a list of options to configure and generate Makefiles at ease.
|
||||||
|
|
||||||
@@ -135,7 +190,7 @@ Example cmake options Comment
|
|||||||
For v7.x.x of slsDetectorPackage and older, refer :ref:`zeromq notes for cmake option to hint library location. <zeromq for different slsDetectorPackage versions>`
|
For v7.x.x of slsDetectorPackage and older, refer :ref:`zeromq notes for cmake option to hint library location. <zeromq for different slsDetectorPackage versions>`
|
||||||
|
|
||||||
|
|
||||||
Build using in-built cmk.sh script
|
3.2.2. Build using in-built cmk.sh script
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
|
||||||
@@ -185,10 +240,10 @@ Build using in-built cmk.sh script
|
|||||||
For v7.x.x of slsDetectorPackage and older, refer :ref:`zeromq notes for cmk script option to hint library location. <zeromq for different slsDetectorPackage versions>`
|
For v7.x.x of slsDetectorPackage and older, refer :ref:`zeromq notes for cmk script option to hint library location. <zeromq for different slsDetectorPackage versions>`
|
||||||
|
|
||||||
|
|
||||||
Build on old distributions
|
3.3. Build on old distributions using conda
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
If your linux distribution doesn't come with a C++11 compiler (gcc>4.8) then
|
If your linux distribution doesn't come with a C++17 compiler (gcc>8) then
|
||||||
it's possible to install a newer gcc using conda and build the slsDetectorPackage
|
it's possible to install a newer gcc using conda and build the slsDetectorPackage
|
||||||
using this compiler
|
using this compiler
|
||||||
|
|
||||||
@@ -210,7 +265,7 @@ using this compiler
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Build slsDetectorGui (Qt5)
|
3.4. Build slsDetectorGui (Qt5)
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
1. Using pre-built binary on conda
|
1. Using pre-built binary on conda
|
||||||
@@ -271,7 +326,7 @@ Build slsDetectorGui (Qt5)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Build this documentation
|
3.5. Build this documentation
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
The documentation for the slsDetectorPackage is build using a combination
|
The documentation for the slsDetectorPackage is build using a combination
|
||||||
@@ -294,8 +349,8 @@ is to use conda
|
|||||||
make rst # rst only, saves time in case the API did not change
|
make rst # rst only, saves time in case the API did not change
|
||||||
|
|
||||||
|
|
||||||
Pybind and Zeromq
|
4. Pybind and Zeromq
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
-------------------------
|
||||||
|
|
||||||
.. _pybind for different slsDetectorPackage versions:
|
.. _pybind for different slsDetectorPackage versions:
|
||||||
|
|
||||||
|
|||||||
230
docs/src/multidet.rst
Normal file
@@ -0,0 +1,230 @@
|
|||||||
|
.. _using multiple detectors:
|
||||||
|
|
||||||
|
Using multiple detectors
|
||||||
|
==========================
|
||||||
|
|
||||||
|
The slsDetectorPackage supports using several detectors on the same computer.
|
||||||
|
This can either be two users, that need to use the same computer without interfering
|
||||||
|
with each other, or the same user that wants to use multiple detectors at the same time.
|
||||||
|
The detectors in turn can consist of multiple modules. For example, a 9M Jungfrau detector
|
||||||
|
consists of 18 modules which typically are addressed at once as a single detector.
|
||||||
|
|
||||||
|
.. note ::
|
||||||
|
|
||||||
|
To address a single module of a multi-module detector you can use the module index.
|
||||||
|
|
||||||
|
- Command line: :ref:`cl-module-index-label`
|
||||||
|
- Python: :ref:`py-module-index-label`
|
||||||
|
|
||||||
|
|
||||||
|
Coming back to multiple detectors we have two tools to our disposal:
|
||||||
|
|
||||||
|
#. Detector index
|
||||||
|
#. The SLSDETNAME environment variable
|
||||||
|
|
||||||
|
They can be used together or separately depending on the use case.
|
||||||
|
|
||||||
|
Detector index
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
When configuring a detector you can specify a detector index. The default is 0.
|
||||||
|
|
||||||
|
**Command line**
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
# Given that we have two detectors (my-det and my-det2) that we want to use,
|
||||||
|
# we can configure them with different indices.
|
||||||
|
|
||||||
|
# Configure the first detector with index 0
|
||||||
|
$ sls_detector_put hostname my-det
|
||||||
|
|
||||||
|
# Set number of frames for detector 0 to 10
|
||||||
|
$ sls_detector_put frames 10
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
#Configure the second detector with index 1 (notice the 1- before hostname)
|
||||||
|
$ sls_detector_put 1-hostname my-det2
|
||||||
|
|
||||||
|
|
||||||
|
# Further configuration
|
||||||
|
...
|
||||||
|
|
||||||
|
# Set number of frames for detector 1 to 19
|
||||||
|
$ sls_detector_put 1-frames 19
|
||||||
|
|
||||||
|
# Note that if we call sls_detector_get without specifying the index,
|
||||||
|
# it will return the configuration of detector 0
|
||||||
|
$ sls_detector_get frames
|
||||||
|
10
|
||||||
|
|
||||||
|
The detector index is added to the name of the shared memory segment, so in this case
|
||||||
|
the shared memory segments would be:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
|
||||||
|
#First detector
|
||||||
|
/dev/shm/slsDetectorPackage_detector_0
|
||||||
|
/dev/shm/slsDetectorPackage_detector_0_module_0
|
||||||
|
|
||||||
|
#Second detector
|
||||||
|
/dev/shm/slsDetectorPackage_detector_1
|
||||||
|
/dev/shm/slsDetectorPackage_detector_1_module_0
|
||||||
|
|
||||||
|
|
||||||
|
**Python**
|
||||||
|
|
||||||
|
The main difference between the command line and the Python API is that you set the index
|
||||||
|
when you create the detector object and you don't have to repeat it for every call.
|
||||||
|
|
||||||
|
The C++ API works int the same way.
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
|
from slsdet import Detector
|
||||||
|
|
||||||
|
|
||||||
|
# The same can be achieved in Python by creating a detector object with an index.
|
||||||
|
# Again we have two detectors (my-det and my-det2) that we want to use:
|
||||||
|
|
||||||
|
# Configure detector with index 0
|
||||||
|
d = Detector()
|
||||||
|
|
||||||
|
# If the detector has already been configured and has a shared memory
|
||||||
|
# segment, you can omit setting the hostname again
|
||||||
|
d.hostname = 'my-det'
|
||||||
|
|
||||||
|
#Further configuration
|
||||||
|
...
|
||||||
|
|
||||||
|
# Configure a second detector with index 1
|
||||||
|
d2 = Detector(1)
|
||||||
|
d2.hostname = 'my-det2'
|
||||||
|
|
||||||
|
d.frames = 10
|
||||||
|
d2.frames = 19
|
||||||
|
|
||||||
|
|
||||||
|
$SLSDETNAME
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
To avoid interfering with other users on shared PCs it is best to always set the SLSDETNAME environmental variable.
|
||||||
|
Imagining a fictive user: Anna, we can set SLSDETNAME from the shell before configuring the detector:
|
||||||
|
|
||||||
|
**Command line**
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
# Set the SLSDETNAME variable
|
||||||
|
$ export SLSDETNAME=Anna
|
||||||
|
|
||||||
|
# You can check that it is set
|
||||||
|
$ echo $SLSDETNAME
|
||||||
|
Anna
|
||||||
|
|
||||||
|
# Now configures a detector with index 0 and prefixed with the name Anna
|
||||||
|
# /dev/shm/slsDetectorPackage_detector_0_Anna
|
||||||
|
$ sls_detector_put hostname my-det
|
||||||
|
|
||||||
|
|
||||||
|
.. tip ::
|
||||||
|
|
||||||
|
Set SLSDETNAME in your .bashrc in order to not forget it when opening a new terminal.
|
||||||
|
|
||||||
|
|
||||||
|
**Python**
|
||||||
|
|
||||||
|
With python the best way is to set the SLSDETNAME from the command line before starting the python interpreter.
|
||||||
|
|
||||||
|
Bash:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
$ export SLSDETNAME=Anna
|
||||||
|
|
||||||
|
Python:
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
|
from slsdet import Detector
|
||||||
|
|
||||||
|
# Now configures a detector with index 0 and prefixed with the name Anna
|
||||||
|
# /dev/shm/slsDetectorPackage_detector_0_Anna
|
||||||
|
d = Detector()
|
||||||
|
d.hostname = 'my-det'
|
||||||
|
|
||||||
|
You can also set SLSDETNAME from within the Python interpreter, but you have to be aware that it will only
|
||||||
|
affect the current process and not the whole shell session.
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
|
import os
|
||||||
|
os.environ['SLSDETNAME'] = 'Anna'
|
||||||
|
|
||||||
|
# You can check that it is set
|
||||||
|
print(os.environ['SLSDETNAME']) # Output: Anna
|
||||||
|
|
||||||
|
#Now SLSDETNAME is set to Anna but as soon as you exit the python interpreter
|
||||||
|
# it will not be set anymore
|
||||||
|
|
||||||
|
.. note ::
|
||||||
|
|
||||||
|
Python has two ways of reading environment variables: `**os.environ**` as shown above which throws a
|
||||||
|
KeyError if the variable is not set and `os.getenv('SLSDETNAME')` which returns None if the variable is not set.
|
||||||
|
|
||||||
|
For more details see the official python documentation on: https://docs.python.org/3/library/os.html#os.environ
|
||||||
|
|
||||||
|
|
||||||
|
Checking for other detectors
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
If using shared accounts on a shared computer (which you anyway should not do), it is good practice to check
|
||||||
|
if there are other detectors configured by other users before configuring your own detector.
|
||||||
|
|
||||||
|
You can do this by listing the files in the shared memory directory `/dev/shm/` that start with `sls`. In this
|
||||||
|
example we can see that two single module detectors are configured one with index 0 and one with index 1.
|
||||||
|
SLSDETNAME is set to `Anna` so it makes sense to assume that she is the user that configured these detectors.
|
||||||
|
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
# List the files in /dev/shm that starts with sls
|
||||||
|
$ ls /dev/shm/sls*
|
||||||
|
/dev/shm/slsDetectorPackage_detector_0_Anna
|
||||||
|
/dev/shm/slsDetectorPackage_detector_0_module_0_Anna
|
||||||
|
/dev/shm/slsDetectorPackage_detector_1_Anna
|
||||||
|
/dev/shm/slsDetectorPackage_detector_1_module_0_Anna
|
||||||
|
|
||||||
|
We also provide a command: user, which gets information about the shared memory segment that
|
||||||
|
the client points to without doing any changes.
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
#in this case 3 simulated Mythen3 modules
|
||||||
|
$ sls_detector_get user
|
||||||
|
user
|
||||||
|
Hostname: localhost+localhost+localhost+
|
||||||
|
Type: Mythen3
|
||||||
|
PID: 1226078
|
||||||
|
User: l_msdetect
|
||||||
|
Date: Mon Jun 2 05:46:20 PM CEST 2025
|
||||||
|
|
||||||
|
|
||||||
|
Other considerations
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
The shared memory is not the only way to interfere with other users. You also need to make sure that you are not
|
||||||
|
using the same:
|
||||||
|
|
||||||
|
* rx_tcpport
|
||||||
|
* Unique combination of udp_dstip and udp_dstport
|
||||||
|
* rx_zmqport
|
||||||
|
* zmqport
|
||||||
|
|
||||||
|
.. attention ::
|
||||||
|
|
||||||
|
The computer that you are using need to have enough resources to run multiple detectors at the same time.
|
||||||
|
This includes CPU and network bandwidth. Please coordinate with the other users!
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@ This instructs the firmware to execute the commands from address 0 to 4 (includi
|
|||||||
.. code-block::
|
.. code-block::
|
||||||
|
|
||||||
start [Ctb, Xilinx_Ctb]
|
start [Ctb, Xilinx_Ctb]
|
||||||
patternstart [Mythen3]
|
patternstart [Mythen3, Ctb, Xilinx_Ctb]
|
||||||
|
|
||||||
The maximal number of patword addresses is 8192. However, it is possible to extend the length of the pattern sequence using loops and wait commands. Loops can be configured with the following commands:
|
The maximal number of patword addresses is 8192. However, it is possible to extend the length of the pattern sequence using loops and wait commands. Loops can be configured with the following commands:
|
||||||
|
|
||||||
@@ -70,11 +70,11 @@ The mappings of bit positions in the pattern word to signals/pads of the FPGA ar
|
|||||||
|
|
||||||
.. table::
|
.. table::
|
||||||
|
|
||||||
+----+---+------+----+----------+-------------------+----------------+
|
+----+---+------+----+----------+----------+----------------+
|
||||||
| 63 | 62| 61-57| 56 | 55-48 | 47-32 | 31-0 |
|
| 63 | 62| 61-57| 56 | 55-48 | 47-32 | 31-0 |
|
||||||
+----+---+------+----+----------+-------------------+----------------+
|
+----+---+------+----+----------+----------+----------------+
|
||||||
| A | D| --- | T | EXTIO | DO, stream source | DIO |
|
| A | D| --- | T | EXTIO | DO | DIO |
|
||||||
+----+---+------+----+----------+-------------------+----------------+
|
+----+---+------+----+----------+----------+----------------+
|
||||||
|
|
||||||
DIO: Driving the 32 FPGA pins corresponding to the lowest 32 bits of the patioctrl command. If bits in patioctrl are 0, the same bit positions in DIO will switch to input pins and connect to dbit sampling. Additionally, some of these 32 bits have an automatic override by detector-specific statemachines which is active whenever one of these statemachines is running (currently bits 7,8,11,14 and 20).
|
DIO: Driving the 32 FPGA pins corresponding to the lowest 32 bits of the patioctrl command. If bits in patioctrl are 0, the same bit positions in DIO will switch to input pins and connect to dbit sampling. Additionally, some of these 32 bits have an automatic override by detector-specific statemachines which is active whenever one of these statemachines is running (currently bits 7,8,11,14 and 20).
|
||||||
|
|
||||||
@@ -120,3 +120,11 @@ DIO: Driving the 32 FPGA pins corresponding to the lowest 32 bits of the patioct
|
|||||||
+---------+-----+-------+-------+----+-------+---------+--------+
|
+---------+-----+-------+-------+----+-------+---------+--------+
|
||||||
|
|
||||||
For Mythen3 the pattern word only connects to output pins of the FPGA when the pattern is running. Afterwards the signals will switch back to other logic in the FPGA. Both CTB's hold the last executed pattern word until a new pattern is started.
|
For Mythen3 the pattern word only connects to output pins of the FPGA when the pattern is running. Afterwards the signals will switch back to other logic in the FPGA. Both CTB's hold the last executed pattern word until a new pattern is started.
|
||||||
|
|
||||||
|
**Relation of received data to pattern execution**
|
||||||
|
|
||||||
|
In the default configuration the Ctb will send out udp packets to the sls_receiver for every end of a pattern execution. This behavior can be changed using STREAMING_CTRL_REG, where one can configure a bit position in the 64-bit pattern word to trigger udp packets. This allows to send more than one packet per pattern or also no packets at all.
|
||||||
|
|
||||||
|
The "patternstart" command on the ctb exectues the pattern. As long as streaming_ctrl_reg is disabeld, every pattern execution using this command will not send UDP packets.
|
||||||
|
|
||||||
|
For Mythen3 the sending of udp packets is not connected to pattern execution.
|
||||||
@@ -50,6 +50,12 @@ datetime.timedelta, DurationWrapper or by setting the time in seconds.
|
|||||||
>>> d.getExptime()
|
>>> d.getExptime()
|
||||||
[sls::DurationWrapper(total_seconds: 181.23 count: 181230000000)]
|
[sls::DurationWrapper(total_seconds: 181.23 count: 181230000000)]
|
||||||
|
|
||||||
|
# In C++ it is possible to use chrono literals to set time more easily
|
||||||
|
# d.setExptime(7ms). However, this is not possible due to pythons syntax.
|
||||||
|
# instead we can create a unit that we use for conversion.
|
||||||
|
>>> ms = dt.timedelta(milliseconds = 1)
|
||||||
|
>>> d.exptime = 7.5*ms
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
------------------------------------
|
------------------------------------
|
||||||
|
|||||||
@@ -123,6 +123,47 @@ in a large detector.
|
|||||||
# Set exposure time for module 1, 5 and 7
|
# Set exposure time for module 1, 5 and 7
|
||||||
d.setExptime(0.1, [1,5,7])
|
d.setExptime(0.1, [1,5,7])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.. _py-module-index-label:
|
||||||
|
|
||||||
|
----------------------------------
|
||||||
|
Accessing individual modules
|
||||||
|
----------------------------------
|
||||||
|
|
||||||
|
Using the C++ like API you can access individual modules in a large detector
|
||||||
|
by passing in the module index as an argument to the function.
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
# Read the UDP destination port for all modules
|
||||||
|
>>> d.getDestinationUDPPort()
|
||||||
|
[50001, 50002, 50003]
|
||||||
|
|
||||||
|
|
||||||
|
# Read it for module 0 and 1
|
||||||
|
>>> d.getDestinationUDPPort([0, 1])
|
||||||
|
[50001, 50002]
|
||||||
|
|
||||||
|
>>> d.setDestinationUDPPort(50010, 1)
|
||||||
|
>>> d.getDestinationUDPPort()
|
||||||
|
[50001, 50010, 50003]
|
||||||
|
|
||||||
|
From the more pythonic API there is no way to read from only one module but you can read
|
||||||
|
and then use list slicing to get the values for the modules you are interested in.
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
>>> d.udp_dstport
|
||||||
|
[50001, 50010, 50003]
|
||||||
|
>>> d.udp_dstport[0]
|
||||||
|
50001
|
||||||
|
|
||||||
|
#For some but not all properties you can also pass in a dictionary with module index as key
|
||||||
|
>>> ip = IpAddr('127.0.0.1')
|
||||||
|
>>> d.udp_dstip = {1:ip}
|
||||||
|
|
||||||
|
|
||||||
--------------------
|
--------------------
|
||||||
Finding functions
|
Finding functions
|
||||||
--------------------
|
--------------------
|
||||||
|
|||||||
@@ -19,14 +19,14 @@ For a Single Module
|
|||||||
slsReceiver
|
slsReceiver
|
||||||
|
|
||||||
# custom port 2012
|
# custom port 2012
|
||||||
slsReceiver -t2012
|
slsReceiver -p 2012
|
||||||
|
|
||||||
|
|
||||||
For Multiple Modules
|
For Multiple Modules
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# slsMultiReceiver [starting port] [number of receivers] [print each frame header for debugging]
|
# slsMultiReceiver [-p: starting port, -n: number of receivers]
|
||||||
slsMultiReceiver 2012 2 0
|
slsMultiReceiver -p 2012 -n 2
|
||||||
|
|
||||||
|
|
||||||
Client
|
Client
|
||||||
@@ -132,6 +132,27 @@ For Multiple Modules
|
|||||||
The **hostname** and **detsize** command in a multi module system can affect the row and column values in the udp/zmq header. The modules are stacked row by row until they reach the y-axis limit set by detsize (if specified). Then, stacking continues in the next column and so on.
|
The **hostname** and **detsize** command in a multi module system can affect the row and column values in the udp/zmq header. The modules are stacked row by row until they reach the y-axis limit set by detsize (if specified). Then, stacking continues in the next column and so on.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Data
|
||||||
|
-----
|
||||||
|
|
||||||
|
Check out the :ref:`UDP header section<detector udp header>` for details on output UDP header data format.`
|
||||||
|
|
||||||
|
Check out the :ref:`Detector image size and format section<data format>` for details on output data format.
|
||||||
|
|
||||||
|
|
||||||
|
Receiver
|
||||||
|
---------
|
||||||
|
|
||||||
|
When using `slsReceiver`, `slsMultiReceiver` or `slsFrameSynchronizer`, check out the following sections:
|
||||||
|
|
||||||
|
- :ref:`File format<file format>`
|
||||||
|
- :ref:`slsReceiver header format<sls receiver header format>`
|
||||||
|
- :ref:`Master file attributes<master file attributes>`
|
||||||
|
|
||||||
|
|
||||||
Gui
|
Gui
|
||||||
----
|
----
|
||||||
|
|
||||||
|
|||||||
@@ -1,25 +1,25 @@
|
|||||||
Receivers
|
Custom Receiver
|
||||||
=================
|
=================
|
||||||
|
|
||||||
Receiver processes can be run on same or different machines as the client, receives the data from the detector (via UDP packets).
|
The receiver essentially listens to UDP data packets sent out by the detector.
|
||||||
When using the slsReceiver/ slsMultiReceiver, they can be further configured by the client control software (via TCP/IP) to set file name, file path, progress of acquisition etc.
|
|
||||||
|
To know more about detector receiver setup in the config file, please check out :ref:`the detector-receiver UDP configuration in the config file<detector udp header config>` and the :ref:`detector udp format<detector udp header>`.
|
||||||
|
|
||||||
|
|
||||||
To know more about detector receiver configuration, please check out :ref:`detector udp header and udp commands in the config file <detector udp header>`
|
| Please note the following when using a custom receiver:
|
||||||
|
|
||||||
Custom Receiver
|
* **udp_dstmac** must be configured in the config file. This parameter is not required when using an in-built receiver.
|
||||||
----------------
|
|
||||||
|
|
||||||
| When using custom receiver with our package, ensure that **udp_dstmac** is also configured in the config file. This parameter is not required when using slsReceiver.
|
* Cannot use "auto" for **udp_dstip**.
|
||||||
|
|
||||||
| Cannot use "auto" for **udp_dstip**.
|
* No **rx_** commands in the config file. These commands are for configuring the slsReceiver.
|
||||||
|
|
||||||
| Also ensure that there are no **rx_** commands in the config file. These commands are for configuring the slsReceiver.
|
|
||||||
|
|
||||||
|
The main difference is the lack of **rx_** commands or file commands (eg. **f**write, **f**path) and the **udp_dstmac** is required in config file.
|
||||||
|
|
||||||
Example of a custom receiver config file
|
Example of a custom receiver config file
|
||||||
|
|
||||||
* The main difference is the lack of **rx_** commands or file commands (eg. fwrite, fpath) and the udp_dstmac is required in config file.
|
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# detector hostname
|
# detector hostname
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
.. _detector_servers:
|
||||||
|
|
||||||
Getting Started
|
Getting Started
|
||||||
===============
|
===============
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
.. _Detector Server Upgrade:
|
.. _Detector Server Upgrade:
|
||||||
|
|
||||||
Upgrade
|
Upgrade
|
||||||
========
|
========
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,78 @@
|
|||||||
slsReceiver/ slsMultiReceiver
|
In-built Receiver
|
||||||
================================
|
================================
|
||||||
|
|
||||||
| One has to start the slsReceiver before loading config file or using any receiver commands (prefix: **rx_** )
|
|
||||||
|
|
||||||
|
The receiver essentially listens to UDP data packets sent out by the detector. It's main features are:
|
||||||
|
|
||||||
|
- **Listening**: Receives UDP data from the detector.
|
||||||
|
- **Writing to File**: Optionally writes received data to disk.
|
||||||
|
- **Streaming via ZMQ**: Optionally streams out the data using ZeroMQ.
|
||||||
|
|
||||||
|
Each of these operations runs asynchronously and in parallel for each UDP port.
|
||||||
|
|
||||||
|
|
||||||
|
.. note ::
|
||||||
|
|
||||||
|
* Can be run on the same or different machine as the client.
|
||||||
|
* Can be configured by the client. (set file name/ discard policy, get progress etc.)
|
||||||
|
* Has to be started before the client runs any receiver specific command.
|
||||||
|
|
||||||
|
|
||||||
|
Receiver Variants
|
||||||
|
-----------------
|
||||||
|
There are three main receiver types. How to start them is described :ref:`below<Starting up the Receiver>`.
|
||||||
|
|
||||||
|
+----------------------+--------------------+-----------------------------------------+--------------------------------+
|
||||||
|
| Receiver Type | slsReceiver | slsMultiReceiver |slsFrameSynchronizer |
|
||||||
|
+======================+====================+=========================================+================================+
|
||||||
|
| Modules Supported | 1 | Multiple | Multiple |
|
||||||
|
+----------------------+--------------------+-----------------------------------------+--------------------------------+
|
||||||
|
| Internal Architecture| Threads per porttt | Multiple child processes of slsReceiver | Multi-threading of slsReceiver |
|
||||||
|
+----------------------+--------------------+-----------------------------------------+--------------------------------+
|
||||||
|
| ZMQ Streaming | Disabled by default| Disabled by default | Enabled, not optional |
|
||||||
|
+----------------------+--------------------+-----------------------------------------+--------------------------------+
|
||||||
|
| ZMQ Synchronization | No | No | Yes, across ports |
|
||||||
|
+----------------------+--------------------+-----------------------------------------+--------------------------------+
|
||||||
|
| Image Reconstruction | No | No | No |
|
||||||
|
+----------------------+--------------------+-----------------------------------------+--------------------------------+
|
||||||
|
|
||||||
|
|
||||||
|
.. _Starting up the Receiver:
|
||||||
|
|
||||||
|
Starting up the Receiver
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
Usage: slsReceiver Options:
|
||||||
|
-v, --version : Version.
|
||||||
|
-p, --port : TCP port to communicate with client for configuration. Non-zero and 16 bit.
|
||||||
|
-u, --uid : Set effective user id if receiver started with privileges.
|
||||||
|
|
||||||
|
Usage: slsMultiReceiver Options:
|
||||||
|
-v, --version : Version.
|
||||||
|
-n, --num-receivers : Number of receivers.
|
||||||
|
-p, --port : TCP port to communicate with client for configuration. Non-zero and 16 bit.
|
||||||
|
-c, --callback : Enable dummy callbacks for debugging. Disabled by default.
|
||||||
|
-u, --uid : Set effective user id if receiver started with privileges.
|
||||||
|
|
||||||
|
Usage: slsFrameSynchronizer Options:
|
||||||
|
-v, --version : Version.
|
||||||
|
-n, --num-receivers : Number of receivers.
|
||||||
|
-p, --port : TCP port to communicate with client for configuration. Non-zero and 16 bit.
|
||||||
|
-c, --print-headers : Print callback headers for debugging. Disabled by default.
|
||||||
|
-u, --uid : Set effective user id if receiver started with privileges.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
For a Single Module
|
For a Single Module
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# default port 1954
|
slsReceiver # default port 1954
|
||||||
slsReceiver
|
|
||||||
|
|
||||||
# custom port 2012
|
slsReceiver -p 2012 # custom port 2012
|
||||||
slsReceiver -t2012
|
|
||||||
|
|
||||||
|
|
||||||
For Multiple Modules
|
For Multiple Modules
|
||||||
@@ -18,57 +80,66 @@ For Multiple Modules
|
|||||||
|
|
||||||
# each receiver (for each module) requires a unique tcp port (if all on same machine)
|
# each receiver (for each module) requires a unique tcp port (if all on same machine)
|
||||||
|
|
||||||
# using slsReceiver in multiple consoles
|
# option 1 (one for each module)
|
||||||
slsReceiver
|
slsReceiver
|
||||||
slsReceiver -t1955
|
slsReceiver -p 1955
|
||||||
|
|
||||||
# slsMultiReceiver [starting port] [number of receivers]
|
# option 2
|
||||||
slsMultiReceiver 2012 2
|
slsMultiReceiver -p 2012 -n 2
|
||||||
|
|
||||||
|
# option 3
|
||||||
|
slsFrameSynchronizer -p 2012 -n 2
|
||||||
|
|
||||||
# slsMultiReceiver [starting port] [number of receivers] [print each frame header for debugging]
|
|
||||||
slsMultiReceiver 2012 2 1
|
|
||||||
|
|
||||||
|
|
||||||
Client Commands
|
Client Commands
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
| One can remove **udp_dstmac** from the config file, as the slsReceiver fetches this from the **udp_ip**.
|
* Client commands to the receiver begin with **rx_** or **f_** (file commands).
|
||||||
|
|
||||||
| One can use "auto" for **udp_dstip** if one wants to use default ip of **rx_hostname**.
|
* **rx_hostname** has to be the first command to the receiver so the client knows which receiver process to communicate with.
|
||||||
|
|
||||||
| The first command to the receiver (**rx_** commands) should be **rx_hostname**. The following are the different ways to establish contact.
|
* Can use 'auto' for **udp_dstip** if using 1GbE interface or the :ref:`virtual simulators<Virtual Detector Servers>`.
|
||||||
|
|
||||||
|
|
||||||
|
To know more about detector receiver setup in the config file, please check out :ref:`the detector-receiver UDP configuration in the config file<detector udp header config>` and the :ref:`detector udp format<detector udp header>`.
|
||||||
|
|
||||||
|
|
||||||
|
The following are the different ways to establish contact using **rx_hostname** command.
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# default receiver tcp port (1954)
|
# ---single module---
|
||||||
|
|
||||||
|
# default receiver port at 1954
|
||||||
rx_hostname xxx
|
rx_hostname xxx
|
||||||
|
|
||||||
# custom receiver port
|
# custom receiver port
|
||||||
rx_hostname xxx:1957
|
rx_hostname xxx:1957 # option 1
|
||||||
|
|
||||||
# custom receiver port
|
rx_tcpport 1957 # option 2
|
||||||
rx_tcpport 1954
|
|
||||||
rx_hostname xxx
|
rx_hostname xxx
|
||||||
|
|
||||||
# multi modules with custom ports
|
|
||||||
rx_hostname xxx:1955+xxx:1956+
|
|
||||||
|
|
||||||
|
# ---multi module---
|
||||||
|
|
||||||
# multi modules using increasing tcp ports when using multi detector command
|
# using increasing tcp ports
|
||||||
rx_tcpport 1955
|
rx_tcpport 1955
|
||||||
rx_hostname xxx
|
rx_hostname xxx
|
||||||
|
|
||||||
# or specify multi modules with custom ports on same rxr pc
|
# custom ports
|
||||||
0:rx_tcpport 1954
|
rx_hostname xxx:1955+xxx:1958+ # option 1
|
||||||
|
|
||||||
|
0:rx_tcpport 1954 # option 2
|
||||||
1:rx_tcpport 1955
|
1:rx_tcpport 1955
|
||||||
2:rx_tcpport 1956
|
2:rx_tcpport 1956
|
||||||
rx_hostname xxx
|
rx_hostname xxx
|
||||||
|
|
||||||
# multi modules with custom ports on different rxr pc
|
# custom ports on different receiver machines
|
||||||
0:rx_tcpport 1954
|
0:rx_tcpport 1954
|
||||||
0:rx_hostname xxx
|
0:rx_hostname xxx
|
||||||
1:rx_tcpport 1955
|
1:rx_tcpport 1955
|
||||||
1:rx_hostname yyy
|
1:rx_hostname yyyrxr
|
||||||
|
|
||||||
|
|
||||||
| Example commands:
|
| Example commands:
|
||||||
@@ -91,6 +162,32 @@ Client Commands
|
|||||||
sls_detector_get -h rx_framescaught
|
sls_detector_get -h rx_framescaught
|
||||||
|
|
||||||
|
|
||||||
|
Example of a config file using in-built receiver
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
# detector hostname
|
||||||
|
hostname bchip052+bchip053+
|
||||||
|
|
||||||
|
# udp destination port (receiver)
|
||||||
|
# sets increasing destination udp ports starting at 50004
|
||||||
|
udp_dstport 50004
|
||||||
|
|
||||||
|
# udp destination ip (receiver)
|
||||||
|
0:udp_dstip 10.0.1.100
|
||||||
|
1:udp_dstip 10.0.2.100
|
||||||
|
|
||||||
|
# udp source ip (same subnet as udp_dstip)
|
||||||
|
0:udp_srcip 10.0.1.184
|
||||||
|
1:udp_srcip 10.0.2.184
|
||||||
|
|
||||||
|
# udp destination mac - not required (picked up from udp_dstip)
|
||||||
|
#udp_dstmac 22:47:d5:48:ad:ef
|
||||||
|
|
||||||
|
# connects to receivers at increasing tcp port starting at 1954
|
||||||
|
rx_hostname mpc3434
|
||||||
|
# same as rx_hostname mpc3434:1954+mpc3434:1955+
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Performance
|
Performance
|
||||||
|
|||||||
147
docs/src/softwarearchitecture.rst
Normal file
@@ -0,0 +1,147 @@
|
|||||||
|
.. _software architecture:
|
||||||
|
|
||||||
|
Software Architecture
|
||||||
|
================================
|
||||||
|
|
||||||
|
|
||||||
|
Introduction
|
||||||
|
------------------------------------
|
||||||
|
|
||||||
|
.. figure:: images/System_communication_architecture.png
|
||||||
|
:target: _images/System_communication_architecture.png
|
||||||
|
:width: 700px
|
||||||
|
:align: center
|
||||||
|
:alt: System communication architecture
|
||||||
|
|
||||||
|
Software Communication Architecture
|
||||||
|
|
||||||
|
|
||||||
|
**Detector**
|
||||||
|
|
||||||
|
A detector can consist of a single module or multiple modules combined.
|
||||||
|
|
||||||
|
**Module**
|
||||||
|
|
||||||
|
Each module sends its data via UDP over distinct ports. Since UDP does not provide acknowledgements, data is transmitted as fast as possible, which can lead to packet loss if the network is not properly configured, among other causes. A single image streamed out could be split into multiple UDP packets and each module can have one or two UDP ports to transmit in parallel different physical sections of the image.
|
||||||
|
|
||||||
|
**Receiver**
|
||||||
|
|
||||||
|
UDP data is received by one or more receivers—either built-in or custom. In the diagram above, there is one built-in receiver per module (1:1). For example, a detector with two modules (two hostnames) will have two built-in receivers. Each receiver could listen to one or two UDP ports (depending on the module it listens to). For each UDP port, the receiver reassembles these packets into sub-images and optionally saved to file.
|
||||||
|
|
||||||
|
**ZMQ**
|
||||||
|
|
||||||
|
Each UDP port in the receiver can also stream out independently sub-images via ZMQ (core: TCP/IP).
|
||||||
|
|
||||||
|
* Directly to the GUI for display.
|
||||||
|
* To an external processing chain for post-processing and optional storage, which can in turn stream the processed data back to the GUI.
|
||||||
|
|
||||||
|
**Client**
|
||||||
|
|
||||||
|
A single client can configure and control individual modules and receivers, or multiple of them in parallel. This communication is handled over TCP/IP, ensuring acknowledgements.
|
||||||
|
|
||||||
|
It can also listen to multiple ZMQ sockets from the Receiver(s) or the external processing chain to assemble the full image for GUI display or Client call backs.
|
||||||
|
|
||||||
|
Next, each component is examined in detail.
|
||||||
|
|
||||||
|
Module
|
||||||
|
-------
|
||||||
|
|
||||||
|
.. figure:: images/Module_architecture.png
|
||||||
|
:target: _images/Module_architecture.png
|
||||||
|
:width: 700px
|
||||||
|
:align: center
|
||||||
|
:alt: Module architecture
|
||||||
|
|
||||||
|
Module Architecture
|
||||||
|
|
||||||
|
|
||||||
|
**Detector Server**
|
||||||
|
|
||||||
|
The module contains an onboard CPU (type depends on the detector — e.g., Nios for Mythen3, Blackfin for Jungfrau). The detector server and detector configuration files are stored here, with the server compiled in C using the CPU-specific compiler. Running the binary starts a Control Server and a Stop Server. Client control/configuration requests go to the Control Server via the TCP control port, while stop/status requests go to the Stop Server via the TCP stop port as the Control Server may be busy with an acquisition. For more details see :ref:`detector server <detector_servers>` and :ref:`detector simulators<Virtual Detector Servers>` to play around with.
|
||||||
|
|
||||||
|
**Firmware**
|
||||||
|
|
||||||
|
The module also includes an FPGA with VHDL firmware (file format depends on the detector — e.g., Mythen3 uses .rbf, Jungfrau uses .pof). Client requests trigger register read/write operations in the FPGA, which manages chip readout and processing. Data from the chips is sent through a UDP generator in the FPGA and output as UDP packets via the UDP port. A single image may be split across multiple packets. A module could have 1 or 2 UDP ports to transmit in parallel different physical sections of the image.
|
||||||
|
|
||||||
|
Upgrade
|
||||||
|
^^^^^^^^
|
||||||
|
|
||||||
|
.. figure:: images/Soft_upgrade_components.png
|
||||||
|
:target: _images/Soft_upgrade_components.png
|
||||||
|
:width: 700px
|
||||||
|
:align: center
|
||||||
|
:alt: Software Upgrade Components
|
||||||
|
|
||||||
|
Software Upgrade Components
|
||||||
|
|
||||||
|
There are mainly three components to the soft upgrade:
|
||||||
|
|
||||||
|
* Detector Server upgrade: The server running on the module.
|
||||||
|
* Firmware upgrade: The VHDL code running on the FPGA.
|
||||||
|
* slsDetectorPackage upgrade: The client code running on the host PC to control the module(s) and receiver(s) if any.
|
||||||
|
|
||||||
|
Please use the `update command <commandline.html#term-update>`_ when updating both the server and firmware simulataneously and `programfpga command <commandline.html#term-programfpga-fname.pof-fname.rbf-full-path-opitonal-force-delete-normal-file>`_ when only updating the firmware. See :ref:`firmware upgrade <firmware upgrade>` for details.
|
||||||
|
|
||||||
|
When only updating the detector server, use the `updatedetectorserver command <commandline.html#term-updatedetectorserver-server_name-with-full-path>`_ command. See :ref:`detector server upgrade <Detector Server Upgrade>` for details.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
**Compatibility**
|
||||||
|
|
||||||
|
When updating anything on the module via the client (server or firmware), the server and client will have to be compatible (same major version). If not, the client and server will not communicate properly.
|
||||||
|
|
||||||
|
Since they are ideally compatible before the upgrade, upgrade the server and firmware first, then the slsDetectorPackage.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Receiver
|
||||||
|
--------
|
||||||
|
|
||||||
|
.. figure:: images/Receiver_architecture.png
|
||||||
|
:target: _images/Receiver_architecture.png
|
||||||
|
:align: center
|
||||||
|
:alt: Receiver Architecture
|
||||||
|
|
||||||
|
Receiver Architecture
|
||||||
|
|
||||||
|
The receiver mainly consists of:
|
||||||
|
|
||||||
|
* A TCP server that listens to client TCP requests for configuration and control.
|
||||||
|
* One or 2 listeners that listen to a UDP port each, reassembling the UDP packets into sub-images in memory.
|
||||||
|
* One or 2 data processors that processes the sub-images with optional callbacks for online processing and file writing.
|
||||||
|
* One or 2 data streamers that stream the processed sub-images to the GUI or external processing chain via ZMQ.
|
||||||
|
|
||||||
|
Few characteristics of the receiver:
|
||||||
|
|
||||||
|
* It can be run on the same host as the client or on a different host.
|
||||||
|
* There is a receiver process for every module and a file for every UDP port.
|
||||||
|
* Each receiver process is independent and asynchronized for performance. So are the UDP ports.
|
||||||
|
|
||||||
|
|
||||||
|
Client
|
||||||
|
--------
|
||||||
|
|
||||||
|
.. figure:: images/Client_architecture.png
|
||||||
|
:target: _images/Client_architecture.png
|
||||||
|
:align: center
|
||||||
|
:alt: Client Architecture
|
||||||
|
|
||||||
|
Client Architecture
|
||||||
|
|
||||||
|
Users can control the detector and receivers through four interfaces:
|
||||||
|
|
||||||
|
* their C++ API,
|
||||||
|
* their Python API,
|
||||||
|
* the command-line interface, or
|
||||||
|
* the Qt-based GUI.
|
||||||
|
|
||||||
|
Regardless of the interface, each ultimately invokes our Detector class—either directly (CLI and GUI) or through our C++/Python libraries (when using their APIs). The Detector class then calls the appropriate module functions, either for a specific module or in parallel for all modules. Each module object sends requests over TCP to its corresponding module and, if needed, to the receiver.
|
||||||
|
|
||||||
|
**Shared Memory**
|
||||||
|
|
||||||
|
As the command-line interface is supported, shared memory is used to store essential information such as the module hostname and TCP port, or the receiver hostname and TCP port. This ensures the system knows which components to communicate with, without requiring the user to re-enter this information for every command-line call.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
Only the client maintains shared memory. Care must be taken when multiple users operate from the same PC. See :ref:`multi detector and user section <using multiple detectors>` for more details.
|
||||||
|
|
||||||
@@ -202,6 +202,56 @@ Receiver PC Tuning Options
|
|||||||
ethtool -K xth1 gro
|
ethtool -K xth1 gro
|
||||||
|
|
||||||
|
|
||||||
|
* **permanent ethtool settings**
|
||||||
|
|
||||||
|
There are two main methods.
|
||||||
|
|
||||||
|
1. ``systemd service`` (recommended for Fedora and modern RHEL)
|
||||||
|
|
||||||
|
This is the preferred method on systems using systemd and NetworkManager, such as Fedora and RHEL 8+.
|
||||||
|
|
||||||
|
Create a systemd service template:
|
||||||
|
.. code-block:: ini
|
||||||
|
|
||||||
|
# /etc/systemd/system/ethtool@.service
|
||||||
|
|
||||||
|
[Unit]
|
||||||
|
Description=Set RX buffer size with ethtool
|
||||||
|
After=network-online.target
|
||||||
|
Wants=network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/sbin/ethtool -G %i rx 8192
|
||||||
|
Type=oneshot
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
|
||||||
|
|
||||||
|
Enable the service for a specific interface:
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
sudo systemctl enable ethtool@xth1.service
|
||||||
|
|
||||||
|
This ensures the setting is applied at every boot once the network is online.
|
||||||
|
|
||||||
|
|
||||||
|
2. ``ETHTOOL_OPTS in ifcfg scripts`` (legacy method for RHEL 7 and earlier)
|
||||||
|
|
||||||
|
This method applies only to systems using the legacy network-scripts backend, typically RHEL 7 and earlier.
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
# edit the corresponding ``ifcfg-*`` file
|
||||||
|
# file: /etc/sysconfig/network-scripts/ifcfg-eth0
|
||||||
|
|
||||||
|
# add or modify the following line:
|
||||||
|
ETHTOOL_OPTS="-K ${DEVICE} gro on; -G ${DEVICE} rx 4096; -L ${DEVICE} combined 4; -C ${DEVICE} rx-usecs 100; -C ${DEVICE} adaptive-rx on"
|
||||||
|
|
||||||
|
# restart the interface
|
||||||
|
ifdown eth0 && ifup eth0
|
||||||
|
|
||||||
|
|
||||||
#. Disable power saving in CPU frequency scaling and set system to performance
|
#. Disable power saving in CPU frequency scaling and set system to performance
|
||||||
* Check current policy (default might be powersave or schedutil)
|
* Check current policy (default might be powersave or schedutil)
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
.. _detector udp header:
|
.. _detector udp header config:
|
||||||
|
|
||||||
|
|
||||||
Config file
|
Config file
|
||||||
|
|||||||
@@ -99,6 +99,7 @@ Detector Enum
|
|||||||
MYTHEN3 6
|
MYTHEN3 6
|
||||||
GOTTHARD2 7
|
GOTTHARD2 7
|
||||||
================ ========
|
================ ========
|
||||||
|
|
||||||
* deprecated since v10.0.0
|
* deprecated since v10.0.0
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
.. _Virtual Detector Servers:
|
.. _Virtual Detector Servers:
|
||||||
|
|
||||||
Simulators
|
Simulators
|
||||||
===========
|
===========
|
||||||
|
|
||||||
|
|||||||
@@ -13,5 +13,5 @@ slsDetectorPackage/8.0.2_rh7 stable cmake/3.15.5 Qt/5.12.10
|
|||||||
slsDetectorPackage/8.0.2_rh8 stable cmake/3.15.5 Qt/5.12.10
|
slsDetectorPackage/8.0.2_rh8 stable cmake/3.15.5 Qt/5.12.10
|
||||||
slsDetectorPackage/9.0.0_rh8 stable cmake/3.15.5 Qt/5.12.10
|
slsDetectorPackage/9.0.0_rh8 stable cmake/3.15.5 Qt/5.12.10
|
||||||
slsDetectorPackage/9.1.0_rh8 stable cmake/3.15.5 Qt/5.12.10
|
slsDetectorPackage/9.1.0_rh8 stable cmake/3.15.5 Qt/5.12.10
|
||||||
|
slsDetectorPackage/9.1.1_rh8 stable cmake/3.15.5 Qt/5.12.10
|
||||||
|
slsDetectorPackage/9.2.0_rh8 stable cmake/3.15.5 Qt/5.12.10
|
||||||
|
|||||||
@@ -154,6 +154,8 @@ class AdcTab(QtWidgets.QWidget):
|
|||||||
self.mainWindow.analogPlots[i].setData(waveform)
|
self.mainWindow.analogPlots[i].setData(waveform)
|
||||||
plotName = getattr(self.view, f"labelADC{i}").text()
|
plotName = getattr(self.view, f"labelADC{i}").text()
|
||||||
waveforms[plotName] = waveform
|
waveforms[plotName] = waveform
|
||||||
|
elif checkBoxEn.isChecked():
|
||||||
|
idx += 1
|
||||||
return waveforms
|
return waveforms
|
||||||
|
|
||||||
@recordOrApplyPedestal
|
@recordOrApplyPedestal
|
||||||
|
|||||||
@@ -50,20 +50,20 @@ class AcquisitionTab(QtWidgets.QWidget):
|
|||||||
self.plotTab = self.mainWindow.plotTab
|
self.plotTab = self.mainWindow.plotTab
|
||||||
self.toggleStartButton(False)
|
self.toggleStartButton(False)
|
||||||
if self.det.type == detectorType.XILINX_CHIPTESTBOARD:
|
if self.det.type == detectorType.XILINX_CHIPTESTBOARD:
|
||||||
self.view.labelRunF.setDisabled(True)
|
|
||||||
self.view.labelADCF.setDisabled(True)
|
|
||||||
self.view.labelADCPhase.setDisabled(True)
|
self.view.labelADCPhase.setDisabled(True)
|
||||||
self.view.labelADCPipeline.setDisabled(True)
|
self.view.labelADCPipeline.setDisabled(True)
|
||||||
self.view.labelDBITF.setDisabled(True)
|
|
||||||
self.view.labelDBITPhase.setDisabled(True)
|
self.view.labelDBITPhase.setDisabled(True)
|
||||||
self.view.labelDBITPipeline.setDisabled(True)
|
self.view.labelDBITPipeline.setDisabled(True)
|
||||||
self.view.spinBoxRunF.setDisabled(True)
|
|
||||||
self.view.spinBoxADCF.setDisabled(True)
|
|
||||||
self.view.spinBoxADCPhase.setDisabled(True)
|
self.view.spinBoxADCPhase.setDisabled(True)
|
||||||
self.view.spinBoxADCPipeline.setDisabled(True)
|
self.view.spinBoxADCPipeline.setDisabled(True)
|
||||||
self.view.spinBoxDBITF.setDisabled(True)
|
|
||||||
self.view.spinBoxDBITPhase.setDisabled(True)
|
self.view.spinBoxDBITPhase.setDisabled(True)
|
||||||
self.view.spinBoxDBITPipeline.setDisabled(True)
|
self.view.spinBoxDBITPipeline.setDisabled(True)
|
||||||
|
self.view.labelRunF.setText("Run Clock Frequency (kHz):")
|
||||||
|
self.view.labelDBITF.setText("DBIT Clock Frequency (kHz):")
|
||||||
|
self.view.labelADCF.setText("ADC Clock Frequency (kHz):")
|
||||||
|
self.view.spinBoxRunF.setMaximum(250000)
|
||||||
|
self.view.spinBoxDBITF.setMaximum(250000)
|
||||||
|
self.view.spinBoxADCF.setMaximum(250000)
|
||||||
|
|
||||||
def connect_ui(self):
|
def connect_ui(self):
|
||||||
# For Acquistions Tab
|
# For Acquistions Tab
|
||||||
@@ -72,12 +72,13 @@ class AcquisitionTab(QtWidgets.QWidget):
|
|||||||
self.view.spinBoxAnalog.editingFinished.connect(self.setAnalog)
|
self.view.spinBoxAnalog.editingFinished.connect(self.setAnalog)
|
||||||
self.view.spinBoxDigital.editingFinished.connect(self.setDigital)
|
self.view.spinBoxDigital.editingFinished.connect(self.setDigital)
|
||||||
|
|
||||||
if self.det.type == detectorType.CHIPTESTBOARD:
|
if self.det.type in [detectorType.CHIPTESTBOARD, detectorType.XILINX_CHIPTESTBOARD]:
|
||||||
self.view.spinBoxRunF.editingFinished.connect(self.setRunFrequency)
|
self.view.spinBoxRunF.editingFinished.connect(self.setRunFrequency)
|
||||||
self.view.spinBoxADCF.editingFinished.connect(self.setADCFrequency)
|
self.view.spinBoxADCF.editingFinished.connect(self.setADCFrequency)
|
||||||
|
self.view.spinBoxDBITF.editingFinished.connect(self.setDBITFrequency)
|
||||||
|
if self.det.type == detectorType.CHIPTESTBOARD:
|
||||||
self.view.spinBoxADCPhase.editingFinished.connect(self.setADCPhase)
|
self.view.spinBoxADCPhase.editingFinished.connect(self.setADCPhase)
|
||||||
self.view.spinBoxADCPipeline.editingFinished.connect(self.setADCPipeline)
|
self.view.spinBoxADCPipeline.editingFinished.connect(self.setADCPipeline)
|
||||||
self.view.spinBoxDBITF.editingFinished.connect(self.setDBITFrequency)
|
|
||||||
self.view.spinBoxDBITPhase.editingFinished.connect(self.setDBITPhase)
|
self.view.spinBoxDBITPhase.editingFinished.connect(self.setDBITPhase)
|
||||||
self.view.spinBoxDBITPipeline.editingFinished.connect(self.setDBITPipeline)
|
self.view.spinBoxDBITPipeline.editingFinished.connect(self.setDBITPipeline)
|
||||||
|
|
||||||
@@ -98,12 +99,13 @@ class AcquisitionTab(QtWidgets.QWidget):
|
|||||||
self.getAnalog()
|
self.getAnalog()
|
||||||
self.getDigital()
|
self.getDigital()
|
||||||
|
|
||||||
if self.det.type == detectorType.CHIPTESTBOARD:
|
if self.det.type in [detectorType.CHIPTESTBOARD, detectorType.XILINX_CHIPTESTBOARD]:
|
||||||
self.getRunFrequency()
|
self.getRunFrequency()
|
||||||
self.getADCFrequency()
|
self.getADCFrequency()
|
||||||
|
self.getDBITFrequency()
|
||||||
|
if self.det.type == detectorType.CHIPTESTBOARD:
|
||||||
self.getADCPhase()
|
self.getADCPhase()
|
||||||
self.getADCPipeline()
|
self.getADCPipeline()
|
||||||
self.getDBITFrequency()
|
|
||||||
self.getDBITPhase()
|
self.getDBITPhase()
|
||||||
self.getDBITPipeline()
|
self.getDBITPipeline()
|
||||||
|
|
||||||
|
|||||||
@@ -11,9 +11,13 @@ build-backend = "scikit_build_core.build"
|
|||||||
[project]
|
[project]
|
||||||
name = "slsdet"
|
name = "slsdet"
|
||||||
dynamic = ["version"]
|
dynamic = ["version"]
|
||||||
|
dependencies = [
|
||||||
|
"numpy",
|
||||||
|
]
|
||||||
|
|
||||||
[tool.cibuildwheel]
|
[tool.cibuildwheel]
|
||||||
before-all = "uname -a"
|
before-all = "uname -a"
|
||||||
|
build = "cp{311,312,313,314}-manylinux_x86_64"
|
||||||
|
|
||||||
[tool.scikit-build.build]
|
[tool.scikit-build.build]
|
||||||
verbose = true
|
verbose = true
|
||||||
|
|||||||
@@ -65,6 +65,9 @@ configure_file( scripts/test_virtual.py
|
|||||||
${CMAKE_BINARY_DIR}/test_virtual.py
|
${CMAKE_BINARY_DIR}/test_virtual.py
|
||||||
)
|
)
|
||||||
|
|
||||||
|
configure_file(scripts/frameSynchronizerPullSocket.py
|
||||||
|
${CMAKE_BINARY_DIR}/bin/frameSynchronizerPullSocket.py COPYONLY)
|
||||||
|
|
||||||
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/../VERSION
|
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/../VERSION
|
||||||
${CMAKE_BINARY_DIR}/bin/slsdet/VERSION
|
${CMAKE_BINARY_DIR}/bin/slsdet/VERSION
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -13,13 +13,17 @@ import subprocess
|
|||||||
import argparse
|
import argparse
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
|
import ctypes.util, re # to check libclang version
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from parse import system_include_paths, clang_format_version
|
from parse import system_include_paths, clang_format_version
|
||||||
|
|
||||||
REDC = "\033[91m"
|
REDC = "\033[91m"
|
||||||
GREENC = "\033[92m"
|
GREENC = "\033[92m"
|
||||||
|
YELLOWC = "\033[93m"
|
||||||
ENDC = "\033[0m"
|
ENDC = "\033[0m"
|
||||||
|
|
||||||
|
def yellow(msg):
|
||||||
|
return f"{YELLOWC}{msg}{ENDC}"
|
||||||
|
|
||||||
def red(msg):
|
def red(msg):
|
||||||
return f"{REDC}{msg}{ENDC}"
|
return f"{REDC}{msg}{ENDC}"
|
||||||
@@ -29,6 +33,25 @@ def green(msg):
|
|||||||
return f"{GREENC}{msg}{ENDC}"
|
return f"{GREENC}{msg}{ENDC}"
|
||||||
|
|
||||||
|
|
||||||
|
def check_libclang_version(required="12"):
|
||||||
|
# Use already-loaded libclang, or let cindex resolve it
|
||||||
|
lib = ctypes.CDLL(cindex.Config.library_file or ctypes.util.find_library("clang"))
|
||||||
|
|
||||||
|
# Get version string
|
||||||
|
lib.clang_getClangVersion.restype = ctypes.c_void_p
|
||||||
|
version_ptr = lib.clang_getClangVersion()
|
||||||
|
version_str = ctypes.cast(version_ptr, ctypes.c_char_p).value.decode()
|
||||||
|
|
||||||
|
# Parse and check version
|
||||||
|
match = re.search(r"version\s+(\d+)", version_str)
|
||||||
|
if not match or match.group(1) != required:
|
||||||
|
msg = red(f"libclang version {match.group(1) if match else '?'} found, but version {required} required. Bye!")
|
||||||
|
print(msg)
|
||||||
|
sys.exit(1)
|
||||||
|
msg = green(f"Found libclang version {required}")
|
||||||
|
print(msg)
|
||||||
|
|
||||||
|
|
||||||
def check_clang_format_version(required_version):
|
def check_clang_format_version(required_version):
|
||||||
if (ver := clang_format_version()) != required_version:
|
if (ver := clang_format_version()) != required_version:
|
||||||
msg = red(
|
msg = red(
|
||||||
@@ -120,6 +143,24 @@ def time_return_lambda(node, args):
|
|||||||
|
|
||||||
|
|
||||||
def visit(node):
|
def visit(node):
|
||||||
|
|
||||||
|
loc = node.location
|
||||||
|
# skip if ndoe is outside project directory
|
||||||
|
if loc.file and not str(loc.file).startswith(str(cargs.build_path.parent)):
|
||||||
|
return
|
||||||
|
|
||||||
|
'''
|
||||||
|
# to see which file was causing the error (not in Detector.h, so skipping others in the above code)
|
||||||
|
try:
|
||||||
|
kind = node.kind
|
||||||
|
except ValueError as e:
|
||||||
|
loc = node.location
|
||||||
|
file_name = loc.file.name if loc.file else "<unknown file>"
|
||||||
|
msg = yellow(f"\nWarning: skipping node with unknown CursorKind id {node._kind_id} at {file_name}:{loc.line}:{loc.column}")
|
||||||
|
print(msg)
|
||||||
|
return
|
||||||
|
'''
|
||||||
|
|
||||||
if node.kind == cindex.CursorKind.CLASS_DECL:
|
if node.kind == cindex.CursorKind.CLASS_DECL:
|
||||||
if node.displayname == "Detector":
|
if node.displayname == "Detector":
|
||||||
for child in node.get_children():
|
for child in node.get_children():
|
||||||
@@ -161,6 +202,7 @@ if __name__ == "__main__":
|
|||||||
)
|
)
|
||||||
cargs = parser.parse_args()
|
cargs = parser.parse_args()
|
||||||
|
|
||||||
|
check_libclang_version("12")
|
||||||
check_clang_format_version(12)
|
check_clang_format_version(12)
|
||||||
check_for_compile_commands_json(cargs.build_path)
|
check_for_compile_commands_json(cargs.build_path)
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ from .gaincaps import Mythen3GainCapsWrapper
|
|||||||
from .PatternGenerator import PatternGenerator
|
from .PatternGenerator import PatternGenerator
|
||||||
|
|
||||||
from . import _slsdet
|
from . import _slsdet
|
||||||
|
from ._slsdet import freeSharedMemory, getUserDetails
|
||||||
|
|
||||||
xy = _slsdet.xy
|
xy = _slsdet.xy
|
||||||
defs = _slsdet.slsDetectorDefs
|
defs = _slsdet.slsDetectorDefs
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ defs = slsDetectorDefs
|
|||||||
|
|
||||||
from .utils import element_if_equal, all_equal, get_set_bits, list_to_bitmask
|
from .utils import element_if_equal, all_equal, get_set_bits, list_to_bitmask
|
||||||
from .utils import Geometry, to_geo, element, reduce_time, is_iterable, hostname_list
|
from .utils import Geometry, to_geo, element, reduce_time, is_iterable, hostname_list
|
||||||
from ._slsdet import xy
|
from ._slsdet import xy, freeSharedMemory, getUserDetails
|
||||||
from .gaincaps import Mythen3GainCapsWrapper
|
from .gaincaps import Mythen3GainCapsWrapper
|
||||||
from . import utils as ut
|
from . import utils as ut
|
||||||
from .proxy import JsonProxy, SlowAdcProxy, ClkDivProxy, MaxPhaseProxy, ClkFreqProxy, PatLoopProxy, PatNLoopProxy, PatWaitProxy, PatWaitTimeProxy
|
from .proxy import JsonProxy, SlowAdcProxy, ClkDivProxy, MaxPhaseProxy, ClkFreqProxy, PatLoopProxy, PatNLoopProxy, PatWaitProxy, PatWaitTimeProxy
|
||||||
@@ -24,6 +24,7 @@ import datetime as dt
|
|||||||
|
|
||||||
from functools import wraps
|
from functools import wraps
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
from collections.abc import Sequence
|
||||||
import socket
|
import socket
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
@@ -90,7 +91,7 @@ class Detector(CppDetectorApi):
|
|||||||
|
|
||||||
def free(self):
|
def free(self):
|
||||||
"""Free detector shared memory"""
|
"""Free detector shared memory"""
|
||||||
self.freeSharedMemory()
|
freeSharedMemory(self.getShmId())
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def config(self):
|
def config(self):
|
||||||
@@ -301,6 +302,46 @@ class Detector(CppDetectorApi):
|
|||||||
def rx_arping(self, value):
|
def rx_arping(self, value):
|
||||||
ut.set_using_dict(self.setRxArping, value)
|
ut.set_using_dict(self.setRxArping, value)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def rx_roi(self):
|
||||||
|
"""Gets the list of ROIs configured in the receiver.
|
||||||
|
|
||||||
|
Note
|
||||||
|
-----
|
||||||
|
Each ROI is represented as a tuple of (x_start, y_start, x_end, y_end). \n
|
||||||
|
If no ROIs are configured, returns [[-1,-1,-1,-1]].
|
||||||
|
"""
|
||||||
|
return self.getRxROI() #vector of Roi structs how represented?
|
||||||
|
|
||||||
|
@rx_roi.setter
|
||||||
|
def rx_roi(self, rois):
|
||||||
|
"""
|
||||||
|
Sets the list of ROIs in the receiver.
|
||||||
|
Can only set multiple ROIs at multi module level without gap pixels. If more than 1 ROI per
|
||||||
|
UDP port, it will throw. Setting number of udp interfaces will clear the
|
||||||
|
roi. Cannot be set for CTB or Xilinx CTB.
|
||||||
|
|
||||||
|
Note
|
||||||
|
-----
|
||||||
|
Each ROI should be represented as a sequence of 4 ints (x_start, y_start, x_end, y_end). \n
|
||||||
|
For mythen3 or gotthard2 pass a sequence of 2 ints (x_start, x_end) \n
|
||||||
|
For multiple ROI's pass a sequence of sequence \n
|
||||||
|
Example: [[0, 100, 50, 100], [260, 270, 50,100]] \n
|
||||||
|
"""
|
||||||
|
# TODO: maybe better to accept py::object in setRxROI and handle there?
|
||||||
|
if not isinstance(rois, Sequence):
|
||||||
|
raise TypeError(
|
||||||
|
"setRxROI failed: expected a tuple/list of ints x_min, x_max, y_min, y_max "
|
||||||
|
"or a sequence of such."
|
||||||
|
)
|
||||||
|
if(not isinstance(rois[0], Sequence)):
|
||||||
|
self.setRxROI([rois])
|
||||||
|
else:
|
||||||
|
self.setRxROI(rois)
|
||||||
|
|
||||||
|
def rx_clearroi(self):
|
||||||
|
"""Clears all the ROIs configured in the receiver."""
|
||||||
|
self.clearRxROI()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@element
|
@element
|
||||||
@@ -1537,7 +1578,7 @@ class Detector(CppDetectorApi):
|
|||||||
"""
|
"""
|
||||||
Retrieve user details from shared memory (hostname, type, PID, User, Date)
|
Retrieve user details from shared memory (hostname, type, PID, User, Date)
|
||||||
"""
|
"""
|
||||||
return self.getUserDetails()
|
return getUserDetails(self.getShmId())
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@element
|
@element
|
||||||
@@ -2184,6 +2225,7 @@ class Detector(CppDetectorApi):
|
|||||||
|
|
||||||
:setter: It loads trim files from settingspath.\n [Mythen3] An energy of -1 will pick up values from detector.
|
:setter: It loads trim files from settingspath.\n [Mythen3] An energy of -1 will pick up values from detector.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if self.type == detectorType.MYTHEN3:
|
if self.type == detectorType.MYTHEN3:
|
||||||
return self.getAllThresholdEnergy()
|
return self.getAllThresholdEnergy()
|
||||||
return self.getThresholdEnergy()
|
return self.getThresholdEnergy()
|
||||||
@@ -3304,7 +3346,11 @@ class Detector(CppDetectorApi):
|
|||||||
@property
|
@property
|
||||||
@element
|
@element
|
||||||
def runclk(self):
|
def runclk(self):
|
||||||
"""[Ctb] Run clock in MHz."""
|
"""
|
||||||
|
[Ctb] Sets Run clock frequency in MHz. \n
|
||||||
|
[Xilinx Ctb] Sets Run clock frequency in kHz.
|
||||||
|
"""
|
||||||
|
|
||||||
return self.getRUNClock()
|
return self.getRUNClock()
|
||||||
|
|
||||||
@runclk.setter
|
@runclk.setter
|
||||||
@@ -3385,7 +3431,11 @@ class Detector(CppDetectorApi):
|
|||||||
@property
|
@property
|
||||||
@element
|
@element
|
||||||
def dbitclk(self):
|
def dbitclk(self):
|
||||||
"""[Ctb] Clock for latching the digital bits in MHz."""
|
"""
|
||||||
|
[Ctb] Sets clock for latching the digital bits in MHz. \n
|
||||||
|
[Xilinx Ctb] clock for latching the digital bits in kHz.
|
||||||
|
"""
|
||||||
|
|
||||||
return self.getDBITClock()
|
return self.getDBITClock()
|
||||||
|
|
||||||
@dbitclk.setter
|
@dbitclk.setter
|
||||||
@@ -3512,7 +3562,11 @@ class Detector(CppDetectorApi):
|
|||||||
@property
|
@property
|
||||||
@element
|
@element
|
||||||
def adcclk(self):
|
def adcclk(self):
|
||||||
"""[Ctb] Sets ADC clock frequency in MHz. """
|
"""
|
||||||
|
[Ctb] Sets ADC clock frequency in MHz. \n
|
||||||
|
[Xilinx Ctb] Sets ADC clock frequency in kHz.
|
||||||
|
"""
|
||||||
|
|
||||||
return self.getADCClock()
|
return self.getADCClock()
|
||||||
|
|
||||||
@adcclk.setter
|
@adcclk.setter
|
||||||
|
|||||||
@@ -281,6 +281,6 @@ def hostname_list(args):
|
|||||||
|
|
||||||
|
|
||||||
def validate_port(value):
|
def validate_port(value):
|
||||||
if value <= 0 or value > 65535:
|
if value < 1024 or value > 65535:
|
||||||
raise ValueError("port must be in range 1 - 65535")
|
raise ValueError("port must be in range 1024 - 65535")
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,9 @@ void init_det(py::module &m) {
|
|||||||
(void (*)(const int, const int)) & sls::freeSharedMemory,
|
(void (*)(const int, const int)) & sls::freeSharedMemory,
|
||||||
py::arg() = 0, py::arg() = -1);
|
py::arg() = 0, py::arg() = -1);
|
||||||
|
|
||||||
|
m.def("getUserDetails", (std::string(*)(const int)) & sls::getUserDetails,
|
||||||
|
py::arg() = 0);
|
||||||
|
|
||||||
py::class_<Detector> CppDetectorApi(m, "CppDetectorApi");
|
py::class_<Detector> CppDetectorApi(m, "CppDetectorApi");
|
||||||
CppDetectorApi.def(py::init<int>());
|
CppDetectorApi.def(py::init<int>());
|
||||||
|
|
||||||
@@ -109,6 +112,13 @@ void init_det(py::module &m) {
|
|||||||
(Result<defs::xy>(Detector::*)(sls::Positions) const) &
|
(Result<defs::xy>(Detector::*)(sls::Positions) const) &
|
||||||
Detector::getModuleSize,
|
Detector::getModuleSize,
|
||||||
py::arg() = Positions{});
|
py::arg() = Positions{});
|
||||||
|
CppDetectorApi.def("getPortPerModuleGeometry",
|
||||||
|
(defs::xy(Detector::*)() const) &
|
||||||
|
Detector::getPortPerModuleGeometry);
|
||||||
|
CppDetectorApi.def("getPortSize",
|
||||||
|
(Result<defs::xy>(Detector::*)(sls::Positions) const) &
|
||||||
|
Detector::getPortSize,
|
||||||
|
py::arg() = Positions{});
|
||||||
CppDetectorApi.def("getDetectorSize", (defs::xy(Detector::*)() const) &
|
CppDetectorApi.def("getDetectorSize", (defs::xy(Detector::*)() const) &
|
||||||
Detector::getDetectorSize);
|
Detector::getDetectorSize);
|
||||||
CppDetectorApi.def("setDetectorSize",
|
CppDetectorApi.def("setDetectorSize",
|
||||||
@@ -924,15 +934,15 @@ void init_det(py::module &m) {
|
|||||||
(void (Detector::*)(bool, sls::Positions)) &
|
(void (Detector::*)(bool, sls::Positions)) &
|
||||||
Detector::setRxArping,
|
Detector::setRxArping,
|
||||||
py::arg(), py::arg() = Positions{});
|
py::arg(), py::arg() = Positions{});
|
||||||
CppDetectorApi.def("getIndividualRxROIs",
|
|
||||||
(Result<defs::ROI>(Detector::*)(sls::Positions) const) &
|
|
||||||
Detector::getIndividualRxROIs,
|
|
||||||
py::arg());
|
|
||||||
CppDetectorApi.def("getRxROI",
|
CppDetectorApi.def("getRxROI",
|
||||||
(defs::ROI(Detector::*)() const) & Detector::getRxROI);
|
(std::vector<defs::ROI>(Detector::*)(int) const) &
|
||||||
CppDetectorApi.def(
|
Detector::getRxROI,
|
||||||
"setRxROI", (void (Detector::*)(const defs::ROI)) & Detector::setRxROI,
|
py::arg() = -1);
|
||||||
|
CppDetectorApi.def("setRxROI",
|
||||||
|
(void (Detector::*)(const std::vector<defs::ROI> &)) &
|
||||||
|
Detector::setRxROI,
|
||||||
py::arg());
|
py::arg());
|
||||||
|
|
||||||
CppDetectorApi.def("clearRxROI",
|
CppDetectorApi.def("clearRxROI",
|
||||||
(void (Detector::*)()) & Detector::clearRxROI);
|
(void (Detector::*)()) & Detector::clearRxROI);
|
||||||
CppDetectorApi.def(
|
CppDetectorApi.def(
|
||||||
@@ -1343,8 +1353,9 @@ void init_det(py::module &m) {
|
|||||||
(void (Detector::*)(const int, const std::string &, sls::Positions)) &
|
(void (Detector::*)(const int, const std::string &, sls::Positions)) &
|
||||||
Detector::setVetoFile,
|
Detector::setVetoFile,
|
||||||
py::arg(), py::arg(), py::arg() = Positions{});
|
py::arg(), py::arg(), py::arg() = Positions{});
|
||||||
CppDetectorApi.def("getBurstMode",
|
CppDetectorApi.def(
|
||||||
(Result<defs::burstMode>(Detector::*)(sls::Positions)) &
|
"getBurstMode",
|
||||||
|
(Result<defs::burstMode>(Detector::*)(sls::Positions) const) &
|
||||||
Detector::getBurstMode,
|
Detector::getBurstMode,
|
||||||
py::arg() = Positions{});
|
py::arg() = Positions{});
|
||||||
CppDetectorApi.def("setBurstMode",
|
CppDetectorApi.def("setBurstMode",
|
||||||
@@ -2056,7 +2067,5 @@ void init_det(py::module &m) {
|
|||||||
(Result<sls::ns>(Detector::*)(sls::Positions) const) &
|
(Result<sls::ns>(Detector::*)(sls::Positions) const) &
|
||||||
Detector::getMeasurementTime,
|
Detector::getMeasurementTime,
|
||||||
py::arg() = Positions{});
|
py::arg() = Positions{});
|
||||||
CppDetectorApi.def("getUserDetails", (std::string(Detector::*)() const) &
|
|
||||||
Detector::getUserDetails);
|
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ void init_det(py::module &m) {
|
|||||||
|
|
||||||
m.def("freeSharedMemory", (void (*)(const int, const int)) &sls::freeSharedMemory, py::arg() = 0, py::arg() = -1);
|
m.def("freeSharedMemory", (void (*)(const int, const int)) &sls::freeSharedMemory, py::arg() = 0, py::arg() = -1);
|
||||||
|
|
||||||
|
m.def("getUserDetails", (std::string (*)(const int)) &sls::getUserDetails, py::arg() = 0);
|
||||||
|
|
||||||
py::class_<Detector> CppDetectorApi(m, "CppDetectorApi");
|
py::class_<Detector> CppDetectorApi(m, "CppDetectorApi");
|
||||||
CppDetectorApi.def(py::init<int>());
|
CppDetectorApi.def(py::init<int>());
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
// SPDX-License-Identifier: LGPL-3.0-or-other
|
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <pybind11/pybind11.h>
|
|
||||||
#include <datetime.h>
|
#include <datetime.h>
|
||||||
|
#include <pybind11/pybind11.h>
|
||||||
|
|
||||||
#include "sls/Result.h"
|
|
||||||
#include "DurationWrapper.h"
|
#include "DurationWrapper.h"
|
||||||
|
#include "sls/Result.h"
|
||||||
|
#include "sls/sls_detector_defs.h"
|
||||||
|
|
||||||
namespace py = pybind11;
|
namespace py = pybind11;
|
||||||
namespace pybind11 {
|
namespace pybind11 {
|
||||||
@@ -14,18 +15,19 @@ template <typename Type, typename Alloc>
|
|||||||
struct type_caster<sls::Result<Type, Alloc>>
|
struct type_caster<sls::Result<Type, Alloc>>
|
||||||
: list_caster<sls::Result<Type, Alloc>, Type> {};
|
: list_caster<sls::Result<Type, Alloc>, Type> {};
|
||||||
|
|
||||||
|
|
||||||
// Based on the typecaster in pybind11/chrono.h
|
// Based on the typecaster in pybind11/chrono.h
|
||||||
template <> struct type_caster<std::chrono::nanoseconds> {
|
template <> struct type_caster<std::chrono::nanoseconds> {
|
||||||
public:
|
public:
|
||||||
PYBIND11_TYPE_CASTER(std::chrono::nanoseconds, const_name("DurationWrapper"));
|
PYBIND11_TYPE_CASTER(std::chrono::nanoseconds,
|
||||||
|
const_name("DurationWrapper"));
|
||||||
|
|
||||||
// signed 25 bits required by the standard.
|
// signed 25 bits required by the standard.
|
||||||
using days = std::chrono::duration<int_least32_t, std::ratio<86400>>;
|
using days = std::chrono::duration<int_least32_t, std::ratio<86400>>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Conversion part 1 (Python->C++): convert a PyObject into std::chrono::nanoseconds
|
* Conversion part 1 (Python->C++): convert a PyObject into
|
||||||
* try datetime.timedelta, floats and our DurationWrapper wrapper
|
* std::chrono::nanoseconds try datetime.timedelta, floats and our
|
||||||
|
* DurationWrapper wrapper
|
||||||
*/
|
*/
|
||||||
|
|
||||||
bool load(handle src, bool) {
|
bool load(handle src, bool) {
|
||||||
@@ -49,30 +51,33 @@ template <> struct type_caster<std::chrono::nanoseconds> {
|
|||||||
);
|
);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
// If invoked with a float we assume it is seconds and convert, same as in chrono.h
|
// If invoked with a float we assume it is seconds and convert, same as
|
||||||
|
// in chrono.h
|
||||||
if (PyFloat_Check(src.ptr())) {
|
if (PyFloat_Check(src.ptr())) {
|
||||||
value = duration_cast<nanoseconds>(duration<double>(PyFloat_AsDouble(src.ptr())));
|
value = duration_cast<nanoseconds>(
|
||||||
|
duration<double>(PyFloat_AsDouble(src.ptr())));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
// If invoked with an int we assume it is nanoseconds and convert, same as in chrono.h
|
// If invoked with an int we assume it is nanoseconds and convert, same
|
||||||
|
// as in chrono.h
|
||||||
if (PyLong_Check(src.ptr())) {
|
if (PyLong_Check(src.ptr())) {
|
||||||
value = duration_cast<nanoseconds>(duration<int64_t>(PyLong_AsLongLong(src.ptr())));
|
value = duration_cast<nanoseconds>(
|
||||||
|
duration<int64_t>(PyLong_AsLongLong(src.ptr())));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Lastly if we were actually called with a DurationWrapper object we
|
||||||
// Lastly if we were actually called with a DurationWrapper object we get
|
// get the number of nanoseconds and create a std::chrono::nanoseconds
|
||||||
// the number of nanoseconds and create a std::chrono::nanoseconds from it
|
// from it
|
||||||
py::object py_cls = py::module::import("slsdet._slsdet").attr("DurationWrapper");
|
py::object py_cls =
|
||||||
if (py::isinstance(src, py_cls)){
|
py::module::import("slsdet._slsdet").attr("DurationWrapper");
|
||||||
|
if (py::isinstance(src, py_cls)) {
|
||||||
sls::DurationWrapper *cls = src.cast<sls::DurationWrapper *>();
|
sls::DurationWrapper *cls = src.cast<sls::DurationWrapper *>();
|
||||||
value = nanoseconds(cls->count());
|
value = nanoseconds(cls->count());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -81,17 +86,59 @@ template <> struct type_caster<std::chrono::nanoseconds> {
|
|||||||
* Default construct an object of (wrapped) DurationWrapper
|
* Default construct an object of (wrapped) DurationWrapper
|
||||||
* set the count from chrono::nanoseconds and return
|
* set the count from chrono::nanoseconds and return
|
||||||
*/
|
*/
|
||||||
static handle cast(std::chrono::nanoseconds src, return_value_policy /* policy */, handle /* parent */) {
|
static handle cast(std::chrono::nanoseconds src,
|
||||||
py::object py_cls = py::module::import("slsdet._slsdet").attr("DurationWrapper");
|
return_value_policy /* policy */, handle /* parent */) {
|
||||||
py::object* obj = new py::object;
|
py::object py_cls =
|
||||||
|
py::module::import("slsdet._slsdet").attr("DurationWrapper");
|
||||||
|
py::object *obj = new py::object;
|
||||||
*obj = py_cls();
|
*obj = py_cls();
|
||||||
sls::DurationWrapper *dur = obj->cast<sls::DurationWrapper *>();
|
sls::DurationWrapper *dur = obj->cast<sls::DurationWrapper *>();
|
||||||
dur->set_count(src.count());
|
dur->set_count(src.count());
|
||||||
return *obj;
|
return *obj;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Type caster for sls::defs::ROI from tuple
|
||||||
|
template <> struct type_caster<sls::defs::ROI> {
|
||||||
|
PYBIND11_TYPE_CASTER(sls::defs::ROI, _("Sequence[int, int, int, int] or "
|
||||||
|
"Sequence[int, int]"));
|
||||||
|
|
||||||
|
// convert c++ ROI to python tuple
|
||||||
|
static handle cast(const sls::defs::ROI &roi, return_value_policy, handle) {
|
||||||
|
return py::make_tuple(roi.xmin, roi.xmax, roi.ymin, roi.ymax).release();
|
||||||
|
}
|
||||||
|
|
||||||
|
// convert from python to c++ ROI
|
||||||
|
bool load(handle roi, bool /*allow implicit conversion*/) {
|
||||||
|
|
||||||
|
// accept tuple, list, numpy array any sequence
|
||||||
|
py::sequence seq;
|
||||||
|
try {
|
||||||
|
seq = py::reinterpret_borrow<py::sequence>(roi);
|
||||||
|
} catch (...) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (seq.size() != 4 && seq.size() != 2)
|
||||||
|
return false;
|
||||||
|
// Check if each element is an int
|
||||||
|
for (auto item : seq) {
|
||||||
|
if (!py::isinstance<py::int_>(item)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
value.xmin = seq[0].cast<int>();
|
||||||
|
value.xmax = seq[1].cast<int>();
|
||||||
|
|
||||||
|
if (seq.size() == 4) {
|
||||||
|
value.ymin = seq[2].cast<int>();
|
||||||
|
value.ymax = seq[3].cast<int>();
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
} // namespace detail
|
} // namespace detail
|
||||||
} // namespace pybind11
|
} // namespace pybind11
|
||||||
85
python/tests/conftest.py
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
import pytest
|
||||||
|
import sys
|
||||||
|
import traceback
|
||||||
|
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
current_dir = Path(__file__).resolve().parents[2]
|
||||||
|
|
||||||
|
scripts_dir = current_dir / "tests" / "scripts"
|
||||||
|
|
||||||
|
sys.path.append(str(scripts_dir))
|
||||||
|
|
||||||
|
print(sys.path)
|
||||||
|
|
||||||
|
from utils_for_test import (
|
||||||
|
Log,
|
||||||
|
LogLevel,
|
||||||
|
cleanup,
|
||||||
|
startReceiver,
|
||||||
|
startDetectorVirtualServer,
|
||||||
|
loadConfig,
|
||||||
|
loadBasicSettings,
|
||||||
|
)
|
||||||
|
|
||||||
|
def pytest_addoption(parser):
|
||||||
|
parser.addoption(
|
||||||
|
"--with-detector-simulators", action="store_true", default=False, help="Run tests that require detector simulators"
|
||||||
|
)
|
||||||
|
|
||||||
|
def pytest_configure(config):
|
||||||
|
config.addinivalue_line("markers", "withdetectorsimulators: mark test as needing detector simulators to run")
|
||||||
|
|
||||||
|
def pytest_collection_modifyitems(config, items):
|
||||||
|
if config.getoption("--with-detector-simulators"):
|
||||||
|
return
|
||||||
|
skip = pytest.mark.skip(reason="need --with-detector-simulators option to run")
|
||||||
|
for item in items:
|
||||||
|
if "withdetectorsimulators" in item.keywords:
|
||||||
|
item.add_marker(skip)
|
||||||
|
|
||||||
|
#helper fixture for servers
|
||||||
|
@pytest.fixture
|
||||||
|
def servers(request):
|
||||||
|
try:
|
||||||
|
return request.param # comes from @pytest.mark.parametrize(..., indirect=True)
|
||||||
|
except AttributeError:
|
||||||
|
# fallback default if the test did not parametrize
|
||||||
|
return ['eiger', 'jungfrau', 'mythen3', 'gotthard2', 'ctb', 'moench', 'xilinx_ctb']
|
||||||
|
return request.param
|
||||||
|
|
||||||
|
@pytest.fixture
|
||||||
|
def test_with_simulators(servers):
|
||||||
|
""" Fixture to automatically setup virtual detector servers for testing. """
|
||||||
|
|
||||||
|
LOG_PREFIX_FNAME = '/tmp/slsDetectorPackage_virtual_PythonAPI_test'
|
||||||
|
MAIN_LOG_FNAME = LOG_PREFIX_FNAME + '_log.txt'
|
||||||
|
|
||||||
|
with open(MAIN_LOG_FNAME, 'w') as fp:
|
||||||
|
try:
|
||||||
|
nmods = 2
|
||||||
|
for server in servers:
|
||||||
|
for ninterfaces in range(1,2):
|
||||||
|
if ninterfaces == 2 and server != 'jungfrau' and server != 'moench':
|
||||||
|
continue
|
||||||
|
|
||||||
|
msg = f'Starting Python API Tests for {server}'
|
||||||
|
|
||||||
|
if server == 'jungfrau' or server == 'moench':
|
||||||
|
msg += f' with {ninterfaces} interfaces'
|
||||||
|
|
||||||
|
Log(LogLevel.INFOBLUE, msg, fp)
|
||||||
|
cleanup(fp)
|
||||||
|
startDetectorVirtualServer(server, nmods, fp)
|
||||||
|
startReceiver(nmods, fp)
|
||||||
|
d = loadConfig(name=server, log_file_fp=fp, num_mods=nmods, num_frames=1, num_interfaces=ninterfaces)
|
||||||
|
loadBasicSettings(name=server, d=d, fp=fp)
|
||||||
|
yield # run test
|
||||||
|
cleanup(fp) # teardown
|
||||||
|
except Exception as e:
|
||||||
|
with open(MAIN_LOG_FNAME, 'a') as fp_error:
|
||||||
|
traceback.print_exc(file=fp_error)
|
||||||
|
Log(LogLevel.ERROR, f'Tests Failed.', fp)
|
||||||
|
cleanup(fp)
|
||||||
|
|
||||||
|
|
||||||
48
python/tests/test_pythonAPI.py
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
import pytest
|
||||||
|
import sys
|
||||||
|
|
||||||
|
from conftest import test_with_simulators
|
||||||
|
|
||||||
|
from slsdet import Detector
|
||||||
|
|
||||||
|
@pytest.mark.withdetectorsimulators
|
||||||
|
@pytest.mark.parametrize("servers", [["moench"]], indirect=True)
|
||||||
|
def test_rx_ROI_moench(test_with_simulators, servers):
|
||||||
|
""" Test setting and getting rx_ROI property of Detector class for moench. """
|
||||||
|
|
||||||
|
d = Detector()
|
||||||
|
d.rx_roi = (0, 10, 10, 20)
|
||||||
|
roi = d.rx_roi
|
||||||
|
assert roi == [(0, 10, 10, 20)]
|
||||||
|
|
||||||
|
d.rx_roi = [5,15,15,25]
|
||||||
|
|
||||||
|
assert d.rx_roi == [(5,15,15,25)]
|
||||||
|
|
||||||
|
d.rx_roi = [[0,10,0,20], [5,20,410,420]]
|
||||||
|
|
||||||
|
roi = d.rx_roi
|
||||||
|
assert roi == [(0,10,0,20), (5,20,410,420)]
|
||||||
|
|
||||||
|
d.rx_clearroi()
|
||||||
|
roi = d.rx_roi
|
||||||
|
assert roi == [(-1,-1,-1,-1)]
|
||||||
|
|
||||||
|
@pytest.mark.withdetectorsimulators
|
||||||
|
@pytest.mark.parametrize("servers", [["mythen3"]], indirect=True)
|
||||||
|
def test_rx_ROI_mythen(test_with_simulators, servers):
|
||||||
|
""" Test setting and getting rx_ROI property of Detector class for mythen. """
|
||||||
|
|
||||||
|
d = Detector()
|
||||||
|
d.rx_roi = (0, 10)
|
||||||
|
roi = d.rx_roi
|
||||||
|
assert roi == [(0, 10, -1, -1)]
|
||||||
|
|
||||||
|
#d.rx_roi = [[5,15, 0, 1]] # not allowed for mythen3
|
||||||
|
|
||||||
|
d.rx_roi = [0,10, -1, -1]
|
||||||
|
|
||||||
|
assert d.rx_roi == [(0,10,-1,-1)]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -3,8 +3,6 @@
|
|||||||
add_executable(using_logger using_logger.cpp)
|
add_executable(using_logger using_logger.cpp)
|
||||||
target_link_libraries(using_logger
|
target_link_libraries(using_logger
|
||||||
slsSupportShared
|
slsSupportShared
|
||||||
pthread
|
|
||||||
rt
|
|
||||||
)
|
)
|
||||||
|
|
||||||
set_target_properties(using_logger PROPERTIES
|
set_target_properties(using_logger PROPERTIES
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
../slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServer_developer
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServer_developer
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServer_developer
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServer_developer
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServer_developer
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServer_developer
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServer_developer
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../slsDetectorServers/xilinx_ctbDetectorServer/bin/xilinx_ctbDetectorServer_developer
|
|
||||||
@@ -3,14 +3,14 @@
|
|||||||
#ifndef ANALOGDETECTOR_H
|
#ifndef ANALOGDETECTOR_H
|
||||||
#define ANALOGDETECTOR_H
|
#define ANALOGDETECTOR_H
|
||||||
|
|
||||||
#include <mutex>
|
//#include <mutex>
|
||||||
|
|
||||||
#include "commonModeSubtractionNew.h"
|
#include "commonModeSubtractionNew.h"
|
||||||
#include "ghostSummation.h"
|
#include "ghostSummation.h"
|
||||||
#include "pedestalSubtraction.h"
|
#include "pedestalSubtraction.h"
|
||||||
#include "sls/tiffIO.h"
|
|
||||||
#include "slsDetectorData.h"
|
#include "slsDetectorData.h"
|
||||||
#include "slsInterpolation.h"
|
#include "slsInterpolation.h"
|
||||||
|
#include "sls/tiffIO.h"
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
#ifdef ROOTSPECTRUM
|
#ifdef ROOTSPECTRUM
|
||||||
@@ -90,8 +90,6 @@ template <class dataType> class analogDetector {
|
|||||||
ymin = 0;
|
ymin = 0;
|
||||||
ymax = ny;
|
ymax = ny;
|
||||||
fMode = ePedestal;
|
fMode = ePedestal;
|
||||||
dMode = eInterpolating;
|
|
||||||
// std::cout << "dMode " << dMode << std::endl;
|
|
||||||
thr = 0;
|
thr = 0;
|
||||||
myFile = NULL;
|
myFile = NULL;
|
||||||
#ifdef ROOTSPECTRUM
|
#ifdef ROOTSPECTRUM
|
||||||
@@ -113,20 +111,15 @@ template <class dataType> class analogDetector {
|
|||||||
destructor. Deletes the pdestalSubtraction array and the image
|
destructor. Deletes the pdestalSubtraction array and the image
|
||||||
*/
|
*/
|
||||||
virtual ~analogDetector() {
|
virtual ~analogDetector() {
|
||||||
// std::cout << "#### Debug: Destructing analogDetector! ####"
|
|
||||||
// << std::endl;
|
|
||||||
for (int i = 0; i < ny; i++) {
|
for (int i = 0; i < ny; i++) {
|
||||||
if (stat[i]) { delete[] stat[i]; stat[i] = nullptr; }
|
delete[] stat[i];
|
||||||
// delete[] stat[i];
|
|
||||||
/* delete [] pedMean[i]; */
|
/* delete [] pedMean[i]; */
|
||||||
/* delete [] pedVariance[i]; */
|
/* delete [] pedVariance[i]; */
|
||||||
}
|
};
|
||||||
/* delete [] pedMean; */
|
/* delete [] pedMean; */
|
||||||
/* delete [] pedVariance; */
|
/* delete [] pedVariance; */
|
||||||
// delete[] stat;
|
delete[] stat;
|
||||||
// delete[] image;
|
delete[] image;
|
||||||
if (stat) { delete[] stat; stat = nullptr; }
|
|
||||||
if (image) { delete[] image; image = nullptr; }
|
|
||||||
#ifdef ROOTSPECTRUM
|
#ifdef ROOTSPECTRUM
|
||||||
delete hs;
|
delete hs;
|
||||||
#ifdef ROOTCLUST
|
#ifdef ROOTCLUST
|
||||||
@@ -144,8 +137,6 @@ template <class dataType> class analogDetector {
|
|||||||
*/
|
*/
|
||||||
analogDetector(analogDetector *orig) {
|
analogDetector(analogDetector *orig) {
|
||||||
/* copy construction from orig*/
|
/* copy construction from orig*/
|
||||||
// std::cout << "#### Debug: Calling analogDetector cloning method! ####"
|
|
||||||
// << std::endl;
|
|
||||||
det = orig->det;
|
det = orig->det;
|
||||||
nx = orig->nx;
|
nx = orig->nx;
|
||||||
ny = orig->ny;
|
ny = orig->ny;
|
||||||
@@ -161,8 +152,6 @@ template <class dataType> class analogDetector {
|
|||||||
thr = orig->thr;
|
thr = orig->thr;
|
||||||
// nSigma=orig->nSigma;
|
// nSigma=orig->nSigma;
|
||||||
fMode = orig->fMode;
|
fMode = orig->fMode;
|
||||||
dMode = orig->dMode;
|
|
||||||
// std::cout << "dMode " << dMode << std::endl;
|
|
||||||
myFile = orig->myFile;
|
myFile = orig->myFile;
|
||||||
|
|
||||||
stat = new pedestalSubtraction *[ny];
|
stat = new pedestalSubtraction *[ny];
|
||||||
@@ -227,75 +216,12 @@ template <class dataType> class analogDetector {
|
|||||||
ghSum = NULL;
|
ghSum = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
constructor creating a deep copy of another analog detector
|
|
||||||
\param other analog Detector structure to be copied
|
|
||||||
*/
|
|
||||||
analogDetector(const analogDetector &other)
|
|
||||||
: det(other.det), nx(other.nx), ny(other.ny), dataSign(other.dataSign),
|
|
||||||
iframe(other.iframe), gmap(other.gmap), id(other.id),
|
|
||||||
xmin(other.xmin), xmax(other.xmax), ymin(other.ymin),
|
|
||||||
ymax(other.ymax), thr(other.thr), fMode(other.fMode),
|
|
||||||
dMode(other.dMode), myFile(NULL) {
|
|
||||||
|
|
||||||
// std::cout << "#### Debug: Calling analogDetector copy constructor! ####"
|
|
||||||
// << std::endl;
|
|
||||||
|
|
||||||
// Deep copy the stat array
|
|
||||||
stat = new pedestalSubtraction *[ny];
|
|
||||||
for (int i = 0; i < ny; i++) {
|
|
||||||
stat[i] = new pedestalSubtraction[nx];
|
|
||||||
std::copy(other.stat[i], other.stat[i] + nx, stat[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Deep copy image array
|
|
||||||
image = new int[nx * ny];
|
|
||||||
std::copy(other.image, other.image + (nx * ny), image);
|
|
||||||
|
|
||||||
// Copy common-mode subtraction object (if it exists)
|
|
||||||
if (other.cmSub) {
|
|
||||||
cmSub = other.cmSub->Clone();
|
|
||||||
std::cout << "Copying cmSub" << std::endl;
|
|
||||||
} else {
|
|
||||||
cmSub = nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Copy ghost summation object (if it exists)
|
|
||||||
if (other.ghSum) {
|
|
||||||
ghSum = other.ghSum->Clone();
|
|
||||||
std::cout << "Copying ghSum" << std::endl;
|
|
||||||
} else {
|
|
||||||
ghSum = nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Ensure pedestal values are copied properly
|
|
||||||
int nped = other.GetNPedestals(0, 0);
|
|
||||||
for (int iy = 0; iy < ny; ++iy) {
|
|
||||||
for (int ix = 0; ix < nx; ++ix) {
|
|
||||||
stat[iy][ix].SetNPedestals(nped);
|
|
||||||
setPedestal(ix, iy, other.getPedestal(ix, iy),
|
|
||||||
other.getPedestalRMS(ix, iy),
|
|
||||||
other.GetNPedestals(ix, iy));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
clone. Must be virtual!
|
clone. Must be virtual!
|
||||||
\returns a clone of the original analog detector
|
\returns a clone of the original analog detector
|
||||||
*/
|
*/
|
||||||
virtual analogDetector *Clone() = 0;
|
virtual analogDetector *Clone() = 0;
|
||||||
|
|
||||||
/**
|
|
||||||
Deep copy. Must be virtual!
|
|
||||||
This is a new addition because of multithreaded storage cell data (where
|
|
||||||
each sc has its own mutex). If the pure virtual function exists here,
|
|
||||||
EVERY derived class has to overwrite it! That means a Copy() function
|
|
||||||
must also be implemented in any derived class. \returns a deep copy of
|
|
||||||
the original analog detector
|
|
||||||
*/
|
|
||||||
virtual analogDetector *Copy() = 0;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Gives an id to the structure. For debugging purposes in case of
|
Gives an id to the structure. For debugging purposes in case of
|
||||||
multithreading. \param i is to be set \returns current id
|
multithreading. \param i is to be set \returns current id
|
||||||
@@ -622,11 +548,6 @@ template <class dataType> class analogDetector {
|
|||||||
return ped;
|
return ped;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Const version for use in the copy constructor
|
|
||||||
virtual double getPedestal(int ix, int iy, int cm = 0) const {
|
|
||||||
return stat[iy][ix].getPedestal();
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
gets pedestal rms (i.e. noise)
|
gets pedestal rms (i.e. noise)
|
||||||
\param ix pixel x coordinate
|
\param ix pixel x coordinate
|
||||||
@@ -645,11 +566,6 @@ template <class dataType> class analogDetector {
|
|||||||
return ped;
|
return ped;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Const version for use in the copy constructor
|
|
||||||
virtual double getPedestalRMS(int ix, int iy) const {
|
|
||||||
return stat[iy][ix].getPedestalRMS();
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
sets pedestal
|
sets pedestal
|
||||||
\param ix pixel x coordinate
|
\param ix pixel x coordinate
|
||||||
@@ -1310,7 +1226,7 @@ template <class dataType> class analogDetector {
|
|||||||
/** gets number of samples for moving average pedestal calculation
|
/** gets number of samples for moving average pedestal calculation
|
||||||
\returns actual number of samples
|
\returns actual number of samples
|
||||||
*/
|
*/
|
||||||
int GetNPedestals(int ix, int iy) const {
|
int GetNPedestals(int ix, int iy) {
|
||||||
if (ix >= 0 && ix < nx && iy >= 0 && iy < ny)
|
if (ix >= 0 && ix < nx && iy >= 0 && iy < ny)
|
||||||
return stat[iy][ix].GetNPedestals();
|
return stat[iy][ix].GetNPedestals();
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -50,8 +50,6 @@ template <typename Element> class CircularFifo {
|
|||||||
mutable sem_t data_mutex;
|
mutable sem_t data_mutex;
|
||||||
mutable sem_t free_mutex;
|
mutable sem_t free_mutex;
|
||||||
unsigned int increment(unsigned int idx_) const;
|
unsigned int increment(unsigned int idx_) const;
|
||||||
int id_;
|
|
||||||
int thread_id_;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename Element> int CircularFifo<Element>::getDataValue() const {
|
template <typename Element> int CircularFifo<Element>::getDataValue() const {
|
||||||
@@ -76,18 +74,14 @@ template <typename Element> int CircularFifo<Element>::getFreeValue() const {
|
|||||||
template <typename Element>
|
template <typename Element>
|
||||||
bool CircularFifo<Element>::push(Element *&item_, bool no_block) {
|
bool CircularFifo<Element>::push(Element *&item_, bool no_block) {
|
||||||
// check for fifo full
|
// check for fifo full
|
||||||
if (no_block && isFull()) {
|
if (no_block && isFull())
|
||||||
//std::cout << "Full Fifo at push. Returning." << std::endl;
|
return false;
|
||||||
return false; // No space, return immediately
|
|
||||||
}
|
|
||||||
|
|
||||||
//std::cout << "Thread " << thread_id_ <<" Push Fifo " << id_ << " item " << static_cast<void*>(item_) << std::endl;
|
sem_wait(&free_mutex);
|
||||||
|
array[tail] = item_;
|
||||||
sem_wait(&free_mutex); // Wait for space
|
tail = increment(tail);
|
||||||
array[tail] = item_; // Add item to the buffer
|
sem_post(&data_mutex);
|
||||||
tail = increment(tail); // Move the tail pointer
|
return true;
|
||||||
sem_post(&data_mutex); // Signal that there is new data
|
|
||||||
return true; // Success
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Consumer only: Removes and returns item from the queue
|
/** Consumer only: Removes and returns item from the queue
|
||||||
@@ -100,18 +94,14 @@ bool CircularFifo<Element>::push(Element *&item_, bool no_block) {
|
|||||||
template <typename Element>
|
template <typename Element>
|
||||||
bool CircularFifo<Element>::pop(Element *&item_, bool no_block) {
|
bool CircularFifo<Element>::pop(Element *&item_, bool no_block) {
|
||||||
// check for fifo empty
|
// check for fifo empty
|
||||||
if (no_block && isEmpty()) {
|
if (no_block && isEmpty())
|
||||||
//std::cout << "Empty Fifo at pop. Returning." << std::endl;
|
return false;
|
||||||
return false; // No data in fifo, return immediately
|
|
||||||
}
|
|
||||||
|
|
||||||
//std::cout << "Thread " << thread_id_ << " Pop Fifo " << id_ << " item " << static_cast<void*>(item_) << std::endl;
|
sem_wait(&data_mutex);
|
||||||
|
item_ = array[head];
|
||||||
sem_wait(&data_mutex); // Wait for data
|
head = increment(head);
|
||||||
item_ = array[head]; // Retreive item from the current head of the buffer
|
sem_post(&free_mutex);
|
||||||
head = increment(head); // Move the head pointer (to point to the next item)
|
return true;
|
||||||
sem_post(&free_mutex); // Signal that there is new free space available
|
|
||||||
return true; //Success
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Useful for testinng and Consumer check of status
|
/** Useful for testinng and Consumer check of status
|
||||||
|
|||||||
@@ -1,482 +0,0 @@
|
|||||||
#include "HDF5File.h"
|
|
||||||
|
|
||||||
#include "ansi.h"
|
|
||||||
|
|
||||||
#include <algorithm>
|
|
||||||
#include <fmt/ranges.h>
|
|
||||||
|
|
||||||
/*
|
|
||||||
* No class member helper functions
|
|
||||||
*/
|
|
||||||
std::string vectorToString(std::vector<hsize_t> const& v) {
|
|
||||||
return fmt::format("({})", fmt::join(v, ", "));
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* increment frame offset (if s dimension exists, loop through all before incrementing z)
|
|
||||||
* should also work if file_dims[1] is not s but x (in that case we ignore it)
|
|
||||||
*/
|
|
||||||
void conditionalIncrement(std::vector<hsize_t>& vec, hsize_t max_value) {
|
|
||||||
|
|
||||||
if (vec.size() < 3) {
|
|
||||||
throw std::invalid_argument("Vector must have at least 3 elements.");
|
|
||||||
}
|
|
||||||
|
|
||||||
// If vector has 4 elements, increment vec[1] first
|
|
||||||
if (vec.size() == 4) {
|
|
||||||
if (++vec[1] >= max_value) { //max_value is never reached!
|
|
||||||
vec[1] = 0; // Reset and increment vec[0]
|
|
||||||
++vec[0];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// If vector has 3 elements, increment vec[0] directly
|
|
||||||
else if (vec.size() == 3) {
|
|
||||||
++vec[0];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void printDatatypeSize(hid_t dataset) {
|
|
||||||
|
|
||||||
hid_t datatype = H5Dget_type(dataset);
|
|
||||||
H5T_class_t class_id = H5Tget_class(datatype);
|
|
||||||
size_t type_size = H5Tget_size(datatype);
|
|
||||||
|
|
||||||
H5Tclose(datatype);
|
|
||||||
|
|
||||||
std::cout << " dataset type class: " << class_id
|
|
||||||
<< ", size: " << type_size << " bytes\n";
|
|
||||||
|
|
||||||
//Ensure the read datatype matches a system native type correctly
|
|
||||||
//hid_t read_type = (type_size == 8) ? H5T_NATIVE_LLONG : H5T_NATIVE_UINT;
|
|
||||||
|
|
||||||
//return read_type;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* **********************
|
|
||||||
* Class member functions
|
|
||||||
* **********************
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Default constructor
|
|
||||||
/*
|
|
||||||
HDF5File::HDF5File () {
|
|
||||||
//InitializeParameters(); //old
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
HDF5File::~HDF5File () {
|
|
||||||
|
|
||||||
if(current_image)
|
|
||||||
delete [] current_image;
|
|
||||||
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
void HDF5File::SetImageDataPath (std::string const& name) {
|
|
||||||
std::cout << "Image dataset path set to " << name << std::endl;
|
|
||||||
data_datasetname = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
void HDF5File::SetFrameIndexPath (std::string const& name) {
|
|
||||||
std::cout << "Frame index dataset path set to " << name << std::endl;
|
|
||||||
index_datasetname = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
void HDF5File::InitializeDimensions () {
|
|
||||||
|
|
||||||
rank = H5Sget_simple_extent_ndims(dataspace);
|
|
||||||
file_dims.resize(rank);
|
|
||||||
H5Sget_simple_extent_dims(dataspace, file_dims.data(), nullptr);
|
|
||||||
|
|
||||||
std::cout << "Dataset dimensions: " << vectorToString(file_dims) << "\n";
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
std::vector<hsize_t> HDF5File::GetDatasetDimensions() {
|
|
||||||
return file_dims;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::vector<hsize_t> HDF5File::GetChunkDimensions() {
|
|
||||||
return chunk_dims;
|
|
||||||
}
|
|
||||||
|
|
||||||
hsize_t HDF5File::GetRank() {
|
|
||||||
return rank;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool HDF5File::ValidateDimensions () {
|
|
||||||
|
|
||||||
// validate rank
|
|
||||||
if(rank != RANK) {
|
|
||||||
cprintf(RED,"rank found %llu. Expected %d\n", rank, RANK);
|
|
||||||
std::cerr << "Error: Rank could not be validated\n";
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate file dimensions of x and y (assuming those are the last two dimensions of the dataset)
|
|
||||||
if ( (file_dims[file_dims.size()-2] != DEFAULT_X_DIMS) || (file_dims[file_dims.size()-1] != DEFAULT_Y_DIMS) ) {
|
|
||||||
cprintf(RED,"file dimensions of x found %llu. Expected %d\n", file_dims[file_dims.size()-2], DEFAULT_X_DIMS);
|
|
||||||
cprintf(RED,"file dimensions of y found %llu. Expected %d\n", file_dims[file_dims.size()-1], DEFAULT_Y_DIMS);
|
|
||||||
std::cerr << "Error: Dataset dimensions could not be validated\n";
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
cprintf(GREEN, "File rank & dimensions validated.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool HDF5File::ReadChunkDimensions () {
|
|
||||||
|
|
||||||
// Get layout
|
|
||||||
hid_t plist_id = H5Dget_create_plist(dataset);
|
|
||||||
|
|
||||||
if (H5Pget_layout (plist_id) != H5D_CHUNKED) {
|
|
||||||
cprintf(RED,"NOTE: Dataset is not chunked!\n");
|
|
||||||
std::cerr << "Error: Dataset is not chunked\n";
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get Chunk Dimensions
|
|
||||||
int rank_chunk = H5Pget_chunk (plist_id, 0, nullptr);
|
|
||||||
chunk_dims.resize(rank_chunk);
|
|
||||||
H5Pget_chunk (plist_id, rank_chunk, chunk_dims.data());
|
|
||||||
|
|
||||||
std::cout << "Chunk dimensions: " << vectorToString(chunk_dims) << "\n";
|
|
||||||
|
|
||||||
H5Pclose (plist_id);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
bool HDF5File::ValidateChunkDimensions () {
|
|
||||||
|
|
||||||
// validate rank
|
|
||||||
if(chunk_dims.size() != rank) {
|
|
||||||
cprintf(RED,"Chunk rank does not match dataset rank! Found %lu. Expected %llu\n", chunk_dims.size(), rank);
|
|
||||||
std::cerr << "Error: Chunk rank does not match dataset rank\n";
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate chunk dimensions of x and y (assuming those are the last two dimensions of the dataset)
|
|
||||||
if ( (chunk_dims[chunk_dims.size()-2] != DEFAULT_CHUNK_X_DIMS) || (chunk_dims[chunk_dims.size()-1] != DEFAULT_CHUNK_Y_DIMS) ) {
|
|
||||||
cprintf(RED,"file dimensions of x found %llu. Expected %d\n", chunk_dims[chunk_dims.size()-2], DEFAULT_CHUNK_X_DIMS);
|
|
||||||
cprintf(RED,"file dimensions of y found %llu. Expected %d\n", chunk_dims[chunk_dims.size()-1], DEFAULT_CHUNK_Y_DIMS);
|
|
||||||
std::cerr << "Error: Chunk dimensions could not be validated\n";
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
cprintf(GREEN, "Chunk rank & dimensions validated.");
|
|
||||||
return true;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
bool HDF5File::OpenFrameIndexDataset() {
|
|
||||||
|
|
||||||
// Get all the frame numbers
|
|
||||||
// Open frame index dataset
|
|
||||||
hid_t fi_dataset = H5Dopen2 (file, index_datasetname.c_str(), H5P_DEFAULT);
|
|
||||||
if (fi_dataset < 0){
|
|
||||||
cprintf (RED,"Could not open frame index dataset %s\n", index_datasetname.c_str());
|
|
||||||
std::cerr << "Error: Could not open frame index dataset\n";
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
hid_t fi_dataspace = H5Dget_space (fi_dataset);
|
|
||||||
int fi_rank = H5Sget_simple_extent_ndims(fi_dataspace);
|
|
||||||
std::vector<hsize_t> fi_dims(fi_rank);
|
|
||||||
H5Sget_simple_extent_dims (fi_dataspace, fi_dims.data(), nullptr);
|
|
||||||
|
|
||||||
std::cout << "Frame index dataset dimensions: " << vectorToString(fi_dims) << "\n";
|
|
||||||
|
|
||||||
// validate size
|
|
||||||
if (fi_dims[0] != file_dims[0]) {
|
|
||||||
cprintf (RED,"Frame index dimensions of z found %llu. Expected %llu\n", fi_dims[0], file_dims[0]);
|
|
||||||
std::cerr << "Error: Z dimension of frame index dataset does not align with z dimension of image dataset\n";
|
|
||||||
H5Sclose (fi_dataspace);
|
|
||||||
H5Dclose (fi_dataset);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// allocate frame index memory
|
|
||||||
frame_index_list.resize(fi_dims[0]); //file_dims
|
|
||||||
|
|
||||||
// read and print datatype size of dataset
|
|
||||||
std::cout << "Frame index";
|
|
||||||
printDatatypeSize(fi_dataset);
|
|
||||||
|
|
||||||
// make sure we only read the first column of the frame index dataset (not all storage cells)
|
|
||||||
//NOTE: For XFEL datasets, this may mean that some frame numbers are skipped
|
|
||||||
//(because they assign a unique frame number to every storage cell)
|
|
||||||
//Possibly, there is a cleaner fix for this...
|
|
||||||
std::vector<hsize_t> start(fi_rank,0);
|
|
||||||
std::vector<hsize_t> count(fi_rank,1);
|
|
||||||
count[0] = fi_dims[0];
|
|
||||||
hid_t memspace = H5Screate_simple (fi_rank, count.data(), nullptr);
|
|
||||||
if (memspace < 0) {
|
|
||||||
std::cerr << "Error: Failed to create memory space for HDF5 read operation\n";
|
|
||||||
H5Sclose(memspace);
|
|
||||||
H5Sclose(fi_dataspace);
|
|
||||||
H5Dclose(fi_dataset);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create hyperslab selection
|
|
||||||
if (H5Sselect_hyperslab(fi_dataspace, H5S_SELECT_SET, start.data(), nullptr, count.data(), nullptr) < 0 ) {
|
|
||||||
cprintf (RED,"Could not create hyperslab for %s\n", vectorToString(start).c_str());
|
|
||||||
std::cerr << "Error: Hyperslab creation failed for " << vectorToString(start) << "\n";
|
|
||||||
H5Sclose(memspace);
|
|
||||||
H5Sclose (fi_dataspace);
|
|
||||||
H5Dclose(fi_dataset);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
//read frame index values
|
|
||||||
//Is u32 correct? I would think not. But I get a segmentation fault if I use u64.
|
|
||||||
if (H5Dread (fi_dataset, H5T_STD_U64LE, memspace, fi_dataspace, H5P_DEFAULT, frame_index_list.data()) < 0) {
|
|
||||||
cprintf (RED,"Could not read frame index dataset %s\n", index_datasetname.c_str());
|
|
||||||
std::cerr << "Error: Could not read frame index dataset\n";
|
|
||||||
H5Sclose(memspace);
|
|
||||||
H5Sclose (fi_dataspace);
|
|
||||||
H5Dclose (fi_dataset);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
H5Sclose(memspace);
|
|
||||||
H5Sclose (fi_dataspace);
|
|
||||||
H5Dclose(fi_dataset);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
int HDF5File::OpenResources (char const*const fname, bool validate) {
|
|
||||||
|
|
||||||
std::cout << "Debug HDF5File.cpp: Attempting to open file " << fname << std::endl;
|
|
||||||
// Open File
|
|
||||||
file = H5Fopen (fname, H5F_ACC_RDONLY, H5P_DEFAULT);
|
|
||||||
if (file < 0) {
|
|
||||||
cprintf(RED,"Could not open hdf5 file\n");
|
|
||||||
std::cerr << "Error: H5Fopen failed\n";
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
cprintf(BLUE, "Opened File: %s\n", fname);
|
|
||||||
|
|
||||||
// Open Dataset
|
|
||||||
dataset = H5Dopen2 (file, data_datasetname.c_str(), H5P_DEFAULT);
|
|
||||||
if (dataset < 0){
|
|
||||||
cprintf(RED,"Could not open dataset\n");
|
|
||||||
std::cerr << "Error: H5Dopen2 failed\n";
|
|
||||||
CloseResources ();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
cprintf(BLUE, "Opened Dataset: %s\n", data_datasetname.c_str());
|
|
||||||
|
|
||||||
// print datatype size of dataset
|
|
||||||
std::cout << "Image";
|
|
||||||
printDatatypeSize(dataset);
|
|
||||||
|
|
||||||
// Create Dataspace
|
|
||||||
dataspace = H5Dget_space (dataset);
|
|
||||||
if (dataspace < 0){
|
|
||||||
cprintf(RED,"Could not open dataspace\n");
|
|
||||||
std::cerr << "Error: H5Dget_space failed\n";
|
|
||||||
CloseResources ();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get Dimensions
|
|
||||||
InitializeDimensions();
|
|
||||||
// Get chunk dimensions
|
|
||||||
if (!ReadChunkDimensions()) {
|
|
||||||
CloseResources();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate file dimensions
|
|
||||||
if (validate) {
|
|
||||||
if ( !ValidateDimensions() || !ValidateChunkDimensions() ) {
|
|
||||||
CloseResources();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//Read frame indices
|
|
||||||
if (!OpenFrameIndexDataset()) {
|
|
||||||
CloseResources();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void HDF5File::CloseResources () {
|
|
||||||
if (dataspace >=0 ) {
|
|
||||||
H5Sclose(dataspace);
|
|
||||||
dataspace = -1;
|
|
||||||
}
|
|
||||||
if (dataset >=0 ) {
|
|
||||||
H5Dclose(dataset);
|
|
||||||
dataset = -1;
|
|
||||||
}
|
|
||||||
if (file >=0 ) {
|
|
||||||
H5Fclose(file);
|
|
||||||
file = -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Function takes uint16_t* argument to make explicit that the caller has to handle memory allocation and deallocation.
|
|
||||||
* This is legacy caused by the structure with which the slsDetectorCalibration cluster finder is written.
|
|
||||||
* (Best practice for modern C++ would be using smart pointers.)
|
|
||||||
*
|
|
||||||
* Originially, this function took uint16_t** which may lead to memory management issues since image gets redirected
|
|
||||||
* to point to current_image, which is owned by HDF5File.
|
|
||||||
* (Good practice in classic C-style. HDF5File needs to clean up the resource at destruction.)
|
|
||||||
*
|
|
||||||
* \param image pointer to uint16_t, buffer which the image is read into. (Memory handled by caller!)
|
|
||||||
* \param offset contains iFrame at [0] and storage cell number at [1],
|
|
||||||
* depending on dimensionality of the dataset, the storage cell number may not be included.
|
|
||||||
* Note that frame number (as read from file) may (likely) differ from frame index (in the dataset)!
|
|
||||||
*/
|
|
||||||
int HDF5File::ReadImage (uint16_t* image, std::vector<hsize_t>& offset ) {
|
|
||||||
|
|
||||||
// Validate input arguments
|
|
||||||
if (!image) {
|
|
||||||
std::cerr << "Error: image buffer is null.\n";
|
|
||||||
return -99;
|
|
||||||
}
|
|
||||||
if ( offset.size() != rank-2 ) {
|
|
||||||
cprintf ( RED,"Offset vector must have size %llu. Found %lu\n", rank-2, offset.size() );
|
|
||||||
std::cerr << "Error: Wrong offset vector size\n";
|
|
||||||
CloseResources ();
|
|
||||||
return -99;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Initialize frame_offset
|
|
||||||
if (frame_offset.empty())
|
|
||||||
frame_offset.resize(rank,0);
|
|
||||||
|
|
||||||
// Check if we reached the end of file
|
|
||||||
// Compares that the offsets of frame and storage cell (Z and S) have reached the end of file
|
|
||||||
// Excludes X and Y indices (of the image dataset) from the comparison
|
|
||||||
// As it is now, this never triggers, because frame_offset[1] is never equals file_dims[1]=16
|
|
||||||
/*
|
|
||||||
if( std::equal( frame_offset.cbegin(), frame_offset.cend()-2, file_dims.cbegin() ) ) {
|
|
||||||
printf("End of file reached\n");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
if (frame_offset[0] == file_dims[0]) {
|
|
||||||
printf("End of file reached\n");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
/* //old
|
|
||||||
if (frame_offset[0] == file_dims[0]-1) {
|
|
||||||
printf("end of file\n");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Validate frame_offset index
|
|
||||||
if (frame_offset[0] >= frame_index_list.size()) {
|
|
||||||
std::cerr << "Error: frame_offset[0] = " << frame_offset[0] << " of bounds.\n";
|
|
||||||
return -99;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check if images exist at the current frame offset
|
|
||||||
if (frame_index_list[frame_offset[0]] == 0) {
|
|
||||||
cprintf (RED,"No images at this frame offset %llu\n", frame_offset[0]);
|
|
||||||
std::cerr << "Error: Framenumber 0 at this frame offset\n";
|
|
||||||
CloseResources ();
|
|
||||||
return -99;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Optional: Ensure dataset and dataspace are valid
|
|
||||||
if (dataset < 0) {
|
|
||||||
std::cerr << "Error: Invalid dataset ID.\n";
|
|
||||||
return -99;
|
|
||||||
}
|
|
||||||
if (dataspace < 0) {
|
|
||||||
std::cerr << "Error: Invalid dataspace.\n";
|
|
||||||
return -99;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Define the size of the hyperslab to read
|
|
||||||
std::vector<hsize_t> frame_size(rank, 1);
|
|
||||||
std::copy(file_dims.begin() + rank-2, file_dims.end(), frame_size.begin() + rank-2);
|
|
||||||
/*
|
|
||||||
for ( int d=0; d < rank; ++d ) {
|
|
||||||
if (d < rank-2)
|
|
||||||
frame_size[d] = 1;
|
|
||||||
if ( d >= rank-2 )
|
|
||||||
frame_size[d] = file_dims[d];
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Define memory space
|
|
||||||
hid_t memspace = H5Screate_simple (rank, frame_size.data(), nullptr);
|
|
||||||
if (memspace < 0) {
|
|
||||||
std::cerr << "Error: Failed to create memory space for HDF5 read operation\n";
|
|
||||||
CloseResources();
|
|
||||||
return -99;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create hyperslab selection
|
|
||||||
// This aligns dataspace such that we read the correct frame
|
|
||||||
if (H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, frame_offset.data(), nullptr, frame_size.data(), nullptr) < 0 ) {
|
|
||||||
cprintf (RED,"Could not create hyperslab for frame offset %s\n", vectorToString(frame_offset).c_str());
|
|
||||||
std::cerr << "Error: Hyperslab creation failed for frame offset " << vectorToString(frame_offset) << "\n";
|
|
||||||
CloseResources();
|
|
||||||
H5Sclose(memspace);
|
|
||||||
return -99;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Read dataset into image buffer (previously read to current_image owned by HDF5File)
|
|
||||||
if (H5Dread(dataset, H5T_STD_U16LE, memspace, dataspace, H5P_DEFAULT, image) < 0 ) {
|
|
||||||
cprintf (RED,"Could not read dataset for frame offset %s\n", vectorToString(frame_offset).c_str());
|
|
||||||
std::cerr << "Error: Reading of dataset failed for given start frame offset " << vectorToString(frame_offset) << "\n";
|
|
||||||
CloseResources ();
|
|
||||||
H5Sclose(memspace);
|
|
||||||
return -99;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Clean up memory space
|
|
||||||
H5Sclose(memspace);
|
|
||||||
|
|
||||||
//*image = current_image; //if uint16_t** is passed, HDF5File owns the resource image points to, which is potentially dangerous
|
|
||||||
|
|
||||||
// Return frame number
|
|
||||||
unsigned int retval = frame_index_list[frame_offset[0]];
|
|
||||||
|
|
||||||
// Pass updated frame offset value(s) via offset parameter vector
|
|
||||||
std::copy_n(frame_offset.begin(), offset.size(), offset.begin());
|
|
||||||
/*
|
|
||||||
std::transform( offset.begin(), offset.end(), offset.begin(),
|
|
||||||
[&, i = 0](size_t) mutable { return frame_offset[i++]; } );
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Increment frame offset correctly
|
|
||||||
conditionalIncrement(frame_offset, file_dims[1]);
|
|
||||||
//++frame_offset[0]; //old
|
|
||||||
|
|
||||||
return retval;
|
|
||||||
}
|
|
||||||
|
|
||||||
void HDF5File::PrintCurrentImage (uint16_t* image) {
|
|
||||||
printf("\n");
|
|
||||||
printf("Frame %llu, Image: %llu\n", frame_offset[0]-1, frame_index_list[frame_offset[0]-1]);
|
|
||||||
|
|
||||||
hsize_t size = file_dims[rank-1] * file_dims[rank-2];
|
|
||||||
for (hsize_t i = 0; i < size; ++i){
|
|
||||||
printf("%u ", image[i]);
|
|
||||||
if (!((i+1) % file_dims[rank-2] ))
|
|
||||||
printf("\n\n");
|
|
||||||
}
|
|
||||||
printf("\n\n\n\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,159 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
/************************************************
|
|
||||||
* @file HDF5Fle.h
|
|
||||||
* @short functions to open/close/read HDF5 File
|
|
||||||
* Adapted for generalization, accepts rank 3 and 4
|
|
||||||
* Supports control over storage cells
|
|
||||||
***********************************************/
|
|
||||||
/**
|
|
||||||
*@short functions to open/close/read HDF5 File
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#include <iostream>
|
|
||||||
#include <vector>
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
#include "hdf5.h"
|
|
||||||
#include "hdf5_hl.h"
|
|
||||||
|
|
||||||
|
|
||||||
//#define MAX_STR_LENGTH 1000
|
|
||||||
|
|
||||||
#define RANK 4 // Dimension of the image dataset, only for validation
|
|
||||||
#define DEFAULT_Z_DIMS 10000 // only for validation
|
|
||||||
#define DEFAULT_Y_DIMS 1024 // only for validation
|
|
||||||
#define DEFAULT_X_DIMS 512 // only for validation
|
|
||||||
//#define DEFAULT_S_DIMS 1 // Storage cells
|
|
||||||
|
|
||||||
#define DEFAULT_CHUNK_Z_DIMS 1 // only for validation
|
|
||||||
#define DEFAULT_CHUNK_Y_DIMS 1024 // only for validation
|
|
||||||
#define DEFAULT_CHUNK_X_DIMS 512 // only for validation
|
|
||||||
//#define DEFAULT_CHUNK_S_DIMS 1
|
|
||||||
|
|
||||||
|
|
||||||
#define DATA_DATASETNAME "/data/JF18T01V01/data" //Furka JF
|
|
||||||
#define INDEX_DATASETNAME "/data/JF18T01V01/frame_index"
|
|
||||||
|
|
||||||
//enum{Z,S,X,Y}; //S is the storage cell //enum is not used
|
|
||||||
|
|
||||||
class HDF5File {
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
//HDF5File () = default; //No need to declare if it is default
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Destructor
|
|
||||||
*/
|
|
||||||
//~HDF5File () = default; //Since the destructor is default (and copy and move are default too)
|
|
||||||
|
|
||||||
|
|
||||||
std::vector<hsize_t> GetDatasetDimensions ();
|
|
||||||
|
|
||||||
std::vector<hsize_t> GetChunkDimensions ();
|
|
||||||
|
|
||||||
hsize_t GetRank ();
|
|
||||||
|
|
||||||
void SetImageDataPath (std::string const& name);
|
|
||||||
|
|
||||||
void SetFrameIndexPath (std::string const& name);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Open HDF5 file and dataset,
|
|
||||||
* reads frame index dataset to array
|
|
||||||
* @param fname file name
|
|
||||||
* @param validate true if one must validate if file is
|
|
||||||
* chunked with dims [? x 128 x 512] and chunk dims [1 x 128 x 512]
|
|
||||||
* @returns 1 if successful, else 0 if fail
|
|
||||||
*/
|
|
||||||
int OpenResources (const char* const fname, bool validate);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Close Open resources
|
|
||||||
*/
|
|
||||||
void CloseResources ();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Read an image into current_image,
|
|
||||||
* increment Z-offset (frame) and (if rank==4) storage cell
|
|
||||||
* @returns frame number read from file,
|
|
||||||
*/
|
|
||||||
int ReadImage (uint16_t* image, std::vector<hsize_t>& offset);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Print current image in memory
|
|
||||||
*/
|
|
||||||
void PrintCurrentImage (uint16_t* image);
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Initialize dimensions of image dataset for each new file
|
|
||||||
*/
|
|
||||||
void InitializeDimensions ();
|
|
||||||
|
|
||||||
bool ReadChunkDimensions ();
|
|
||||||
|
|
||||||
bool ValidateDimensions ();
|
|
||||||
|
|
||||||
bool ValidateChunkDimensions ();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Open dataset containing the frame numbers
|
|
||||||
*/
|
|
||||||
bool OpenFrameIndexDataset ();
|
|
||||||
|
|
||||||
|
|
||||||
/** file name */
|
|
||||||
std::string file_name{};
|
|
||||||
/** dataset name for image data */
|
|
||||||
std::string data_datasetname = DATA_DATASETNAME;
|
|
||||||
/** dataset name for frame index data */
|
|
||||||
std::string index_datasetname = INDEX_DATASETNAME;
|
|
||||||
|
|
||||||
/** file handle */
|
|
||||||
hid_t file{};
|
|
||||||
/** dataspace handle */
|
|
||||||
hid_t dataspace{};
|
|
||||||
/** memory space handle */
|
|
||||||
//hid_t memspace; //old
|
|
||||||
/** dataset handle */
|
|
||||||
hid_t dataset{};
|
|
||||||
|
|
||||||
/** file dimensions */
|
|
||||||
std::vector<hsize_t> file_dims{};
|
|
||||||
//hsize_t file_dims[RANK]{}; //static array (dimensions are known)
|
|
||||||
|
|
||||||
/** chunk dimensions
|
|
||||||
** not necessarily required
|
|
||||||
** useful for optimization or validation */
|
|
||||||
std::vector<hsize_t> chunk_dims{};
|
|
||||||
//hsize_t chunk_dims[RANK]{};
|
|
||||||
|
|
||||||
/** Rank of the image dataset */
|
|
||||||
hsize_t rank{};
|
|
||||||
|
|
||||||
/** number of frames */
|
|
||||||
unsigned int number_of_frames{};
|
|
||||||
|
|
||||||
/** frame index list */
|
|
||||||
std::vector<hsize_t> frame_index_list{};
|
|
||||||
|
|
||||||
/** Current image
|
|
||||||
** dynamic array
|
|
||||||
** uint16_t pointer format is chosen to support use with slsDetectorCalibration cluster finder */
|
|
||||||
//uint16_t* current_image{nullptr};
|
|
||||||
//uint16_t current_chunk[DEFAULT_CHUNK_Z_DIMS][DEFAULT_CHUNK_Y_DIMS][DEFAULT_CHUNK_X_DIMS];
|
|
||||||
|
|
||||||
/** Current frame offset
|
|
||||||
** (Z-offset, S-offset, 0, 0) or (Z-offset, 0, 0), increments automatically with ReadImage */
|
|
||||||
std::vector<hsize_t> frame_offset{};
|
|
||||||
//hsize_t frame_offset[RANK]{};
|
|
||||||
|
|
||||||
};
|
|
||||||
@@ -1,422 +0,0 @@
|
|||||||
// SPDX-License-Identifier: LGPL-3.0-or-other
|
|
||||||
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
|
||||||
#ifndef JUNGFRAULGADSTRIXELSDATAQUAD_H
|
|
||||||
#define JUNGFRAULGADSTRIXELSDATAQUAD_H
|
|
||||||
#ifdef CINT
|
|
||||||
#include "sls/sls_detector_defs_CINT.h"
|
|
||||||
#else
|
|
||||||
#include "sls/sls_detector_defs.h"
|
|
||||||
#endif
|
|
||||||
#include "slsDetectorData.h"
|
|
||||||
|
|
||||||
// #define VERSION_V2
|
|
||||||
/**
|
|
||||||
@short structure for a Detector Packet or Image Header
|
|
||||||
@li frameNumber is the frame number
|
|
||||||
@li expLength is the subframe number (32 bit eiger) or real time exposure
|
|
||||||
time in 100ns (others)
|
|
||||||
@li packetNumber is the packet number
|
|
||||||
@li bunchId is the bunch id from beamline
|
|
||||||
@li timestamp is the time stamp with 10 MHz clock
|
|
||||||
@li modId is the unique module id (unique even for left, right, top, bottom)
|
|
||||||
@li xCoord is the x coordinate in the complete detector system
|
|
||||||
@li yCoord is the y coordinate in the complete detector system
|
|
||||||
@li zCoord is the z coordinate in the complete detector system
|
|
||||||
@li debug is for debugging purposes
|
|
||||||
@li roundRNumber is the round robin set number
|
|
||||||
@li detType is the detector type see :: detectorType
|
|
||||||
@li version is the version number of this structure format
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <algorithm>
|
|
||||||
#include <numeric>
|
|
||||||
#include <tuple>
|
|
||||||
|
|
||||||
namespace strixelQuad {
|
|
||||||
constexpr int nc_rawimg = 1024; // for full images //256;
|
|
||||||
constexpr int nc_quad = 512;
|
|
||||||
constexpr int nr_rawimg = 512;
|
|
||||||
constexpr int nr_chip = 256;
|
|
||||||
constexpr int gr = 9;
|
|
||||||
|
|
||||||
//shift due to extra pixels
|
|
||||||
constexpr int shift_x = 2; //left
|
|
||||||
|
|
||||||
constexpr int nc_strixel = ( nc_quad - shift_x - 2*gr ) / 3; //164
|
|
||||||
constexpr int nr_strixel = ( nr_chip - 1 - gr ) * 3; //one half (-1 because double sided pixel) //738
|
|
||||||
constexpr int nr_center = 12; //double sided pixels to be skipped
|
|
||||||
|
|
||||||
// boundaries in ASIC coordinates (pixels at both bounds are included)
|
|
||||||
constexpr int xstart = 256 + gr; // 265
|
|
||||||
constexpr int xend = 255 + nc_quad - gr; // 758
|
|
||||||
constexpr int bottom_ystart = gr; // 9
|
|
||||||
constexpr int bottom_yend = nr_chip - 2; // 254
|
|
||||||
constexpr int top_ystart = nr_chip + 1; // 257
|
|
||||||
constexpr int top_yend = nr_chip*2 - gr - 1; // 502
|
|
||||||
|
|
||||||
// x shift because of 2-pixel strixels on one side
|
|
||||||
constexpr int shift = 2;
|
|
||||||
|
|
||||||
} // namespace strixelQuad
|
|
||||||
|
|
||||||
//to account for module rotation
|
|
||||||
enum rotation {
|
|
||||||
NORMAL = 0,
|
|
||||||
INVERSE = 1
|
|
||||||
};
|
|
||||||
|
|
||||||
const int rota = NORMAL;
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
uint64_t bunchNumber; /**< is the frame number */
|
|
||||||
uint64_t pre; /**< something */
|
|
||||||
|
|
||||||
} jf_header; // Aldo's header
|
|
||||||
|
|
||||||
using namespace strixelQuad;
|
|
||||||
|
|
||||||
class jungfrauLGADStrixelsDataQuad : public slsDetectorData<uint16_t> {
|
|
||||||
|
|
||||||
private:
|
|
||||||
int iframe;
|
|
||||||
int x0, y0, x1, y1, shifty;
|
|
||||||
struct {
|
|
||||||
uint16_t xmin;
|
|
||||||
uint16_t xmax;
|
|
||||||
uint16_t ymin;
|
|
||||||
uint16_t ymax;
|
|
||||||
int nc;
|
|
||||||
} globalROI;
|
|
||||||
|
|
||||||
//to account for the inverted routing of the two different quad halfs
|
|
||||||
enum location {
|
|
||||||
BOTTOM = 0,
|
|
||||||
TOP = 1
|
|
||||||
};
|
|
||||||
|
|
||||||
int multiplicator = 3;
|
|
||||||
std::vector<int> mods{ 0, 1, 2 };
|
|
||||||
|
|
||||||
void reverseVector( std::vector<int>& v ) {
|
|
||||||
std::reverse( v.begin(), v.end() );
|
|
||||||
std::cout << "mods reversed ";
|
|
||||||
for ( auto i : v )
|
|
||||||
std::cout << i << " ";
|
|
||||||
std::cout << '\n';
|
|
||||||
}
|
|
||||||
|
|
||||||
void setMappingShifts( const int rot, const int half ) {
|
|
||||||
|
|
||||||
x0 = xstart;
|
|
||||||
x1 = xend;
|
|
||||||
|
|
||||||
if (rot==NORMAL) {
|
|
||||||
x0 += shift;
|
|
||||||
} else {
|
|
||||||
x1-=shift;
|
|
||||||
reverseVector(mods);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (half==BOTTOM) {
|
|
||||||
y0 = bottom_ystart;
|
|
||||||
y1 = bottom_yend;
|
|
||||||
shifty = 0;
|
|
||||||
} else {
|
|
||||||
y0 = top_ystart;
|
|
||||||
y1 = top_yend;
|
|
||||||
reverseVector(mods);
|
|
||||||
shifty = nr_strixel + nr_center; //double-sided pixels in the center have to be jumped
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void remap( int xmin=0, int xmax=0, int ymin=0, int ymax=0 ) {
|
|
||||||
|
|
||||||
int ix, iy = 0;
|
|
||||||
// remapping loop
|
|
||||||
for (int ipy = y0; ipy <= y1; ipy++) {
|
|
||||||
for (int ipx = x0; ipx <= x1; ipx++) {
|
|
||||||
|
|
||||||
ix = int((ipx - x0) / multiplicator);
|
|
||||||
for (int m = 0; m < multiplicator; ++m) {
|
|
||||||
if ((ipx - x0) % multiplicator == m)
|
|
||||||
iy = (ipy - y0) * multiplicator + mods[m] + shifty;
|
|
||||||
}
|
|
||||||
|
|
||||||
// if (iy< 40) cout << iy << " " << ix <<endl;
|
|
||||||
if (xmin < xmax && ymin < ymax) {
|
|
||||||
if ( ipx>=xmin && ipx<=xmax && ipy>=ymin && ipy <=ymax )
|
|
||||||
dataMap[iy][ix] =
|
|
||||||
sizeof(header) + (globalROI.nc * (ipy - globalROI.ymin) + (ipx - globalROI.xmin)) * 2;
|
|
||||||
} else {
|
|
||||||
dataMap[iy][ix] = sizeof(header) + (nc_rawimg * ipy + ipx) * 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void remapQuad(const int rot) {
|
|
||||||
|
|
||||||
setMappingShifts( rot, BOTTOM );
|
|
||||||
remap();
|
|
||||||
setMappingShifts( rot, TOP );
|
|
||||||
remap();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
std::tuple< uint16_t, uint16_t, uint16_t, uint16_t > adjustROItoLimits(uint16_t xmin,
|
|
||||||
uint16_t xmax,
|
|
||||||
uint16_t ymin,
|
|
||||||
uint16_t ymax,
|
|
||||||
uint16_t lim_roi_xmin,
|
|
||||||
uint16_t lim_roi_xmax,
|
|
||||||
uint16_t lim_roi_ymin,
|
|
||||||
uint16_t lim_roi_ymax) {
|
|
||||||
uint16_t xmin_roi, xmax_roi, ymin_roi, ymax_roi;
|
|
||||||
if ( xmin < lim_roi_xmin)
|
|
||||||
xmin_roi = lim_roi_xmin;
|
|
||||||
else
|
|
||||||
xmin_roi = xmin;
|
|
||||||
if ( xmax > lim_roi_xmax )
|
|
||||||
xmax_roi = lim_roi_xmax;
|
|
||||||
else
|
|
||||||
xmax_roi = xmax;
|
|
||||||
if ( ymin < lim_roi_ymin )
|
|
||||||
ymin_roi = lim_roi_ymin;
|
|
||||||
else
|
|
||||||
ymin_roi = ymin;
|
|
||||||
if ( ymax > lim_roi_ymax )
|
|
||||||
ymax_roi = lim_roi_ymax;
|
|
||||||
else
|
|
||||||
ymax_roi = ymax;
|
|
||||||
return std::make_tuple(xmin_roi, xmax_roi, ymin_roi, ymax_roi);
|
|
||||||
}
|
|
||||||
|
|
||||||
std::vector < std::tuple< int, uint16_t, uint16_t, uint16_t, uint16_t > > mapSubROIs(uint16_t xmin,
|
|
||||||
uint16_t xmax,
|
|
||||||
uint16_t ymin,
|
|
||||||
uint16_t ymax) {
|
|
||||||
bool bottom = false;
|
|
||||||
bool top = false;
|
|
||||||
|
|
||||||
for ( int x=xmin; x!=xmax+1; ++x ) {
|
|
||||||
for ( int y=ymin; y!=ymax; ++y ) {
|
|
||||||
if ( xstart<=x && x<=xend && bottom_ystart<=y && y<=bottom_yend )
|
|
||||||
bottom = true;
|
|
||||||
if ( xstart<=x && x<=xend && top_ystart<=y && y<=top_yend )
|
|
||||||
top = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
uint16_t xmin_roi{}, xmax_roi{}, ymin_roi{}, ymax_roi{};
|
|
||||||
std::vector < std::tuple< int, uint16_t, uint16_t, uint16_t, uint16_t > > rois{};
|
|
||||||
|
|
||||||
if (bottom) {
|
|
||||||
std::tie( xmin_roi, xmax_roi, ymin_roi, ymax_roi ) =
|
|
||||||
adjustROItoLimits( xmin, xmax, ymin, ymax,
|
|
||||||
xstart, xend, bottom_ystart, bottom_yend );
|
|
||||||
rois.push_back( std::make_tuple( BOTTOM, xmin_roi, xmax_roi, ymin_roi, ymax_roi ) );
|
|
||||||
}
|
|
||||||
if (top) {
|
|
||||||
std::tie( xmin_roi, xmax_roi, ymin_roi, ymax_roi ) =
|
|
||||||
adjustROItoLimits( xmin, xmax, ymin, ymax,
|
|
||||||
xstart, xend, top_ystart, top_yend );
|
|
||||||
rois.push_back( std::make_tuple( TOP, xmin_roi, xmax_roi, ymin_roi, ymax_roi ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
return rois;
|
|
||||||
}
|
|
||||||
|
|
||||||
void remapROI(std::tuple< int, uint16_t, uint16_t, uint16_t, uint16_t > roi, const int rot ) {
|
|
||||||
|
|
||||||
int half, xmin, xmax, ymin, ymax;
|
|
||||||
std::tie( half, xmin, xmax, ymin, ymax ) = roi;
|
|
||||||
|
|
||||||
setMappingShifts(rot, half);
|
|
||||||
|
|
||||||
std::cout << "remapping roi: "
|
|
||||||
<< ", x0: " << x0 << ", x1: " << x1 << ", y0: " << y0
|
|
||||||
<< ", y1: " << y1 << std::endl;
|
|
||||||
std::cout << "Adjusted roi: [" << xmin << ", " << xmax << ", " << ymin << ", " << ymax << "]" << std::endl;
|
|
||||||
|
|
||||||
remap( xmin, xmax, ymin, ymax );
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
using header = sls::defs::sls_receiver_header;
|
|
||||||
|
|
||||||
jungfrauLGADStrixelsDataQuad(uint16_t xmin = 0, uint16_t xmax = 0,
|
|
||||||
uint16_t ymin = 0, uint16_t ymax = 0)
|
|
||||||
: slsDetectorData<uint16_t>(
|
|
||||||
nc_strixel,
|
|
||||||
nr_strixel * 2 + nr_center,
|
|
||||||
nc_strixel * ( nr_strixel * 2 + nr_center ) * 2 + sizeof(header)) {
|
|
||||||
std::cout << "Jungfrau strixels quad with full module data "
|
|
||||||
<< std::endl;
|
|
||||||
|
|
||||||
// Fill all strixels with dummy values
|
|
||||||
for (int ix = 0; ix != nc_strixel; ++ix) {
|
|
||||||
for (int iy = 0; iy != nr_strixel * 2 + nr_center; ++iy) {
|
|
||||||
dataMap[iy][ix] = sizeof(header);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
globalROI.xmin = xmin;
|
|
||||||
globalROI.xmax = xmax;
|
|
||||||
globalROI.ymin = ymin;
|
|
||||||
globalROI.ymax = ymax;
|
|
||||||
|
|
||||||
std::cout << "sizeofheader = " << sizeof(header) << std::endl;
|
|
||||||
std::cout << "Jungfrau strixels quad with full module data "
|
|
||||||
<< std::endl;
|
|
||||||
|
|
||||||
if (xmin < xmax && ymin < ymax) {
|
|
||||||
|
|
||||||
// get ROI raw image number of columns
|
|
||||||
globalROI.nc = xmax - xmin + 1;
|
|
||||||
std::cout << "nc_roi = " << globalROI.nc << std::endl;
|
|
||||||
|
|
||||||
dataSize =
|
|
||||||
(xmax - xmin + 1) * (ymax - ymin + 1) * 2 + sizeof(header);
|
|
||||||
std::cout << "datasize " << dataSize << std::endl;
|
|
||||||
|
|
||||||
auto rois = mapSubROIs(xmin, xmax, ymin, ymax);
|
|
||||||
//function to fill vector of rois from globalROI
|
|
||||||
|
|
||||||
for ( auto roi : rois )
|
|
||||||
remapROI(roi, rota);
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
remapQuad( rota );
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
iframe = 0;
|
|
||||||
std::cout << "data struct created" << std::endl;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
Returns the value of the selected channel for the given dataset as
|
|
||||||
double. \param data pointer to the dataset (including headers etc) \param
|
|
||||||
ix pixel number in the x direction \param iy pixel number in the y
|
|
||||||
direction \returns data for the selected channel, with inversion if
|
|
||||||
required as double
|
|
||||||
|
|
||||||
*/
|
|
||||||
virtual double getValue(char *data, int ix, int iy = 0) {
|
|
||||||
|
|
||||||
uint16_t val = getChannel(data, ix, iy) & 0x3fff;
|
|
||||||
return val;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
|
|
||||||
Returns the frame number for the given dataset. Purely virtual func.
|
|
||||||
\param buff pointer to the dataset
|
|
||||||
\returns frame number
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
int getFrameNumber(char *buff) {
|
|
||||||
#ifdef ALDO // VH
|
|
||||||
return ((jf_header *)buff)->bunchNumber; // VH
|
|
||||||
#endif // VH
|
|
||||||
return ((header *)buff)->detHeader.frameNumber;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
|
|
||||||
Returns the packet number for the given dataset. purely virtual func
|
|
||||||
\param buff pointer to the dataset
|
|
||||||
\returns packet number number
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*/
|
|
||||||
int getPacketNumber(char *buff) {
|
|
||||||
#ifdef ALDO // VH
|
|
||||||
// uint32_t fakePacketNumber = 1000;
|
|
||||||
// return fakePacketNumber; //VH //TODO: Keep in mind in case of bugs!
|
|
||||||
// //This is definitely bad!
|
|
||||||
return 1000;
|
|
||||||
#endif // VH
|
|
||||||
return ((header *)buff)->detHeader.packetNumber;
|
|
||||||
};
|
|
||||||
|
|
||||||
char *readNextFrame(std::ifstream &filebin) {
|
|
||||||
int ff = -1, np = -1;
|
|
||||||
return readNextFrame(filebin, ff, np);
|
|
||||||
};
|
|
||||||
|
|
||||||
char *readNextFrame(std::ifstream &filebin, int &ff) {
|
|
||||||
int np = -1;
|
|
||||||
return readNextFrame(filebin, ff, np);
|
|
||||||
};
|
|
||||||
|
|
||||||
char *readNextFrame(std::ifstream &filebin, int &ff, int &np) {
|
|
||||||
char *data = new char[dataSize];
|
|
||||||
char *d = readNextFrame(filebin, ff, np, data);
|
|
||||||
if (d == NULL) {
|
|
||||||
delete[] data;
|
|
||||||
data = NULL;
|
|
||||||
}
|
|
||||||
return data;
|
|
||||||
};
|
|
||||||
|
|
||||||
char *readNextFrame(std::ifstream &filebin, int &ff, int &np, char *data) {
|
|
||||||
//char *retval = 0;
|
|
||||||
//int nd;
|
|
||||||
//int fnum = -1;
|
|
||||||
np = 0;
|
|
||||||
//int pn;
|
|
||||||
|
|
||||||
//std::cout << dataSize << std::endl;
|
|
||||||
//if (ff >= 0) {
|
|
||||||
// fnum = ff; }
|
|
||||||
|
|
||||||
if (filebin.is_open()) {
|
|
||||||
if (filebin.read(data, dataSize)) {
|
|
||||||
std::cout << "*";
|
|
||||||
ff = getFrameNumber(data);
|
|
||||||
np = getPacketNumber(data);
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
std::cout << "#";
|
|
||||||
} else {
|
|
||||||
std::cout << "File not open" << std::endl;
|
|
||||||
}
|
|
||||||
return NULL;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Loops over a memory slot until a complete frame is found (i.e. all */
|
|
||||||
/* packets 0 to nPackets, same frame number). purely virtual func \param
|
|
||||||
*/
|
|
||||||
/* data pointer to the memory to be analyzed \param ndata reference to
|
|
||||||
* the */
|
|
||||||
/* amount of data found for the frame, in case the frame is incomplete at
|
|
||||||
*/
|
|
||||||
/* the end of the memory slot \param dsize size of the memory slot to be
|
|
||||||
*/
|
|
||||||
/* analyzed \returns pointer to the beginning of the last good frame
|
|
||||||
* (might */
|
|
||||||
/* be incomplete if ndata smaller than dataSize), or NULL if no frame is
|
|
||||||
*/
|
|
||||||
/* found */
|
|
||||||
|
|
||||||
/* *\/ */
|
|
||||||
virtual char *findNextFrame(char *data, int &ndata, int dsize) {
|
|
||||||
if (dsize < dataSize)
|
|
||||||
ndata = dsize;
|
|
||||||
else
|
|
||||||
ndata = dataSize;
|
|
||||||
return data;
|
|
||||||
};
|
|
||||||
|
|
||||||
// int getPacketNumber(int x, int y) {return dataMap[y][x]/packetSize;};
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,432 +0,0 @@
|
|||||||
// SPDX-License-Identifier: LGPL-3.0-or-other
|
|
||||||
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
|
||||||
#ifndef JUNGFRAULGADSTRIXELSDATAQUADH5_H
|
|
||||||
#define JUNGFRAULGADSTRIXELSDATAQUADH5_H
|
|
||||||
#ifdef CINT
|
|
||||||
#include "sls/sls_detector_defs_CINT.h"
|
|
||||||
#else
|
|
||||||
#include "sls/sls_detector_defs.h"
|
|
||||||
#endif
|
|
||||||
#include "slsDetectorData.h"
|
|
||||||
|
|
||||||
// This needs to be linked correctly
|
|
||||||
#include "HDF5File.cpp"
|
|
||||||
#include "HDF5File.h" //this includes hdf5.h and hdf5_hl.h
|
|
||||||
|
|
||||||
// #define VERSION_V2
|
|
||||||
/**
|
|
||||||
@short structure for a Detector Packet or Image Header
|
|
||||||
@li frameNumber is the frame number
|
|
||||||
@li expLength is the subframe number (32 bit eiger) or real time exposure
|
|
||||||
time in 100ns (others)
|
|
||||||
@li packetNumber is the packet number
|
|
||||||
@li bunchId is the bunch id from beamline
|
|
||||||
@li timestamp is the time stamp with 10 MHz clock
|
|
||||||
@li modId is the unique module id (unique even for left, right, top, bottom)
|
|
||||||
@li xCoord is the x coordinate in the complete detector system
|
|
||||||
@li yCoord is the y coordinate in the complete detector system
|
|
||||||
@li zCoord is the z coordinate in the complete detector system
|
|
||||||
@li debug is for debugging purposes
|
|
||||||
@li roundRNumber is the round robin set number
|
|
||||||
@li detType is the detector type see :: detectorType
|
|
||||||
@li version is the version number of this structure format
|
|
||||||
*/
|
|
||||||
|
|
||||||
// #include <algorithm>
|
|
||||||
#include <numeric>
|
|
||||||
#include <tuple>
|
|
||||||
|
|
||||||
namespace strixelQuad {
|
|
||||||
constexpr int nc_rawimg = 1024; // for full images //256;
|
|
||||||
constexpr int nc_quad = 512;
|
|
||||||
constexpr int nr_rawimg = 512;
|
|
||||||
constexpr int nr_chip = 256;
|
|
||||||
constexpr int gr = 9;
|
|
||||||
|
|
||||||
// shift due to extra pixels
|
|
||||||
constexpr int shift_x = 2; // left
|
|
||||||
|
|
||||||
constexpr int nc_strixel = (nc_quad - shift_x - 2 * gr) / 3; // 164
|
|
||||||
constexpr int nr_strixel =
|
|
||||||
(nr_chip - 1 - gr) * 3; // one half (-1 because double sided pixel) //738
|
|
||||||
constexpr int nr_center = 12; // double sided pixels to be skipped
|
|
||||||
|
|
||||||
// boundaries in ASIC coordinates (pixels at both bounds are included)
|
|
||||||
constexpr int xstart = 256 + gr; // 265
|
|
||||||
constexpr int xend = 255 + nc_quad - gr; // 758
|
|
||||||
constexpr int bottom_ystart = gr; // 9
|
|
||||||
constexpr int bottom_yend = nr_chip - 2; // 254
|
|
||||||
constexpr int top_ystart = nr_chip + 1; // 257
|
|
||||||
constexpr int top_yend = nr_chip * 2 - gr - 1; // 502
|
|
||||||
|
|
||||||
// x shift because of 2-pixel strixels on one side
|
|
||||||
constexpr int shift = 2;
|
|
||||||
|
|
||||||
} // namespace strixelQuad
|
|
||||||
|
|
||||||
// to account for module rotation
|
|
||||||
enum rotation { NORMAL = 0, INVERSE = 1 };
|
|
||||||
|
|
||||||
const int rota = NORMAL;
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
uint64_t bunchNumber; /**< is the frame number */
|
|
||||||
uint64_t pre; /**< something */
|
|
||||||
|
|
||||||
} jf_header; // Aldo's header
|
|
||||||
|
|
||||||
using namespace strixelQuad;
|
|
||||||
|
|
||||||
class jungfrauLGADStrixelsDataQuadH5 : public slsDetectorData<uint16_t> {
|
|
||||||
|
|
||||||
private:
|
|
||||||
int iframe;
|
|
||||||
int x0, y0, x1, y1, shifty;
|
|
||||||
struct {
|
|
||||||
uint16_t xmin;
|
|
||||||
uint16_t xmax;
|
|
||||||
uint16_t ymin;
|
|
||||||
uint16_t ymax;
|
|
||||||
int nc;
|
|
||||||
} globalROI;
|
|
||||||
|
|
||||||
// to account for the inverted routing of the two different quad halfs
|
|
||||||
enum location { BOTTOM = 0, TOP = 1 };
|
|
||||||
|
|
||||||
int multiplicator = 3;
|
|
||||||
std::vector<int> mods{0, 1, 2};
|
|
||||||
|
|
||||||
void reverseVector(std::vector<int> &v) {
|
|
||||||
std::reverse(v.begin(), v.end());
|
|
||||||
std::cout << "mods reversed ";
|
|
||||||
for (auto i : v)
|
|
||||||
std::cout << i << " ";
|
|
||||||
std::cout << '\n';
|
|
||||||
}
|
|
||||||
|
|
||||||
void setMappingShifts(const int rot, const int half) {
|
|
||||||
|
|
||||||
x0 = xstart;
|
|
||||||
x1 = xend;
|
|
||||||
|
|
||||||
if (rot == NORMAL) {
|
|
||||||
x0 += shift;
|
|
||||||
} else {
|
|
||||||
x1 -= shift;
|
|
||||||
reverseVector(mods);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (half == BOTTOM) {
|
|
||||||
y0 = bottom_ystart;
|
|
||||||
y1 = bottom_yend;
|
|
||||||
shifty = 0;
|
|
||||||
} else {
|
|
||||||
y0 = top_ystart;
|
|
||||||
y1 = top_yend;
|
|
||||||
reverseVector(mods);
|
|
||||||
shifty = nr_strixel + nr_center; // double-sided pixels in the
|
|
||||||
// center have to be jumped
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void remap(int xmin = 0, int xmax = 0, int ymin = 0, int ymax = 0) {
|
|
||||||
|
|
||||||
int ix, iy = 0;
|
|
||||||
// remapping loop
|
|
||||||
for (int ipy = y0; ipy <= y1; ++ipy) {
|
|
||||||
for (int ipx = x0; ipx <= x1; ++ipx) {
|
|
||||||
|
|
||||||
ix = int((ipx - x0) / multiplicator);
|
|
||||||
for (int m = 0; m < multiplicator; ++m) {
|
|
||||||
if ((ipx - x0) % multiplicator == m)
|
|
||||||
iy = (ipy - y0) * multiplicator + mods[m] + shifty;
|
|
||||||
}
|
|
||||||
|
|
||||||
// if (iy< 40) cout << iy << " " << ix <<endl;
|
|
||||||
if (xmin < xmax && ymin < ymax) { // if ROI
|
|
||||||
if (ipx >= xmin && ipx <= xmax && ipy >= ymin &&
|
|
||||||
ipy <= ymax)
|
|
||||||
dataMap[iy][ix] =
|
|
||||||
(globalROI.nc * (ipy - globalROI.ymin) +
|
|
||||||
(ipx - globalROI.xmin)) *
|
|
||||||
2;
|
|
||||||
} else { // if full Quad
|
|
||||||
dataMap[iy][ix] = (nc_rawimg * ipy + ipx) * 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void remapQuad(const int rot) {
|
|
||||||
|
|
||||||
setMappingShifts(rot, BOTTOM);
|
|
||||||
remap();
|
|
||||||
setMappingShifts(rot, TOP);
|
|
||||||
remap();
|
|
||||||
}
|
|
||||||
|
|
||||||
std::tuple<uint16_t, uint16_t, uint16_t, uint16_t>
|
|
||||||
adjustROItoLimits(uint16_t xmin, uint16_t xmax, uint16_t ymin,
|
|
||||||
uint16_t ymax, uint16_t lim_roi_xmin,
|
|
||||||
uint16_t lim_roi_xmax, uint16_t lim_roi_ymin,
|
|
||||||
uint16_t lim_roi_ymax) {
|
|
||||||
uint16_t xmin_roi, xmax_roi, ymin_roi, ymax_roi;
|
|
||||||
if (xmin < lim_roi_xmin)
|
|
||||||
xmin_roi = lim_roi_xmin;
|
|
||||||
else
|
|
||||||
xmin_roi = xmin;
|
|
||||||
if (xmax > lim_roi_xmax)
|
|
||||||
xmax_roi = lim_roi_xmax;
|
|
||||||
else
|
|
||||||
xmax_roi = xmax;
|
|
||||||
if (ymin < lim_roi_ymin)
|
|
||||||
ymin_roi = lim_roi_ymin;
|
|
||||||
else
|
|
||||||
ymin_roi = ymin;
|
|
||||||
if (ymax > lim_roi_ymax)
|
|
||||||
ymax_roi = lim_roi_ymax;
|
|
||||||
else
|
|
||||||
ymax_roi = ymax;
|
|
||||||
return std::make_tuple(xmin_roi, xmax_roi, ymin_roi, ymax_roi);
|
|
||||||
}
|
|
||||||
|
|
||||||
// The strixel Quad has a mirrored symmetry from the center axis
|
|
||||||
// So we need to distinguish between bottom and top half for remapping
|
|
||||||
std::vector<std::tuple<int, uint16_t, uint16_t, uint16_t, uint16_t>>
|
|
||||||
mapSubROIs(uint16_t xmin, uint16_t xmax, uint16_t ymin, uint16_t ymax) {
|
|
||||||
bool bottom = false;
|
|
||||||
bool top = false;
|
|
||||||
|
|
||||||
for (int x = xmin; x != xmax + 1; ++x) {
|
|
||||||
for (int y = ymin; y != ymax; ++y) {
|
|
||||||
if (xstart <= x && x <= xend && bottom_ystart <= y &&
|
|
||||||
y <= bottom_yend)
|
|
||||||
bottom = true;
|
|
||||||
if (xstart <= x && x <= xend && top_ystart <= y &&
|
|
||||||
y <= top_yend)
|
|
||||||
top = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
uint16_t xmin_roi{}, xmax_roi{}, ymin_roi{}, ymax_roi{};
|
|
||||||
std::vector<std::tuple<int, uint16_t, uint16_t, uint16_t, uint16_t>>
|
|
||||||
rois{};
|
|
||||||
|
|
||||||
if (bottom) {
|
|
||||||
std::tie(xmin_roi, xmax_roi, ymin_roi, ymax_roi) =
|
|
||||||
adjustROItoLimits(xmin, xmax, ymin, ymax, xstart, xend,
|
|
||||||
bottom_ystart, bottom_yend);
|
|
||||||
rois.push_back(std::make_tuple(BOTTOM, xmin_roi, xmax_roi, ymin_roi,
|
|
||||||
ymax_roi));
|
|
||||||
}
|
|
||||||
if (top) {
|
|
||||||
std::tie(xmin_roi, xmax_roi, ymin_roi, ymax_roi) =
|
|
||||||
adjustROItoLimits(xmin, xmax, ymin, ymax, xstart, xend,
|
|
||||||
top_ystart, top_yend);
|
|
||||||
rois.push_back(
|
|
||||||
std::make_tuple(TOP, xmin_roi, xmax_roi, ymin_roi, ymax_roi));
|
|
||||||
}
|
|
||||||
|
|
||||||
return rois;
|
|
||||||
}
|
|
||||||
|
|
||||||
void remapROI(std::tuple<int, uint16_t, uint16_t, uint16_t, uint16_t> roi,
|
|
||||||
const int rot) {
|
|
||||||
|
|
||||||
int half, xmin, xmax, ymin, ymax;
|
|
||||||
std::tie(half, xmin, xmax, ymin, ymax) = roi;
|
|
||||||
|
|
||||||
setMappingShifts(rot, half);
|
|
||||||
|
|
||||||
std::cout << "remapping roi: "
|
|
||||||
<< ", x0: " << x0 << ", x1: " << x1 << ", y0: " << y0
|
|
||||||
<< ", y1: " << y1 << std::endl;
|
|
||||||
std::cout << "Adjusted roi: [" << xmin << ", " << xmax << ", " << ymin
|
|
||||||
<< ", " << ymax << "]" << std::endl;
|
|
||||||
|
|
||||||
remap(xmin, xmax, ymin, ymax);
|
|
||||||
}
|
|
||||||
|
|
||||||
// The following functions are pure virtual in the base class. But I don't
|
|
||||||
// want them to be accessible here! Implement the functions as private (to
|
|
||||||
// satisfy the linker) int getFrameNumber(char* buff){return 0;} //This is
|
|
||||||
// actually needed because the cluster finder writes the framenumber
|
|
||||||
int getPacketNumber(char *buff) { return 0; } // Not provided
|
|
||||||
|
|
||||||
// Mark overwritten functions as override final
|
|
||||||
char *readNextFrame(std::ifstream &filebin) override final {
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
|
||||||
using header = sls::defs::sls_receiver_header;
|
|
||||||
|
|
||||||
jungfrauLGADStrixelsDataQuadH5(uint16_t xmin = 0, uint16_t xmax = 0,
|
|
||||||
uint16_t ymin = 0, uint16_t ymax = 0)
|
|
||||||
: slsDetectorData<uint16_t>(
|
|
||||||
// nc_strixel,
|
|
||||||
// nr_strixel * 2 + nr_center,
|
|
||||||
// nc_strixel * ( nr_strixel * 2 + nr_center ) * 2
|
|
||||||
512 / 2, 1024 * 2, 512 * 1024 * 2) {
|
|
||||||
std::cout << "Jungfrau strixels quad with full module data "
|
|
||||||
<< std::endl;
|
|
||||||
|
|
||||||
// Fill all strixels with dummy values
|
|
||||||
// for (int ix = 0; ix != nc_strixel; ++ix) {
|
|
||||||
// for (int iy = 0; iy != nr_strixel * 2 + nr_center; ++iy) {
|
|
||||||
for (int ix = 0; ix != 512 / 2; ++ix) {
|
|
||||||
for (int iy = 0; iy != 1024 * 2; ++iy) {
|
|
||||||
// Set everything to dummy value
|
|
||||||
dataMap[iy][ix] = sizeof(header);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
globalROI.xmin = xmin;
|
|
||||||
globalROI.xmax = xmax;
|
|
||||||
globalROI.ymin = ymin;
|
|
||||||
globalROI.ymax = ymax;
|
|
||||||
|
|
||||||
// std::cout << "sizeofheader = " << sizeof(header) << std::endl;
|
|
||||||
std::cout << "Jungfrau strixels quad with full module data "
|
|
||||||
<< std::endl;
|
|
||||||
|
|
||||||
if (xmin < xmax && ymin < ymax) {
|
|
||||||
|
|
||||||
// get ROI raw image number of columns
|
|
||||||
globalROI.nc = xmax - xmin + 1;
|
|
||||||
std::cout << "nc_roi = " << globalROI.nc << std::endl;
|
|
||||||
|
|
||||||
dataSize = (xmax - xmin + 1) * (ymax - ymin + 1) * 2;
|
|
||||||
std::cout << "datasize " << dataSize << std::endl;
|
|
||||||
|
|
||||||
auto rois = mapSubROIs(xmin, xmax, ymin, ymax);
|
|
||||||
// function to fill vector of rois from globalROI
|
|
||||||
|
|
||||||
for (auto roi : rois)
|
|
||||||
remapROI(roi, rota);
|
|
||||||
|
|
||||||
} else {
|
|
||||||
remapQuad(rota);
|
|
||||||
}
|
|
||||||
|
|
||||||
iframe = 0;
|
|
||||||
std::cout << "data struct created" << std::endl;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
Returns the value of the selected channel for the given dataset as
|
|
||||||
double. \param data pointer to the dataset (including headers etc) \param
|
|
||||||
ix pixel number in the x direction \param iy pixel number in the y
|
|
||||||
direction \returns data for the selected channel, with inversion if
|
|
||||||
required as double
|
|
||||||
|
|
||||||
*/
|
|
||||||
virtual double getValue(char *data, int ix, int iy = 0) {
|
|
||||||
|
|
||||||
uint16_t val = getChannel(data, ix, iy) & 0x3fff;
|
|
||||||
return val;
|
|
||||||
};
|
|
||||||
|
|
||||||
char *readNextFrame(HDF5File &hfile) {
|
|
||||||
int fn = 0;
|
|
||||||
std::vector<hsize_t> h5offset(1);
|
|
||||||
return readNextFrame(hfile, fn, h5offset);
|
|
||||||
};
|
|
||||||
|
|
||||||
char *readNextFrame(HDF5File &hfile, int &fn) {
|
|
||||||
std::vector<hsize_t> h5offset(1);
|
|
||||||
return readNextFrame(hfile, fn, h5offset);
|
|
||||||
};
|
|
||||||
|
|
||||||
char *readNextFrame(HDF5File &hfile, int &fn,
|
|
||||||
std::vector<hsize_t> &h5offset) {
|
|
||||||
|
|
||||||
// Ensure dataSize is a valid size for allocation
|
|
||||||
if (dataSize <= 0) {
|
|
||||||
// Handle error case appropriately, e.g., log an error message
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
char *data = new char[dataSize];
|
|
||||||
char *readResult = readNextFrame(hfile, fn, h5offset, data);
|
|
||||||
|
|
||||||
// Check if reading failed
|
|
||||||
if (readResult == nullptr) {
|
|
||||||
delete[] data; // Free allocated memory
|
|
||||||
data = nullptr; // Set to nullptr to avoid dangling pointer
|
|
||||||
}
|
|
||||||
|
|
||||||
return data; // returning data is equivalent to returning
|
|
||||||
// reinterpret_cast<char*>(data_ptr) as they both point to
|
|
||||||
// the same memory
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This is the most recent function. This is used in the cluster finder!
|
|
||||||
* The overloads are legacy!
|
|
||||||
* Note that caller has to allocate and deallocate memory for data!
|
|
||||||
* \param hfile object of type HDF5File (reader class)
|
|
||||||
* \param framenumber frame number as read from the HDF5 file
|
|
||||||
* \param h5offset vector defining offset parameters for HDF5 hyperslab
|
|
||||||
* selection (dimensions Z and S), incremented automatially
|
|
||||||
* \param data pointer to image buffer (converted to hold uint16_t by
|
|
||||||
* definition of HDF5File)
|
|
||||||
*/
|
|
||||||
char *readNextFrame(HDF5File &hfile, int &framenumber,
|
|
||||||
std::vector<hsize_t> &h5offset, char *data) {
|
|
||||||
|
|
||||||
if (framenumber >= 0) {
|
|
||||||
if (h5offset[0] % 10 == 0)
|
|
||||||
std::cout << "*";
|
|
||||||
|
|
||||||
// Storing the reinterpret_cast in the variable data_ptr ensures
|
|
||||||
// that I can pass it to a function that expects at uint16_t*
|
|
||||||
uint16_t *data_ptr = reinterpret_cast<uint16_t *>(
|
|
||||||
data); // now data_ptr points where data points (thus modifies
|
|
||||||
// the same memory)
|
|
||||||
|
|
||||||
framenumber = hfile.ReadImage(data_ptr, h5offset);
|
|
||||||
iframe = h5offset[0]; // iframe is a class member!
|
|
||||||
return data; // return reinterpret_cast<char*>(data_ptr); //
|
|
||||||
// Equivalent
|
|
||||||
}
|
|
||||||
|
|
||||||
std::cout << "#";
|
|
||||||
return nullptr;
|
|
||||||
};
|
|
||||||
|
|
||||||
int getFrameNumber(char *buff) {
|
|
||||||
return iframe;
|
|
||||||
} // Provided via public method readNextFrame
|
|
||||||
// It is debatable if one might not instead want to provide the "real" frame
|
|
||||||
// number as read from the file here For now, this is the frame offset
|
|
||||||
// counter (that always has to start at 0 for each new file)
|
|
||||||
|
|
||||||
/* Loops over a memory slot until a complete frame is found (i.e. all */
|
|
||||||
/* packets 0 to nPackets, same frame number). purely virtual func \param
|
|
||||||
*/
|
|
||||||
/* data pointer to the memory to be analyzed \param ndata reference to
|
|
||||||
* the */
|
|
||||||
/* amount of data found for the frame, in case the frame is incomplete at
|
|
||||||
*/
|
|
||||||
/* the end of the memory slot \param dsize size of the memory slot to be
|
|
||||||
*/
|
|
||||||
/* analyzed \returns pointer to the beginning of the last good frame
|
|
||||||
* (might */
|
|
||||||
/* be incomplete if ndata smaller than dataSize), or NULL if no frame is
|
|
||||||
*/
|
|
||||||
/* found */
|
|
||||||
|
|
||||||
/* *\/ */
|
|
||||||
virtual char *findNextFrame(char *data, int &ndata, int dsize) {
|
|
||||||
if (dsize < dataSize)
|
|
||||||
ndata = dsize;
|
|
||||||
else
|
|
||||||
ndata = dataSize;
|
|
||||||
return data;
|
|
||||||
};
|
|
||||||
|
|
||||||
// int getPacketNumber(int x, int y) {return dataMap[y][x]/packetSize;};
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -28,10 +28,6 @@
|
|||||||
@li version is the version number of this structure format
|
@li version is the version number of this structure format
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <algorithm>
|
|
||||||
#include <numeric>
|
|
||||||
#include <tuple>
|
|
||||||
|
|
||||||
namespace strixelSingleChip {
|
namespace strixelSingleChip {
|
||||||
constexpr int nc_rawimg = 1024; // for full images //256;
|
constexpr int nc_rawimg = 1024; // for full images //256;
|
||||||
constexpr int nr_rawimg = 512;
|
constexpr int nr_rawimg = 512;
|
||||||
@@ -81,7 +77,7 @@ constexpr int c6g1_ystart = c6g2_yend + 1; // 448
|
|||||||
constexpr int c6g1_yend = c6g2_yend + 64 - gr; // 502
|
constexpr int c6g1_yend = c6g2_yend + 64 - gr; // 502
|
||||||
|
|
||||||
// y shift due to faulty bonding (relevant for M408)
|
// y shift due to faulty bonding (relevant for M408)
|
||||||
constexpr int bond_shift_y = 0; // CHANGE IF YOU CHANGE MODULE!
|
constexpr int bond_shift_y = 1; // CHANGE IF YOU CHANGE MODULE!
|
||||||
|
|
||||||
} // namespace strixelSingleChip
|
} // namespace strixelSingleChip
|
||||||
|
|
||||||
@@ -101,13 +97,6 @@ class jungfrauLGADStrixelsData : public slsDetectorData<uint16_t> {
|
|||||||
int chip_x0;
|
int chip_x0;
|
||||||
int chip_y0;
|
int chip_y0;
|
||||||
int x0, y0, x1, y1, shifty;
|
int x0, y0, x1, y1, shifty;
|
||||||
struct {
|
|
||||||
uint16_t xmin;
|
|
||||||
uint16_t xmax;
|
|
||||||
uint16_t ymin;
|
|
||||||
uint16_t ymax;
|
|
||||||
int nc;
|
|
||||||
} globalROI;
|
|
||||||
|
|
||||||
int getMultiplicator(const int group) {
|
int getMultiplicator(const int group) {
|
||||||
int multiplicator;
|
int multiplicator;
|
||||||
@@ -226,113 +215,9 @@ class jungfrauLGADStrixelsData : public slsDetectorData<uint16_t> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void remapROI(uint16_t xmin, uint16_t xmax, uint16_t ymin, uint16_t ymax) {
|
||||||
std::tuple< uint16_t, uint16_t, uint16_t, uint16_t > adjustROItoLimits(uint16_t xmin,
|
|
||||||
uint16_t xmax,
|
|
||||||
uint16_t ymin,
|
|
||||||
uint16_t ymax,
|
|
||||||
uint16_t lim_roi_xmin,
|
|
||||||
uint16_t lim_roi_xmax,
|
|
||||||
uint16_t lim_roi_ymin,
|
|
||||||
uint16_t lim_roi_ymax) {
|
|
||||||
uint16_t xmin_roi, xmax_roi, ymin_roi, ymax_roi;
|
|
||||||
if ( xmin < lim_roi_xmin)
|
|
||||||
xmin_roi = lim_roi_xmin;
|
|
||||||
else
|
|
||||||
xmin_roi = xmin;
|
|
||||||
if ( xmax > lim_roi_xmax )
|
|
||||||
xmax_roi = lim_roi_xmax;
|
|
||||||
else
|
|
||||||
xmax_roi = xmax;
|
|
||||||
if ( ymin < lim_roi_ymin )
|
|
||||||
ymin_roi = lim_roi_ymin;
|
|
||||||
else
|
|
||||||
ymin_roi = ymin;
|
|
||||||
if ( ymax > lim_roi_ymax )
|
|
||||||
ymax_roi = lim_roi_ymax;
|
|
||||||
else
|
|
||||||
ymax_roi = ymax;
|
|
||||||
return std::make_tuple(xmin_roi, xmax_roi, ymin_roi, ymax_roi);
|
|
||||||
}
|
|
||||||
|
|
||||||
std::vector < std::tuple< int, int, uint16_t, uint16_t, uint16_t, uint16_t > > mapSubROIs(uint16_t xmin,
|
|
||||||
uint16_t xmax,
|
|
||||||
uint16_t ymin,
|
|
||||||
uint16_t ymax) {
|
|
||||||
bool chip_1_1 = false;
|
|
||||||
bool chip_1_2 = false;
|
|
||||||
bool chip_1_3 = false;
|
|
||||||
bool chip_6_1 = false;
|
|
||||||
bool chip_6_2 = false;
|
|
||||||
bool chip_6_3 = false;
|
|
||||||
|
|
||||||
for ( int x=xmin; x!=xmax+1; ++x ) {
|
|
||||||
for ( int y=ymin; y!=ymax; ++y ) {
|
|
||||||
if ( c1g1_xstart<=x && x<=c1_xend && (c1g1_ystart+bond_shift_y)<=y && y<=(c1g1_yend+bond_shift_y) )
|
|
||||||
chip_1_1 = true;
|
|
||||||
if ( c1g2_xstart<=x && x<=c1_xend && (c1g2_ystart+bond_shift_y)<=y && y<=(c1g2_yend+bond_shift_y) )
|
|
||||||
chip_1_2 = true;
|
|
||||||
if ( c1g3_xstart<=x && x<=c1_xend && (c1g3_ystart+bond_shift_y)<=y && y<=(c1g3_yend+bond_shift_y) )
|
|
||||||
chip_1_3 = true;
|
|
||||||
if ( c6_xstart<=x && x<=c6g1_xend && (c6g1_ystart-bond_shift_y)<=y && y<=(c6g1_yend-bond_shift_y) )
|
|
||||||
chip_6_1 = true;
|
|
||||||
if ( c6_xstart<=x && x<=c6g2_xend && (c6g2_ystart-bond_shift_y)<=y && y<=(c6g2_yend-bond_shift_y) )
|
|
||||||
chip_6_2 = true;
|
|
||||||
if ( c6_xstart<=x && x<=c6g3_xend && (c6g3_ystart-bond_shift_y)<=y && y<=(c6g3_yend-bond_shift_y) )
|
|
||||||
chip_6_3 = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
uint16_t xmin_roi{}, xmax_roi{}, ymin_roi{}, ymax_roi{};
|
|
||||||
//[ chip, group, xmin, xmax, ymin, ymax ]
|
|
||||||
std::vector < std::tuple< int, int, uint16_t, uint16_t, uint16_t, uint16_t > > rois{};
|
|
||||||
|
|
||||||
if (chip_1_1) {
|
|
||||||
std::tie( xmin_roi, xmax_roi, ymin_roi, ymax_roi ) =
|
|
||||||
adjustROItoLimits( xmin, xmax, ymin, ymax,
|
|
||||||
c1g1_xstart, c1_xend, 0, c1g1_yend+bond_shift_y );
|
|
||||||
rois.push_back( std::make_tuple( 1, 1, xmin_roi, xmax_roi, ymin_roi, ymax_roi ) );
|
|
||||||
}
|
|
||||||
if (chip_1_2) {
|
|
||||||
std::tie( xmin_roi, xmax_roi, ymin_roi, ymax_roi ) =
|
|
||||||
adjustROItoLimits( xmin, xmax, ymin, ymax,
|
|
||||||
c1g2_xstart, c1_xend, c1g2_ystart+bond_shift_y, c1g2_yend+bond_shift_y );
|
|
||||||
rois.push_back( std::make_tuple( 1, 2, xmin_roi, xmax_roi, ymin_roi, ymax_roi ) );
|
|
||||||
}
|
|
||||||
if (chip_1_3) {
|
|
||||||
std::tie( xmin_roi, xmax_roi, ymin_roi, ymax_roi ) =
|
|
||||||
adjustROItoLimits( xmin, xmax, ymin, ymax,
|
|
||||||
c1g3_xstart, c1_xend, c1g3_ystart+bond_shift_y, c1g3_yend+bond_shift_y );
|
|
||||||
rois.push_back( std::make_tuple( 1, 3, xmin_roi, xmax_roi, ymin_roi, ymax_roi ) );
|
|
||||||
}
|
|
||||||
if (chip_6_3) {
|
|
||||||
std::tie( xmin_roi, xmax_roi, ymin_roi, ymax_roi ) =
|
|
||||||
adjustROItoLimits( xmin, xmax, ymin, ymax,
|
|
||||||
c6_xstart, c6g3_xend, c6g3_ystart-bond_shift_y, c6g3_yend-bond_shift_y );
|
|
||||||
rois.push_back( std::make_tuple( 6, 3, xmin_roi, xmax_roi, ymin_roi, ymax_roi ) );
|
|
||||||
}
|
|
||||||
if (chip_6_2) {
|
|
||||||
std::tie( xmin_roi, xmax_roi, ymin_roi, ymax_roi ) =
|
|
||||||
adjustROItoLimits( xmin, xmax, ymin, ymax,
|
|
||||||
c6_xstart, c6g2_xend, c6g2_ystart-bond_shift_y, c6g2_yend-bond_shift_y );
|
|
||||||
rois.push_back( std::make_tuple( 6, 2, xmin_roi, xmax_roi, ymin_roi, ymax_roi ) );
|
|
||||||
}
|
|
||||||
if (chip_6_1) {
|
|
||||||
std::tie( xmin_roi, xmax_roi, ymin_roi, ymax_roi ) =
|
|
||||||
adjustROItoLimits( xmin, xmax, ymin, ymax,
|
|
||||||
c6_xstart, c6g1_xend, c6g1_ystart-bond_shift_y, 511 );
|
|
||||||
rois.push_back( std::make_tuple( 6, 1, xmin_roi, xmax_roi, ymin_roi, ymax_roi ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
return rois;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void remapROI(std::tuple< int, int, uint16_t, uint16_t, uint16_t, uint16_t > roi) {
|
|
||||||
// determine group and chip selected by ROI
|
// determine group and chip selected by ROI
|
||||||
int group, xmin, xmax, ymin, ymax;
|
int group;
|
||||||
std::tie( mchip, group, xmin, xmax, ymin, ymax ) = roi;
|
|
||||||
/*
|
|
||||||
if (ymax <= c1g1_yend + bond_shift_y) {
|
if (ymax <= c1g1_yend + bond_shift_y) {
|
||||||
group = 1;
|
group = 1;
|
||||||
mchip = 1;
|
mchip = 1;
|
||||||
@@ -358,17 +243,18 @@ class jungfrauLGADStrixelsData : public slsDetectorData<uint16_t> {
|
|||||||
group = -1;
|
group = -1;
|
||||||
mchip = -1;
|
mchip = -1;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
int multiplicator = getMultiplicator(group);
|
int multiplicator = getMultiplicator(group);
|
||||||
setMappingShifts(group);
|
setMappingShifts(group);
|
||||||
|
|
||||||
std::cout << "remapping chip: " << mchip << ", group: " << group << ", m: " << multiplicator
|
std::cout << "chip: " << mchip << ", group: " << group << ", m: " << multiplicator
|
||||||
<< ", x0: " << x0 << ", x1: " << x1 << ", y0: " << y0
|
<< ", x0: " << x0 << ", x1: " << x1 << ", y0: " << y0
|
||||||
<< ", y1: " << y1 << std::endl;
|
<< ", y1: " << y1 << std::endl;
|
||||||
std::cout << "Adjusted roi: [" << xmin << ", " << xmax << ", " << ymin << ", " << ymax << "]" << std::endl;
|
|
||||||
|
// get ROI raw image number of columns
|
||||||
|
int nc_roi = xmax - xmin + 1;
|
||||||
|
std::cout << "nc_roi = " << nc_roi << std::endl;
|
||||||
|
|
||||||
// make sure loop bounds are correct
|
// make sure loop bounds are correct
|
||||||
/*
|
|
||||||
if (y0 < ymin)
|
if (y0 < ymin)
|
||||||
std::cout << "Error ymin" << std::endl;
|
std::cout << "Error ymin" << std::endl;
|
||||||
if (y1 > ymax)
|
if (y1 > ymax)
|
||||||
@@ -378,7 +264,6 @@ class jungfrauLGADStrixelsData : public slsDetectorData<uint16_t> {
|
|||||||
std::cout << "Error xmin" << std::endl;
|
std::cout << "Error xmin" << std::endl;
|
||||||
if (x1 > xmax)
|
if (x1 > xmax)
|
||||||
std::cout << "Error xmax" << std::endl;
|
std::cout << "Error xmax" << std::endl;
|
||||||
*/
|
|
||||||
|
|
||||||
// remapping loop
|
// remapping loop
|
||||||
int ix, iy = 0;
|
int ix, iy = 0;
|
||||||
@@ -392,10 +277,8 @@ class jungfrauLGADStrixelsData : public slsDetectorData<uint16_t> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// if (iy< 40) cout << iy << " " << ix <<endl;
|
// if (iy< 40) cout << iy << " " << ix <<endl;
|
||||||
if ( ipx>=xmin && ipx<=xmax && ipy>=ymin && ipy <=ymax )
|
|
||||||
dataMap[iy][ix] =
|
dataMap[iy][ix] =
|
||||||
sizeof(header) + (globalROI.nc * (ipy - globalROI.ymin) + (ipx - globalROI.xmin)) * 2;
|
sizeof(header) + (nc_roi * (ipy - ymin) + (ipx - xmin)) * 2;
|
||||||
else dataMap[iy][ix] = sizeof(header);
|
|
||||||
groupmap[iy][ix] = group - 1;
|
groupmap[iy][ix] = group - 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -424,31 +307,16 @@ class jungfrauLGADStrixelsData : public slsDetectorData<uint16_t> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
globalROI.xmin = xmin;
|
|
||||||
globalROI.xmax = xmax;
|
|
||||||
globalROI.ymin = ymin;
|
|
||||||
globalROI.ymax = ymax;
|
|
||||||
|
|
||||||
std::cout << "sizeofheader = " << sizeof(header) << std::endl;
|
std::cout << "sizeofheader = " << sizeof(header) << std::endl;
|
||||||
std::cout << "Jungfrau strixels 2X single chip with full module data "
|
std::cout << "Jungfrau strixels 2X single chip with full module data "
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
|
||||||
if (xmin < xmax && ymin < ymax) {
|
if (xmin < xmax && ymin < ymax) {
|
||||||
|
|
||||||
// get ROI raw image number of columns
|
|
||||||
globalROI.nc = xmax - xmin + 1;
|
|
||||||
std::cout << "nc_roi = " << globalROI.nc << std::endl;
|
|
||||||
|
|
||||||
dataSize =
|
dataSize =
|
||||||
(xmax - xmin + 1) * (ymax - ymin + 1) * 2 + sizeof(header);
|
(xmax - xmin + 1) * (ymax - ymin + 1) * 2 + sizeof(header);
|
||||||
std::cout << "datasize " << dataSize << std::endl;
|
std::cout << "datasize " << dataSize << std::endl;
|
||||||
|
remapROI(xmin, xmax, ymin, ymax);
|
||||||
//[ chip, group, xmin, xmax, ymin, ymax ]
|
|
||||||
auto rois = mapSubROIs(xmin, xmax, ymin, ymax);
|
|
||||||
//function to fill vector of rois from globalROI
|
|
||||||
|
|
||||||
for ( auto roi : rois )
|
|
||||||
remapROI(roi);
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|||||||