feat(ablegacy): PCCC multi-element file array read + IsArray discovery
This commit is contained in:
@@ -41,13 +41,31 @@ public sealed record AbLegacyDeviceOptions(
|
||||
/// One PCCC-backed OPC UA variable. <paramref name="Address"/> is the canonical PCCC
|
||||
/// file-address string that parses via <c>AbLegacyAddress.TryParse</c>.
|
||||
/// </summary>
|
||||
/// <param name="ArrayLength">
|
||||
/// Element count when the tag addresses a multi-element span of a PCCC data file (e.g. an
|
||||
/// <c>N7</c> integer file is inherently up to 256 words); <see langword="null"/> for a scalar.
|
||||
/// A PCCC data file holds at most <see cref="AbLegacyArray.MaxElements"/> (256) elements, so a
|
||||
/// value above that is clamped where it is materialised/read. <c>1</c> reads as a scalar.
|
||||
/// </param>
|
||||
public sealed record AbLegacyTagDefinition(
|
||||
string Name,
|
||||
string DeviceHostAddress,
|
||||
string Address,
|
||||
AbLegacyDataType DataType,
|
||||
bool Writable = true,
|
||||
bool WriteIdempotent = false);
|
||||
bool WriteIdempotent = false,
|
||||
int? ArrayLength = null);
|
||||
|
||||
/// <summary>PCCC array-tag constants shared by the parser, discovery, and read paths.</summary>
|
||||
public static class AbLegacyArray
|
||||
{
|
||||
/// <summary>
|
||||
/// Maximum element count for a single PCCC data file. The PCCC/DF1 protocol addresses a
|
||||
/// data file element with a single byte sub-element offset, so a file holds at most 256
|
||||
/// elements (words for N/B/I/O/S/A, 32-bit elements for L/F). Array tags clamp to this.
|
||||
/// </summary>
|
||||
public const int MaxElements = 256;
|
||||
}
|
||||
|
||||
public sealed class AbLegacyProbeOptions
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user