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

/// <summary>
///     PLC family selector that drives the parser's family-native branch. When the
///     driver is configured for a specific family, address strings using that family's native
///     notation (DirectLOGIC <c>V2000</c> octal, MELSEC <c>X20</c> hex/octal, etc.) are
///     translated to <see cref="ModbusRegion"/> + PDU offset directly — without forcing
///     integration engineers to pre-translate to Modicon notation.
/// </summary>
/// <remarks>
///     <para>
///         When set to <see cref="Generic"/> (the default), the parser only accepts Modicon and
///         mnemonic forms — preserves the previous behaviour exactly. Setting a non-Generic family
///         is the only way to enable family-native parsing.
///     </para>
///     <para>
///         <b>Cross-family ambiguity</b>: <c>C100</c> means coil 100 under
///         <see cref="Generic"/>, but DL260 control-relay 100 under <see cref="DL205"/>, etc.
///         Per-driver Family selection makes the choice unambiguous within one driver instance;
///         users with mixed families need separate driver instances per device.
///     </para>
/// </remarks>
public enum ModbusFamily
{
    /// <summary>Default — only Modicon (4xxxx) and mnemonic (HR1, C100) forms are accepted.</summary>
    Generic,

    /// <summary>
    ///     AutomationDirect DirectLOGIC (DL205 / DL260 / DL350). V-memory is octal; Y / C
    ///     are coils with hard-wired bank bases; X / SP are discrete inputs.
    /// </summary>
    DL205,

    /// <summary>
    ///     Mitsubishi MELSEC. X / Y interpretation depends on sub-family selection — see
    ///     <see cref="MelsecFamily"/>. Defaults to Q/L/iQR (hex) when this family is selected.
    /// </summary>
    MELSEC,
}
