From df0cf7d605fa26fd54012a15759006b19f886f43 Mon Sep 17 00:00:00 2001 From: Marc Sanchis Date: Sun, 8 Jun 2025 17:32:44 +0200 Subject: [PATCH] feat: add BLCU configuration structure and settings --- backend/cmd/config.go | 7 +++++++ backend/cmd/config.toml | 31 ++++++++++++++++++++++++++----- 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/backend/cmd/config.go b/backend/cmd/config.go index 9aeb4208b..724ab0073 100644 --- a/backend/cmd/config.go +++ b/backend/cmd/config.go @@ -18,10 +18,17 @@ type Transport struct { PropagateFault bool } +type Blcu struct { + IP string + DownloadOrderId uint16 + UploadOrderId uint16 +} + type Config struct { Vehicle vehicle.Config Server server.Config Adj Adj Network Network Transport Transport + Blcu Blcu } diff --git a/backend/cmd/config.toml b/backend/cmd/config.toml index 7ac70bf6f..59a691dc4 100644 --- a/backend/cmd/config.toml +++ b/backend/cmd/config.toml @@ -1,27 +1,48 @@ +# Hyperloop UPV Backend Configuration +# Configuration file for the H10 Control Station backend server + +# Vehicle Configuration [vehicle] -boards = ["HVSCU", "PCU"] +boards = ["HVSCU", "PCU", "BLCU"] + +# BLCU (Boot Loader Control Unit) Configuration +[blcu] +ip = "127.0.0.1" # TFTP server IP address +download_order_id = 1 # Packet ID for download orders (0 = use default) +upload_order_id = 2 # Packet ID for upload orders (0 = use default) + +# Server Configuration [server.ethernet-view] address = "127.0.0.1:4040" static = "./ethernet-view" + [server.ethernet-view.endpoints] pod_data = "/podDataStructure" order_data = "/orderStructures" programable_boards = "/uploadableBoards" connections = "/backend" files = "/" + [server.control-station] address = "127.0.0.1:4000" static = "./control-station" + [server.control-station.endpoints] pod_data = "/podDataStructure" order_data = "/orderStructures" programable_boards = "/uploadableBoards" connections = "/backend" files = "/" + +# ADJ (Architecture Description JSON) Configuration [adj] -branch = "main" # Leave blank when using ADJ as a submodule (like this: "") -test = true +branch = "software" # Leave blank when using ADJ as a submodule (like this: "") +test = true # Enable test mode + +# Network Configuration [network] -manual = false +manual = true # Manual network device selection + +# Transport Configuration [transport] -propagate_fault = true +propagate_fault = true # Propagate fault messages like VCU