LibItsMapemSpatem_TestSystem.ttcn 5.31 KB
Newer Older
1
/**
garciay's avatar
garciay committed
2
 *    @author   ETSI / STF484 / STF517
Yann Garcia's avatar
Yann Garcia committed
3
4
 *    @version  $Url: https://oldforge.etsi.org/svn/LibIts/tags/20170222_STF527_Final/ttcn/MapemSpatem/LibItsMapemSpatem_TestSystem.ttcn $
 *              $Id: LibItsMapemSpatem_TestSystem.ttcn,v 1.2 2018/05/31 15:57:10 dte Exp $
5
 *    @desc     Test System module for ITS MAPEM SPATEM
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.
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
 *
 */
module LibItsMapemSpatem_TestSystem {
    
    // LibCommon
    import from LibCommon_BasicTypesAndValues all;
    import from LibCommon_Time all;
    import from LibCommon_Sync all;
    import from LibCommon_DataStrings all;

    // LibIts
    import from ITS_Container language "ASN.1:1997" all;
    import from MAPEM_PDU_Descriptions language "ASN.1:1997" all;
    import from SPATEM_PDU_Descriptions language "ASN.1:1997" all;
    import from EfcDsrcGeneric language "ASN.1:1997" all;

    // LibItsCommon
    import from LibItsCommon_TestSystem all;
    import from LibItsCommon_TypesAndValues all;
    
    // LibItsMapemSpatem
    import from LibItsMapemSpatem_TypesAndValues all;
    
    group portDefinitions {
34
35
36
37
38
39
40
41
        
        /**
         * @desc Adapter control port
         */
        type port AdapterControlPort message {
            out
                AcSecPrimitive;
            in
42
                AdapterControlResults;
43
44
        } // end AdapterControlPort
        
45
46
47
48
49
        /**
         * @desc Upper Tester port
         */
        type port UpperTesterPort message {
            out 
50
                UtMapemSpatemInitialize, UtMapemSpatemTrigger;
51
            in 
52
                UtMapemSpatemResults, UtMapemEventInd , UtSpatemEventInd;
53
54
55
56
57
58
59
60
61
62
63
64
        } // end UpperTesterPort

    } // end portDefinitions

    group interfacePorts {

        /**
        * @desc Application MapSpat Port
        */
        type port MapemSpatemPort message { in MapemInd , SpatemInd ; out MapemReq , SpatemReq }
    
    } // End of group interfacePorts
Bostjan Pintar's avatar
Bostjan Pintar committed
65
66
67
68
69
70
71
        
        /**
    * @desc ITS Main Test Component
    */
    type component ItsMtc extends ItsBaseMtc, ItsMapemSpatem {
            var ComponentTable vc_componentTable := {};
    } // end ItsMtc
72
73
74
75
76
77
78

    /**
    * @desc ITS System Adapter
    */
    type component ItsMapemSpatemSystem {
            
        port UpperTesterPort utPort;
garciay's avatar
garciay committed
79
        port AdapterControlPort acPort;
80
81
82
83
84
85
86
87
88
        port MapemSpatemPort mapemSpatemPort;

    } // End of component ITS System Adapter
     
    /**
     * @desc Test component for ITS MAPEM-SPATEM application layer 
     */
    type component ItsMapemSpatem extends ItsBaseComponent {

89
        port AdapterControlPort acPort;
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
        port UpperTesterPort utPort;
        port MapemSpatemPort mapemSpatemPort;
        //timers
        
        //component variables
        var MapemInd vc_mapMsg;
        var SpatemInd vc_spatMsg;
        var UtMapemEventIndList vc_utMapemEvents := {};
        var UtSpatemEventIndList vc_utSpatemEvents := {};
        
        //default
        var default vc_default := null;
        
        //global variables
        var boolean vc_mapemReceived := false;
        var boolean vc_spatemReceived := false;
Yann Garcia's avatar
Yann Garcia committed
106
107
        
        var boolean vc_mapemSpatemDefaultActive := true;
108
109
110
111
112
113
    } // End of component ItsMapemSpatem

    group ApplPrimitives {
        
        type record MapemInd {
            MAPEM       msgIn,
Yann Garcia's avatar
Yann Garcia committed
114
            UInt64      recvTime,
115
116
117
118
119
120
121
            UInt8       gnNextHeader optional,
            UInt8       gnHeaderType optional,
            UInt8       gnHeaderSubtype optional,
            UInt32      gnLifetime optional,
            UInt8       gnTrafficClass optional,
            UInt16      btpDestinationPort optional,
            UInt16      btpInfo optional,
Yann Garcia's avatar
Yann Garcia committed
122
            Bit24       ssp optional,
123
            UInt32      its_aid optional
124
125
        }
        with {
126
            encode (msgIn) "PER"
127
128
129
130
        }
        
        type record SpatemInd {
            SPATEM      msgIn,
Yann Garcia's avatar
Yann Garcia committed
131
            UInt64      recvTime,
132
133
134
135
136
137
138
            UInt8       gnNextHeader optional,
            UInt8       gnHeaderType optional,
            UInt8       gnHeaderSubtype optional,
            UInt32      gnLifetime optional,
            UInt8       gnTrafficClass optional,
            UInt16      btpDestinationPort optional,
            UInt16      btpInfo optional,
Yann Garcia's avatar
Yann Garcia committed
139
            Bit24       ssp optional,
140
            UInt32      its_aid optional
141
142
        }
        with {
143
            encode (msgIn) "PER"
144
145
146
147
148
149
150
151
152
        }
        
        /**
        * @desc Appl MAPEM and SPATEM Request Primitive 
        */
        type record MapemReq { 
            MAPEM msgOut 
        }
        with {
153
            encode (msgOut) "PER"
154
155
156
157
158
        }
        type record SpatemReq { 
            SPATEM msgOut
        }
        with {
159
            encode (msgOut) "PER"
160
161
        }
            
162
163
    } with {
        variant ""
164
165
166
        encode "LibIts_Interface" 
    } // End of group ApplPrimitives
    
Bostjan Pintar's avatar
Bostjan Pintar committed
167
168
169
170
171
172
173
174
175
176
177
    group misc {
        
        type record ComponentEntry {
           charstring          componentName,
           ItsMapemSpatem      msComponent optional
        }
        
        type record of ComponentEntry ComponentTable;
        
    } // end misc
    
178
} // End of module LibItsMapemSpatem_TestSystem