@@ -13,6 +13,16 @@ public interface IAbLegacyTagRuntime : IDisposable
|
||||
int GetStatus();
|
||||
object? DecodeValue(AbLegacyDataType type, int? bitIndex);
|
||||
void EncodeValue(AbLegacyDataType type, int? bitIndex, object? value);
|
||||
|
||||
/// <summary>
|
||||
/// PR 7 — decode element <paramref name="elementIndex"/> of an N-element contiguous
|
||||
/// block read. Implementations call the same per-element accessors used by
|
||||
/// <see cref="DecodeValue"/> at offset <c>elementIndex × elementBytes</c>. Default
|
||||
/// implementation throws so existing fakes that don't override remain explicit.
|
||||
/// </summary>
|
||||
object? DecodeArrayElement(AbLegacyDataType type, int elementIndex)
|
||||
=> throw new NotSupportedException(
|
||||
"Array decoding requires an IAbLegacyTagRuntime that overrides DecodeArrayElement.");
|
||||
}
|
||||
|
||||
public interface IAbLegacyTagFactory
|
||||
@@ -26,4 +36,5 @@ public sealed record AbLegacyTagCreateParams(
|
||||
string CipPath,
|
||||
string LibplctagPlcAttribute,
|
||||
string TagName,
|
||||
TimeSpan Timeout);
|
||||
TimeSpan Timeout,
|
||||
int ElementCount = 1);
|
||||
|
||||
Reference in New Issue
Block a user