View Issue Details

IDProjectCategoryView StatusLast Update
000386710000-006: MappingsSpecpublic2020-04-21 15:06
Reportersmyrman Assigned Torandyarmstrong  
PriorityhighSeveritymajorReproducibilityN/A
Status closedResolutionduplicate 
PlatformN/AOSN/AOS VersionN/A
Product Version1.03 
Summary0003867: Confusion between CharArray and String in the spec part 5/6 and https://opcfoundation.org/UA/schemas/1.03/Opc.Ua.Types.bsd.xml
Description

Conflicting definitions of String/CharArray in the Spec Part 6 and Part 5 Appendix E, as well as inconsequent usage of CharArray v.s. String in Opc.Ua.Types.bsd.xml. Perhaps should the later file use type String in place of CharArray for all fields? In detail:

From the Spec part 6 (1.04 RC and 1.03):

5.2.2.4 String

All String values are encoded as a sequence of UTF8 characters without a null terminator and preceded by the length in bytes.
The length in bytes is encoded as Int32. A value of −1 is used to indicate a ‘null’ string.

No mention of CharArray. WideString or WideCharArray.

However, from the spec part 5:

E.3 Standard Type Descriptions

  • String: A null terminated sequence of UTF-8 characters.
  • CharArray: A sequence of UTF-8 characters preceded by the number of characters.

If String in Part 6 was meant to be CharArray notice the difference between "length in bytes" v.s. "number of characters", as that matters quite a bit for UTF-8... (edited)

For more fun, the XML type specification (https://opcfoundation.org/UA/schemas/1.03/Opc.Ua.Types.bsd.xml) mentions both CharArray and String as field types for various "Structured Types". E.g. in DiagnosticInfo the "AdditionalInfo" field is a "String" according to te Spec part 6, but a "CharArray" according to "Opc.Ua.Types.bsd.xml".

The Argument "Name" field in "Opc.Ua.Types.bsd.xml" has the type "String", both in this file, and in the Spec part 3 (under 8.6 Argument) (edited)

smyrman
[10:11 AM]
To be fair, the text in part 5 that conflicts with the definitions in Part 6 is from an appendix:

Annex E
(normative)
OPC Binary Type Description System

However, since CharArray is not defined in Part 6 (neither is WideString or WideCharArrray for UTF-16), I am confused about the destinction between CharArray and String in the "Opc.Ua.Types.bsd.xml" file

Steps To Reproduce

N/A

Additional Information

This is the second issue I report for https://opcfoundation.org/UA/schemas/1.03/Opc.Ua.Types.bsd.xml, the previous one reported in 2015. We are writing out own OPC UA Stack in Searis (http://www.searis.no) for the Go programming language, so it would be nice to get the XML file updated to facilitate easier/safer code generation.

TagsNo tags attached.
Commit Version
Fix Due Date

Relationships

duplicate of 0003750 closedjeffhardingabb 10000-005: Information Model Table E.9 - CharArray should be renamed to String 

Activities

smyrman

2017-06-09 08:47

reporter   ~0008218

Update: This appears to be a duplicate of https://opcfoundation-onlineapplications.org/mantis/view.php?id=3750 and could be closed as such.

smyrman

2017-06-09 08:52

reporter   ~0008219

BTW, should Annex E Part 5 also be updated? Or is this an historic reference only?

smyrman

2017-06-09 08:59

reporter   ~0008220

Last edited: 2017-06-09 09:03

@jeffhardingabb, the Annex E with the conflicting definition is in Part 5: Information Model Release Candidate 1.04.09.

randyarmstrong

2020-04-21 15:06

administrator   ~0011949

Duplicate. Closed in Apr 21th WG Meeting.

Issue History

Date Modified Username Field Change
2017-06-09 08:45 smyrman New Issue
2017-06-09 08:47 smyrman Note Added: 0008218
2017-06-09 08:52 smyrman Note Added: 0008219
2017-06-09 08:59 smyrman Note Added: 0008220
2017-06-09 09:03 smyrman Note Edited: 0008220
2018-08-28 16:12 Jim Luth Project UA Specification => 10000-006: Mappings
2018-08-28 16:12 Jim Luth Assigned To => randyarmstrong
2018-08-28 16:12 Jim Luth Status new => assigned
2019-03-01 18:16 randyarmstrong Status assigned => resolved
2019-03-01 18:16 randyarmstrong Resolution open => duplicate
2019-03-01 18:16 randyarmstrong Relationship added duplicate of 0003750
2020-04-21 15:06 randyarmstrong Status resolved => closed
2020-04-21 15:06 randyarmstrong Note Added: 0011949