blob: 9d890281e3130f65a79b47bc2f67da7c70f8c177 [file] [log] [blame]
Harald Weltea814f262017-07-24 13:21:35 +02001///////////////////////////////////////////////////////////////////////////////
2// //
3// Copyright Test Competence Center (TCC) ETH 2016 //
4// //
5// The copyright to the computer program(s) herein is the property of TCC. //
6// The program(s) may be used and/or copied only with the written permission //
7// of TCC or in accordance with the terms and conditions stipulated in the //
8// agreement/contract under which the program(s) has been supplied. //
9// //
10///////////////////////////////////////////////////////////////////////////////
11//
12// File: MobileL3_CommonIE_Types.ttcn
13// Rev: R1B
14// Prodnr: CNL 113 832
15// Contact: http://ttcn.ericsson.se
16// Reference: 3GPP TS 24.008 v13.4.0
17
18module MobileL3_CommonIE_Types {
19
20import from General_Types all;
21
22// This type is a container for all necessary MS related parameters
23type record MS_parameters
24{
25 integer imsi_length, //in
26 BIT4 imsi_firstdigit,
27 octetstring imsi,
28 octetstring number,
29 integer SCCP_connId, //connection Id of currently used SCCP connection
30 integer L3_NSD, // actual value of L3 NSD
31 BIT1 tiFlag // '0'B for call originator, '1' for call destination
32 // this is an example how to set the value
33 // tsp_imsi_1_firstdigit := '0010'B
34 // tsp_imsi_1 := '26200103000015'O; // '262021030000051'O;
35 // tsp_calledPartyBCD_Number_digits := '7112300020'O ; // '1721030002'O
36}
37
38// Use these Types instead of repeating it !
39
40type record Type1_V
41{
42 BIT4 dummy,
43 BIT4 valuePart
44};
45
46type record Type1_TV
47{
48 BIT4 valuePart,
49 BIT4 elementIdentifier
50};
51
52type record Type2
53{
54 OCT1 elementIdentifier
55};
56
57type record Type3_V
58{
59 OCTN valuePart
60};
61
62type record Type3_TV
63{
64 OCT1 elementIdentifier,
65 OCTN valuePart
66};
67
68type record Type4_LV
69{
70 LIN1 lengthIndicator,
71 OCTN valuePart
72} with { variant (lengthIndicator) "LENGTHTO (valuePart)"};
73
74type record Type4_TLV
75{
76 OCT1 elementIdentifier,
77 LIN1 lengthIndicator,
78 OCTN valuePart
79} with { variant (lengthIndicator) "LENGTHTO (valuePart)"};
80
81///////////////////////////////////////
82// IE Type definitions
83///////////////////////////////////////
84
85type record ML3_NotifySS_Arg
86{
87 OCT1 sequenceTag,
88 OCT1 sequenceLength,
89 OCT1 ssCodeTag,
90 OCT1 ssCodeLength,
91 OCT1 ssCodeValue,
92 OCT1 ssIndicatorTag,
93 OCT1 ssIndicatorLength,
94 OCT1 ssIndicatorValue
95};
96
97
98//============================================================================
99// 10.5.1 Common Information elements
100//============================================================================
101
102// 10.5.1.1 Cell Identity
103type record CellIdentity
104{
105 OCT1 elementIdentifier,
106 OCT2 cIvalue
107};
108
109// 10.5.1.2 CipheringKeySequenceNumber
110type record CipheringKeySequenceNumberTV
111{
112 CipheringKeySequenceNumberV keySequence,
113 BIT4 elementIdentifier
114} with { variant "PRESENCE (elementIdentifier = '1000'B)"; };
115
116type record CipheringKeySequenceNumberV
117{
118 BIT3 keySequence,
119 BIT1 spare
120};
121
122//24.008/10.5.1.3 Location Area Identification
123type record LocationAreaIdentification_V
124{
125 OCT3 mcc_mnc,
126 OCT2 lac
127};
128
129type record LocationAreaIdentification_TV
130{
131 OCT1 elementIdentifier,
132 OCT3 mcc_mnc,
133 OCT2 lac
134};
135
136// 24.008/ 10.5.1.4 Mobile Identity
137type record MobileIdentityTLV
138{
139 BIT7 elementIdentifier,
140 BIT1 spare1,
141 MobileIdentityLV mobileIdentityLV
142};
143
144type record MobileIdentityLV
145{
146 LIN1 lengthIndicator,
147 MobileIdentityV mobileIdentityV
148} with { variant (lengthIndicator) "LENGTHTO (mobileIdentityV)"};
149
150type record MobileIdentityV
151{
152 BIT3 typeOfIdentity,
153 OddEvenInd_Identity oddEvenInd_identity
154} with { variant (oddEvenInd_identity) "CROSSTAG
155 (
156 imei, typeOfIdentity ='010'B;
157 imsi, typeOfIdentity ='001'B;
158 imei_sv, typeOfIdentity ='011'B;
159 tmsi_ptmsi, typeOfIdentity ='100'B;
160 tmgi_and_MBMS_SessionID, typeOfIdentity ='101'B;
161 no_identity, typeOfIdentity ='000'B;
162 )"};
163
164
165type union OddEvenInd_Identity
166{
167 IMSI_L3 imsi, // avoid name conflict with RANAP
168 IMEI_L3 imei, // avoid name conflict with RANAP
169 IMEI_SV imei_sv,
170 TMSI_PTMSI tmsi_ptmsi,
171 TMGI_and_MBMS_SessionID tmgi_and_MBMS_SessionID,
172 No_Identity no_identity
173};
174
175type record IMSI_L3
176{
177 BIT1 oddevenIndicator, // '1'B or '0'B
178 hexstring digits length(5..15),
179 BIT4 fillerDigit optional // B'1111, fillerDigit is present
180 // if oddevenIndicator=0
181} with { variant (fillerDigit) "PRESENCE (oddevenIndicator = '0'B) ";};
182
183type record IMEI_L3
184{
185 BIT1 oddevenIndicator, // '1'B
186 hexstring digits length(15)
187};
188
189type record TMSI_PTMSI
190{
191 BIT1 oddevenIndicator, // '0'B
192 BIT4 fillerDigit, // B'1111
193 OCT4 octets
194};
195
196type record IMEI_SV
197{
198 BIT1 oddevenIndicator, // '0'B
199 hexstring digits length(16),
200 BIT4 fillerDigit // filler '1111'B
201};
202
203type record TMGI_and_MBMS_SessionID
204{
205 BIT1 oddevenIndicator,
206 BIT1 mCC_MNCIndicator, // 1: present
207 BIT1 mBMS_SessionIdentityIndicator, // 1: present
208 BIT2 spare,
209 OCT3 mBMS_ServiceID,
210 HEX1 mccDigit1,
211 HEX1 mccDigit2,
212 HEX1 mccDigit3,
213 HEX1 mncDigit3,
214 HEX1 mncDigit1,
215 HEX1 mncDigit2,
216 OCT1 mBMS_SessionIdentity
217}
218
219type record No_Identity
220{
221 BIT1 oddevenIndicator, // '0'B (guessed)
222 hexstring fillerDigits length(5) // length to be "3" if the GMM identification procedure is used
223};
224
225// 24.008/ 10.5.1.5 MobileStationClassmark1
226type record MobileStationClassmark1_TV
227{
228 OCT1 elementIdentifier, //'???'H
229 BIT3 rf_PowerCapability,
230 BIT1 a5_1,
231 BIT1 esind,
232 BIT2 revisionLevel,
233 BIT1 spare1_1
234};
235
236type record MobileStationClassmark1_V
237{
238 BIT3 rf_PowerCapability,
239 // class1 (000) (for GSM+DCS+PCS)
240 // class2 (001) (for GSM+DCS+PCS)
241 // class3 (010) (for GSM+DCS+PCS)
242 // class4 (011) (only for GSM)
243 // class5 (100) (only for GSM)
244 BIT1 a5_1,
245 // encryption algor. A5/available 1 (1)
246 // encryption algor. A5/1 available not (0)
247 BIT1 esind,
248 BIT2 revisionLevel,
249 BIT1 spare1_1
250};
251
252// 24.008/ 10.5.1.6 MobileStationClassmark2
253//4th octet:
254type record MobileStationClassmark2_oct4
255{
256 BIT1 fc, // '0'B no MS support of E/R_GSM
257 // '1'B MS support of E/R_GSM
258 ////BIT2 spare1_2, // '00'B removed by ethbaat
259 BIT1 vgcs,//'0'B no VGCS capability
260 //'1'B VGCS capability and notifications wanted
261 BIT1 vbs, //'0'B no VBS capability,
262 // '1'B VBS capability and notifications wanted
263 BIT1 sm_Capability, // '0'B SM capbility present not
264 // '1'B SM capbility present
265 BIT2 ss_ScreenIndicator,
266 // '00'B default value of phase1 (GSM+DCS) reserved or (PCS)
267 // '01'B capability of notation ellipsis
268 // '10'B for future use
269 // '11'B for use future
270 BIT1 ps_Capability, // 'x'B ignored, received if
271 BIT1 spare2_1 // '0'B
272};
273
274
275//5th octet ( Table 10.5.6a ):
276type record MobileStationClassmark2_oct5
277{
278 BIT1 a5_2, // '0'B encryption algorithm A5/2 available not(0)
279 // '1'B encryption algorithm A5/available 2 (1)
280 BIT1 a5_3, // '0'B encryption algorithm A5/3 available not(0)
281 // '1'B encryption algorithm A5/available 3 (1)
282 //removed by ethbaat: BIT5 spare3_5, // '00000'B
283 BIT1 cmsp,
284 BIT1 solsa,
285 BIT1 ucs2,
286 BIT1 lcsva_cap,
287 BIT1 spare5_7,
288 BIT1 cm3 // '0'B no additional capability info
289 // '1'B The MS supports options that are indicated in classmark 3 IE
290 // (additional info capability)
291};
292
293type record MobileStationClassmark2_LV
294{
295 LIN1 lengthIndicator, // '01'O..'03'O
296 BIT3 rf_PowerCapability, // '000'B class1 (for GSM+DCS+PCS)
297 // '001'B class2 (for GSM+DCS+PCS)
298 // '010'B class3 (for GSM+DCS+PCS)
299 // '011'class4 B (only for GSM)
300 // '100'class5 B (only for GSM)
301 BIT1 a5_1, // '0'B encryption algorithm A5/1 available (0)
302 // '1'B encryption algorithm A5/1 not available 1 (1)
303 BIT1 esind,
304 // '0'B controlled early classmark sending option implemented not (0)
305 // '1'B controlled early classmark sending implemented option (1)
306 BIT2 revisionLevel, // '00'B reserved for phase1 (GSM+DCS)
307 // '00'B reserved for GSM phase 1 (PCS)
308 // '01'B used by phase2 MSs (GSM+DCS)
309 // '01'B used by PCS1900 MSs phase1 (PCS)
310 // '10'B used by MSs R99 supporting
311 // '11'B reserved for future use
312 BIT1 spare1_1, // '0'B
313 MobileStationClassmark2_oct4 mobileStationClassmark2_oct4 optional,
314 MobileStationClassmark2_oct5 mobileStationClassmark2_oct5 optional
315} with { variant (lengthIndicator) "LENGTHTO (rf_PowerCapability, a5_1, esind,
316 revisionLevel, spare1_1,
317 mobileStationClassmark2_oct4,
318 mobileStationClassmark2_oct5)"};
319
320type record MobileStationClassmark2_TLV
321{
322 OCT1 elementIdentifier,
323 MobileStationClassmark2_LV mobileStationClassmark2LV
324} with {
325 variant "PRESENCE (elementIdentifier = '11'O)";
326};
327
328
329
330//**********************************************************************
331// 24.008/ 10.5.1.6 5th octet ( Table 10.5.6a ):
332// almost the same as MobileStationClassmark2_LV, but
333// _TLV ie elementIdentifier is present
334// oct4 and oct5 is mandatory
335// The record name is inherited from (and used in) old test cases
336//**********************************************************************
337type record ClassmarkInformationType2_forUMTS
338{
339 OCT1 elementIdentifier,
340 //'33'O instead of '12'O (normal Classmark2)
341 LIN1 lengthIndicator,
342 //always '03'O (unlike normal ClassMark2, which can be 2 or 3)
343 BIT3 rf_PowerCapability, // '000'B class1 (for GSM+DCS+PCS)
344 // '001'B class2 (for GSM+DCS+PCS)
345 // '010'B class3 (for GSM+DCS+PCS)
346 // '011'class4 B (only for GSM)
347 // '100'class5 B (only for GSM)
348 BIT1 a5_1, // '0'B encryption algorithm A5/1 available not (0)
349 // '1'B encryption algorithm A5/available 1 (1)
350 BIT1 esind,
351 //'0'B controlled early classmark sending option implemented not (0)
352 // '1'B controlled early classmark sending implemented option (1)
353 BIT2 revisionLevel, // '00'B reserved for phase1 (GSM+DCS)
354 // '00'reserved B (PCS)
355 // '01'B used by phase2 MSs (GSM+DCS)
356 // '01'B used by PCS1900 MSs phase1 (PCS)
357 BIT1 spare1_1, // '0'B
358 BIT1 fc, // '0'B no MS' support of E/R_GSM
359 // '1'B MS' support of E/R_GSM
360 BIT1 vgcs,//'0'B no VGCS capability
361 //'1'B VGCS capability and notifications wanted
362 BIT1 vbs, //'0'B no VBS capability,
363 // '1'B VBS capability and notifications wanted
364 BIT1 sm_Capability, // '0'B SM capbility present not
365 // '1'B SM capability present
366 BIT2 ss_ScreenIndicator, // '00'B default value of phase1 (GSM+DCS)
367 // '00'reserved B (PCS)
368 // '01'B capability of notation ellipsis
369 // '10'B for future use
370 // '11'B for use future
371 BIT1 ps_Capability, // '0'B or '1'B ignored, received if
372 BIT1 spare2_1, // '0'B,
373 BIT1 a5_2, // '0'B encryption algorithm A5/2 available not (0)
374 // '1'B encryption algorithm A5/available 2 (1)
375 BIT1 a5_3, // '0'B encryption algorithm A5/3 available not (0)
376 // '1'B encryption algorithm A5/available 3 (1)
377 //BIT5 spare3_5, // '00000'B
378 BIT1 cmsp,
379 BIT1 solsa,
380 BIT1 ucs2,
381 BIT1 lcsva_cap,
382 BIT1 spare5_7,
383 BIT1 cm3 // '0'B no additional capability info
384 // '1'B additional info capability
385} with { variant (lengthIndicator) "LENGTHTO (rf_PowerCapability, a5_1, esind,
386 revisionLevel, spare1_1, fc, vgcs, vbs,
387 sm_Capability, ss_ScreenIndicator,
388 ps_Capability, spare2_1, a5_2, a5_3,
389 //spare3_5,
390 cmsp,solsa,ucs2,lcsva_cap,spare5_7,
391 cm3)"};
392
393
394
395//24.008/ 10.5.1.7
396type record MobileStationClassmark3_TLV
397{
398 OCT1 elementIdentifier,
399 LIN1 lengthIndicator,
400 OCTN valuePart
401} with {
402 variant "PRESENCE (elementIdentifier = '20'O)"
403 variant (lengthIndicator) "LENGTHTO (valuePart)"
404};
405
406
407type record MobileStationClassmark3_LV
408{
409 LIN1 lengthIndicator,
410 OCTN valuePart
411} with { variant (lengthIndicator) "LENGTHTO (valuePart)"};
412// used in: PDU_ML3_Setup_MSC_MS, PDU_ML3_CallProceeding,
413// PDU_ML3_CMServiceRequest
414
415type record UTRACSGCellsReporting
416{
417 BIT1 reportingofUTRANCSGCellsSupport
418} with {
419 variant "FIELDORDER(msb)"
420}
421
422type record VAMOSLevel
423{
424 BIT2 vAMOSSupport
425} with {
426 variant "FIELDORDER(msb)"
427}
428
429//24.008/ 10.5.1.8 Spare half octet ---- not used
430
431//24.008/ 10.5.1.9 Descriptive group or broadcast call reference
432type record DescriptiveGroupOrBroadcastCallReference_V
433{
434 bitstring binaryCodingOfGroupOrBroadcastCallReference length (27),
435 BIT1 sF,
436 BIT1 aF,
437 BIT3 callPriority,
438 BIT4 cipheringInformation,
439 BIT4 spare
440} with { variant (binaryCodingOfGroupOrBroadcastCallReference,sF,aF,
441 callPriority,cipheringInformation,spare) "FIELDORDER(msb)"};
442
443//10.5.1.10 Group Cipher Key Number
444type record groupCipherKeyNumber_TV
445{
446 BIT4 valuePart,
447 BIT4 elementIdentifier
448};
449
450type BIT4 groupCipherKeyNumber_V;
451
452
453//24.008/10.5.1.10a
454type record PdAndSapi
455{
456 BIT4 protocolDiscriminator,
457 BIT2 sapi,
458 BIT2 spare2
459};
460
461//10.5.1.11 Priority Level
462type record PriorityLevel_ML3
463{
464 BIT3 callPriority, // B'...._000 no applied priority
465 // B'...._001 call priority level 4
466 // B'...._010 call priority level 3
467 // B'...._011 call priority level 2
468 // B'...._100 call priority level 1
469 // B'...._101 call priority level 0
470 // B'...._110 call priority level B
471 // B'...._111 call priority level A
472 BIT1 spare1_1, // B'....0.._
473 // modified by ethbaat:OCT1 elementIdentifier for...
474 BIT4 elementIdentifier // B'1000' type 1 IEI Priority level
475};
476//ending "_ML3" added, because ambiguities of (RANAP is also using this name)
477
478
479//10.5.1.12 Core Network System Information
480// not implemented yet
481
482//10.5.1.13 PLMN List
483type record PLMNListTLV
484{
485 BIT7 elementIdentifier,
486 BIT1 spare1,
487 LIN1 lengthIndicator,
488 octetstring digits length(3..45) // collapsed into one octetstring
489 // instead of digits
490} with { variant "PRESENCE (elementIdentifier = '1001010'B)";
491 variant (lengthIndicator) "LENGTHTO (digits)"};
492
493//10.5.1.15
494type record MS_NetworkFeatureSupportTV
495{
496 BIT1 extendedPeriodicTimers,
497 BIT3 spare,
498 BIT4 elementIdentifier
499}
500
501// GPRS Timer3 - 10.5.7.4a
502type record GPRSTimer3TLV
503{
504 OCT1 elementIdentifier,
505 LIN1 lengthIndicator,
506 GPRSTimer3V gprsTimer3V
507} with {
508 variant (lengthIndicator) "LENGTHTO (gprsTimer3V)"
509};
510
511type record GPRSTimer3V
512{
513 BIT5 timerValue,
514 BIT3 unit
515};
516
517//****************************************************************************
518// Common elements in CC and SS:
519//****************************************************************************
520
521//24.008/10.5.4.11 Cause
522type record Diagnostics
523{
524 octetstring data // to split into pieces????
525} with { variant "EXTENSION_BIT (yes)"};
526
527// This type is added for handling extension bit in octet 3 of Cause IE
528type record ML3_Cause_oct3
529{
530 BIT4 location, // '0000'user B
531 // '0001'B private network, local user
532 // '0010'B public network, user local
533 // '0011'B transit network
534 // '0100'B public network, user remote
535 // '0101'B private network, remote user
536 // '0111'B network international
537 // '1010'B Network beyond interworking pt.
538 BIT1 spare1_1, // '0'B
539 BIT2 codingStandard, // '00'B coding according Q.931
540 // '01'B reserved for standards other
541 // '10'B National standard
542 // '11'B standard other (e.g. one defined for GSM PLMNs)
543 BIT1 ext1, // '0'B or '1'B
544 //octet3a:
545 BIT7 recommendation optional,
546 BIT1 ext2 optional // B'1......
547} with { variant "EXTENSION_BIT (yes)"};
548
549type record ML3_Cause_oct4
550{
551 BIT7 causeValue, // see 12/FS
552 BIT1 ext3 // B'1......
553} with { variant "EXTENSION_BIT (yes)"};
554
555type record ML3_Cause_LV
556{
557 LIN1 lengthIndicator, // 2..30
558 ML3_Cause_oct3 oct3,
559 ML3_Cause_oct4 oct4,
560 Diagnostics diagnostics optional // size: 1..27
561} with { variant (lengthIndicator) "LENGTHTO (oct3, oct4, diagnostics) "};
562
563//24.008/10.5.4.11
564type record ML3_Cause_TLV
565{
566 OCT1 elementIdentifier,
567 LIN1 lengthIndicator, // 2..30
568 ML3_Cause_oct3 oct3,
569 ML3_Cause_oct4 oct4,
570 Diagnostics diagnostics optional // size: 1..27
571} with { variant (lengthIndicator) "LENGTHTO (oct3, oct4, diagnostics) "};
572
573//10.5.4.15 Facility IE (see also 24.080/3.6)
574type record Facility_TLV
575{
576 OCT1 elementIdentifier, // H'1C
577 LIN1 lengthIndicator, // 0..?
578 OCTN facilityInformation optional //see 24.080/3.6
579} with { variant (lengthIndicator) "LENGTHTO (facilityInformation)"};
580
581type record Facility_LV
582{
583 LIN1 lengthIndicator, // 0..?
584 OCTN facilityInformation optional //see 24.080/3.6
585} with { variant (lengthIndicator) "LENGTHTO (facilityInformation)"};
586
587//24.008/10.5.4.24 SS Version Indicator
588// used by SS and CC
589type record SS_VersionIndicator
590{
591 OCT1 elementIdentifier, // H'7F
592 LIN1 lengthIndicator, // 0..?
593 OCTN ss_VersionIndicatorContents optional //see 24.080 !!!
594} with { variant (lengthIndicator) "LENGTHTO (ss_VersionIndicatorContents)"};
595
596//10.5.4.32 Supported Codec List
597type record codec
598{
599 OCT1 systemIdentification1,
600 OCT1 lengthOfBitmap1,
601 OCT1 codecBitmap1_bits1to8,
602 OCT1 codecBitmap1_bits9to16
603};
604
605type record of codec CodecList_ML3;
606
607type record SupportedCodecList
608{
609 OCT1 elementIdentifier,
610 LIN1 lengthIndicator, //
611 CodecList_ML3 codecList
612} with {
613 variant "PRESENCE (elementIdentifier = '40'O)";
614 variant (lengthIndicator) "LENGTHTO( codecList )"
615};
616
617// 10.5.7.8
618type record DevicePropertiesTV
619{
620 BIT1 lowPriority,
621 BIT3 spare,
622 BIT4 elementIdentifier
623}
624
625//****************************************************************************
626// Common elements in GMM and MM:
627//****************************************************************************
628// 10.5.5.8a - P-TMSI Signature 2
629type record P_TMSISignature2TLV
630{
631 OCT1 elementIdentifier,
632 LIN1 lengthIndicator,
633 OCT3 valueField
634} with {
635 variant "PRESENCE (elementIdentifier = '19'O)";
636 variant (lengthIndicator) "LENGTHTO (valueField)"
637};
638
639// 10.5.5.29 - P-TMSI Type
640type record P_TMSI_TypeTV
641{
642 BIT1 pTMSI_TypeValue,
643 BIT3 spare,
644 BIT4 elementIdentifier
645} with { variant "PRESENCE (elementIdentifier = '1110'B)" };
646
647//10.5.5.15a - Routing Area Identification
648type record RoutingAreaIdentification2TLV
649{
650 OCT1 elementIdentifier,
651 LIN1 lengthIndicator,
652 OCT6 routingAreaIdentification2
653} with {
654 variant "PRESENCE (elementIdentifier = '1B'O)";
655 variant (lengthIndicator) "LENGTHTO (routingAreaIdentification2)"
656};
657
658
659//****************************************************************************
660// Common elements in RRM and MM:
661//****************************************************************************
662
663//10.5.3.14 Additional Update Parameter
664type record AdditionalUpdateParameterTV
665{
666 BIT1 cSMT,
667 BIT1 cSMO,
668 BIT1 spare2,
669 BIT1 spare3,
670 BIT4 elementIdentifier
671} with {
672 variant "PRESENCE (elementIdentifier = '1100'B)"
673}
674
675}//end of module
676with {
677extension "version R1B"
678encode "RAW"
679}
680