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

ID | Project | Category | View Status | Date Submitted | Last Update
0007200 | Part 01: TTCN-3 Core Language | Technical | public | 15-10-2015 09:14 | 10-12-2015 16:54

Reporter | tepelmann |
Assigned To | Gyorgy Rethy |
Priority | normal | Severity | minor | Reproducibility | have not tried
Status | closed | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version |  |
Target Version | v4.8.1 (published 2016-07) | Fixed in Version | v4.8.1 (published 2016-07) |
Clause Reference(s) | 6.2.4, C.1.30
Source (company - Author) | Testing Technologies

Summary | 0007200: Allow ranges and value list for enumerated types

Description

The type enumerated provides the tester with meaningful values during development and execution without the necessity to interpret specific values.
However there is one disadvantage in cases where not all possible values are specified inside the enumerated, e.g. reserved values. This occurs in the majority of protocol specifications.
Simple example: A 8Bit enocded enumerated Color -
type enumerated Color {
e_red(0),
e_green(1),
e_blue(2),
e_reserved
}
On the sending side it is not possible to select all values - e_reserved has only one value: 3, where values between 0 and 255 would be selectable.
On the receiving side there are two possible pitfalls in case of receiving a value not expressed by the enumerated type. Either you get an error because the value is not assignable, or you have special decoding mapping the unassignable value to 'reserved' but loosing the actual value.
Proposal: Allow ranges and value list for the type enumerated
E.g.
type enumerated Color {
e_red(0),
e_green(1),
e_blue(2),
e_reserved(3..255)
}
type enumerated Color {
e_red(0),
e_green(1),
e_blue(3),
e_reserved(2,4..255)
}
For the sending(and receiving) side the explicit value of 'reserved' could be expressed in brackets - reserved(127).
For receiving - where the actual value is unknown beforehand - the actual value could be retrieved via the existing enum2int predefined function.
If the explicit value is not given the lowest possible value could be used by default - this is the current behaviour.

Steps To Reproduce |
Additional Information |
Tags | No tags attached.
Relationships |
Attached Files | CR7200.docx (520,017) 04-11-2015 17:14 http://oldforge.etsi.org/mantis/file_download.php?file_id=3364&type=bug CR7200-1-v2.docx (254,422) 05-11-2015 14:08 http://oldforge.etsi.org/mantis/file_download.php?file_id=3368&type=bug CR7200-1-v3.docx (314,507) 09-12-2015 15:47 http://oldforge.etsi.org/mantis/file_download.php?file_id=3389&type=bug

Issue History
Date Modified | Username | Field | Change
15-10-2015 09:14 | tepelmann | New Issue |
02-11-2015 08:56 | tepelmann | Note Added: 0013432 |
03-11-2015 16:42 | Gyorgy Rethy | Note Added: 0013480 |
03-11-2015 16:42 | Gyorgy Rethy | Assigned To | => Jacob Wieland - Spirent
03-11-2015 16:42 | Gyorgy Rethy | Status | new => assigned
04-11-2015 13:59 | Gyorgy Rethy | Target Version | => v4.8.1 (published 2016-07)
04-11-2015 17:14 | Jacob Wieland - Spirent | File Added: CR7200.docx |
04-11-2015 17:15 | Jacob Wieland - Spirent | Note Added: 0013493 |
04-11-2015 17:16 | Jacob Wieland - Spirent | Assigned To | Jacob Wieland - Spirent => Jens Grabowski
04-11-2015 17:16 | Jacob Wieland - Spirent | Status | assigned => confirmed
05-11-2015 14:07 | Jens Grabowski | Note Added: 0013501 |
05-11-2015 14:08 | Jens Grabowski | File Added: CR7200-1-v2.docx |
05-11-2015 14:08 | Jens Grabowski | Assigned To | Jens Grabowski => Gyorgy Rethy
05-11-2015 14:08 | Jens Grabowski | Status | confirmed => assigned
05-11-2015 14:09 | Jens Grabowski | Status | assigned => confirmed
06-11-2015 08:53 | Gyorgy Rethy | Note Edited: 0013480 | bug_revision_view_page.php?bugnote_id=13480#r214
09-12-2015 15:30 | Gyorgy Rethy | File Added: CR7200-1-v3.docx |
09-12-2015 15:31 | Gyorgy Rethy | File Deleted: CR7200-1-v3.docx |
09-12-2015 15:47 | Gyorgy Rethy | File Added: CR7200-1-v3.docx |
09-12-2015 15:50 | Gyorgy Rethy | Note Added: 0013571 |
09-12-2015 15:50 | Gyorgy Rethy | Status | confirmed => resolved
09-12-2015 15:50 | Gyorgy Rethy | Fixed in Version | => v4.8.1 (published 2016-07)
09-12-2015 15:50 | Gyorgy Rethy | Resolution | open => fixed
10-12-2015 16:54 | Gyorgy Rethy | Note Added: 0013582 |
10-12-2015 16:54 | Gyorgy Rethy | Status | resolved => closed

Notes

(0013432)
tepelmann
02-11-2015 08:56

Real world example: 3GPP TS 24.008, 10.5.3.3 CM service type:
Service type (octet 1)
Bits
4 3 2 1
0 0 0 1 Mobile originating call establishment or packet mode connection establishment
0 0 1 0 Emergency call establishment
0 1 0 0 Short message service
1 0 0 0 Supplementary service activation
1 0 0 1 Voice group call establishment
1 0 1 0 Voice broadcast call establishment
1 0 1 1 Location Services (NOTE)
All other values are reserved.
Could result in:
type enumerated CM_ServiceType {
e_mobileOrigCallEstab_packetModConEstab(1),
e_emergCallEstab(2),
e_sms(4),
e_supplServAct(8),
e_voiceGroupCallEstab(9),
e_voiceBcastCallEstab(10),
e_locServices(11),
reserved(3, 5..6, 12..15)
}

(0013480)
Gyorgy Rethy
03-11-2015 16:42 (edited on: 06-11-2015 08:53)

STF discussion: practical usefulness is agreed. The "range" enumerated names can be used as TTCN-3 values with concrete associated integer values only. Otherwise they can be used in templates. Prepare a concrete proposal.

(0013493)
Jacob Wieland - Spirent
04-11-2015 17:15

added proposal allowing enum ranges, enum values with single integer and enum templates with integer template list please review

(0013501)
Jens Grabowski
05-11-2015 14:07

Corrected one or two typos. György: In this resolution, Jacob also corrected examples on page 12 of the attachment which are not directly related to enum ranges. Please check them also. For this reason a put this issue to confirm instead of resolved.

(0013571)
Gyorgy Rethy
09-12-2015 15:50

1 example causing error is added to $6.2.4 (enumerated value with associated integer is used) plus editorials.

(0013582)
Gyorgy Rethy
10-12-2015 16:54

Added to draft V4.7.4