LibItsDenm_TestSystem.ttcn 4.69 KB
Newer Older
reinaortega's avatar
reinaortega committed
1
/**
tepelmann's avatar
tepelmann committed
2
 *    @author     ETSI / STF449
filatov's avatar
filatov committed
3
4
 *    @version     $URL$
 *                 $Id$
reinaortega's avatar
reinaortega committed
5
6
7
8
9
10
11
12
 *    @desc        Test System module for ITS DENM
 *
 */
module LibItsDenm_TestSystem {
    
    // LibCommon
    import from LibCommon_Time {modulepar all};
    import from LibCommon_Sync all;
13
    import from LibCommon_BasicTypesAndValues all;
14
    import from LibCommon_DataStrings all;
reinaortega's avatar
reinaortega committed
15
16

    // LibIts
garciay's avatar
garciay committed
17
18
19
20
    import from DENM_PDU_Descriptions language "ASN.1:1997" all;    
    import from ITS_Container language "ASN.1:1997" all;
    
    // LibItsCommon
reinaortega's avatar
reinaortega committed
21
    import from LibItsCommon_TestSystem all;
22
    import from LibItsCommon_TypesAndValues all;
reinaortega's avatar
reinaortega committed
23
    
garciay's avatar
garciay committed
24
25
    // LibItsDenm
    import from LibItsDenm_TypesAndValues all;
reinaortega's avatar
reinaortega committed
26
27
28
    
    group portDefinitions {
    
29
30
31
32
33
        /**
         * @desc Adapter control port
         */
        type port AdapterControlPort message {
            out
34
                AcGnssPrimitive, AcSecPrimitive;
35
            in
36
                AcGnssResponse, AcGnssDistanceCovered, AcSecResponse;
37
38
        } // end AdapterControlPort
        
reinaortega's avatar
reinaortega committed
39
40
41
42
43
        /**
         * @desc Upper Tester port
         */
        type port UpperTesterPort message {
            out 
44
                UtInitialize, UtDenmTrigger, UtDenmUpdate, UtDenmTermination, UtChangePosition, UtChangePseudonym;
reinaortega's avatar
reinaortega committed
45
            in 
46
47
                UtInitializeResult, UtDenmTriggerResult, UtDenmUpdateResult, UtDenmTerminationResult,
                UtChangePositionResult, UtChangePseudonymResult, UtDenmEventInd;
reinaortega's avatar
reinaortega committed
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
        } // end UpperTesterPort
        
    } // end portDefinitions
    group interfacePorts {
        
        group facilityPorts {
            
            group fa1Ports {
    
                /**
                 * @desc FA1 DENM Port (DENM/BTP/GeoNet/G5) 
                 */
                type port DenmPort message {
                    in DenmInd;
                    out DenmReq;
                } // End of port DenmPort
                
            } // End of group fa1Ports
            
        } // End of group facilityPorts
    
    } // End of group interfacePorts
        
    group componentDefinitions {

        /**
         * @desc ITS System Adapter
         */
        type component ItsDenmSystem {
            
            port UpperTesterPort utPort;
79
            port AdapterControlPort acPort;
reinaortega's avatar
reinaortega committed
80
81
82
83
84
85
86
87
88
89
90
91
92
            
            // FA1 ports
            port DenmPort denmPort;
            
        } // end component ItsAdapter
        
    } // End of group componentDefinitions
    
    /**
     * @desc Test component for ITS Facility layer 
     */
    type component ItsDenm extends ItsBaseComponent {

93
        port AdapterControlPort acPort;
reinaortega's avatar
reinaortega committed
94
95
96
97
98
99
100
101
102
103
104
105
106
        port UpperTesterPort utPort;

        // FA1 ports
        port DenmPort denmPort;
        
        //timers
        
        //component variables
        
        //default
        var default vc_default := null;
        
        //global variables
tepelmann's avatar
tepelmann committed
107
        var SequenceNumber vc_sequenceNo := 0;
reinaortega's avatar
reinaortega committed
108
109
        var boolean vc_denmReceived := false;
        
110
        var UtDenmEventIndList vc_utEvents := {};
tepelmann's avatar
tepelmann committed
111
        
112
113
        var UtDenmActionIDList vc_utActionIDs := {};
        
garciay's avatar
garciay committed
114
115
116
        var boolean vc_utDefaultActive := true;
        var boolean vc_denmDefaultActive := true;
        
reinaortega's avatar
reinaortega committed
117
118
119
120
121
122
123
124
125
126
127
128
    } // End of component ItsDenm

    group facilityPrimitives {
            
        group fa1Primitives {
            
            /**
             * @desc FA1 DENM Indication Primitive 
             * 
             * @member denmMsg
             */
            type record DenmInd {
129
130
131
132
133
134
135
136
                DENM        msgIn,
                UInt8       gnNextHeader optional,
                UInt8       gnHeaderType optional,
                UInt8       gnHeaderSubtype optional,
                UInt32      gnLifetime optional,
                UInt8       gnTrafficClass optional,
                UInt16      btpDestinationPort optional,
                UInt16      btpInfo optional,
137
                Bit256      ssp optional,
138
                UInt32      its_aid optional
reinaortega's avatar
reinaortega committed
139
140
141
142
143
144
145
146
147
148
149
            }
            with {
                encode (msgIn) "LibItsDenm_asn1"
            }
            
            /**
             * @desc FA1 DENM Request Primitive 
             * 
             * @member denmMsg
             */
            type record DenmReq {
tepelmann's avatar
tepelmann committed
150
                DENM msgOut
reinaortega's avatar
reinaortega committed
151
152
153
154
155
156
157
158
159
160
161
162
163
            }
            with {
                encode (msgOut) "LibItsDenm_asn1"
            }
            
        } // End of group fa1Primitives
        
    } // End of group facilityPrimitives
    with {
        encode "LibIts_Interface"
    } // end interfacePrimitives    
         
} // End of module LibItsDenm_TestSystem