Auto: twincat-1.2 — native UA TIME/DATE/DT/TOD

IEC 61131-3 TIME/TOD now surface as TimeSpan (UA Duration); DATE/DT
surface as DateTime (UTC). The wire form stays UDINT — AdsTwinCATClient
post-processes raw values in ReadValueAsync and OnAdsNotificationEx,
and accepts native CLR types in ConvertForWrite. Added Duration to
DriverDataType (back-compat: existing switches default to BaseDataType
for unknown enum values) and mapped it to DataTypeIds.Duration in
DriverNodeManager.

Closes #306
This commit is contained in:
Joseph Doherty
2026-04-25 17:14:12 -04:00
parent 8286255ae5
commit 80b2d7f8c3
5 changed files with 171 additions and 6 deletions

View File

@@ -310,6 +310,7 @@ public sealed class DriverNodeManager : CustomNodeManager2, IAddressSpaceBuilder
DriverDataType.Float64 => DataTypeIds.Double,
DriverDataType.String => DataTypeIds.String,
DriverDataType.DateTime => DataTypeIds.DateTime,
DriverDataType.Duration => DataTypeIds.Duration,
_ => DataTypeIds.BaseDataType,
};