You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In v3.0, we ask that you mark the assembly containing your custom structures with TypeLibrary attribute.
using System;
using Workstation.ServiceModel.Ua;
[assembly: TypeLibrary()]
namespace CustomTypeLibrary
{
[DataTypeId("nsu=http://www.unifiedautomation.com/DemoServer/;i=3002")]
[BinaryEncodingId("nsu=http://www.unifiedautomation.com/DemoServer/;i=5054")]
public class CustomVector : Structure
{
public double X { get; set; }
public double Y { get; set; }
public double Z { get; set; }
public override void Encode(IEncoder encoder)
{
encoder.WriteDouble("X", X);
encoder.WriteDouble("Y", Y);
encoder.WriteDouble("Z", Z);
}
public override void Decode(IDecoder decoder)
{
X = decoder.ReadDouble("X");
Y = decoder.ReadDouble("Y");
Z = decoder.ReadDouble("Z");
}
}
}
The text was updated successfully, but these errors were encountered:
In v3.0, we ask that you mark the assembly containing your custom structures with TypeLibrary attribute.
The text was updated successfully, but these errors were encountered: