View Issue Details

IDProjectCategoryView StatusLast Update
000368210000-006: MappingsSpecpublic2021-11-16 16:41
ReporterV. Monfort Assigned ToRandy Armstrong  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionno change required 
Product Version1.03 
Summary0003682: Variant encoding of Null or undefined built in type Ids
Description

In part 6, table 14, the variant encoding does not indicate possible valid encoding with a Null (0) or undefined built-in type Id (defined in Table 1). Could you then confirm there is no valid encoding of a variant in those cases (including Null Id = 0) ?
I raise this point because the Ansi C Stack reference implementation accepts to encode a Variant with a Null built-in type Id for a single value as an "EncodingByte" = 0 with then no "Value" encoded. On the contrary Variant array Value with a Null type Id is refused.

I also opened an issue on Ansi C Stack github to raise the point (https://github.com/OPCFoundation/UA-AnsiC/issues/31).

Regards,

TagsNo tags attached.
Commit Version
Fix Due Date

Activities

V. Monfort

2017-01-24 08:00

reporter   ~0007788

As reported in the Ansi-C github opened issue:
"We will publish an errata for 1.03 that adds a statement to 5.2.2.16:
A value of 0 for the EncodingMask indicates that no Value is encoded. This is the representation of the NULL value for the Variant"

Randy Armstrong

2017-01-24 08:37

administrator   ~0007789

Spec was missing this detail. Errata added.

V. Monfort

2017-02-06 09:07

reporter   ~0007848

Could you confirm that in the case of a Null built-in type Id it is forbidden that the variant represents an array ?
i.e. an array of Null values must not be accepted as a valid Variant value.

Please be precise enough in the errata to indicate that the case EncodingMask = Null built-in type Id + array mask(s) is forbidden if it is the case.

Randy Armstrong

2017-07-19 03:17

administrator   ~0008303

I am not sure what you are expecting.

The value of a Variant read or written is NULL if the corresponding StatusCode is bad. If the corresponding StatusCode is good the general rules for nullable values apply. Specifically:

Variants can be empty. An empty Variant is described as having a null value and should be treated like a null column in a SQL database. A null value in a Variant may not be the same as a null value for data types that support nulls such as Strings. Some Development Platforms may not be able to preserve the distinction between a null for a DataType and a null for a Variant, therefore, applications shall not rely on this distinction. This requirement also means that if an Attribute supports the writing of a null value it shall also support writing of an empty Variant and vice versa.

Jim Luth

2021-11-16 16:41

administrator   ~0015311

Agreed to no-fix in telecon.

Issue History

Date Modified Username Field Change
2017-01-13 11:31 V. Monfort New Issue
2017-01-24 08:00 V. Monfort Note Added: 0007788
2017-01-24 08:37 Randy Armstrong Note Added: 0007789
2017-01-24 08:37 Randy Armstrong Status new => resolved
2017-01-24 08:37 Randy Armstrong Resolution open => no change required
2017-01-24 08:37 Randy Armstrong Assigned To => Randy Armstrong
2017-02-06 09:07 V. Monfort Note Added: 0007848
2017-02-06 09:07 V. Monfort Status resolved => feedback
2017-02-06 09:07 V. Monfort Resolution no change required => reopened
2017-07-19 03:17 Randy Armstrong Note Added: 0008303
2017-07-19 03:17 Randy Armstrong Status feedback => resolved
2017-07-19 03:17 Randy Armstrong Resolution reopened => no change required
2021-06-03 18:37 Jim Luth Project UA Specification => 10000-006: Mappings
2021-11-16 16:41 Jim Luth Status resolved => closed
2021-11-16 16:41 Jim Luth Note Added: 0015311