using ZB.MOM.WW.OtOpcUa.Core.Abstractions;

namespace ZB.MOM.WW.OtOpcUa.Driver.MTConnect;

/// <summary>
///     One MTConnect-backed OPC UA variable. Each authored tag binds a single Agent DataItem by
///     its <c>id</c> attribute (<see cref="FullName"/>); the driver looks up the observation's
///     current value from the Agent's <c>/current</c> snapshot / <c>/sample</c> stream by that id.
/// </summary>
/// <param name="FullName">
///     The MTConnect DataItem's <c>id</c> attribute (the Agent's <c>/probe</c> response). This is
///     the driver's reference for read/subscribe — MTConnect is a read-only source protocol, so
///     there is no corresponding write path.
/// </param>
/// <param name="DriverDataType">Logical data type the DataItem's value is coerced to.</param>
/// <param name="IsArray">
///     When <c>true</c>, the tag is exposed as an OPC UA array (e.g. an MTConnect
///     <c>PathPosition</c> / vector-valued sample). Default <c>false</c> = scalar.
/// </param>
/// <param name="ArrayDim">
///     Element count when <see cref="IsArray"/> is <c>true</c>; ignored for scalar tags. Default
///     <c>0</c>.
/// </param>
/// <param name="MtCategory">
///     The DataItem's MTConnect <c>category</c> attribute — <c>SAMPLE</c>, <c>EVENT</c>, or
///     <c>CONDITION</c>. Optional metadata carried through for browse / display; not consulted by
///     the value-mapping path. Default <c>null</c>.
/// </param>
/// <param name="MtType">
///     The DataItem's MTConnect <c>type</c> attribute (e.g. <c>POSITION</c>, <c>EXECUTION</c>).
///     Optional metadata. Default <c>null</c>.
/// </param>
/// <param name="MtSubType">
///     The DataItem's MTConnect <c>subType</c> attribute (e.g. <c>ACTUAL</c>, <c>COMMANDED</c>).
///     Optional metadata. Default <c>null</c>.
/// </param>
/// <param name="Units">
///     The DataItem's MTConnect <c>units</c> attribute (e.g. <c>MILLIMETER</c>,
///     <c>REVOLUTION/MINUTE</c>). Optional metadata. Default <c>null</c>.
/// </param>
public sealed record MTConnectTagDefinition(
    string FullName,
    DriverDataType DriverDataType,
    bool IsArray = false,
    int ArrayDim = 0,
    string? MtCategory = null,
    string? MtType = null,
    string? MtSubType = null,
    string? Units = null);
