1 /******************************************************************************
2 * Copyright (c) 2000-2014 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
7 ******************************************************************************/
8 module bende_t_SE { //^In TTCN-3 module//
12 octetstring causeValue,
16 type record PrivateExtension
19 type set DownlinkDataNotificationFailureIndication
22 PrivateExtension privateExtension optional
26 type union GTPCv2_PDUs
28 DownlinkDataNotificationFailureIndication downlinkDataNotificationFailureIndication
31 const bitstring zerobit := '0'B;
33 // GTPCv2_IE_Templates.ttcn:122
34 template Cause t_GTPCv2_IE_cause (
35 template bitstring pl_cS := // specific value, which is either:
37 template octetstring pl_causeValue := omit
40 causeValue := pl_causeValue,
42 // The presence of this _parameterized_ template alone is not enough for fatal error.
43 // It has to be the default value of a parameter (template or function).
46 const octetstring cg_GTPv2_CV_UENotResponding := '57'O
48 // The original kaboom
49 template GTPCv2_PDUs t_GTPCv2_DataDownlinkNotificationFailureIndication(
50 template Cause pl_Cause := t_GTPCv2_IE_cause(pl_causeValue := cg_GTPv2_CV_UENotResponding)
53 downlinkDataNotificationFailureIndication :=
56 privateExtension := omit
58 } /* template t_GTPCv2_DataDownlinkNotificationFailureIndication */
60 // Parameterized template as default value => kaboom!
61 //function f(in template Cause p_cause := t_GTPCv2_IE_cause(pl_causeValue := cg_GTPv2_CV_UENotResponding)) runs on C
67 var template Cause mt_cause := {};
70 // correctly flagged as error:
71 // "default value cannot refer to a field of the component in the `runs on' clause"
72 function f2( //^In function definition// //^In formal parameter list:$//
73 in template Cause p_cause := mt_cause //^In parameter `p_cause':$// //^In default value:// \
74 //^error\: default value cannot refer to a field of the component in the \`runs on\' clause$//
79 testcase tc1() runs on C
82 var template Cause vt_cause := t_GTPCv2_IE_cause(pl_causeValue := cg_GTPv2_CV_UENotResponding);