summaryrefslogtreecommitdiffstats
path: root/MobileL3_v13.4.0_CNL113832_LATEST/src/MobileL3_Types.ttcn
blob: 0165481d93c0f6e7f8be3f8415f08885bc23439a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
///////////////////////////////////////////////////////////////////////////////
//                                                                           //
// Copyright Test Competence Center (TCC) ETH 2016                           //
//                                                                           //
// The copyright to the computer  program(s) herein  is the property of TCC. //
// The program(s) may be used and/or copied only with the written permission //
// of TCC or in accordance with  the terms and conditions  stipulated in the //
// agreement/contract under which the program(s) has been supplied.          //
//                                                                           //
///////////////////////////////////////////////////////////////////////////////
//
//  File:               MobileL3_Types.ttcn
//  Rev:                R1B
//  Prodnr:             CNL 113 832
//  Contact:            http://ttcn.ericsson.se
//  Reference:          3GPP TS 24.008 v13.4.0

module MobileL3_Types
{

import from General_Types           all;
import from MobileL3_CommonIE_Types all;
import from MobileL3_GMM_SM_Types   all;
import from MobileL3_MM_Types       all;
import from MobileL3_CC_Types       all;
import from MobileL3_RRM_Types      all;
import from MobileL3_SMS_Types      all;
import from MobileL3_SS_Types       all;

external function enc_PDU_L3_MS_SGSN(in PDU_L3_MS_SGSN pdu) return octetstring
with { extension "prototype(convert)" extension "encode(RAW)" }
external function enc_PDU_L3_MS_SGSN_fast(in PDU_L3_MS_SGSN pdu, out octetstring stream)
with { extension "prototype(fast)" extension "encode(RAW)" }

// new external function for decoding MS -> SGSN
external function dec_PDU_L3_MS_SGSN(in octetstring stream) return PDU_L3_MS_SGSN
with { extension "prototype(convert)" extension "decode(RAW)" }
external function dec_PDU_L3_MS_SGSN_backtrack(in octetstring stream, out PDU_L3_MS_SGSN pdu) return integer
with { extension "prototype(backtrack)" extension "decode(RAW)" }

// new external function for encoding SGSN -> MS
external function enc_PDU_L3_SGSN_MS(in PDU_L3_SGSN_MS pdu) return octetstring
with { extension "prototype(convert)" extension "encode(RAW)" }
external function enc_PDU_L3_SGSN_MS_fast(in PDU_L3_SGSN_MS pdu, out octetstring stream)
with { extension "prototype(fast)" extension "encode(RAW)" }

external function dec_PDU_L3_SGSN_MS(in octetstring stream) return PDU_L3_SGSN_MS
with { extension "prototype(convert)" extension "decode(RAW)" }
external function dec_PDU_L3_SGSN_MS_backtrack(in octetstring stream, out PDU_L3_SGSN_MS pdu) return integer
with { extension "prototype(backtrack)" extension "decode(RAW)" }

external function enc_PDU_ML3_NW_MS(in PDU_ML3_NW_MS pdu) return octetstring
with { extension "prototype(convert)" extension " encode(RAW)" }
external function enc_PDU_ML3_NW_MS_fast(in PDU_ML3_NW_MS pdu, out octetstring stream)
with { extension "prototype(fast)" extension " encode(RAW)" }

external function dec_PDU_ML3_NW_MS(in octetstring stream) return PDU_ML3_NW_MS
with { extension "prototype(convert)" extension " decode(RAW)" }
external function dec_PDU_ML3_NW_MS_backtrack(in octetstring stream, out PDU_ML3_NW_MS pdu) return integer
with { extension "prototype(backtrack)" extension " decode(RAW)" }

external function enc_PDU_ML3_MS_NW(in PDU_ML3_MS_NW pdu) return octetstring
with { extension "prototype(convert)" extension " encode(RAW)" }
external function enc_PDU_ML3_MS_NW_fast(in PDU_ML3_MS_NW pdu, out octetstring stream)
with { extension "prototype(fast)" extension " encode(RAW)" }

external function dec_PDU_ML3_MS_NW(in octetstring stream) return PDU_ML3_MS_NW
with { extension "prototype(convert)" extension " decode(RAW)" }
external function dec_PDU_ML3_MS_NW_backtrack(in octetstring stream, out PDU_ML3_MS_NW pdu) return integer
with { extension "prototype(backtrack)" extension " decode(RAW)" }

// ***************************************************************************
// *     The container types of all L3_PDU
// ***************************************************************************
type record L3_TransactionId
{
  BIT3               tio,
  BIT1               tiFlag ,
  TI_Extension       tIExtension  optional
  // an extension octet (TI) can be used for session management messages
  // not yet implemented (see 24.008 clause 10.3.2 for more detail
} with { variant (tIExtension) "PRESENCE(tio = '111'B)" };

type record L3_TransactionId_not_extended
{
  BIT3               tio,
  BIT1               tiFlag
};

type union TiOrSkip_not_extended
{
  BIT4                                   skipIndicator,
  L3_TransactionId_not_extended          transactionId
};


type union TiOrSkip
{
  BIT4               skipIndicator,
  L3_TransactionId   transactionId
};

type union L3_Discr_SGSN_MS
{
  octetstring        gcc,       //group call control
  octetstring        bcc,      // broadcast call control
  octetstring        cc,       // call control; call related SS messages PDU_ypes_CC_MSC_MS
  octetstring        gttp,     // GPRS Transparent Transport Protocol
  octetstring        mm,       // mobility management messages  PDU_DTAP_MM
  octetstring        rrm,      // radio resource management messages PDU_DTAP_RRM
  L3_GMM_SGSN_MS     gprs_mm,  // GPRS mobility management messages
  octetstring        sms,      // SMS messages
  L3_GSM_SGSN_MS     gprs_sm,  // GPRS session management messages
  octetstring        ss,       // non call related SS messages
  octetstring        loc,      // Location services
  octetstring        reserved
};


type record PDU_L3_SGSN_MS_unextended_ti
{
  BIT4                         discriminator,
  TiOrSkip_not_extended        tiOrSkip,
  L3_Discr_SGSN_MS             msgs
} with { variant (msgs)"CROSSTAG(
  gcc,        discriminator='0000'B;
  bcc,        discriminator='0001'B;
  cc,         discriminator='0011'B;
  gttp,       discriminator='0100'B;
  mm,         discriminator='0101'B;
  rrm,        discriminator='0110'B;
  gprs_mm,    discriminator='1000'B;
  sms,        discriminator='1001'B;
  gprs_sm,    discriminator='1010'B;
  ss,         discriminator='1011'B;
  loc,        discriminator='1100'B;
  reserved, { discriminator='0010'B,
  discriminator='0111'B,
  discriminator='1101'B,
  discriminator='1110'B,
  discriminator='1111'B }
  )";
  variant (tiOrSkip)"CROSSTAG(
  skipIndicator,    { discriminator='0000'B,
  discriminator='0001'B,
  discriminator='0010'B,
  discriminator='0100'B,
  discriminator='0101'B,
  discriminator='0110'B,
  discriminator='0111'B,
  discriminator='1000'B,
  discriminator='1100'B,
  discriminator='1101'B,
  discriminator='1110'B,
  discriminator='1111'B };
  transactionId,    { discriminator='0011'B,
  discriminator='1001'B,
  discriminator='1011'B,
  discriminator='1010'B }
  )";
};


type record PDU_L3_SGSN_MS
{
  BIT4               discriminator,
  TiOrSkip           tiOrSkip,
  L3_Discr_SGSN_MS   msgs
}  with { variant (msgs)"CROSSTAG(
  gcc,        discriminator='0000'B;
  bcc,        discriminator='0001'B;
  cc,         discriminator='0011'B;
  gttp,       discriminator='0100'B;
  mm,         discriminator='0101'B;
  rrm,        discriminator='0110'B;
  gprs_mm,    discriminator='1000'B;
  sms,        discriminator='1001'B;
  gprs_sm,    discriminator='1010'B;
  ss,         discriminator='1011'B;
  loc,        discriminator='1100'B;
  reserved, { discriminator='0010'B,
  discriminator='0111'B,
  discriminator='1101'B,
  discriminator='1110'B,
  discriminator='1111'B }
  )";
  variant (tiOrSkip)"CROSSTAG(
  skipIndicator,    { discriminator='0000'B,
  discriminator='0001'B,
  discriminator='0010'B,
  discriminator='0100'B,
  discriminator='0101'B,
  discriminator='0110'B,
  discriminator='0111'B,
  discriminator='1000'B,
  discriminator='1100'B,
  discriminator='1101'B,
  discriminator='1110'B,
  discriminator='1111'B };
  transactionId,    { discriminator='0011'B,
  discriminator='1011'B,
  discriminator='1001'B,
  discriminator='1010'B }
  )";
};


type union L3_Discr_MS_SGSN
{
  octetstring        gcc,      //group call control
  octetstring        bcc,      // broadcast call control
  octetstring        cc,       // call control; call related SS messages PDU_DTAP_CC_MS_MSC
  octetstring        gttp,     // GPRS Transparent Transport Protocol
  octetstring        mm,       // mobility management messages PDU_DTAP_MM
  octetstring        rrm,      // radio resource management messages PDU_DTAP_RRM
  L3_GMM_MS_SGSN     gprs_mm,  // GPRS mobility management messages
  octetstring        sms,      // SMS messages
  L3_GSM_MS_SGSN     gprs_sm,  // GPRS session management messages
  octetstring        ss,  // non call related SS messages
  octetstring        loc, // Location services
  octetstring        reserved
};


type record PDU_L3_MS_SGSN
{
  BIT4               discriminator,
  TiOrSkip           tiOrSkip,
  L3_Discr_MS_SGSN   msgs
} with { variant (msgs)"CROSSTAG(
  gcc,        discriminator='0000'B;
  bcc,        discriminator='0001'B;
  cc,         discriminator='0011'B;
  gttp,       discriminator='0100'B;
  mm,         discriminator='0101'B;
  rrm,        discriminator='0110'B;
  gprs_mm,    discriminator='1000'B;
  sms,        discriminator='1001'B;
  gprs_sm,    discriminator='1010'B;
  ss,         discriminator='1011'B;
  loc,        discriminator='1100'B;
  reserved, { discriminator='0010'B,
  discriminator='0111'B,
  discriminator='1101'B,
  discriminator='1110'B,
  discriminator='1111'B }
  )";
  variant (tiOrSkip)"CROSSTAG(
  skipIndicator,    { discriminator='0000'B,
  discriminator='0001'B,
  discriminator='0010'B,
  discriminator='0100'B,
  discriminator='0101'B,
  discriminator='0110'B,
  discriminator='0111'B,
  discriminator='1000'B,
  discriminator='1100'B,
  discriminator='1101'B,
  discriminator='1110'B,
  discriminator='1111'B };
  transactionId,    { discriminator='0011'B,
  discriminator='1001'B,
  discriminator='1011'B,
  discriminator='1010'B }
  )";
};


//***************************************************************************
//  24.007/11.2.3.1.1 and 24.008/10.2 Protocol Discriminator    NW->MS
//***************************************************************************
type union ML3_Discr_NW_MS
{
  octetstring        gcc,      // group call control                      <- 24.068  WITHDRAWN
  octetstring        bcc,      // broadcast call control                  <- 24.069 WITHDRAWN
  PDU_ML3_CC_NW_MS   cc,       // call control; call related SS messages  <-24.008, implemented
  octetstring        gttp,     // GPRS Transparent Transport Protocol <- not required in MSC
  PDU_ML3_MM         mm,       // mobility management messages        <- 24.008,
  PDU_RRM_NW_MS      rrm,      // radio resource management messages  <- 24.008, 24.018
  octetstring        gprs_mm,  // GPRS mobility management messages   <- Not required in MSC
  // but implemented as L3_GMM_SGSN_MS in L3_Types (SGSN)
  L3_SMS_SGSN_MS     sms,      // SMS messages
  //<-24.011, imported from L3_SMS_Types
  octetstring        gprs_sm,  // GPRS session management messages    <- not required in MSC
  // but impl. as L3_GMM_MS_SGSN in L3_GSM_SGSN_MS_Types
  PDU_ML3_SS_NW_MS   ss,       // non call related SS messages
  //<- 24.080 ASN1 or implemented by ethgbh
  octetstring        loc,      // Location services(LCS)              <- 24.030
  octetstring        reserved
};


// ref: 24.007/11.2.3.1.1 "Protocol discriminator" and
// Table 11.2 "Protocol dicriminator values"
type record PDU_ML3_NW_MS
{
  BIT4             discriminator, //24.008/10.2
  TiOrSkip         tiOrSkip,      //24.008/10.3
  ML3_Discr_NW_MS  msgs
} with { variant (msgs)"CROSSTAG(
  gcc,        discriminator='0000'B;
  bcc,        discriminator='0001'B;
  cc,         discriminator='0011'B;
  gttp,       discriminator='0100'B;
  mm,         discriminator='0101'B;
  rrm,        discriminator='0110'B;
  gprs_mm,    discriminator='1000'B;
  sms,        discriminator='1001'B;
  gprs_sm,    discriminator='1010'B;
  ss,         discriminator='1011'B;
  loc,        discriminator='1100'B;
  reserved, { discriminator='0010'B,
              discriminator='0111'B,
              discriminator='1101'B,
              discriminator='1110'B,
              discriminator='1111'B }
  )";
  variant (tiOrSkip)"CROSSTAG(
  skipIndicator,    { discriminator='0000'B,
                      discriminator='0001'B,
                      discriminator='0010'B,
                      discriminator='0100'B,
                      discriminator='0101'B,
                      discriminator='0110'B,
                      discriminator='0111'B,
                      discriminator='1000'B,
                      discriminator='1100'B,
                      discriminator='1101'B,
                      discriminator='1110'B,
                      discriminator='1111'B };
  transactionId,    { discriminator='0011'B,
                      discriminator='1001'B,
                      discriminator='1011'B,
                      discriminator='1010'B }
  )";
};


type union ML3_Discr_MS_NW
{
  octetstring        gcc,      //group call control
  octetstring        bcc,      // broadcast call control
  PDU_ML3_CC_MS_NW   cc,       // call control; call related SS messages
  octetstring        gttp,     // GPRS Transparent Transport Protocol
  PDU_ML3_MM         mm,       // mobility management messages
  PDU_RRM_MS_NW      rrm,      // radio resource management messages
  octetstring        gprs_mm,  // GPRS mobility management messages
  L3_SMS_MS_SGSN     sms,      // SMS messages
  octetstring        gprs_sm,  // GPRS session management messages
  PDU_ML3_SS_MS_NW   ss,  // non call related SS messages
  octetstring        loc, // Location services
  octetstring        reserved
};

type record PDU_ML3_MS_NW
{
  BIT4                discriminator,
  TiOrSkip            tiOrSkip,
  ML3_Discr_MS_NW     msgs
} with { variant (msgs)"CROSSTAG(
  gcc,        discriminator='0000'B;
  bcc,        discriminator='0001'B;
  cc,         discriminator='0011'B;
  gttp,       discriminator='0100'B;
  mm,         discriminator='0101'B;
  rrm,        discriminator='0110'B;
  gprs_mm,    discriminator='1000'B;
  sms,        discriminator='1001'B;
  gprs_sm,    discriminator='1010'B;
  ss,         discriminator='1011'B;
  loc,        discriminator='1100'B;
  reserved, { discriminator='0010'B,
              discriminator='0111'B,
              discriminator='1101'B,
              discriminator='1110'B,
              discriminator='1111'B }
  )";
  variant (tiOrSkip)"CROSSTAG(
  skipIndicator,    { discriminator='0000'B,
                      discriminator='0001'B,
                      discriminator='0010'B,
                      discriminator='0100'B,
                      discriminator='0101'B,
                      discriminator='0110'B,
                      discriminator='0111'B,
                      discriminator='1000'B,
                      discriminator='1100'B,
                      discriminator='1101'B,
                      discriminator='1110'B,
                      discriminator='1111'B };
  transactionId,    { discriminator='0011'B,    //24.008/10.3.2
                      discriminator='1001'B,
                      discriminator='1011'B,
                      discriminator='1010'B }   //24.008/10.3.2
  )";
};

}//end of module
with {
extension "version R1B"
encode "RAW"
}