1 /******************************************************************************
2 * Copyright (c) 2000-2016 Ericsson Telecom AB
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
12 ******************************************************************************/
13 module bende_t_SE { //^In TTCN-3 module//
17 octetstring causeValue,
21 type record PrivateExtension
24 type set DownlinkDataNotificationFailureIndication
27 PrivateExtension privateExtension optional
31 type union GTPCv2_PDUs
33 DownlinkDataNotificationFailureIndication downlinkDataNotificationFailureIndication
36 const bitstring zerobit := '0'B;
38 // GTPCv2_IE_Templates.ttcn:122
39 template Cause t_GTPCv2_IE_cause (
40 template bitstring pl_cS := // specific value, which is either:
42 template octetstring pl_causeValue := omit
45 causeValue := pl_causeValue,
47 // The presence of this _parameterized_ template alone is not enough for fatal error.
48 // It has to be the default value of a parameter (template or function).
51 const octetstring cg_GTPv2_CV_UENotResponding := '57'O
53 // The original kaboom
54 template GTPCv2_PDUs t_GTPCv2_DataDownlinkNotificationFailureIndication(
55 template Cause pl_Cause := t_GTPCv2_IE_cause(pl_causeValue := cg_GTPv2_CV_UENotResponding)
58 downlinkDataNotificationFailureIndication :=
61 privateExtension := omit
63 } /* template t_GTPCv2_DataDownlinkNotificationFailureIndication */
65 // Parameterized template as default value => kaboom!
66 //function f(in template Cause p_cause := t_GTPCv2_IE_cause(pl_causeValue := cg_GTPv2_CV_UENotResponding)) runs on C
72 var template Cause mt_cause := {};
75 // correctly flagged as error:
76 // "default value cannot refer to a field of the component in the `runs on' clause"
77 function f2( //^In function definition// //^In formal parameter list:$//
78 in template Cause p_cause := mt_cause //^In parameter `p_cause':$// //^In default value:// \
79 //^error\: default value cannot refer to a field of the component in the \`runs on\' clause$//
84 testcase tc1() runs on C
87 var template Cause vt_cause := t_GTPCv2_IE_cause(pl_causeValue := cg_GTPv2_CV_UENotResponding);