LibItsMapemSpatem_TestSystem.ttcn 4.85 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
65
66
67
68
69
70
71
        } // end UpperTesterPort

    } // end portDefinitions

    group interfacePorts {

        /**
        * @desc Application MapSpat Port
        */
        type port MapemSpatemPort message { in MapemInd , SpatemInd ; out MapemReq , SpatemReq }
    
    } // End of group interfacePorts

    /**
    * @desc ITS System Adapter
    */
    type component ItsMapemSpatemSystem {
            
        port UpperTesterPort utPort;
garciay's avatar
garciay committed
72
        port AdapterControlPort acPort;
73
74
75
76
77
78
79
80
81
        port MapemSpatemPort mapemSpatemPort;

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

82
        port AdapterControlPort acPort;
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
        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
99
100
        
        var boolean vc_mapemSpatemDefaultActive := true;
101
102
103
104
105
106
    } // End of component ItsMapemSpatem

    group ApplPrimitives {
        
        type record MapemInd {
            MAPEM       msgIn,
Yann Garcia's avatar
Yann Garcia committed
107
            UInt64      recvTime,
108
109
110
111
112
113
114
            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
115
            Bit24       ssp optional,
116
            UInt32      its_aid optional
117
118
        }
        with {
119
            encode (msgIn) "PER"
120
121
122
123
        }
        
        type record SpatemInd {
            SPATEM      msgIn,
Yann Garcia's avatar
Yann Garcia committed
124
            UInt64      recvTime,
125
126
127
128
129
130
131
            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
132
            Bit24       ssp optional,
133
            UInt32      its_aid optional
134
135
        }
        with {
136
            encode (msgIn) "PER"
137
138
139
140
141
142
143
144
145
        }
        
        /**
        * @desc Appl MAPEM and SPATEM Request Primitive 
        */
        type record MapemReq { 
            MAPEM msgOut 
        }
        with {
146
            encode (msgOut) "PER"
147
148
149
150
151
        }
        type record SpatemReq { 
            SPATEM msgOut
        }
        with {
152
            encode (msgOut) "PER"
153
154
        }
            
155
156
    } with {
        variant ""
157
158
159
160
        encode "LibIts_Interface" 
    } // End of group ApplPrimitives
    
} // End of module LibItsMapemSpatem_TestSystem