FIXUP! update documentation

This commit is contained in:
Hosam-Eldin.mostafa 2025-10-20 21:27:57 +02:00
parent 4364dc2067
commit 363cc2f361
4 changed files with 13 additions and 7 deletions

View File

@ -6,7 +6,7 @@ Python-based ECU testing framework built on pytest, with a pluggable LIN communi
- Mock LIN adapter for fast, hardware-free development
- Real BabyLIN adapter using the SDK's official Python wrapper (BabyLIN_library.py)
- Hex flashing scaffold you can wire to UDS/XCP
- Hex flashing scaffold you can wire to UDS
- Rich pytest fixtures and example tests
- Self-contained HTML report with Title, Requirements, Steps, and Expected Results extracted from test docstrings
- JUnit XML report for CI/CD
@ -206,5 +206,5 @@ The `ecu_framework/lin/babylin.py` implementation uses the official `BabyLIN_lib
## Next steps
- Plug in the actual BabyLin DLL and verify the hardware smoke tests
- Replace `HexFlasher` with a production flashing routine (UDS/XCP)
- Replace `HexFlasher` with a production flashing routine (UDS)
- Expand tests for end-to-end ECU workflows and requirement coverage

View File

@ -1,6 +1,6 @@
# Flashing Sequence (ECU Programming)
This document outlines the expected flashing workflow using the `HexFlasher` scaffold over the LIN interface and where you can plug in your production flasher (UDS/XCP).
This document outlines the expected flashing workflow using the `HexFlasher` scaffold over the LIN interface and where you can plug in your production flasher (UDS).
## Overview
@ -23,7 +23,7 @@ sequenceDiagram
alt flash.enabled == true and hex_path provided
F->>H: HexFlasher(lin).flash_hex(hex_path)
H->>L: connect (ensure session ready)
H->>E: Enter programming session (UDS/XCP)
H->>E: Enter programming session (UDS)
H->>E: Erase memory (as required)
loop For each block in HEX
H->>L: Transfer block via LIN frames
@ -39,7 +39,7 @@ sequenceDiagram
## Implementation notes
- `ecu_framework/flashing/hex_flasher.py` is a stub — replace with your protocol implementation (UDS/XCP)
- `ecu_framework/flashing/hex_flasher.py` is a stub — replace with your protocol implementation (UDS)
- Validate timing requirements and chunk sizes per ECU
- Consider power-cycle/reset hooks via programmable poewr supply.

View File

@ -1,3 +1,9 @@
"""
Flashing package.
Exports:
- HexFlasher: scaffold class to wire up UDS-based ECU programming over LIN.
"""
from .hex_flasher import HexFlasher
__all__ = ["HexFlasher"]

View File

@ -9,7 +9,7 @@ from ..lin.base import LinInterface
class HexFlasher:
"""Stubbed ECU flasher over LIN.
Replace with your actual UDS/XCP flashing sequence. For now, just validates the file exists
Replace with your actual UDS flashing sequence. For now, just validates the file exists
and pretends to flash successfully.
"""
@ -20,6 +20,6 @@ class HexFlasher:
path = pathlib.Path(hex_path)
if not path.is_file():
raise FileNotFoundError(f"HEX file not found: {hex_path}")
# TODO: Implement real flashing over LIN (UDS/XCP). This is a placeholder.
# TODO: Implement real flashing over LIN (UDS). This is a placeholder.
# You might send specific frames or use a higher-level protocol library.
return True