فهرست منبع

Update readmes with setup information

anfeny 2 ماه پیش
والد
کامیت
ac4ec4a4f8
3فایلهای تغییر یافته به همراه76 افزوده شده و 1 حذف شده
  1. 74 0
      README.md
  2. 1 1
      dashboard/README.md
  3. 1 0
      simulator/README.md

+ 74 - 0
README.md

@@ -1,7 +1,81 @@
 # fischertechnik-factory-twin
 DEVS simulator and dashboard of the fischertechnik lernfabrik (training factory) 9V
 
+This project provides a digital twin of the Fischertechnik Training Factory 9V, consisting of two interconnected components:
 
+1. **Simulator (`simulator/`)**  
+   A DEVS-based simulation engine that models the behavior of the factory and publishes MQTT messages. It can operate standalone or in hybrid mode alongside real factory data.
+
+2. **Dashboard (`dashboard/`)**  
+   A Flask-based web application that serves as a real-time control center. It visualizes data from the real factory, the simulator, or both. It includes WebSocket integration, an MQTT bridge, and dynamic dashboard modes (monitor, simulation, hybrid).
+
+Each sub-project has its own Python virtual environment and set of dependencies.
+
+## Getting Started
+
+### 1. Clone the Repository
+
+```bash
+TODO
+```
+
+### 2. Start the MQTT Broker (Mosquitto)
+
+Make sure a Mosquitto MQTT broker is running on your machine.
+The simulator expects it to be available at localhost (127.0.0.1) on the default port (1883).
+
+If you have Mosquitto installed locally, you can start it using:
+
+```bash
+# On most Linux systems:
+sudo systemctl start mosquitto
+
+# Or manually:
+mosquitto
+```
+
+> You can verify it's running by checking localhost:1883 or using an MQTT client like MQTT Explorer.
+
+
+### 3: Run the dashboard
+
+```bash
+./run_dashboard.sh
+```
+
+- Create a virtual environment in dashboard/venv/ if it doesn't exist
+
+- Install Flask and other required packages
+
+- Start the dashboard web server (accessible locally in your browser on https://localhost:5000)
+
+
+### 4. Run the simulator
+
+```bash
+./run_sim.sh
+```
+
+ This will:
+
+- Create a virtual environment in simulator/venv/ if it doesn't exist
+
+- Install dependencies from requirements.txt
+
+- Launch the DEVS simulator in realtime-mode
+
+## Project Structure
+
+```bash
+fischertechnik-factory-twin/
+├── simulator/        # DEVS simulation engine
+├── dashboard/        # Flask web dashboard
+├── run_sim.sh        # Root-level launcher for the simulator
+├── run_dashboard.sh  # Root-level launcher for the dashboard
+├── LICENSE
+├── NOTICE.txt
+└── README.md
+```
 
 ## License
 

+ 1 - 1
dashboard/README.md

@@ -8,7 +8,7 @@ A small Python web-based control center for the Fischertechnik Lernfabrik 9V.
 
 ## Running
 
-You can run the flask server which runs the main program using the included script `run_flask.sh`.
+You can run the flask server which runs the main program using the included script `run.sh`.
 
 
 ## Testing

+ 1 - 0
simulator/README.md

@@ -9,6 +9,7 @@ packages.
 
 - `PyPDEVS` 2.4.2
 - `loguru` 0.7.3
+-  `PythonPDEVS` (delivered in repo)
 
 
 ## Flowchart