source: trunk/t3d-examples/basics/functions.ttcn3 @ 37

Last change on this file since 37 was 7, checked in by phdmakk, 15 years ago
File size: 1.5 KB
Line 
1module functions {
2        import from types all;
3        import from configuration all;
4    group mtcFunctions {
5        /*
6           @desc Given the security cababilities of an UE (e.g. from an ATTACH
7           * REQUEST/UE network capabilities IE) this function creates a new value for
8           * the security capabilities which is invalid for the current UE. To achieve
9           * this, the original capabilities are inverted.
10           * @param p_SecurityCaps Security capabilities as reported by the UE.
11           @return Security capabilities which are invalid for the current UE.
12         */
13
14        function f1 ()
15        runs on sampleComponent1 {
16            p1.send ( integer:1 );
17            p2.receive ( charstring:"a" );
18        }
19         //@desc description
20         //@param par1, par2
21        function f2 (
22            integer par1,
23            charstring par2
24        )
25        runs on sampleComponent1 {
26            p1.receive ( integer:par1 );
27            p2.send ( charstring:par2 );
28        }
29    }
30
31    group ptcFunctions {
32        //*@desc description
33        function f3 ()
34        runs on sampleComponent2 {
35            p1.send ( integer:1 );
36            p2.receive ( charstring:"a" );
37        }
38       
39                /*
40         //@desc description
41         //@param par1, par2
42                */
43
44        function f4 (
45            sampleType1 par1,
46            sampleType2 par2
47        )
48        runs on sampleComponent2 {
49            p1.receive ( integer:par1 );
50            p2.send ( charstring:par2 );
51        }
52    }
53
54}
Note: See TracBrowser for help on using the repository browser.