feat: embed config in server log; replay_sim takes a single log path

ServerLogTask now embeds the full config in its JSON output, matching
SudLogTask — so replay_sim and analyze_log work on server logs without
needing a separate config file.

replay_sim.py switches from two positional args (date_time, sud_name) to
a single log file path, with config and plant params resolved from the
log's embedded "Config"/"PlantParams" sections when present and falling
back to config.json / hardcoded defaults for older logs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-30 23:17:50 +02:00
co-authored by Claude Sonnet 4.6
parent 4de6efcf82
commit dc687c3559
3 changed files with 62 additions and 49 deletions
+1 -1
View File
@@ -137,7 +137,7 @@ if __name__ == '__main__':
# Continuous server-session log - records from startup to shutdown
# regardless of Sud state; written to logs/log_{date_time}.json on exit.
server_log_task = ServerLogTask(tc, heater, heater_task, DT_TASK, args.logdir)
server_log_task = ServerLogTask(tc, heater, heater_task, DT_TASK, args.logdir, config=config)
taskmgr.add(server_log_task)
# Assign data flow