ETSI's Bug Tracker - Part 01: TTCN-3 Core Language
View Issue Details

ID | Project | Category | View Status | Date Submitted | Last Update
0007737 | Part 01: TTCN-3 Core Language | Technical | public | 15-12-2017 14:47 | 04-01-2019 16:48

Reporter | Tomas Urban |
Assigned To | Gyorgy Rethy |
Priority | normal | Severity | minor | Reproducibility | have not tried
Status | closed | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version | v4.9.1 (published 2017-05) |
Target Version | 4.11.1 (published 2019-05) | Fixed in Version | 4.11.1 (published 2019-05) |
Clause Reference(s) | C.5.5, C.5.6
Source (company - Author) | Elvior

Summary | 0007737: Padding bits in encvalue_o result and decvalue_o input

Description

The specification doesn't explain how padding bits are handled by the encvalue_o and decvalue_o functions in bit-oriented encodings. I assume that padding bits are located at the end of the octetstring, but the specification should state that explicitly.
The specification should also mention what the content of the padding bits should be, especially if they shall be set to zero (error when 1 is detected during decoding) or if 1s are allowed too.

Steps To Reproduce |
Additional Information |
Tags | No tags attached.
Relationships |
Attached Files | CR7737.docx (157,368) 19-07-2018 13:30 http://oldforge.etsi.org/mantis/file_download.php?file_id=3777&type=bug CR7737-2.docx (177,120) 19-07-2018 13:43 http://oldforge.etsi.org/mantis/file_download.php?file_id=3778&type=bug

Issue History
Date Modified | Username | Field | Change
15-12-2017 14:47 | Tomas Urban | New Issue |
15-12-2017 15:20 | Jacob Wieland - Spirent | Note Added: 0014944 |
15-12-2017 15:20 | Jacob Wieland - Spirent | Note Edited: 0014944 | bug_revision_view_page.php?rev_id=448
18-12-2017 16:39 | Jacob Wieland - Spirent | Note Added: 0014945 |
19-12-2017 15:15 | Jacob Wieland - Spirent | Note Deleted: 0014944 |
19-12-2017 15:15 | Jacob Wieland - Spirent | Note Deleted: 0014945 |
19-12-2017 15:23 | Jacob Wieland - Spirent | Note Added: 0014946 |
05-01-2018 13:59 | Gyorgy Rethy | Product Version | => v4.9.1 (published 2017-05)
05-01-2018 13:59 | Gyorgy Rethy | Target Version | => 4.11.1 (published 2019-05)
16-07-2018 13:36 | Jens Grabowski | Note Added: 0015128 |
16-07-2018 13:37 | Jens Grabowski | Assigned To | => Jacob Wieland - Spirent
16-07-2018 13:37 | Jens Grabowski | Status | new => assigned
19-07-2018 12:44 | Jacob Wieland - Spirent | Note Added: 0015175 |
19-07-2018 12:44 | Jacob Wieland - Spirent | Assigned To | Jacob Wieland - Spirent => Tomas Urban
19-07-2018 12:44 | Jacob Wieland - Spirent | Status | assigned => confirmed
19-07-2018 13:30 | Jacob Wieland - Spirent | File Added: CR7737.docx |
19-07-2018 13:43 | Tomas Urban | File Added: CR7737-2.docx |
19-07-2018 13:44 | Tomas Urban | Note Added: 0015178 |
19-07-2018 13:44 | Tomas Urban | Status | confirmed => resolved
19-07-2018 13:44 | Tomas Urban | Resolution | open => fixed
19-07-2018 13:44 | Tomas Urban | Assigned To | Tomas Urban => Gyorgy Rethy
04-01-2019 16:48 | Gyorgy Rethy | Note Added: 0015300 |
04-01-2019 16:48 | Gyorgy Rethy | Status | resolved => closed
04-01-2019 16:48 | Gyorgy Rethy | Fixed in Version | => 4.11.1 (published 2019-05)

Notes

(0014946)
Jacob Wieland - Spirent
19-12-2017 15:23

From our tool vendors' discussion, I think there was consensus that the normal case is padding to the right. That would be consistent with the result of tciEncodeValue which delivers a TriMessage which contains a left-aligned byte-array and the the bit-length.
Thus, it would make sense to also expose the bit-length information to the TTCN-3 layer via an additional out parameter. If someone wants to turn the left-alignment to right-alignment, all they need to do is rotate the value by length-minus-bit-length to the right.
var integer bitlength;
var octetstring o := encvalue_o(v, bitlength := bitlength);
o := bit2oct(oct2bit(o) @> (lengthof(o)*8-bitlength))

(0015128)
Jens Grabowski
16-07-2018 13:36

STF discussion: Clarification needed.

(0015175)
Jacob Wieland - Spirent
19-07-2018 12:44

please review

(0015178)
Tomas Urban
19-07-2018 13:44

Reviewed, one minor correction made (mod instead of % for the modulo operation). The updated proposal can be added to the new version of the core language specification.

(0015300)
Gyorgy Rethy
04-01-2019 16:48

Added to draft V4.10.2