From 968f99fd07b0d5b2b044ac2d141474ee95655465 Mon Sep 17 00:00:00 2001 From: "Lucas, John P." Date: Tue, 19 Aug 2025 22:23:35 -0400 Subject: [PATCH 1/8] [tryspaceorg/tryspace-lab#27] Initial mold for radio from demo component; --- .gitmodules | 4 ++++ comp/radio | 1 + 2 files changed, 5 insertions(+) create mode 160000 comp/radio diff --git a/.gitmodules b/.gitmodules index ee48375..f869daf 100644 --- a/.gitmodules +++ b/.gitmodules @@ -22,3 +22,7 @@ path = comp/eps url = https://github.com/TrySpaceOrg/tryspace-comp-eps.git branch = main +[submodule "comp/radio"] + path = comp/radio + url = https://github.com/TrySpaceOrg/tryspace-comp-radio.git + branch = main diff --git a/comp/radio b/comp/radio new file mode 160000 index 0000000..0373c7e --- /dev/null +++ b/comp/radio @@ -0,0 +1 @@ +Subproject commit 0373c7eedc331c9e13582c4f0f7db08d6c868d92 From 3d6cbc3a3d32cf4d897013c6d4ae3c87a7877dd6 Mon Sep 17 00:00:00 2001 From: "Lucas, John P." Date: Thu, 21 Aug 2025 10:46:51 -0400 Subject: [PATCH 2/8] [tryspaceorg/tryspace-lab#27] Radio NOOP and HK working with CLI; --- comp/demo | 2 +- comp/eps | 2 +- comp/radio | 2 +- fsw | 2 +- simulith | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/comp/demo b/comp/demo index 57d5ea1..412aea0 160000 --- a/comp/demo +++ b/comp/demo @@ -1 +1 @@ -Subproject commit 57d5ea1aeb665bfb1c37a2818e1a6d29e283f4f1 +Subproject commit 412aea0672e66bd70b158d794e93f01fa0d474cb diff --git a/comp/eps b/comp/eps index 2e8f87b..fe446f8 160000 --- a/comp/eps +++ b/comp/eps @@ -1 +1 @@ -Subproject commit 2e8f87b3e4332174e2ab2c5635b75e8e508cdb62 +Subproject commit fe446f8d611537a69a665ad81c5697c456dffce3 diff --git a/comp/radio b/comp/radio index 0373c7e..9775855 160000 --- a/comp/radio +++ b/comp/radio @@ -1 +1 @@ -Subproject commit 0373c7eedc331c9e13582c4f0f7db08d6c868d92 +Subproject commit 9775855cf094191942210cb08c409c7d970f4143 diff --git a/fsw b/fsw index dd35df9..3d7794f 160000 --- a/fsw +++ b/fsw @@ -1 +1 @@ -Subproject commit dd35df945eb69769e1a7324f765203993260dee2 +Subproject commit 3d7794f75c9cdda364f8eb824dfe18edcf5e18f9 diff --git a/simulith b/simulith index a62a722..b90e601 160000 --- a/simulith +++ b/simulith @@ -1 +1 @@ -Subproject commit a62a722010e49a88b24377de1725f1fe0fbc7a48 +Subproject commit b90e601294237a34ca599f7d33b7c4a3e2cf8548 From fbd1cfb8d66ce85ea72aa332381d6b529573f427 Mon Sep 17 00:00:00 2001 From: "Lucas, John P." Date: Thu, 21 Aug 2025 16:03:47 -0400 Subject: [PATCH 3/8] [tryspaceorg/tryspace-lab#27] Added radio app to FSW; --- cfg/drm/drm.yaml | 1 + cfg/tryspace-comp-mold.py | 2 +- comp/radio | 2 +- fsw | 2 +- gsw | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cfg/drm/drm.yaml b/cfg/drm/drm.yaml index 0ca2482..bd08b24 100644 --- a/cfg/drm/drm.yaml +++ b/cfg/drm/drm.yaml @@ -2,6 +2,7 @@ mission_name: "drm" components: - name: "demo" - name: "eps" + - name: "radio" scenarios: - name: "nominal" config_file: "drm/scenarios/drm-nominal.yaml" diff --git a/cfg/tryspace-comp-mold.py b/cfg/tryspace-comp-mold.py index 621f45d..f768877 100644 --- a/cfg/tryspace-comp-mold.py +++ b/cfg/tryspace-comp-mold.py @@ -199,7 +199,7 @@ def main(): print(f" ./fsw/tryspace_defs/tables/to_lab_sub.c") print(f" ./fsw/tryspace_defs/targets.cmake") print(f" 4. Add the component to the GSW definitions:") - print(f" ./gsw/src/main/yamcs/etc/etc/yamcs.nos3.yaml") + print(f" ./gsw/src/main/yamcs/etc/yamcs.tryspace.yaml") print(f" 5. Build like you would normally and confirm new component runs") print(f" 6. Customize the component for your specific needs") print() diff --git a/comp/radio b/comp/radio index 9775855..a623aaf 160000 --- a/comp/radio +++ b/comp/radio @@ -1 +1 @@ -Subproject commit 9775855cf094191942210cb08c409c7d970f4143 +Subproject commit a623aaf5b00bef6c29569fb3cfa08d2f139c0c07 diff --git a/fsw b/fsw index 3d7794f..b000e0e 160000 --- a/fsw +++ b/fsw @@ -1 +1 @@ -Subproject commit 3d7794f75c9cdda364f8eb824dfe18edcf5e18f9 +Subproject commit b000e0ed0211d0e7fd23f9e236509429a16bdea7 diff --git a/gsw b/gsw index b304b47..a96b173 160000 --- a/gsw +++ b/gsw @@ -1 +1 @@ -Subproject commit b304b47ef13ad554efd95b7e0bf310c191998e40 +Subproject commit a96b173b9abbda8eabbef87b423ceabd19857a05 From ced50d39a2ae3d55178b2f61885b20974063f3e0 Mon Sep 17 00:00:00 2001 From: "Lucas, John P." Date: Fri, 22 Aug 2025 12:49:50 -0400 Subject: [PATCH 4/8] [tryspaceorg/tryspace-lab#27] Radio downlink functional; --- cfg/lab-compose.yaml | 1 + comp/radio | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cfg/lab-compose.yaml b/cfg/lab-compose.yaml index 917c325..51124c6 100644 --- a/cfg/lab-compose.yaml +++ b/cfg/lab-compose.yaml @@ -50,6 +50,7 @@ services: stdin_open: true tty: true depends_on: + - tryspace-gsw - tryspace-server command: ["/app/simulith_director_standalone"] cpus: "1.0" diff --git a/comp/radio b/comp/radio index a623aaf..30cec25 160000 --- a/comp/radio +++ b/comp/radio @@ -1 +1 @@ -Subproject commit a623aaf5b00bef6c29569fb3cfa08d2f139c0c07 +Subproject commit 30cec2532558f197f11744924f2185803669ad21 From 5a0d0ce2c526a332d2250da6480d91f1b592d387 Mon Sep 17 00:00:00 2001 From: "Lucas, John P." Date: Fri, 22 Aug 2025 15:00:21 -0400 Subject: [PATCH 5/8] [tryspaceorg/tryspace-lab#27] Wrapped debug prints in *_CFG_DEBUG statements; --- .gitignore | 3 ++- cfg/{lab-compose.yaml => lab-compose.j2} | 15 ++++++++------- cfg/tryspace-orchestrator.py | 17 +++++++++++++++++ comp/demo | 2 +- comp/eps | 2 +- comp/radio | 2 +- fsw | 2 +- simulith | 2 +- 8 files changed, 32 insertions(+), 13 deletions(-) rename cfg/{lab-compose.yaml => lab-compose.j2} (86%) diff --git a/.gitignore b/.gitignore index 8ba3c9e..373794f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ build cfg/active.yaml cfg/build.yaml -cfg/cli-compose.yaml \ No newline at end of file +cfg/cli-compose.yaml +cfg/lab-compose.yaml \ No newline at end of file diff --git a/cfg/lab-compose.yaml b/cfg/lab-compose.j2 similarity index 86% rename from cfg/lab-compose.yaml rename to cfg/lab-compose.j2 index 51124c6..a235aff 100644 --- a/cfg/lab-compose.yaml +++ b/cfg/lab-compose.j2 @@ -1,9 +1,5 @@ -# Start -# docker compose -f lab-compose.yaml up -# View specific containers -# docker attach tryspace-fsw -# docker attach tryspace-director -# docker attach tryspace-server +# lab-compose.j2 +# Jinja2 template for lab-compose.yaml with SIMULITH_LOG_MODE services: tryspace-gsw: image: tryspace-gsw:latest @@ -12,7 +8,7 @@ services: - tryspace-net attach: false ports: - - "8090:8090" # YAMCS Web Interface + - "8090:8090" volumes: - gsw-data:/app/yamcs-data healthcheck: @@ -33,6 +29,7 @@ services: tty: true environment: - NUM_CLIENTS=${NUM_CLIENTS:-2} + - SIMULITH_LOG_MODE=stdout command: ["/bin/sh", "-c", "/app/simulith_server_standalone $${NUM_CLIENTS}"] cpus: "4.0" mem_limit: 2g @@ -52,6 +49,8 @@ services: depends_on: - tryspace-gsw - tryspace-server + environment: + - SIMULITH_LOG_MODE={{ log_mode | default('stdout') }} command: ["/app/simulith_director_standalone"] cpus: "1.0" mem_limit: 512m @@ -70,6 +69,8 @@ services: depends_on: - tryspace-server - tryspace-director + environment: + - SIMULITH_LOG_MODE={{ log_mode | default('stdout') }} sysctls: - fs.mqueue.msg_max=10000 ulimits: diff --git a/cfg/tryspace-orchestrator.py b/cfg/tryspace-orchestrator.py index 7cb014f..3a83e89 100644 --- a/cfg/tryspace-orchestrator.py +++ b/cfg/tryspace-orchestrator.py @@ -48,6 +48,7 @@ def main(): mission = active.get("mission") scenario = active.get("scenario", "nominal") cli_component = active.get("cli", "demo") + log_mode = active.get("log", "stdout") # Find mission config file mission_entry = next((m for m in global_cfg["build"]["missions"] if m["name"] == mission), None) @@ -126,6 +127,7 @@ def main(): else: print(f"[orchestrator] No config or template found for component '{comp_name}', skipping.") + # Render cli-compose.yaml from Jinja2 template using cli_component cli_template_path = os.path.abspath(os.path.join(CFG_DIR)) cli_template_file = "cli-compose.j2" @@ -141,5 +143,20 @@ def main(): else: print(f"[orchestrator] cli-compose.j2 template not found, skipping cli-compose.yaml generation.") + # Render lab-compose.yaml from Jinja2 template using log_mode + lab_template_path = os.path.abspath(os.path.join(CFG_DIR)) + lab_template_file = "lab-compose.j2" + lab_template_full_path = os.path.join(lab_template_path, lab_template_file) + lab_compose_output_path = os.path.join(CFG_DIR, "lab-compose.yaml") + if os.path.exists(lab_template_full_path): + env = Environment(loader=FileSystemLoader(lab_template_path)) + template = env.get_template(lab_template_file) + output = template.render(log_mode=log_mode) + with open(lab_compose_output_path, "w") as f: + f.write(output) + print(f"[orchestrator] lab-compose.yaml written to {lab_compose_output_path} (log_mode={log_mode})") + else: + print(f"[orchestrator] lab-compose.j2 template not found, skipping lab-compose.yaml generation.") + if __name__ == "__main__": main() diff --git a/comp/demo b/comp/demo index 412aea0..af20129 160000 --- a/comp/demo +++ b/comp/demo @@ -1 +1 @@ -Subproject commit 412aea0672e66bd70b158d794e93f01fa0d474cb +Subproject commit af201290cd91fd82e91dbab484e09d4abab5b2a3 diff --git a/comp/eps b/comp/eps index fe446f8..0d5a9dd 160000 --- a/comp/eps +++ b/comp/eps @@ -1 +1 @@ -Subproject commit fe446f8d611537a69a665ad81c5697c456dffce3 +Subproject commit 0d5a9dd217dcc07716757614f6047de0cd3d3359 diff --git a/comp/radio b/comp/radio index 30cec25..bcb271d 160000 --- a/comp/radio +++ b/comp/radio @@ -1 +1 @@ -Subproject commit 30cec2532558f197f11744924f2185803669ad21 +Subproject commit bcb271d60e11a9adea65f0d4a390eaed5fa39818 diff --git a/fsw b/fsw index b000e0e..6657196 160000 --- a/fsw +++ b/fsw @@ -1 +1 @@ -Subproject commit b000e0ed0211d0e7fd23f9e236509429a16bdea7 +Subproject commit 665719667a52ce81fbb3d0ba5eeecb853ca568cb diff --git a/simulith b/simulith index b90e601..1f4f836 160000 --- a/simulith +++ b/simulith @@ -1 +1 @@ -Subproject commit b90e601294237a34ca599f7d33b7c4a3e2cf8548 +Subproject commit 1f4f836a931715100ed18e55a3fcd1755516cae8 From d3e9af26860eda5836853de3e644dcf9c139af67 Mon Sep 17 00:00:00 2001 From: "Lucas, John P." Date: Fri, 22 Aug 2025 21:12:20 -0400 Subject: [PATCH 6/8] [tryspaceorg/tryspace-lab#27] Updated radio unit tests; --- comp/radio | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/comp/radio b/comp/radio index bcb271d..9c89d88 160000 --- a/comp/radio +++ b/comp/radio @@ -1 +1 @@ -Subproject commit bcb271d60e11a9adea65f0d4a390eaed5fa39818 +Subproject commit 9c89d881c075f4c793351fecac82c6a5ff9e2de6 From 2ff9f8d9599b063f927eb7bacae7da7cf7ca6706 Mon Sep 17 00:00:00 2001 From: "Lucas, John P." Date: Fri, 22 Aug 2025 21:36:33 -0400 Subject: [PATCH 7/8] [tryspaceorg/tryspace-lab#27] Added log_mode to default active.yaml; --- cfg/drm/drm.yaml | 4 ++-- cfg/drm/scenarios/drm-debug.yaml | 3 +++ cfg/drm/scenarios/drm-flight.yaml | 3 --- cfg/drm/scenarios/drm-nominal.yaml | 1 + cfg/tryspace-orchestrator.py | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 cfg/drm/scenarios/drm-debug.yaml delete mode 100644 cfg/drm/scenarios/drm-flight.yaml diff --git a/cfg/drm/drm.yaml b/cfg/drm/drm.yaml index bd08b24..5067847 100644 --- a/cfg/drm/drm.yaml +++ b/cfg/drm/drm.yaml @@ -6,5 +6,5 @@ components: scenarios: - name: "nominal" config_file: "drm/scenarios/drm-nominal.yaml" - - name: "flight" - config_file: "drm/scenarios/drm-flight.yaml" + - name: "debug" + config_file: "drm/scenarios/drm-debug.yaml" diff --git a/cfg/drm/scenarios/drm-debug.yaml b/cfg/drm/scenarios/drm-debug.yaml new file mode 100644 index 0000000..0abfa22 --- /dev/null +++ b/cfg/drm/scenarios/drm-debug.yaml @@ -0,0 +1,3 @@ +scenario_name: "debug" +overrides: + debug: true diff --git a/cfg/drm/scenarios/drm-flight.yaml b/cfg/drm/scenarios/drm-flight.yaml deleted file mode 100644 index 6b7eb17..0000000 --- a/cfg/drm/scenarios/drm-flight.yaml +++ /dev/null @@ -1,3 +0,0 @@ -scenario_name: "flight" -overrides: - debug: false diff --git a/cfg/drm/scenarios/drm-nominal.yaml b/cfg/drm/scenarios/drm-nominal.yaml index bcdd9bb..8f6d597 100644 --- a/cfg/drm/scenarios/drm-nominal.yaml +++ b/cfg/drm/scenarios/drm-nominal.yaml @@ -1,2 +1,3 @@ scenario_name: "nominal" overrides: + debug: false diff --git a/cfg/tryspace-orchestrator.py b/cfg/tryspace-orchestrator.py index 3a83e89..312f1d6 100644 --- a/cfg/tryspace-orchestrator.py +++ b/cfg/tryspace-orchestrator.py @@ -40,7 +40,7 @@ def main(): mission_cfg = load_yaml(mission_cfg_path) scenarios = mission_cfg.get("scenarios", []) scenario = scenarios[0]["name"] if scenarios else "nominal" - active = {"mission": mission, "scenario": scenario, "cli": "demo"} + active = {"mission": mission, "scenario": scenario, "cli": "demo", "log_mode": "none"} with open(ACTIVE_PATH, "w") as f: yaml.safe_dump(active, f) print(f"[orchestrator] Created {ACTIVE_PATH} with defaults: mission={mission}, scenario={scenario}") From f4bf77d492bd79da40244e612d8c2fd015560813 Mon Sep 17 00:00:00 2001 From: "Lucas, John P." Date: Sat, 23 Aug 2025 07:56:32 -0400 Subject: [PATCH 8/8] [tryspaceorg/tryspace-lab#27] Updates after PR reviews; --- comp/demo | 2 +- comp/radio | 2 +- fsw | 2 +- gsw | 2 +- simulith | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/comp/demo b/comp/demo index af20129..2c0f06f 160000 --- a/comp/demo +++ b/comp/demo @@ -1 +1 @@ -Subproject commit af201290cd91fd82e91dbab484e09d4abab5b2a3 +Subproject commit 2c0f06fa5ccb0a84a95d3e508da0e8d41680c74e diff --git a/comp/radio b/comp/radio index 9c89d88..c4ed812 160000 --- a/comp/radio +++ b/comp/radio @@ -1 +1 @@ -Subproject commit 9c89d881c075f4c793351fecac82c6a5ff9e2de6 +Subproject commit c4ed812803b177ddf1157a114b8e267643b04058 diff --git a/fsw b/fsw index 6657196..a3617ef 160000 --- a/fsw +++ b/fsw @@ -1 +1 @@ -Subproject commit 665719667a52ce81fbb3d0ba5eeecb853ca568cb +Subproject commit a3617efa0a221a56e3a3f287f93c6600e3989296 diff --git a/gsw b/gsw index a96b173..80e590d 160000 --- a/gsw +++ b/gsw @@ -1 +1 @@ -Subproject commit a96b173b9abbda8eabbef87b423ceabd19857a05 +Subproject commit 80e590da3763db63e9bb6b24813d35c7d44a83e5 diff --git a/simulith b/simulith index 1f4f836..554c81a 160000 --- a/simulith +++ b/simulith @@ -1 +1 @@ -Subproject commit 1f4f836a931715100ed18e55a3fcd1755516cae8 +Subproject commit 554c81aecbbe2629cf484074bf9e46e96fa5e4f5