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

ID | Project | Category | View Status | Date Submitted | Last Update
0008005 | Part 01: TTCN-3 Core Language | Technical | public | 16-02-2021 09:43 | 23-11-2021 13:25

Reporter | Tomas Urban |
Assigned To | Jens Grabowski |
Priority | normal | Severity | minor | Reproducibility | have not tried
Status | closed | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version |  |
Target Version |  | Fixed in Version |  |
Clause Reference(s) | 20.5.2
Source (company - Author) | Elvior OÜ

Summary | 0008005: It should be possible to reactivate a default

Description

Currently the only way to activate defaults is to use a function instance in the activate statement. However, sometimes there's a need to disable a default just temporarily and reactivate it again. All defaults can be disabled in an easy way by using the @nodefault modifier. However, there are situations when it is required to suspend a single default or several, but not all of them. When reactivating it again, it doesn't seem wise to repeat the parameters again. The parameter values might not even be available in the place of activation. It would be much simpler to use the same default reference that was used in the deactivate call, to activate the default again:
var default v_def := activate(a_myDefaultBehaviour());
...
deactivate(v_def); // deactivate the default
alt {...} // alt block without the suspended default
activate(v_def); // activate the default again

Steps To Reproduce |
Additional Information |
Tags | No tags attached.
Relationships |
Attached Files | CR0008005.docx (28,061) 09-09-2021 14:41 http://oldforge.etsi.org/mantis/file_download.php?file_id=4015&type=bug

Issue History
Date Modified | Username | Field | Change
16-02-2021 09:43 | Tomas Urban | New Issue |
06-09-2021 16:40 | Jens Grabowski | Assigned To | => Gusztáv Adamis
06-09-2021 16:40 | Jens Grabowski | Status | new => assigned
07-09-2021 16:23 | Gusztáv Adamis | Note Added: 0015952 |
07-09-2021 16:23 | Gusztáv Adamis | Note Added: 0015953 |
08-09-2021 09:06 | Gusztáv Adamis | Status | assigned => confirmed
08-09-2021 12:02 | Gusztáv Adamis | Status | confirmed => assigned
09-09-2021 14:30 | Gusztáv Adamis | File Added: DefaultSuspendResume.docx |
09-09-2021 14:39 | Gusztáv Adamis | File Deleted: DefaultSuspendResume.docx |
09-09-2021 14:41 | Gusztáv Adamis | File Added: CR0008005.docx |
09-09-2021 14:42 | Gusztáv Adamis | Assigned To | Gusztáv Adamis => Jacob Wieland - Spirent
10-09-2021 13:28 | Gusztáv Adamis | Note Added: 0015979 |
10-09-2021 13:28 | Gusztáv Adamis | Status | assigned => confirmed
10-09-2021 16:16 | Jacob Wieland - Spirent | Note Added: 0015987 |
10-09-2021 16:16 | Jacob Wieland - Spirent | Status | confirmed => resolved
10-09-2021 16:16 | Jacob Wieland - Spirent | Resolution | open => fixed
10-09-2021 16:16 | Jacob Wieland - Spirent | Assigned To | Jacob Wieland - Spirent => Jens Grabowski
23-11-2021 13:25 | Jens Grabowski | Note Added: 0016096 |
23-11-2021 13:25 | Jens Grabowski | Status | resolved => closed

Notes

(0015952)
Gusztáv Adamis
07-09-2021 16:23

After the discussion in STF the more detailed example of the request:
var default v_def1 := activate(a_myDefaultBehaviour1());
var default v_def2 := activate(a_myDefaultBehaviour2());
var default v_def3 := activate(a_myDefaultBehaviour3());
...
deactivate(v_def2, true); // deactivate the default temporarily, with a second optional argument (default value false: finally deactivated as it is now; true: temporarily deactivated, suspended)
alt {...} // alt block without the suspended default v_def2
activate(v_def2); // re-activate the default again and the priorities of the defaults shall be the same as before suspension: v_def3 highest prio, v_def2, v_def1

(0015953)
Gusztáv Adamis
07-09-2021 16:23

After internal analysis Ericsson can support this proposal

(0015979)
Gusztáv Adamis
10-09-2021 13:28

@Jacob: pls. review the suggested solution

(0015987)
Jacob Wieland - Spirent
10-09-2021 16:16

The proposal is fine.

(0016096)
Jens Grabowski
23-11-2021 13:25

implemented