Task Roadmap - EGAT BESS RCU Firmware¶
- Project: Battery Energy Storage System - Rack Control Unit Firmware
- Primary Language: Python (with C for HAL)
- Developer Level: Intermediate
- Last Updated: 2026-01-20
Task Status Legend¶
Use these emoji to indicate task status. Simply copy and paste into the Status column:
| Emoji | Status | Description |
|---|---|---|
| π | Not Started | Task is planned but not yet begun |
| π | In Progress | Task is actively being worked on |
| β | Completed | Task is finished and tested |
| βΈοΈ | On Hold | Task is blocked or paused waiting for dependencies |
| β οΈ | Review | Task needs review or has issues |
| β | Cancelled | Task is no longer needed |
Story Points Estimation¶
| Story Points (SP) | Work Effort | Time Estimation | Dependency | Known about Task |
|---|---|---|---|---|
| 1 SP | Very Low | < 2 hours | None | Well understood |
| 2 SP | Low | 4 hours | Minor | Mostly understood |
| 3 SP | Moderate | 1-2 days | Some | Some unknowns |
| 5 SP | High | 3-5 days | Significant | Uncertain or complex |
| 8 SP | Very High | 1-2 weeks | Major | Highly uncertain or very complex |
| 13 SP | Extreme | 2+ weeks | Critical | Extremely uncertain or critical |
- Story Points use the Fibonacci sequence (1, 2, 3, 5, 8, 13) for relative sizing:
- Story Points reflect effort, complexity, and risk/uncertainty - not direct time conversion.
1. Project Setup & Infrastructure¶
| Status | Task ID | Task Name | Description | Est. Time | Story Points | Dependencies | Priority |
|---|---|---|---|---|---|---|---|
| β | INFRA-001 | Project repository setup | Initialize git repository, configure .gitignore, setup branch strategy | 2h | 1 | - | Critical |
| β | INFRA-002 | Python environment setup | Configure virtual environment, setup pyproject.toml/requirements.txt | 3h | 2 | INFRA-001 | Critical |
| β | INFRA-003 | Development tooling | Setup linters (pylint, flake8), formatters (black), type checkers (mypy) | 4h | 2 | INFRA-002 | High |
| π | INFRA-004 | CI/CD pipeline | Configure GitHub Actions/GitLab CI for automated testing and deployment | 8h | 5 | INFRA-002, INFRA-003 | High |
| π | INFRA-005 | Documentation framework | Setup MkDocs with mkdocstrings plugin for API documentation | 4h | 2 | INFRA-002 | Medium |
| π | INFRA-006 | Logging infrastructure | Implement centralized logging system with rotation and levels | 6h | 3 | INFRA-002 | High |
| π | INFRA-007 | Configuration management | Create configuration file handler (JSON/YAML) with validation | 6h | 3 | INFRA-002 | High |
| π | INFRA-008 | Unit testing framework | Setup pytest, configure test structure and fixtures | 4h | 2 | INFRA-002 | High |
| π | INFRA-009 | Hardware abstraction layer | Design and implement HAL interface for hardware independence | 12h | 8 | INFRA-002 | Critical |
2. Modbus Communication¶
2.1 Modbus Server (Slave) Implementation¶
| Status | Task ID | Task Name | Description | Est. Time | Story Points | Dependencies | Priority |
|---|---|---|---|---|---|---|---|
| π | MODBUS-001 | Modbus TCP server | Implement Modbus TCP server using pymodbus (slave ID 1) | 10h | 5 | INFRA-002, INFRA-006 | Critical |
| β | MODBUS-002 | Modbus RTU server | Implement Modbus RTU server for RS-485 communication | 10h | 8 | INFRA-002, INFRA-009 | Critical |
| π | MODBUS-003 | Register map implementation | Implement complete register map (holding, input, coils) | 12h | 8 | MODBUS-001 | Critical |
| π | MODBUS-004 | Function code handlers | Implement handlers for FC 03, 04, 06, 16 | 8h | 5 | MODBUS-003 | Critical |
| π | MODBUS-005 | Exception handling | Implement proper Modbus exception responses | 4h | 2 | MODBUS-004 | High |
| π | MODBUS-006 | Multi-client support | Handle concurrent TCP client connections (up to 10) | 6h | 5 | MODBUS-001 | High |
| π | MODBUS-007 | Register access control | Implement read-only/write protection for registers | 4h | 2 | MODBUS-003 | Medium |
| π | MODBUS-008 | Modbus data validation | Validate incoming data ranges and types | 5h | 3 | MODBUS-004 | High |
| π | MODBUS-009 | Communication timeout | Implement timeout detection and recovery | 4h | 3 | MODBUS-001, MODBUS-002 | High |
| π | MODBUS-010 | Unit testing - Modbus | Create comprehensive unit tests for Modbus functionality | 12h | 8 | MODBUS-001-009 | High |
2.2 Modbus Client (Master) Implementation¶
| Status | Task ID | Task Name | Description | Est. Time | Story Points | Dependencies | Priority |
|---|---|---|---|---|---|---|---|
| β | MODBUS-011 | Modbus TCP client | Implement Modbus TCP client for external device communication | 8h | 5 | INFRA-002 | High |
| π | MODBUS-012 | Modbus RTU client | Implement Modbus RTU client for sensor polling | 8h | 5 | INFRA-002, INFRA-009 | High |
| π | MODBUS-013 | Request scheduler | Implement polling scheduler for multiple devices | 6h | 5 | MODBUS-011, MODBUS-012 | Medium |
| π | MODBUS-014 | Response validation | Validate and parse Modbus responses | 4h | 2 | MODBUS-011, MODBUS-012 | High |
| π | MODBUS-015 | Error recovery | Implement retry logic and error handling | 5h | 3 | MODBUS-011, MODBUS-012 | High |
3. CAN Bus Communication¶
| Status | Task ID | Task Name | Description | Est. Time | Story Points | Dependencies | Priority |
|---|---|---|---|---|---|---|---|
| π | CAN-001 | CAN interface setup | Configure SocketCAN interface in Linux | 4h | 3 | INFRA-002, INFRA-009 | Critical |
| π | CAN-002 | python-can integration | Integrate python-can library with custom configuration | 6h | 3 | CAN-001 | Critical |
| π | CAN-003 | DBC file parser | Implement DBC file parser for message definitions | 12h | 8 | CAN-002 | Critical |
| π | CAN-004 | Message encoder | Implement CAN message encoding with signal packing | 10h | 8 | CAN-003 | Critical |
| π | CAN-005 | Message decoder | Implement CAN message decoding with signal extraction | 10h | 8 | CAN-003 | Critical |
| π | CAN-006 | BMS communication | Implement BMS-specific CAN protocol (read battery data) | 14h | 13 | CAN-004, CAN-005 | Critical |
| π | CAN-007 | PCS communication | Implement PCS CAN protocol (power commands, status) | 14h | 13 | CAN-004, CAN-005 | Critical |
| π | CAN-008 | CAN filtering | Implement hardware and software CAN message filters | 6h | 3 | CAN-002 | High |
| π | CAN-009 | Message prioritization | Implement message queue with priority handling | 6h | 5 | CAN-002 | High |
| π | CAN-010 | CAN error handling | Implement bus-off detection and auto-recovery | 8h | 5 | CAN-002 | Critical |
| π | CAN-011 | CAN health monitoring | Monitor bus load, error counters, and timeouts | 6h | 3 | CAN-002, INFRA-006 | High |
| π | CAN-012 | DBC version management | Handle multiple DBC versions and compatibility | 4h | 3 | CAN-003 | Medium |
| π | CAN-013 | CAN message logging | Log CAN traffic for debugging and analysis | 5h | 2 | CAN-002, INFRA-006 | Medium |
| π | CAN-014 | Unit testing - CAN | Create comprehensive unit tests for CAN functionality | 12h | 8 | CAN-001-013 | High |
4. Power Control & Command Processing¶
| Status | Task ID | Task Name | Description | Est. Time | Story Points | Dependencies | Priority |
|---|---|---|---|---|---|---|---|
| π | PWR-001 | Power command receiver | Receive power commands from PLC via Modbus | 6h | 3 | MODBUS-003, MODBUS-004 | Critical |
| π | PWR-002 | Command validation | Validate power commands against safety limits (0-100kW) | 6h | 5 | PWR-001 | Critical |
| π | PWR-003 | Unit conversion | Convert power units (kW to Watts) with precision | 3h | 1 | PWR-001 | High |
| π | PWR-004 | PCS command generator | Generate CAN messages for PCS control | 8h | 5 | PWR-003, CAN-007 | Critical |
| π | PWR-005 | Bidirectional control | Support charging and discharging commands | 5h | 3 | PWR-004 | High |
| π | PWR-006 | Power limit enforcement | Enforce configurable power limits with alarms | 6h | 5 | PWR-002 | Critical |
| π | PWR-007 | Ramp rate control | Implement power ramp rate limiting | 8h | 5 | PWR-004 | High |
| π | PWR-008 | Status feedback | Report power command status back to PLC | 4h | 2 | PWR-004, MODBUS-003 | High |
| π | PWR-009 | PCS response handling | Process and validate PCS response messages | 6h | 3 | CAN-007 | High |
| π | PWR-010 | Command timeout detection | Detect and handle command timeout (< 7s for PCS) | 4h | 3 | PWR-004 | Critical |
5. Digital I/O Control¶
| Status | Task ID | Task Name | Description | Est. Time | Story Points | Dependencies | Priority |
|---|---|---|---|---|---|---|---|
| π | DIO-001 | GPIO HAL implementation | Implement GPIO hardware abstraction layer | 8h | 5 | INFRA-009 | Critical |
| π | DIO-002 | Digital input reader | Read digital inputs (E-Stop, Door, Water immersion) | 6h | 3 | DIO-001 | Critical |
| π | DIO-003 | Input debouncing | Implement software debouncing for digital inputs | 4h | 3 | DIO-002 | High |
| π | DIO-004 | Digital output controller | Control digital outputs (contactors, relays, LEDs) | 6h | 3 | DIO-001 | Critical |
| π | DIO-005 | Contactor control | Implement 24V DC contactor control (CTR1 x2) | 6h | 5 | DIO-004 | Critical |
| π | DIO-006 | Door lock control | Implement door lock/unlock mechanism | 4h | 2 | DIO-004 | High |
| π | DIO-007 | Status LED control | Control status LEDs (Power, Comm, Fault, etc.) | 3h | 1 | DIO-004 | Medium |
| π | DIO-008 | Input interrupt handling | Implement ISR for critical inputs (E-Stop) | 6h | 5 | DIO-002, INFRA-009 | Critical |
| π | DIO-009 | I/O state machine | Create state machine for I/O control logic | 8h | 5 | DIO-002, DIO-004 | High |
| π | DIO-010 | I/O diagnostics | Implement I/O health monitoring and fault detection | 5h | 3 | DIO-001 | Medium |
5A. Simulation & Dry-Run Testing¶
Note: See Simulation Guidelines for detailed framework and testing guide.
| Status | Task ID | Task Name | Description | Est. Time | Story Points | Dependencies | Priority |
|---|---|---|---|---|---|---|---|
| π | SIM-001 | Simulation framework design | Design overall simulation architecture and patterns | 4h | 3 | INFRA-002 | High |
| π | SIM-002 | Base simulator class | Create abstract base class for all simulators | 3h | 2 | SIM-001 | High |
| π | SIM-003 | Virtual CAN setup | Configure vcan interface and test utilities | 2h | 2 | CAN-001 | High |
| π | SIM-004 | PLC simulator | Implement PLC Modbus client simulator | 8h | 5 | SIM-002, MODBUS-001 | Critical |
| π | SIM-005 | PCS simulator | Implement PCS CAN device simulator with DBC support | 10h | 8 | SIM-002, CAN-002, CAN-003 | Critical |
| π | SIM-006 | BMS simulator | Implement BMS CAN device simulator (FOXBMS) | 10h | 8 | SIM-002, CAN-002, CAN-003 | Critical |
| π | SIM-007 | Gas sensor simulator | Implement gas sensor Modbus simulator | 6h | 3 | SIM-002, MODBUS-011 | High |
| π | SIM-008 | I/O simulator | Implement digital I/O simulator (E-Stop, contactors, LEDs) | 5h | 3 | SIM-002 | High |
| π | SIM-009 | Test harness | Create integration test harness for multi-device scenarios | 6h | 5 | SIM-004-008 | High |
| π | SIM-010 | Scenario library | Create reusable test scenario library | 8h | 5 | SIM-009 | Medium |
| π | SIM-011 | Register validation suite | Create register-level validation tests | 4h | 3 | SIM-004, MODBUS-003 | High |
| π | SIM-012 | CI/CD integration | Integrate simulation tests into CI/CD pipeline | 4h | 3 | SIM-009, INFRA-004 | High |
6. Sensor Integration¶
6.1 Gas Detection Sensor (Cubic ATRS-1032)¶
Architecture: Gas Sensor (CAN) β Waveshare CAN-to-RS485 Adapter β RCU (RS-485/Modbus)
| Status | Task ID | Task Name | Description | Est. Time | Dependencies | Priority |
|---|---|---|---|---|---|---|
| π | SENSOR-001 | Gas sensor specification review | Review Cubic ATRS-1032 CAN protocol specification | 4h | - | High |
| π | SENSOR-002 | Waveshare adapter configuration | Configure CAN IDs, Modbus mapping, and slave ID on adapter | 8h | SENSOR-001 | High |
| π | SENSOR-003 | Adapter testing and validation | Verify CAN-to-Modbus conversion with test equipment | 6h | SENSOR-002 | High |
| π | SENSOR-004 | Gas sensor RS-485 driver | Implement RS-485/Modbus client for gas sensor data | 6h | INFRA-009, MODBUS-012, SENSOR-003 | High |
| π | SENSOR-005 | Gas sensor protocol implementation | Implement Modbus polling for gas concentration data | 6h | SENSOR-004 | High |
| π | SENSOR-006 | Gas data parsing | Parse gas concentration, alarm status, and sensor health | 4h | SENSOR-005 | High |
| π | SENSOR-007 | Gas alarm handling | Generate alarms on gas detection threshold | 5h | SENSOR-006 | Critical |
| π | SENSOR-008 | Gas sensor calibration | Implement sensor calibration and zero-point adjustment | 6h | SENSOR-005 | Medium |
| π | SENSOR-009 | Gas sensor fault detection | Detect sensor communication faults and hardware errors | 4h | SENSOR-005 | High |
6.2 Temperature Sensors¶
| Status | Task ID | Task Name | Description | Est. Time | Story Points | Dependencies | Priority |
|---|---|---|---|---|---|---|---|
| π | SENSOR-010 | Temperature sensor driver | Implement temperature sensor interface | 6h | 3 | INFRA-009 | Medium |
| π | SENSOR-011 | Multi-point temperature monitoring | Read multiple temperature sensors | 5h | 3 | SENSOR-010 | Medium |
| π | SENSOR-012 | Temperature alarm thresholds | Implement high/low temperature alarms | 4h | 2 | SENSOR-011 | High |
| π | SENSOR-013 | Temperature data filtering | Implement moving average filter for stability | 3h | 1 | SENSOR-011 | Low |
6.3 Other Sensors¶
| Status | Task ID | Task Name | Description | Est. Time | Story Points | Dependencies | Priority |
|---|---|---|---|---|---|---|---|
| π | SENSOR-014 | Water immersion sensor | Implement water detection sensor reading | 4h | 2 | DIO-002 | High |
| β | SENSOR-015 | Motor status monitoring | Read motor status as digital input | 3h | 1 | DIO-002 | Medium |
| π | SENSOR-016 | Sensor data aggregation | Aggregate all sensor data for PLC reporting | 6h | 3 | SENSOR-006, SENSOR-011, SENSOR-014 | High |
6.4 AC Power Meter (RISH LM1360)¶
Architecture: AC Meter (3-phase) β RS-485/Modbus RTU β RCU
| Status | Task ID | Task Name | Description | Est. Time | Story Points | Dependencies | Priority |
|---|---|---|---|---|---|---|---|
| π | SENSOR-017 | AC meter specification review | Review RISH LM1360 specifications and Modbus register map | 4h | 2 | - | High |
| π | SENSOR-018 | AC meter RS-485 driver | Implement RS-485/Modbus RTU driver for AC meter | 6h | 3 | INFRA-009, MODBUS-012, SENSOR-017 | High |
| π | SENSOR-019 | AC meter data parsing | Parse voltage, current, power, energy, PF, and frequency | 8h | 3 | SENSOR-018 | High |
| π | SENSOR-020 | Energy calculation | Implement energy accumulation and power factor monitoring | 5h | 3 | SENSOR-019 | Medium |
| π | SENSOR-021 | AC meter simulator | Implement simulator for AC meter testing | 6h | 3 | SIM-002, MODBUS-012 | High |
6.5 Insulation Resistance Meter (isoCHA425HV)¶
Architecture: Insulation Meter (HV) β Modbus β RCU (Safety-Critical)
| Status | Task ID | Task Name | Description | Est. Time | Story Points | Dependencies | Priority |
|---|---|---|---|---|---|---|---|
| π | SENSOR-022 | Insulation meter specification review | Review isoCHA425HV specifications and communication protocol | 4h | 2 | - | Critical |
| π | SENSOR-023 | Insulation meter driver | Implement Modbus driver for insulation meter | 8h | 5 | INFRA-009, SENSOR-022 | Critical |
| π | SENSOR-024 | Insulation resistance parsing | Parse insulation resistance data and test status | 8h | 3 | SENSOR-023 | Critical |
| π | SENSOR-025 | Insulation alarm handling | Generate critical alarms for insulation failures | 6h | 5 | SENSOR-024, SAFE-004 | Critical |
| π | SENSOR-026 | Insulation fault detection | Detect communication and hardware faults | 4h | 3 | SENSOR-023 | High |
| π | SENSOR-027 | Insulation meter simulator | Implement simulator with fault injection for safety testing | 6h | 3 | SIM-002 | High |
7. Safety & Monitoring Systems¶
| Status | Task ID | Task Name | Description | Est. Time | Story Points | Dependencies | Priority |
|---|---|---|---|---|---|---|---|
| π | SAFE-001 | Emergency stop handler | Implement E-Stop signal processing (< 50ms) | 8h | 8 | DIO-008 | Critical |
| π | SAFE-002 | E-Stop state machine | Create E-Stop state machine with manual reset | 6h | 5 | SAFE-001 | Critical |
| π | SAFE-003 | Safety interlock logic | Implement safety interlock conditions | 10h | 8 | SAFE-001, PWR-006 | Critical |
| π | SAFE-004 | Fault detection system | Detect hardware, communication, and software faults | 12h | 13 | INFRA-006 | Critical |
| π | SAFE-005 | Fault logging | Log all faults with timestamp and severity | 4h | 2 | SAFE-004, INFRA-006 | High |
| π | SAFE-006 | Alarm management | Implement alarm prioritization and acknowledgment | 8h | 5 | SAFE-004 | High |
| π | SAFE-007 | Watchdog implementation | Implement hardware watchdog timer service | 6h | 5 | INFRA-009 | Critical |
| π | SAFE-008 | Software watchdog | Implement application-level watchdog monitoring | 5h | 3 | SAFE-007 | High |
| π | SAFE-009 | Health monitoring | Monitor system health (CPU, memory, temperature) | 6h | 3 | INFRA-006 | Medium |
| π | SAFE-010 | Communication timeout detection | Detect PLC, PCS, and BMS communication timeouts | 6h | 5 | MODBUS-009, CAN-011 | High |
| π | SAFE-011 | Safe state implementation | Define and implement safe state for all fault conditions | 8h | 8 | SAFE-001, SAFE-004 | Critical |
| π | SAFE-012 | Fail-safe logic | Implement fail-safe behavior for critical functions | 10h | 8 | SAFE-011 | Critical |
8. Data Management & Logging¶
| Status | Task ID | Task Name | Description | Est. Time | Story Points | Dependencies | Priority |
|---|---|---|---|---|---|---|---|
| π | DATA-001 | Data model definition | Define data structures for all system data | 8h | 5 | INFRA-002 | High |
| π | DATA-002 | Real-time data buffer | Implement circular buffer for real-time data | 6h | 3 | DATA-001 | High |
| π | DATA-003 | Time-series logging | Implement time-series data logging (1s interval) | 8h | 5 | DATA-001, INFRA-006 | High |
| π | DATA-004 | Log file rotation | Implement log rotation with size/time limits | 4h | 2 | DATA-003 | Medium |
| π | DATA-005 | Data persistence | Store configuration and historical data | 6h | 3 | INFRA-007 | Medium |
| π | DATA-006 | Event logging | Log system events, commands, and state changes | 5h | 2 | INFRA-006 | High |
| π | DATA-007 | Performance metrics | Track and log performance metrics (latency, throughput) | 6h | 3 | INFRA-006 | Medium |
| π | DATA-008 | Data export functionality | Export logs to CSV/JSON for analysis | 5h | 2 | DATA-003 | Low |
| π | DATA-009 | Data compression | Implement data compression for long-term storage | 6h | 3 | DATA-003 | Low |
9. System State Management¶
| Status | Task ID | Task Name | Description | Est. Time | Story Points | Dependencies | Priority |
|---|---|---|---|---|---|---|---|
| π | STATE-001 | State machine design | Design main system state machine | 8h | 5 | - | Critical |
| π | STATE-002 | State machine implementation | Implement state machine with transitions | 10h | 8 | STATE-001 | Critical |
| π | STATE-003 | Initialization state | Implement system initialization and self-test | 8h | 5 | STATE-002 | Critical |
| π | STATE-004 | Normal operation state | Implement normal operation state logic | 6h | 3 | STATE-002 | Critical |
| π | STATE-005 | Fault state | Implement fault state handling | 6h | 5 | STATE-002, SAFE-004 | Critical |
| π | STATE-006 | Maintenance mode | Implement maintenance mode for testing/debugging | 10h | 8 | STATE-002 | High |
| π | STATE-007 | Shutdown sequence | Implement safe shutdown sequence | 6h | 5 | STATE-002 | High |
| π | STATE-008 | State persistence | Save and restore state across reboots | 4h | 3 | STATE-002, DATA-005 | Medium |
| π | STATE-009 | State transition logging | Log all state transitions with reasons | 4h | 2 | STATE-002, INFRA-006 | High |
10. PLC Integration¶
| Status | Task ID | Task Name | Description | Est. Time | Story Points | Dependencies | Priority |
|---|---|---|---|---|---|---|---|
| π | PLC-001 | PLC command parser | Parse PLC commands from Modbus registers | 6h | 3 | MODBUS-003 | Critical |
| π | PLC-002 | Command acknowledgment | Send ACK/NACK responses to PLC | 4h | 2 | MODBUS-003, PLC-001 | High |
| π | PLC-003 | Status reporting | Report system status to PLC registers | 6h | 3 | MODBUS-003, STATE-002 | Critical |
| π | PLC-004 | Data aggregation | Aggregate data from BMS/PCS for PLC | 8h | 5 | CAN-006, CAN-007, MODBUS-003 | High |
| π | PLC-005 | PLC heartbeat | Implement heartbeat mechanism with PLC | 4h | 2 | MODBUS-001 | High |
| π | PLC-006 | PLC timeout handling | Handle PLC communication loss gracefully | 5h | 3 | MODBUS-009, SAFE-010 | High |
11. PCS Integration¶
| Status | Task ID | Task Name | Description | Est. Time | Story Points | Dependencies | Priority |
|---|---|---|---|---|---|---|---|
| π | PCS-001 | PCS DBC integration | Load and parse PCS CAN DBC file | 6h | 5 | CAN-003 | Critical |
| π | PCS-002 | PCS power command | Send power commands to PCS via CAN | 8h | 5 | PCS-001, PWR-004 | Critical |
| π | PCS-003 | PCS status monitoring | Monitor PCS status messages | 6h | 3 | PCS-001, CAN-005 | Critical |
| π | PCS-004 | PCS fault handling | Handle PCS fault conditions | 8h | 8 | PCS-003, SAFE-004 | Critical |
| π | PCS-005 | PCS response timeout | Implement 7-second timeout for PCS commands | 4h | 3 | PCS-002, PWR-010 | Critical |
| π | PCS-006 | PCS operating mode | Control PCS operating modes (charge/discharge/standby) | 6h | 5 | PCS-002 | High |
| π | PCS-007 | PCS data logging | Log PCS operational data | 4h | 2 | PCS-003, DATA-003 | Medium |
12. BMS Integration¶
| Status | Task ID | Task Name | Description | Est. Time | Story Points | Dependencies | Priority |
|---|---|---|---|---|---|---|---|
| π | BMS-001 | BMS DBC integration | Load and parse BMS (FOXBMS) CAN DBC file | 6h | 5 | CAN-003 | Critical |
| π | BMS-002 | BMS data receiver | Receive battery data (voltage, current, SOC, temp) | 10h | 8 | BMS-001, CAN-005 | Critical |
| π | BMS-003 | Cell voltage monitoring | Monitor individual cell voltages | 6h | 5 | BMS-002 | High |
| π | BMS-004 | Temperature monitoring | Monitor battery pack temperatures | 5h | 3 | BMS-002 | High |
| π | BMS-005 | SOC/SOH monitoring | Monitor State of Charge and State of Health | 6h | 5 | BMS-002 | High |
| π | BMS-006 | BMS fault detection | Detect and handle BMS fault messages | 8h | 8 | BMS-002, SAFE-004 | Critical |
| π | BMS-007 | Battery protection logic | Implement over-voltage/under-voltage protection | 10h | 13 | BMS-003, SAFE-003 | Critical |
| π | BMS-008 | Multi-rack support | Support up to 8 battery racks per RCU | 12h | 13 | BMS-002 | High |
| π | BMS-009 | BMS communication timeout | Detect BMS communication loss | 4h | 3 | BMS-002, SAFE-010 | High |
13. Network & Remote Access¶
| Status | Task ID | Task Name | Description | Est. Time | Story Points | Dependencies | Priority |
|---|---|---|---|---|---|---|---|
| π | NET-001 | Network configuration | Configure Ethernet interface and IP settings | 4h | 2 | INFRA-002 | High |
| π | NET-002 | Modbus TCP socket | Open Modbus TCP socket on port 502 | 4h | 2 | MODBUS-001, NET-001 | Critical |
| π | NET-003 | Web interface | Create simple web interface for monitoring | 16h | 13 | NET-001 | Medium |
| π | NET-004 | REST API | Implement REST API for remote access | 12h | 8 | NET-001 | Low |
| π | NET-005 | NTP client | Implement NTP time synchronization | 4h | 2 | NET-001 | Medium |
| π | NET-006 | Network security | Implement basic firewall rules and access control | 8h | 5 | NET-001 | High |
| π | NET-007 | Remote diagnostics | Enable remote diagnostic access | 8h | 5 | NET-003 | Low |
14. Testing & Validation¶
| Status | Task ID | Task Name | Description | Est. Time | Story Points | Dependencies | Priority |
|---|---|---|---|---|---|---|---|
| π | TEST-001 | Unit test framework | Setup comprehensive unit test suite | 8h | 3 | INFRA-008 | Critical |
| π | TEST-002 | Modbus unit tests | Create unit tests for Modbus functionality | 12h | 5 | MODBUS-010 | High |
| π | TEST-003 | CAN unit tests | Create unit tests for CAN functionality | 12h | 5 | CAN-014 | High |
| π | TEST-004 | Integration test plan | Create integration test plan and procedures | 8h | 5 | - | High |
| π | TEST-005 | Hardware-in-loop tests | Develop HIL test cases | 16h | 13 | TEST-004 | High |
| π | TEST-006 | System test procedures | Create end-to-end system test procedures | 12h | 8 | TEST-004 | High |
| π | TEST-007 | Performance testing | Test timing requirements and performance | 10h | 8 | TEST-006 | High |
| π | TEST-008 | Safety validation | Validate all safety-critical functions | 16h | 13 | SAFE-001-012 | Critical |
| π | TEST-009 | Communication stress tests | Test communication under high load | 8h | 5 | TEST-002, TEST-003 | Medium |
| π | TEST-010 | Fault injection tests | Test system behavior under fault conditions | 12h | 8 | SAFE-004, TEST-008 | High |
| π | TEST-011 | Regression test suite | Create automated regression test suite | 12h | 8 | TEST-001-010 | High |
15. Documentation¶
| Status | Task ID | Task Name | Description | Est. Time | Story Points | Dependencies | Priority |
|---|---|---|---|---|---|---|---|
| π | DOC-001 | API documentation | Generate API documentation using MkDocs with mkdocstrings | 8h | 3 | INFRA-005 | High |
| π | DOC-002 | User manual | Create user manual for operators | 16h | 8 | - | High |
| π | DOC-003 | Installation guide | Create installation and deployment guide | 8h | 5 | - | High |
| π | DOC-004 | Configuration guide | Document configuration parameters | 6h | 3 | INFRA-007 | Medium |
| π | DOC-005 | Troubleshooting guide | Create troubleshooting and diagnostics guide | 10h | 5 | SAFE-004 | Medium |
| π | DOC-006 | Architecture documentation | Document system architecture and design | 12h | 5 | - | High |
| π | DOC-007 | Protocol specifications | Document all communication protocols | 8h | 3 | - | Medium |
| π | DOC-008 | Safety procedures | Document safety-related procedures | 8h | 5 | SAFE-001-012 | Critical |
16. Deployment & Operations¶
| Status | Task ID | Task Name | Description | Est. Time | Story Points | Dependencies | Priority |
|---|---|---|---|---|---|---|---|
| π | DEPLOY-001 | Deployment scripts | Create automated deployment scripts | 8h | 5 | INFRA-004 | High |
| π | DEPLOY-002 | System configuration | Create production configuration files | 4h | 2 | INFRA-007 | High |
| π | DEPLOY-003 | Backup/restore procedures | Implement backup and restore functionality | 6h | 3 | DATA-005 | Medium |
| π | DEPLOY-004 | Update mechanism | Implement firmware update mechanism | 12h | 8 | DEPLOY-001 | High |
| π | DEPLOY-005 | Rollback capability | Implement rollback for failed updates | 6h | 5 | DEPLOY-004 | High |
| π | DEPLOY-006 | Health check scripts | Create system health check scripts | 6h | 3 | SAFE-009 | Medium |
| π | DEPLOY-007 | Monitoring setup | Setup system monitoring and alerting | 8h | 5 | INFRA-006 | Medium |
Summary Statistics¶
By Priority¶
- Critical: 82 tasks (~540h / ~67.5 days)
- High: 82 tasks (~512h / ~64 days)
- Medium: 24 tasks (~147h / ~18.4 days)
- Low: 5 tasks (~25h / ~3.1 days)
By Category¶
- Infrastructure: 9 tasks (53h, 32 SP)
- Modbus: 15 tasks (106h, 64 SP)
- CAN: 14 tasks (119h, 78 SP)
- Power Control: 10 tasks (62h, 36 SP)
- Digital I/O: 10 tasks (61h, 37 SP)
- Simulation: 12 tasks (70h, 47 SP)
- Sensors: 27 tasks (152h, 81 SP)
- Safety: 12 tasks (89h, 64 SP)
- Data Management: 9 tasks (56h, 28 SP)
- State Management: 9 tasks (56h, 44 SP)
- PLC Integration: 6 tasks (33h, 18 SP)
- PCS Integration: 7 tasks (46h, 31 SP)
- BMS Integration: 9 tasks (67h, 58 SP)
- Network: 7 tasks (56h, 37 SP)
- Testing: 11 tasks (126h, 81 SP)
- Documentation: 8 tasks (76h, 37 SP)
- Deployment: 7 tasks (50h, 31 SP)
Total Effort¶
- Total Tasks: 204
- Estimated Hours: ~1,285 hours
- Total Story Points: 844 SP
Story Points Distribution¶
Fibonacci sequence breakdown across all tasks:
- 13 points: 9 tasks (BMS/PCS protocols, safety systems, integration testing)
- 8 points: 37 tasks (Complex implementations, HAL, multi-rack support)
- 5 points: 58 tasks (Standard features with moderate complexity)
- 3 points: 57 tasks (Medium complexity, well-understood work)
- 2 points: 22 tasks (Simple implementations, configs)
- 1 point: 10 tasks (Trivial tasks, LED control, filtering)
- Estimated Developer-Months: ~7.3 months (at 175h/month, intermediate level)
Sprint Planning: For detailed sprint planning, ceremonies, and task breakdowns, see Agile Scrum Framework
Phase-Based Implementation View¶
This section provides a high-level overview of the implementation phases. For detailed sprint planning with task breakdowns, see Agile Scrum Framework.
Phase 1: Foundation & Core Protocols (Weeks 1-6)¶
Objective: Establish development environment and prove end-to-end data flow with core protocols
- Infrastructure Setup (Week 1-2)
- INFRA-001 to INFRA-009 - Setup development environment
-
SIM-001 to SIM-003 - Setup simulation framework (See Simulation Guidelines)
-
Core Protocol Implementation (Week 3-5)
- MODBUS-001, MODBUS-002 - Basic Modbus server (TCP/RTU)
- MODBUS-003 - Minimal register map (power command, status only)
- CAN-001, CAN-002, CAN-003 - CAN interface and DBC parser
-
SIM-004, SIM-005 - Create PLC and PCS simulators
-
Walking Skeleton (Week 6)
- STATE-001, STATE-002 - Design and implement basic state machine
- PWR-001, PWR-002, PWR-004 - Simple power command flow: PLC β RCU β PCS
- DIO-001 - GPIO HAL for basic I/O
- SIM-006 - End-to-end integration test with simulators
Deliverable: Working prototype that receives Modbus command, processes it, and sends CAN message
Phase 2: Complete Communication Stack (Weeks 7-12)¶
Objective: Implement full communication protocols and basic integrations
- Complete Modbus Implementation (Week 7-9)
- MODBUS-004 to MODBUS-010 - Complete Modbus server functionality
- MODBUS-011 to MODBUS-015 - Modbus client for sensors
-
PLC-001 to PLC-003 - Full PLC integration
-
Complete CAN Implementation (Week 10-12)
- CAN-004 to CAN-014 - Full CAN stack with error handling
- SIM-007 - BMS simulator with realistic data
Deliverable: Full bidirectional communication with PLC, PCS, and basic BMS
Phase 3: Device Integration (Weeks 13-18)¶
Objective: Complete device-specific implementations and power control logic
- BMS Integration (Week 13-14)
- BMS-001 to BMS-009 - Complete BMS implementation
-
SIM-006 - BMS simulator for validation
-
PCS Integration (Week 15-16)
- PCS-001 to PCS-007 - Complete PCS implementation
-
PWR-007 to PWR-010 - Advanced power control features
-
PLC Data Aggregation (Week 17-18)
- PLC-004 to PLC-006 - Complete PLC integration
- Data aggregation from all devices
Deliverable: Full power control pipeline with all device integrations
Phase 4: Safety & Sensors (Weeks 19-23)¶
Objective: Implement safety-critical functions and sensor integration
- Safety Systems (Week 19-21)
- SAFE-001 to SAFE-012 - Complete safety implementation
- DIO-002 to DIO-010 - Complete I/O control
-
STATE-003 to STATE-007 - Complete state machine
-
Sensor Integration (Week 22-23)
- SENSOR-001 to SENSOR-009 - Gas detection (with Waveshare adapter)
- SENSOR-010 to SENSOR-016 - Temperature and other sensors
- SIM-007 - Gas sensor simulator
Deliverable: Fully functional safety system with all sensors
Phase 5: Testing, Documentation & Deployment (Weeks 24-30)¶
Objective: Comprehensive validation, documentation, and production readiness
- Integration Testing (Week 24-26)
- TEST-001 to TEST-011 - Full test suite
- SIM-009 to SIM-012 - Complete simulation testing
-
Hardware-in-the-loop (HIL) testing
-
Documentation (Week 27-28)
- DOC-001 to DOC-008 - Complete documentation set
-
API documentation with MkDocs, user manuals, troubleshooting guides
-
Deployment Preparation (Week 29-30)
- DEPLOY-001 to DEPLOY-007 - Production deployment
- NET-001 to NET-007 - Network and remote access
- Final system validation
Deliverable: Production-ready firmware with complete documentation
Notes¶
- Python Focus: Most application logic will be in Python using libraries like:
pymodbusfor Modbus TCP/RTUpython-canfor CAN buscantoolsfor DBC parsinggpiodfor GPIO control-
pytestfor testing -
Hardware Abstraction: C-based HAL may be needed for:
- Low-latency GPIO operations
- Watchdog timer control
-
Real-time interrupt handling
-
Simulation-First Development: Follow the walking skeleton approach:
- Develop against simulators first (Phase 1)
- Validate logic before hardware integration
- Maintain simulation suite for regression testing
-
See Simulation Guidelines for details
-
Gas Sensor Architecture:
- Cubic ATRS-1032 (CAN) β Waveshare CAN-to-RS485 Adapter β RCU (RS-485/Modbus)
- Adapter requires configuration for CAN ID mapping and Modbus register assignment
-
Task SENSOR-002 covers adapter configuration
-
Documentation Framework:
- Use MkDocs with mkdocstrings plugin for API documentation
- Easier to manage for intermediate developers
- Renders beautifully on GitHub Pages
-
Better Python integration than Sphinx
-
Time Estimates: Based on intermediate developer skill level. Actual times may vary based on:
- Hardware availability and stability
- Third-party library maturity
- Integration complexity
-
Testing requirements
-
Dependencies: Many tasks have dependencies. Use proper project management tools (GitHub Projects, Jira, Azure DevOps) to track critical path.
-
Risk Areas:
- CAN DBC file completeness and accuracy
- PCS 7-second timeout requirement
- Multi-rack BMS coordination
- Safety-critical timing requirements
- Waveshare adapter configuration and stability
Management Workflow¶
Version Control¶
This document is the source of truth for project planning and is version-controlled in the repository at docs/planning/task-roadmap.md.
GitHub Integration¶
For active task management:
- Create GitHub Issues for Critical and High priority tasks
- Use GitHub Projects for Kanban-style tracking
- Link commits to issues using
Closes #issue-number - Create Milestones for each phase
Updating Status¶
To update task status:
- Edit this file directly in your repository
- Replace the emoji in the Status column with the appropriate symbol from the legend
- Commit with a descriptive message:
chore: update INFRA-001 to in-progress
Example Status Update¶
This approach provides both offline tracking (version-controlled Markdown) and online execution (GitHub Issues/Projects) for optimal project management.