Files
Jungfraujoch/broker
2024-10-23 19:03:09 +02:00
..
2024-10-23 19:03:09 +02:00
2024-10-05 13:14:49 +02:00
2024-10-23 19:03:09 +02:00
2024-10-16 19:52:01 +02:00
2024-10-16 19:52:01 +02:00
2024-10-16 19:52:01 +02:00
2024-10-16 19:52:01 +02:00
2024-10-16 19:52:01 +02:00
2024-10-16 19:52:01 +02:00
2024-10-16 19:52:01 +02:00
2024-10-23 10:16:37 +02:00
2024-10-23 10:16:37 +02:00
2024-10-16 19:52:01 +02:00
2024-10-16 19:52:01 +02:00
2024-10-05 13:14:49 +02:00
2024-10-23 19:03:09 +02:00

Jungfraujoch service (jfjoch_broker)

'jfjoch_broker' is the main service for the Jungfraujoch application. It is responsible for:

  • Providing user interface via HTTP and OpenAPI
  • Configuring FPGA firmware
  • Building images from FPGA output and forwarding the results over ZeroMQ

External interfaces

Broker operates three external interfaces.

Data interface ZeroMQ PULL socket with CBOR serialization is used to send images, metadata and processing results for writing or downstream processing. See here for description of the format.

Preview interface as above, but limited to subset of frames (1 image/s by default).

Configuration, status and results HTTP/REST interface described in the OpenAPI format. Description of the API is presented in the redoc-static.html file. Due to limitations of GitLab/GitHub the file cannot be viewed directly from the repository, but needs to be downloaded.

Broker configuration

'jfjoch_broker' requires JSON configuration files. The file is described by OpenAPI structure jfjoch_settings defined in jfjoch_api.yaml file. It is recommended to go through example files in the etc/.

Setting up a local test for Jungfraujoch

For development, it is possible to setup a local installation of Jungfraujoch. This will work without FPGA installed in the computer and allows to test Jungfraujoch software layer, including ZeroMQ streaming and file writing.

The workflow simulates FPGA behavior, by running high-level synthesis code on the CPU - the performance is therefore very low, as fixed-point calculations have large performance penalty on CPU. In the CPU simulation mode, one can simulate using only a single FPGA device.

To run the test:

Compile Jungfraujoch with frontend

mkdir build
cd build
cmake ..
make jfjoch
make frontend

Start services

Start broker:

cd build/broker
./jfjoch_broker ../../etc/broker_local.json 5232

Start writer:

cd build/writer
./jfjoch_writer tcp://127.0.0.1:5500

Run tests

To run test a Python script is provided:

cd tests/test_data
python jfjoch_broker_test.py

The script will initialize Jungfraujoch, import test image and start data collection.

Expected result

You can observe online data analysis by opening the following web page: http://localhost:5232. Also in the build/writer subdirectory a dataset with images should be written.