source: branches/t3e-tools/t3q-examples/NamingConventions/NC_variables_timers_componentInstances_portInstances.ttcn3 @ 36

Last change on this file since 36 was 4, checked in by phdmakk, 15 years ago
File size: 1.1 KB
Line 
1module NC_variables_timers_componentInstances_portInstances {
2    //port instances, good and bad
3    //also component  data-type definition, bad
4    type component comp_1 {
5        port port_1 p1, P3
6        port port_1 P2
7        port port_1 p4
8    }
9    //timer, variable and component instances in a component, good and bad
10    //also component data-type definition, good
11
12    type component Comp_1 {
13        timer tc_a1, Tc_a2;
14        var integer vc_a, c;
15        var integer b := 2, vc_d := 3;
16        var integer vc_1e;
17        var Comp_12 Cc, bB, Aa;
18    }
19    //variable, timer and component instances in a function, good and bad       
20    //also formal parameters, good
21    //also function definition, good
22
23    function f_a3(inout charstring p_c, in template integer p_ti, inout timer p_t, inout port_1 p_p) {
24        p_t.start;
25        var integer a, v_c;
26        var integer b := 2, v_1d := 3;
27        var integer v_e;
28        var template TypeA vx_ta;
29        var Comp_1 Cc, bB, Aa;
30        timer t_a1, T_a2;
31        t_1.start;
32        for (var integer i := 0; i < 10; i := i + 1) {
33        }
34    }
35
36}
Note: See TracBrowser for help on using the repository browser.