View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0006953 | 10000-006: Mappings | Spec | public | 2021-05-18 16:40 | 2021-08-31 16:33 |
| Reporter | David Levine | Assigned To | Randy Armstrong | ||
| Priority | normal | Severity | minor | Reproducibility | have not tried |
| Status | closed | Resolution | fixed | ||
| Summary | 0006953: Part 6 (Mappings) Section 5.2.6: Description of how to map structures is confusing | ||||
| Description | The spec uses this as an example: (Part 6 section 5.2.6) ===================== In the C/C++ example above, the Y field is a pointer to an array with a length stored in NoOfY. When encoding an array the length is part of the array encoding so the NoOfY field is not encoded. That said, encoders and decoders use NoOfY during encoding.This is confusing. In C/C++ the field NoOfY is a separate field that is unrelated to anything, which to me implies it ought to be encoded along with all other fields. I think a better example would be This shows a C/C++ struct that has an explicit array. Its length is made explicit in the encoding as Y.Length. It also implies that the bytes are contained inline in the struct, and not located in a memory location pointed to by Y. struct Type1 { with a note that explains that the length of Y must be made known to the encoder through some other mechanism. It could also use this (similar to original) struct Type1 { with a note that explains that the two fields "LengthOfY" and "Y" combine the semantics of "[]Y". It a kind of RPC syntax, where the size of a field is contained in the value of a different field - in this case, the encoder "knows" it is the number of elements in Y | ||||
| Tags | No tags attached. | ||||
| Commit Version | |||||
| Fix Due Date | |||||
|
|
The example in 5.2.6 shows how to encode a variable length array, but does not show an example of how to encode a fixed length array. Both are needed because the encodings are different. And the ArrayDimensions member of the StructuredField is not shown anywhere. |
|
|
As an alternative to the above, to me it makes more sense to use an example that shows a structure, and then show the structure of what the encoded value in the output stream should contain. e.g. would be encoded as struct Type1Encoded { with text that explains that LengthOfY is encoded into the output stream, and that EncodedY is a sequence of Ys encoded inline into the output stream. A similar example for a fixed length array is needed. |
|
|
Agreed to add an example of a fixed size array. |
|
|
Added fixed length array field to example in OPC 10000-6 - UA Specification Part 6 - Mappings 1.05.3 RC |
|
|
Reviewed by WG - add to version table before closing. |
|
|
Agreed to changes in 1.05.01 Draft 4. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2021-05-18 16:40 | David Levine | New Issue | |
| 2021-06-01 11:02 | David Levine | Note Added: 0014443 | |
| 2021-06-01 11:38 | David Levine | Note Added: 0014445 | |
| 2021-06-01 16:01 | Jim Luth | Note Added: 0014448 | |
| 2021-06-01 16:01 | Jim Luth | Assigned To | => Randy Armstrong |
| 2021-06-01 16:01 | Jim Luth | Status | new => assigned |
| 2021-08-14 03:34 | Randy Armstrong | Status | assigned => resolved |
| 2021-08-14 03:34 | Randy Armstrong | Resolution | open => fixed |
| 2021-08-14 03:34 | Randy Armstrong | Note Added: 0014743 | |
| 2021-08-17 16:28 | Randy Armstrong | Note Added: 0014753 | |
| 2021-08-31 16:33 | Jim Luth | Status | resolved => closed |
| 2021-08-31 16:33 | Jim Luth | Note Added: 0014791 |