This project simulates a Service-Oriented Vehicle Diagnostics (SOVD) system using Flask.
- ECU Overview (
/ecu-overview): Returns a list of simulated ECUs with metadata. - Fault Memory Readout (
/fault-memory): Returns mock fault codes for ECUs. - Software Update Trigger (
/software-update): Simulates triggering a software update (POST request). - Logging Service (
/logs): Allows adding and retrieving diagnostic logs.
- Install dependencies:
pip install flask
π Step-by-Step Instructions
- Create the Project Folder Create a folder named sovd_simulator and place all the provided files inside it, maintaining the structure:
sovd_simulator/ βββ app.py βββ services/ β βββ init.py β βββ ecu_overview.py β βββ fault_memory.py β βββ software_update.py β βββ logging_service.py βββ templates/ β βββ index.html βββ static/ βββ style.css 2. Install Flask Open a terminal or command prompt and run:
- Run the Application Navigate to the project folder:
Then start the Flask server:
- Access the Simulator Open your browser and go to:
http://127.0.0.1:5000 Youβll see the homepage with links to:
/ecu-overview /fault-memory /logs You can also use tools like Postman or curl to test the POST endpoints like /software-update and /logs.