ETSI's Bug Tracker - Part 06: TTCN-3 Control Interface
View Issue Details

ID | Project | Category | View Status | Date Submitted | Last Update
0005986 | Part 06: TTCN-3 Control Interface | Technical | public | 16-12-2011 16:22 | 12-07-2012 16:13

Reporter | Mateusz Pusz |
Assigned To | Ina Schieferdecker |
Priority | normal | Severity | major | Reproducibility | N/A
Status | closed | Resolution | won't fix |
Platform |  | OS |  | OS Version |
Product Version |  |
Target Version | v4.5.1 (published 2013-04) | Fixed in Version |  |
Clause Reference(s) | 10.5.3.9-10
Source (company - Author) | Mateusz Pusz/freettcn

Summary | 0005986: Invalid TCI interface for octetstring

Description

That issue is a follow up of 0005945 and exactly that part:
"Tchar is not defined in the standard too and it is used in OctetstringValue and HexstringValue interfaces (10.5.3.9-10)."
It seems that Tchar is not a good solution here and should be removed from the specification. Here is why...
Lets assume:
var hexstring string1;
string1 := '1234'H;
string1[1] := '1'H; // is valid and will end up with '1134'H;
ORG_ETSI_TTCN3_TCI::HexstringValue::setHex(1, '1'); // is valid and will end up again with '1134'H;
Now lets look at another type:
var octetstring string2;
string2 := '1234'O;
string2[1] := '11'O; // is valid and will end up with '1211'O;
// but how TCI should behave?
// we cannot pass
ORG_ETSI_TTCN3_TCI::OctetstringValue::setOctet(1, '11'); // <---- compilation error
// maybe index of a TTCN type should not be equal to index of TCI type?
ORG_ETSI_TTCN3_TCI::OctetstringValue::setOctet(2, '1');
ORG_ETSI_TTCN3_TCI::OctetstringValue::setOctet(3, '1'); // but that is not he best idea
// and of course getOctet() has to use the same indices
// or maybe Tchar should be treated as an integer and not a char
ORG_ETSI_TTCN3_TCI::OctetstringValue::setOctet(1, 0x11);
// but in such a case hexstring should also be modfied to work like that:
ORG_ETSI_TTCN3_TCI::HexstringValue::setHex(1, 0x01);
// also getOctet() and getHex() should return similar values
From current TCI definition it is not possible to understand what the standard really means here.
It would be much better to use Tinteger value here because it is directly suggesting the usage scenario. In such a case Tchar type is not needed anywhere and should be removed from the standard.
Alternatively Tchar can be renamed to Tbyte. The same underlying (1 byte long) type will be used, but it will provide totally different meaning suggesting usage of integral values instead of characters. In such a case TCI interface description should be extended with exact information how to use it.

Steps To Reproduce |
Additional Information | See also no.3 here http://list.etsi.org/scripts/wa.exe?A2=ind1110&L=ttcn3&T=0&P=393. [^]
Tags | No tags attached.
Relationships |
Attached Files |

Issue History
Date Modified | Username | Field | Change
16-12-2011 16:22 | Mateusz Pusz | New Issue |
16-12-2011 16:22 | Mateusz Pusz | Clause Reference(s) | => 10.5.3.9-10
16-12-2011 16:22 | Mateusz Pusz | Source (company - Author) | => Mateusz Pusz/freettcn
09-07-2012 16:53 | Ina Schieferdecker | Project | TTCN-3 Change Requests => Part 06: TTCN-3 Control Interface
10-07-2012 18:24 | Gyorgy Rethy | Note Added: 0010777 |
10-07-2012 18:24 | Gyorgy Rethy | Assigned To | => Ina Schieferdecker
10-07-2012 18:24 | Gyorgy Rethy | Status | new => assigned
10-07-2012 18:24 | Gyorgy Rethy | Target Version | => Edition 4.5.1
12-07-2012 16:12 | Ina Schieferdecker | Note Added: 0010895 |
12-07-2012 16:13 | Ina Schieferdecker | Status | assigned => closed
12-07-2012 16:13 | Ina Schieferdecker | Resolution | open => won't fix

Notes

(0010777)
Gyorgy Rethy
10-07-2012 18:24

STF discussion 2012-07-10: to be checked

(0010895)
Ina Schieferdecker
12-07-2012 16:12

TChar is used in TCI for BitString, HexString, and OctetString in getBit, getHex, and getOctet to return the bit, hex, and octet at a given position as a character. It is NOT used to set a bit, octet, or hex respectively. For that, integer is used instead - see setBit, setOctet, and setHex. Hence, the examples given above work differently, but will work if the operations are used as defined.