software and system v1

This commit is contained in:
2026-02-02 00:49:50 +01:00
parent 9c5082cd9e
commit a23dbf0828
21 changed files with 4400 additions and 137 deletions

View File

@@ -0,0 +1,130 @@
# HMI Controller Component
## ASF Sensor Hub (Sub-Hub) Embedded System
**Component ID:** C-HMI-001
**Version:** 1.0
**Date:** 2025-02-01
**Location:** `application_layer/business_stack/hmi_controller/`
**Display:** OLED 128x64 (I2C)
---
## 1. Component Overview
The HMI Controller provides local human-machine interface functionality including OLED display management, button input handling, and menu navigation. This component enables local status monitoring and basic diagnostics access.
**Primary Purpose:** Provide local user interface for system status and diagnostics.
---
## 2. Responsibilities
### 2.1 In-Scope
- OLED display initialization and management
- Display content rendering
- Button input handling (Up, Down, Select)
- Menu system implementation
- Status information display
- Diagnostic information display
- Sensor information display
### 2.2 Out-of-Scope
- Configuration changes (read-only interface)
- System control (handled by System State Manager)
- Data modification (handled by authenticated sessions)
---
## 3. Provided Interfaces
### 3.1 Display Interface
```c
/**
* @brief Initialize HMI Controller
* @return true on success
*/
bool hmi_init(void);
/**
* @brief Update display with system status
* @param status System status structure
* @return true on success
*/
bool hmi_update_status(const system_status_t* status);
/**
* @brief Display diagnostic information
* @param diag_info Diagnostic information structure
* @return true on success
*/
bool hmi_display_diagnostics(const diagnostic_info_t* diag_info);
```
### 3.2 Button Interface
```c
/**
* @brief Get button input
* @param button_state Output button state
* @return true if button pressed
*/
bool hmi_get_button_input(button_state_t* button_state);
```
---
## 4. Display Content
### 4.1 Main Screen
- Connectivity status
- System state
- Connected sensor count
- Current time/date
- Error indicator
### 4.2 Menu Structure
```
Main Menu
├── Status
│ ├── System State
│ ├── Sensors
│ └── Connectivity
├── Diagnostics
│ ├── Recent Events
│ ├── Error Count
│ └── System Health
└── About
├── Firmware Version
└── Device ID
```
---
## 5. Dependencies
- **OSAL-I2C:** OLED display communication
- **OSAL-GPIO:** Button input
- **System State Manager:** System state information
- **Diagnostics Manager:** Diagnostic information
- **Time Utils:** Time/date display
---
## 6. Traceability
### 6.1 System Requirements
- **SR-SYS-007:** OLED display interface
- **SR-SYS-008:** System information display
- **SR-SYS-009:** Button navigation
- **SR-SYS-010:** Diagnostic menu access
---
**Document Status:** Complete
**Next Review:** Before implementation