# High-Level Requirements

## HLR-001: OPC UA Server

The system shall expose an OPC UA server endpoint that OPC UA clients can connect to for browsing, reading, and writing Galaxy tag data.

## HLR-002: Galaxy Hierarchy as OPC UA Address Space

The system shall build an OPC UA address space that mirrors the System Platform Galaxy object hierarchy, using contained names for browse structure and tag names for runtime data access.

## HLR-003: MXAccess Runtime Data Access

The system shall use the MXAccess toolkit to subscribe to, read, and write Galaxy tag attribute values at runtime on behalf of connected OPC UA clients.

## HLR-004: Data Type Mapping

The system shall map Galaxy attribute data types (mx_data_type) to appropriate OPC UA built-in types, including support for array attributes.

## HLR-005: Dynamic Address Space Rebuild

The system shall detect Galaxy deployment changes (via `galaxy.time_of_last_deploy`) and rebuild the OPC UA address space to reflect the current deployed state.

## HLR-006: Windows Service Hosting

The system shall run as a Windows service (via TopShelf) with support for install, uninstall, and interactive console modes.

## HLR-007: Logging

The system shall log operational events to rolling daily log files using Serilog.

## HLR-008: Connection Resilience

The system shall automatically reconnect to MXAccess after connection loss, replaying active subscriptions upon reconnect.

## HLR-009: Status Dashboard

The system shall host an embedded HTTP status dashboard (similar to the LmxProxy dashboard) providing at-a-glance operational visibility including connection state, health, subscription statistics, and operation metrics.

## Component-Level Requirements

Detailed requirements are broken out into the following documents:

- [OPC UA Server Requirements](OpcUaServerReqs.md)
- [MXAccess Client Requirements](MxAccessClientReqs.md)
- [Galaxy Repository Requirements](GalaxyRepositoryReqs.md)
- [Service Host Requirements](ServiceHostReqs.md)
- [Status Dashboard Requirements](StatusDashboardReqs.md)
