feat(domain): add ModbusAddress type and HealthStatus enum

Implements T025-T027 from TDD workflow (red-green-refactor):
- T025 (red): Tests for ModbusAddress with From<RelayId> conversion
- T026 (green): ModbusAddress newtype (#[repr(transparent)]) with offset mapping
- T027 (red+green): HealthStatus enum with state transitions

ModbusAddress wraps u16 and converts user-facing relay IDs (1-8) to
Modbus addresses (0-7) at the domain boundary. HealthStatus tracks
relay health with Healthy, Degraded, and Unhealthy states supporting
error tracking and recovery monitoring.

Ref: T025, T026, T027 (specs/001-modbus-relay-control)
This commit is contained in:
2026-01-03 23:44:38 +01:00
parent 39a609dec6
commit 7c89d48ac0
5 changed files with 448 additions and 3 deletions

View File

@@ -36,3 +36,5 @@
//! - Domain specification: `specs/001-modbus-relay-control/spec.md`
pub mod relay;
pub mod modbus;
pub mod health;