fix: initialize SDK telemetry and preserve ByteString boundaries
This commit is contained in:
@@ -14,7 +14,9 @@ internal static class SdkValueBoundary
|
||||
if (array.Rank != 1) throw new ArgumentException("Only one-dimensional values are supported.", nameof(value));
|
||||
value = array.Clone();
|
||||
}
|
||||
if (byteArray && value is byte[] bytes) return Variant.From((ArrayOf<byte>)bytes);
|
||||
if (value is byte[] bytes) return byteArray
|
||||
? Variant.From((ArrayOf<byte>)bytes)
|
||||
: Variant.From(ByteString.From(bytes));
|
||||
if (VariantHelper.TryCastFrom(value, out var variant)) return variant;
|
||||
throw new ArgumentException("Unsupported OPC UA value type.", nameof(value));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user