Type of issue
Current Behavior
Publishing a UInt32 0 value with FieldTypeEncodingMask.DataValue field type encoding does not publish the actual Value field. This is due to an equals check against StatusCode.Good (uint 0) in the Json encoder:
Expected Behavior
UInt 0 values can be published, i.e.:
"UInt32": {
"Value": 0
"SourceTimestamp": "2025-10-30T13:41:29.8386075Z"
}
Steps To Reproduce
Add UInt field in ConsoleReferencePublisher with initial value of 0u.
Set the corresponding DataSetWriterDataType.DataSetFieldContentMask = (uint)(DataSetFieldContentMask.StatusCode | DataSetFieldContentMask.SourceTimestamp)
Environment
- OS: Windows 11
- Runtime: .NET 8
- Nuget Version: 1.05.374
- Component: Opc.Ua.PubSub
Anything else?
I can provide a PR for that.
Type of issue
Current Behavior
Publishing a UInt32 0 value with
FieldTypeEncodingMask.DataValuefield type encoding does not publish the actual Value field. This is due to an equals check against StatusCode.Good (uint 0) in the Json encoder:Expected Behavior
UInt 0 values can be published, i.e.:
Steps To Reproduce
Add UInt field in ConsoleReferencePublisher with initial value of
0u.Set the corresponding
DataSetWriterDataType.DataSetFieldContentMask = (uint)(DataSetFieldContentMask.StatusCode | DataSetFieldContentMask.SourceTimestamp)Environment
Anything else?
I can provide a PR for that.