View Issue Details

IDProjectCategoryView StatusLast Update
000805110000-014: PubSubSpecpublic2023-06-23 13:34
ReporterThomas Merk Assigned ToMatthias Damm  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version1.05.01 
Fixed in Version1.05.03 RC1 
Summary0008051: Usage of maxStringLength is unclear
Description

In FiledMetaData it is stated:
If the dataType field is a String, LocalizedText or ByteString then this field specifies the maximum supported length....

I assume that this number specifies the number of characters / bytes in encoding for the text part (not including the 4 byte of length).
=> A string with maxStringLength of 20 shall be encoded as
4 byte: string length (e.g. 5)
n byte: string content (e.g. 5 byte)
20 - n byte: padding (e.g. 15)

Or shall the maxStringLength define the "field size", which would change the number of padding bytes to 11 in example above.
For localized texts additionally 2 byte for namespace index would restrict "real" string length.

What is not clearly defined as well:

  • shall this padding be done for RawData encoding only or in general?
    I would assume yes; otherwise data type LocalizedText would not make any sense.
  • if a string does not fit into the specified length, how shall be reacted?
    • truncate the string? (unlikely)
    • invalid data set message? (IsValid bit is set to 0)
    • ...
TagsNo tags attached.
Commit Version
Fix Due Date

Activities

Matthias Damm

2023-06-21 20:49

developer   ~0019634

Table 7 – FieldMetaData structure
MaxStringLength
Updated text to be in sync with Part 3 definition of MaxStringLength (Table 13 – Variable NodeClass)
If the dataType field is a String, LocalizedText (the text field) or ByteString then this field specifies the maximum supported length of the data in number of bytes.

7.2.4.4.9 RawData field encoding
Added
The padding only applies to RawData field encoding.

Randy Armstrong

2023-06-22 17:52

administrator   ~0019652

Agreed on changes, Need Errata.

Jim Luth

2023-06-23 13:34

administrator   ~0019665

Agreed to 1.04 Errata.

Issue History

Date Modified Username Field Change
2022-06-15 09:09 Thomas Merk New Issue
2022-06-21 16:37 Matthias Damm Assigned To => Matthias Damm
2022-06-21 16:37 Matthias Damm Status new => assigned
2023-06-21 20:49 Matthias Damm Status assigned => resolved
2023-06-21 20:49 Matthias Damm Resolution open => fixed
2023-06-21 20:49 Matthias Damm Fixed in Version => 1.05.02 RC1
2023-06-21 20:49 Matthias Damm Note Added: 0019634
2023-06-22 17:40 Randy Armstrong Fixed in Version 1.05.02 RC1 => 1.05.03 RC1
2023-06-22 17:52 Randy Armstrong Note Added: 0019652
2023-06-23 13:34 Jim Luth Status resolved => closed
2023-06-23 13:34 Jim Luth Note Added: 0019665