LibItsDenm_TestSystem.ttcn 5.29 KB
Newer Older
reinaortega's avatar
reinaortega committed
1
/**
garciay's avatar
garciay committed
2
 *    @author     ETSI / STF449 / STF484 / STF517
filatov's avatar
filatov committed
3
4
 *    @version     $URL$
 *                 $Id$
reinaortega's avatar
reinaortega committed
5
 *    @desc        Test System module for ITS DENM
garciay's avatar
garciay committed
6
7
8
9
 *    @copyright   ETSI Copyright Notification
 *                 No part may be reproduced except as authorized by written permission.
 *                 The copyright and the foregoing restriction extend to reproduction in all media.
 *                 All rights reserved.
reinaortega's avatar
reinaortega committed
10
11
12
13
14
 *
 */
module LibItsDenm_TestSystem {
    
    // LibCommon
filatov's avatar
filatov committed
15
16
//    import from LibCommon_Time {modulepar all};
//    import from LibCommon_Sync all;
17
    import from LibCommon_BasicTypesAndValues all;
18
    import from LibCommon_DataStrings all;
reinaortega's avatar
reinaortega committed
19
20

    // LibIts
garciay's avatar
garciay committed
21
22
23
24
    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
25
    import from LibItsCommon_TestSystem all;
26
    import from LibItsCommon_TypesAndValues all;
reinaortega's avatar
reinaortega committed
27
    
garciay's avatar
garciay committed
28
29
    // LibItsDenm
    import from LibItsDenm_TypesAndValues all;
reinaortega's avatar
reinaortega committed
30
31
32
    
    group portDefinitions {
    
33
34
35
36
37
        /**
         * @desc Adapter control port
         */
        type port AdapterControlPort message {
            out
38
                AcGnssPrimitive, AcSecPrimitive;
39
            in
40
41
42
//FIXME RGY!!! As discussed, list of booleans is changed by a top-level union type
//                AcGnssResponse, AcGnssDistanceCovered, AcSecResponse;
                AdapterControlResults
43
44
        } // end AdapterControlPort
        
reinaortega's avatar
reinaortega committed
45
46
47
48
49
        /**
         * @desc Upper Tester port
         */
        type port UpperTesterPort message {
            out 
50
                UtInitialize, UtDenmTrigger, UtDenmUpdate, UtDenmTermination, UtChangePosition, UtChangePseudonym;
reinaortega's avatar
reinaortega committed
51
            in 
52
53
54
55
56
//FIXME RGY! As discussed, list of booleans is changed by a top-level union type
//                UtInitializeResult, UtDenmTriggerResult, UtDenmUpdateResult, UtDenmTerminationResult,
//                UtChangePositionResult, UtChangePseudonymResult, UtDenmEventInd;
                UtCommonResults, UtDENMResults, UtDenmTriggerResult,
                UtDenmUpdateResult, UtDenmEventInd;
reinaortega's avatar
reinaortega committed
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
        } // 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;
88
            port AdapterControlPort acPort;
reinaortega's avatar
reinaortega committed
89
90
91
92
93
94
95
96
97
98
99
100
101
            
            // FA1 ports
            port DenmPort denmPort;
            
        } // end component ItsAdapter
        
    } // End of group componentDefinitions
    
    /**
     * @desc Test component for ITS Facility layer 
     */
    type component ItsDenm extends ItsBaseComponent {

102
        port AdapterControlPort acPort;
reinaortega's avatar
reinaortega committed
103
104
105
106
107
108
109
110
111
112
113
114
115
        port UpperTesterPort utPort;

        // FA1 ports
        port DenmPort denmPort;
        
        //timers
        
        //component variables
        
        //default
        var default vc_default := null;
        
        //global variables
tepelmann's avatar
tepelmann committed
116
        var SequenceNumber vc_sequenceNo := 0;
reinaortega's avatar
reinaortega committed
117
118
        var boolean vc_denmReceived := false;
        
119
        var UtDenmEventIndList vc_utEvents := {};
tepelmann's avatar
tepelmann committed
120
        
121
122
        var UtDenmActionIDList vc_utActionIDs := {};
        
garciay's avatar
garciay committed
123
124
125
        var boolean vc_utDefaultActive := true;
        var boolean vc_denmDefaultActive := true;
        
reinaortega's avatar
reinaortega committed
126
127
128
129
130
131
132
133
134
135
136
137
    } // End of component ItsDenm

    group facilityPrimitives {
            
        group fa1Primitives {
            
            /**
             * @desc FA1 DENM Indication Primitive 
             * 
             * @member denmMsg
             */
            type record DenmInd {
138
139
140
141
142
143
144
145
                DENM        msgIn,
                UInt8       gnNextHeader optional,
                UInt8       gnHeaderType optional,
                UInt8       gnHeaderSubtype optional,
                UInt32      gnLifetime optional,
                UInt8       gnTrafficClass optional,
                UInt16      btpDestinationPort optional,
                UInt16      btpInfo optional,
146
                Bit256      ssp optional,
147
                UInt32      its_aid optional
reinaortega's avatar
reinaortega committed
148
149
            }
            with {
filatov's avatar
filatov committed
150
                encode (msgIn) "PER"
reinaortega's avatar
reinaortega committed
151
152
153
154
155
156
157
158
            }
            
            /**
             * @desc FA1 DENM Request Primitive 
             * 
             * @member denmMsg
             */
            type record DenmReq {
tepelmann's avatar
tepelmann committed
159
                DENM msgOut
reinaortega's avatar
reinaortega committed
160
161
            }
            with {
filatov's avatar
filatov committed
162
                encode (msgOut) "PER"
reinaortega's avatar
reinaortega committed
163
164
165
166
167
168
169
170
171
172
            }
            
        } // End of group fa1Primitives
        
    } // End of group facilityPrimitives
    with {
        encode "LibIts_Interface"
    } // end interfacePrimitives    
         
} // End of module LibItsDenm_TestSystem