tbf/TBF/Rig/Input/DataStorage/UniDataStorageReader/Interfaces/PublicModels.cs

67 lines
2.6 KiB
C#

using System;
using System.Collections.Generic;
namespace TBF.Rig.Input.DataStorage.UniDataStorageReader.Interfaces
{
/// <summary>
/// Public data contract layer for the UniDataStorageReader (UDSR).
///
/// This class defines all Data Transfer Objects (DTOs) that are exposed
/// to external consumers (e.g. TBF, UI, or other integration layers).
///
/// Responsibilities:
/// - Provide stable, dependency-free models for external usage
/// - Decouple internal GCI implementation (GenesisMeter, Xylem libraries)
/// from external systems
/// - Define request/response contracts for all supported operations
/// - Contain mapping methods between public DTOs and internal domain models
///
/// Architecture:
/// External world (TBF / UI)
/// ↓
/// GciPublicModels (this layer)
/// ↓
/// Internal GCI API (InterfaceGCIToLaatzen, GenesisMeter, etc.)
///
/// Notes:
/// - Public models must NOT expose internal types (e.g. GenesisMeter, IPort, etc.)
/// - All mapping between internal and external representations must be done here
/// - DTOs are designed to be simple, serializable, and stable over time
/// - Any change in internal implementation should not affect these models
///
/// Pattern:
/// Each operation follows a consistent structure:
/// Request → Operation → Result
///
/// Example:
/// GciInitSlotRequest → InitSlot → GciInitSlotResult
/// GetSlot → GciSlotInfo
/// GetPcbId → GciGetPcbIdResult
///
/// This layer acts as a boundary between domain logic and integration logic.
/// </summary>
public class PublicModels
{
/// <summary>
/// Public DTOs exposed to external systems.
/// These models represent the contract of the GCI API.
/// They must remain stable and independent of internal implementation.
/// </summary>
#region ================================== PUBLIC MODELS ===========================================
/// <summary>
/// Represents query input for data storage readers.
/// Each value is used to execute the same query template once.
/// A single-item list represents a single query.
/// </summary>
public class DataQuery
{
/// <summary>
/// Parameter values used for repeated execution of the same query template.
/// </summary>
public List<string> QueryParams { get; } = new List<string>();
}
#endregion
}
}