receive_template.ttcn 837 Bytes
Newer Older
Elemer Lelik's avatar
Elemer Lelik committed
1
/******************************************************************************
Elemer Lelik's avatar
Elemer Lelik committed
2
 * Copyright (c) 2000-2015 Ericsson Telecom AB
Elemer Lelik's avatar
Elemer Lelik committed
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 ******************************************************************************/
module receive_template {
import from types all;

altstep as_1(test_int_port pl_1) {
  var integer rec, i;

  [] pl_1.receive(1) -> value rec {
	while (rec > 4) {
	  // no problem with this match
	  if (match(i, 43)) {}
	}
  }

  [] pl_1.receive(*) -> value rec {
    {
      // uses the redirected value, a receive template would be better
      if (match(rec, 43)) {}
    }
  }
}
}