Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
128 commits
Select commit Hold shift + click to select a range
abbbe32
Add ideas for json api format examples
BLuedtke Nov 15, 2023
e86dfea
add json builder and first try with monitor route
BLuedtke Nov 15, 2023
82d004e
add missing free
BLuedtke Nov 15, 2023
8c052c4
more json conversion work
BLuedtke Nov 15, 2023
150004a
adjust json format for route experiment
BLuedtke Nov 15, 2023
b19368b
changed get route info to json version
BLuedtke Nov 16, 2023
3f2c731
more json api
BLuedtke Nov 16, 2023
c8d1e19
json api for current monitor endpoints
BLuedtke Nov 16, 2023
563d97f
fixes after testing and size pre-alloc debug
BLuedtke Nov 16, 2023
8957d50
debug adjustment
BLuedtke Nov 16, 2023
5fc5b52
fix train state json bug and adjust size estimates
BLuedtke Nov 16, 2023
940eda5
fixed debug print format
BLuedtke Nov 16, 2023
1021e23
fix block list linebreak
BLuedtke Nov 16, 2023
c376353
updated size estimates in debug print
BLuedtke Nov 16, 2023
417d193
updated size estimates
BLuedtke Nov 16, 2023
da06e04
Merge branch 'master' into json-experiments
BLuedtke Jun 5, 2024
e88a036
move api format folder
BLuedtke Jun 5, 2024
d201741
adjust to new logging scheme
BLuedtke Jun 5, 2024
48e2e09
moved api-doc around and got rid of old basic/advanced differentiation
BLuedtke Jun 5, 2024
c18bb41
wip api improvement
BLuedtke Jun 5, 2024
d099cee
train-states monitor endpoint
BLuedtke Jun 10, 2024
7bfdb46
registered monitor endpoint and converted driver to JSON answers
BLuedtke Jun 10, 2024
5c4c54b
start with prepared python client based on JSON answer format
BLuedtke Jun 10, 2024
3ba70fe
admin json doc and refactor driver json doc
BLuedtke Jun 11, 2024
fe55753
more json api conversion
BLuedtke Jun 12, 2024
93755e9
remove unused code, add some comments, optimize some details
BLuedtke Jun 25, 2024
bd762c4
major admin, controller, driver handler overhaul regarding handler fu…
BLuedtke Jul 18, 2024
1b2ca2b
Added readme to json schema doc
BLuedtke Jul 18, 2024
8faef0a
fix route conflict array element setting
BLuedtke Jul 18, 2024
985d675
Merge local branch 'cleanup-maintenance' into api-and-handler-overhaul
BLuedtke Jul 18, 2024
0f86131
const adjustments; handler_monitor adapted to new utils
BLuedtke Jul 18, 2024
d3d8ac4
adjust naming and static-ness
BLuedtke Jul 19, 2024
7b67025
more init, static, const; prep upload for improvement
BLuedtke Jul 19, 2024
cb274c0
handler upload reply overhaul
BLuedtke Jul 19, 2024
a161f0c
small check added in upload
BLuedtke Jul 19, 2024
8826874
moved doc
BLuedtke Jul 19, 2024
f38f06b
moved get engines and interlockers endpoints and refactored duplicate…
BLuedtke Jul 19, 2024
f9d4b39
handler monitor small improvements
BLuedtke Jul 19, 2024
92b547d
onion type alias for shorter signatures
BLuedtke Jul 19, 2024
0d6724f
json schema definition for api WIP
BLuedtke Nov 13, 2024
2d6b134
more work on api json schema definitions
BLuedtke Nov 14, 2024
04fc23c
More json schema adjustments for monitor
BLuedtke Nov 15, 2024
c67abc7
Added missing schema and added doxygen-style doc to monitor json gen …
BLuedtke Nov 15, 2024
10042a2
json helpers formatting and documentation
BLuedtke Jan 9, 2025
f8b7275
more documentation
BLuedtke Jan 9, 2025
0da1ec5
admin handler improv (details, doc/comments), comutils name in licens…
BLuedtke Jan 9, 2025
fa14c41
handler controller improvements and small dyn cont interface doc addi…
BLuedtke Jan 9, 2025
ce72668
wip bahn util and interlocking impl improvements
BLuedtke Jan 9, 2025
b9989d7
bahn data util improvements + consequences to other files
BLuedtke Jan 9, 2025
d52bebc
additional bahn data util fixes
BLuedtke Jan 9, 2025
dd5b010
improvements and fixes for interlocking impl
BLuedtke Jan 9, 2025
4987d15
change interlocking impl file indentation to tabs
BLuedtke Jan 9, 2025
df7588d
adjust dyn containers interface, formatting, improved naming, type fi…
BLuedtke Jan 9, 2025
6699947
formatting improved for dynlib.c
BLuedtke Jan 9, 2025
03f212a
formatting, trailing whitespace on non-empty lines + intentional tra…
BLuedtke Jan 9, 2025
ef8dee2
local functions -> static
BLuedtke Jan 9, 2025
1ad4955
various improvements to logging, comments, wrong lock, and changed si…
BLuedtke Jan 10, 2025
8a6a1e5
checked all syslog calls -> fixed syslog related problems
BLuedtke Jan 10, 2025
77febd1
somewhat consistent log and reply formatting for missing or invalid p…
BLuedtke Jan 10, 2025
9830d06
send before logging in upload handler
BLuedtke Jan 10, 2025
b1fbaca
drive-route checks if grab-id is still valid before stopping/slowing …
BLuedtke Jan 10, 2025
236cac1
adjusted naming in handler_driver
BLuedtke Jan 10, 2025
3c59aec
consistent log formatting for grab-id and session-id
BLuedtke Jan 10, 2025
7ee42c8
slight api and path adjustments
BLuedtke Jan 16, 2025
74ce724
monitor api small path change and placeholder for missing endpoint
BLuedtke Jan 16, 2025
e113085
try to refactor missing param validation, admin only for now
BLuedtke Jan 16, 2025
f4a4a7d
roll out missing param handling for all - monitor endpoints with para…
BLuedtke Jan 16, 2025
fc2f000
start work on adding signal-details endpoint
BLuedtke Mar 4, 2025
01f0f34
Merge branch 'master' into api-and-handler-overhaul
BLuedtke Apr 15, 2025
2b256ee
minor admin client adjustment
BLuedtke Apr 15, 2025
7acc33b
openapi doc of admin endpoints
BLuedtke Apr 16, 2025
d69faeb
controller endpoints in OpenAPI
BLuedtke Apr 16, 2025
70413be
OpenAPI schemas prep for driver, driver minor adjustment when sending…
BLuedtke Apr 16, 2025
fd9561e
minor driver and controller improvements for better feedback, simpler…
BLuedtke Apr 23, 2025
4f0ce82
driver endpoints in OpenAPI and some doc refinements in other api parts
BLuedtke Apr 23, 2025
139b263
preparation for adding monitor to OpenAPI spec
BLuedtke Apr 24, 2025
429cc73
Add monitor endpoints OpenAPI Doc/Spec + shortcut to check if train i…
BLuedtke Apr 25, 2025
f759ead
engine upload endpoint added to OpenAPI; adjusted handler and client …
BLuedtke May 6, 2025
24ac4af
OpenAPI for rest of upload endpoints
BLuedtke May 6, 2025
90e8aef
OpenAPI Fixes based on IBM Validation Tool
BLuedtke May 7, 2025
6c861df
reduce duplicate schema in OpenAPI
BLuedtke May 7, 2025
1b40a06
python client for json api up to driver endpoints, and fixed incorrec…
BLuedtke May 9, 2025
45f2fa2
python client for json api, done for all endpoints, reduced duplicate…
BLuedtke May 20, 2025
f8beddc
small json client fixes
BLuedtke May 20, 2025
54f8a02
client fixes from testing
BLuedtke May 21, 2025
5210166
jsonify api script_game
Jun 13, 2025
9dac8e4
set-point or signal now replies with 404 if point/signal unknown
BLuedtke Jul 8, 2025
0713132
better log for 404 case of set-point/signal
BLuedtke Jul 8, 2025
954f619
adjusted logging to improve debugging invalid handler inputs
BLuedtke Jul 8, 2025
9cf12ce
sync
Jul 8, 2025
78cf4be
added script changes for api overhaul (main client script.js) [WIP]
Jul 11, 2025
968fb84
adjusted gitignore: exclude .env folders
Jul 11, 2025
133973c
removed unwanted env folder from tablegenerator path
Jul 11, 2025
b16e95f
finished api rewrite for json api based of openapi docs
Jul 18, 2025
97bb7bc
fix wrong reply schema ref in openApi spec for upload interlocker
BLuedtke Jul 21, 2025
9a00adc
fixed error messaging handling and minor problems in script.js
Jul 22, 2025
3e4c799
fix(script.js): removed the famous python function .format
Jul 25, 2025
c249774
debugging script to not always go to error handler
uniba-swt-management Jul 25, 2025
ee04943
Added recompiled dynLibs for Raspberry Pi 5
uniba-swt-management Jul 25, 2025
da7d9a3
WIP fix script js
BLuedtke Jul 25, 2025
6f907ec
try to fix grab and release
uniba-swt-management Jul 25, 2025
5dd81c4
script JS rework
BLuedtke Jul 25, 2025
5cbbeb7
helper for setting info/error alerts
BLuedtke Jul 25, 2025
e06f769
Script JS Refactoring
BLuedtke Jul 25, 2025
b41210a
initial fixes regarding script and compile paths
uniba-swt-management Jul 25, 2025
77cd700
major fix for return types in script JS
BLuedtke Jul 25, 2025
cff3831
game client rework (api usage, formatting, feedback, structuring)
BLuedtke Jul 30, 2025
f81d162
restructured doc api formats folder, removed old json format files
BLuedtke Aug 8, 2025
efdbfe8
renamed doc api formats folder to api
BLuedtke Aug 8, 2025
cf19c03
python client improvements
BLuedtke Aug 8, 2025
d75ed00
renamed json python client to OG client name
BLuedtke Aug 8, 2025
088e25f
rename py client and adjust readme and test script
BLuedtke Aug 8, 2025
b65006a
fix missing true/false swap
BLuedtke Aug 8, 2025
b28cb40
js clients make variable kind clear
BLuedtke Aug 11, 2025
03030f2
minor javascript client adjustments
BLuedtke Aug 11, 2025
93b35f0
reduce logging in parsers (less log pollution)
BLuedtke Aug 19, 2025
8c3e127
add missing sec-ack config for slave board of SWTbahn-Full (tested on…
BLuedtke Aug 19, 2025
34a7a25
add more detailed startup err reason feedback
BLuedtke Sep 1, 2025
5ccb3e2
cleanup unused and old todo
BLuedtke Sep 1, 2025
9a14439
remove todo (tested, works)
BLuedtke Sep 1, 2025
126a6f0
add custom codes for code 500 in two cases
BLuedtke Sep 1, 2025
b37e252
adjusted time printing for drive route to match libbidib
BLuedtke Sep 1, 2025
a652639
removed newlines in syslog_server invocations
BLuedtke Sep 1, 2025
687c182
mini formatting fixes
BLuedtke Sep 1, 2025
7df69ff
revert python client renaming with .py
BLuedtke Sep 1, 2025
14f46dd
drive-route wait before release
BLuedtke Sep 9, 2025
6c86f2b
Addressing PR change requests
BLuedtke Sep 24, 2025
f174395
revert change to startup endpoint in python client
BLuedtke Sep 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ server/src/.vscode/
**/.vscode
**/.cache
**.project
**jsconfig.json
**jsconfig.json
**/.env
20 changes: 12 additions & 8 deletions README.md
Comment thread
eyip002 marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ libgcrypt, libpthread, libglib-2.0, libyaml,
* KIELER command line compiler: [kico.jar](https://rtsys.informatik.uni-kiel.de/~kieler/files/nightly/sccharts/cli/)
* Path to the folder that contains `kico.jar` has to be defined in the environment variable `KIELER_PATH`
* BahnDSL command line compiler: [bahnc](https://github.com/trinnguyen/bahndsl)
* Path to the folder that contains the `bahnc` has to be defined in the environment variable `BAHNDSL_PATH`
* Path to the folder that contains the `bahnc` has to be defined in the environment variable `BAHNC_PATH`
* SCCharts verifier: [SWTbahn Verifier (SWT internal repository)](https://gitlab.rz.uni-bamberg.de/swt/swtbahn-verifier)

#### Command Line Client
Expand Down Expand Up @@ -70,9 +70,9 @@ client from a different working directory for the current session, otherwise it
won't find the configuration file. If you really want to use two logically
different clients on the same device, you could just run the clients from
different working directories which will lead to distinct configs.
3. Now you can use the commands from the categories `swtbahn admin`,
`swtbahn controller`, `swtbahn driver` and `swtbahn monitor`. If the system was
not started by `swtbahn admin startup`, all the other commands won't work.
3. Now you can use the commands from the roles `admin`,
`controller`, `driver` and `monitor`. If the system was
not started by `admin startup`, all the other commands won't work.

For example:
`./swtbahn admin startup`
Expand Down Expand Up @@ -230,12 +230,16 @@ As an example, when a request is made to set point10 to the normal state, the re
> _Intervening log messages from internal processing_
> LOG_NOTICE: `Request: Set point - point: point10 state: normal - finish`

If the above request was instead made with an unsupported state, e.g., `foobar`, then the request handler would generate the following log messages to say that the processing was stopped because of invalid parameters:
If the above request was instead made with an unsupported state, e.g., `foobar`, then the request handler would generate the following log messages to say that the processing was stopped because of invalid parameter values:

> LOG_NOTICE: `Request: Set point - point: point10 state: foobar - start`
> _Intervening log messages from internal processing_
> LOG_ERR: `Request: Set point - point: point10 state: foobar - invalid parameters - abort`
> LOG_ERR: `Request: Set point - point: point10 state: foobar - invalid parameter values - abort`

If the above request forgot to specify the state, i.e., the state parameter is `null`, then the request handler would only generate the following log message to say that the parameter validation failed:
If the above request forgot to specify the state, i.e., the state parameter is `null`, then the request handler would only generate the following log message to say that the parameter is missing:

> LOG_ERR: `Request: Set point - invalid parameters`
> LOG_ERR: `Request: Set point - missing parameter state`

And if sending this info to the client failed, the following would be logged:

> LOG_ERR: `Request: Set point - missing parameter state - but sending msg to client failed`
Loading