From 3e82e6f708b1fc424c7224dbd653642ba267d749 Mon Sep 17 00:00:00 2001 From: Gary Yendell Date: Fri, 26 Apr 2024 16:32:59 +0100 Subject: [PATCH] Add launch configs for development --- .vscode/launch.json | 38 +++++++++++- dev/fp1.json | 140 ++++++++++++++++++++++++++++++++++++++++++++ dev/log4cxx.xml | 75 ++++++++++++++++++++++++ dev/odin_server.cfg | 17 ++++++ 4 files changed, 269 insertions(+), 1 deletion(-) create mode 100644 dev/fp1.json create mode 100644 dev/log4cxx.xml create mode 100644 dev/odin_server.cfg diff --git a/.vscode/launch.json b/.vscode/launch.json index 36d8f50..ea80e3b 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -4,6 +4,42 @@ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ + { + "name": "Odin IOC", + "type": "debugpy", + "request": "launch", + "module": "odin_fastcs", + "justMyCode": false, + "console": "integratedTerminal", + "args": ["ioc", "ODIN"] + }, + { + "name": "Odin Asyncio", + "type": "debugpy", + "request": "launch", + "module": "odin_fastcs", + "justMyCode": false, + "console": "integratedTerminal", + "args": ["asyncio"] + }, + { + "name": "FrameProcessor", + "type": "debugpy", + "request": "launch", + "module": "odin.main", + "justMyCode": false, + "console": "integratedTerminal", + "args": ["--config", "${workspaceFolder}/dev/odin_server.cfg"] + }, + { + "name": "Odin Control FP", + "type": "debugpy", + "request": "launch", + "module": "odin.main", + "justMyCode": false, + "console": "integratedTerminal", + "args": ["--config", "${workspaceFolder}/dev/odin_server.cfg"] + }, { "name": "Debug Unit Test", "type": "debugpy", @@ -18,6 +54,6 @@ // Enable break on exception when debugging tests (see: tests/conftest.py) "PYTEST_RAISE": "1", }, - } + }, ] } diff --git a/dev/fp1.json b/dev/fp1.json new file mode 100644 index 0000000..9cb1649 --- /dev/null +++ b/dev/fp1.json @@ -0,0 +1,140 @@ +[ + { + "fr_setup": { + "fr_ready_cnxn": "tcp://127.0.0.1:10001", + "fr_release_cnxn": "tcp://127.0.0.1:10002" + }, + "meta_endpoint": "tcp://*:10008" + }, + { + "plugin": { + "load": { + "index": "eiger", + "name": "EigerProcessPlugin", + "library": "/scratch/development/odin/eiger-detector/vscode_build/lib/libEigerProcessPlugin.so" + } + } + }, + { + "plugin": { + "load": { + "index": "offset", + "name": "OffsetAdjustmentPlugin", + "library": "/scratch/development/odin/odin-data/vscode_build/lib/libOffsetAdjustmentPlugin.so" + } + } + }, + { + "plugin": { + "load": { + "index": "param", + "name": "ParameterAdjustmentPlugin", + "library": "/scratch/development/odin/odin-data/vscode_build/lib/libParameterAdjustmentPlugin.so" + } + } + }, + { + "plugin": { + "load": { + "index": "hdf", + "name": "FileWriterPlugin", + "library": "/scratch/development/odin/odin-data/vscode_build/lib/libHdf5Plugin.so" + } + } + }, + { + "plugin": { + "connect": { + "index": "eiger", + "connection": "frame_receiver" + } + } + }, + { + "plugin": { + "connect": { + "index": "offset", + "connection": "eiger" + } + } + }, + { + "plugin": { + "connect": { + "index": "param", + "connection": "offset" + } + } + }, + { + "plugin": { + "connect": { + "index": "hdf", + "connection": "param" + } + } + }, + { + "hdf": { + "dataset": { + "compressed_size": { + "datatype": "uint32", + "chunks": [1000] + } + } + } + }, + { + "hdf": { + "dataset": { + "uid": { + "datatype": "uint64", + "chunks": [1000] + } + } + } + }, + { + "param": { + "parameter": { + "uid": { + "adjustment": 1 + } + } + } + }, + { + "hdf": { + "process": { + "number": 4, + "rank": 0 + } + } + }, + { + "hdf": { + "file": { + "flush_error_duration": 10000, + "write_error_duration": 10000, + "close_error_duration": 10000, + "create_error_duration": 10000 + } + } + }, + { + "hdf": { + "file": { + "first_number": 1 + } + } + }, + { + "hdf": { + "dataset": { + "data": { + "indexes": true + } + } + } + } +] diff --git a/dev/log4cxx.xml b/dev/log4cxx.xml new file mode 100644 index 0000000..371f0ff --- /dev/null +++ b/dev/log4cxx.xml @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/odin_server.cfg b/dev/odin_server.cfg new file mode 100644 index 0000000..e31b0fa --- /dev/null +++ b/dev/odin_server.cfg @@ -0,0 +1,17 @@ +[server] +debug_mode = 1 +http_port = 8888 +http_addr = 127.0.0.1 +static_path = ./static +adapters = od_fps, fp + +[tornado] +logging = debug + +[adapter.od_fps] +module = odin_data.control.odin_data_adapter.OdinDataAdapter +endpoints = 127.0.0.1:10004 +update_interval = 0.2 + +[adapter.fp] +module = odin_data.control.frame_processor_adapter.FrameProcessorAdapter