blob: a5ed81d0c1bf92a421dd90fe732c27de4b6b0b7f [file] [log] [blame]
Harald Welte65dad8e2019-05-06 14:48:02 +02001/* SABP Templates in TTCN-3
2 * (C) 2019 Harald Welte <laforge@gnumonks.org>
3 * All rights reserved.
4 *
5 * Released under the terms of GNU General Public License, Version 2 or
6 * (at your option) any later version.
7 *
8 * SPDX-License-Identifier: GPL-2.0-or-later
9 */
10
11module SABP_Templates {
12
13import from General_Types all;
14
15import from SABP_IEs all;
16import from SABP_CommonDataTypes all;
17import from SABP_Constants all;
18import from SABP_Containers all;
19import from SABP_PDU_Contents all;
20import from SABP_PDU_Descriptions all;
21
22template (value) Service_Area_Identifier ts_SabpSai(template (value) OCT3 plmn_id,
23 template (value) OCT2 lac,
24 template (value) OCT2 sac) := {
25 pLMNidentity := plmn_id,
26 lac := lac,
27 sac := sac
28}
29
30/* 9.1.3 WRITE REPLACE */
31template (value) SABP_PDU
32ts_SABP_Write(template (value) BIT16 msg_id, template (value) BIT16 ser_nr,
33 template (value) Service_Areas_List sa_list, template (value) integer rep_per,
34 template (value) integer num_bcast, template (value) BIT8 dcs,
35 template (value) bitstring content) := {
36 initiatingMessage := {
37 procedureCode := id_Write_Replace,
38 criticality := reject,
39 value_ := {
40 Write_Replace := {
41 protocolIEs := {
42 {
43 id := SABP_Constants.id_Message_Identifier,
44 criticality := reject,
45 value_ := { Message_Identifier := msg_id }
46 }, {
47 id := SABP_Constants.id_New_Serial_Number,
48 criticality := reject,
49 value_ := { New_Serial_Number := ser_nr }
50 }, {
51 /* Optional: Old Serial Number */
52 id := SABP_Constants.id_Service_Areas_List,
53 criticality := reject,
54 value_ := { Service_Areas_List := sa_list }
55 }, {
56 /* Optional: Category */
57 id := SABP_Constants.id_Repetition_Period,
58 criticality := reject,
59 value_ := { Repetition_Period := rep_per }
60 }, {
61 id := SABP_Constants.id_Number_of_Broadcasts_Requested,
62 criticality := reject,
63 value_ := { Number_of_Broadcasts_Requested := num_bcast }
64 }, {
65 id := SABP_Constants.id_Data_Coding_Scheme,
66 criticality := reject,
67 value_ := { Data_Coding_Scheme := dcs }
68 }, {
69 id := SABP_Constants.id_Broadcast_Message_Content,
70 criticality := reject,
71 value_ := { Broadcast_Message_Content := content }
72 }
73 },
74 protocolExtensions := omit
75 }
76 }
77 }
78}
79template (present) SABP_PDU
80tr_SABP_Write(template (present) BIT16 msg_id, template (present) BIT16 ser_nr,
81 template (present) Service_Areas_List sa_list := ?, template (present) integer rep_per := ?,
82 template (present) integer num_bcast := ?, template (present) BIT8 dcs := ?,
83 template (present) bitstring content := ?) := {
84 initiatingMessage := {
85 procedureCode := id_Write_Replace,
86 criticality := reject,
87 value_ := {
88 Write_Replace := {
89 protocolIEs := {
90 {
91 id := SABP_Constants.id_Message_Identifier,
92 criticality := reject,
93 value_ := { Message_Identifier := msg_id }
94 }, {
95 id := SABP_Constants.id_New_Serial_Number,
96 criticality := reject,
97 value_ := { New_Serial_Number := ser_nr }
98 }, *, /* Optional: Old Serial Number */
99 {
100 id := SABP_Constants.id_Service_Areas_List,
101 criticality := reject,
102 value_ := { Service_Areas_List := sa_list }
103 }, * /* Optional: Category */,
104 {
105 id := SABP_Constants.id_Repetition_Period,
106 criticality := reject,
107 value_ := { Repetition_Period := rep_per }
108 }, {
109 id := SABP_Constants.id_Number_of_Broadcasts_Requested,
110 criticality := reject,
111 value_ := { Number_of_Broadcasts_Requested := num_bcast }
112 }, {
113 id := SABP_Constants.id_Data_Coding_Scheme,
114 criticality := reject,
115 value_ := { Data_Coding_Scheme := dcs }
116 }, {
117 id := SABP_Constants.id_Broadcast_Message_Content,
118 criticality := reject,
119 value_ := { Broadcast_Message_Content := content }
120 }
121 },
122 protocolExtensions := *
123 }
124 }
125 }
126}
127
128/* 9.1.4 WRITE REPLACE COMPLETE */
129template (value) SABP_PDU
130ts_SABPWriteCompl(template (value) BIT16 msg_id, template (value) BIT16 ser_nr) := {
131 successfulOutcome := {
132 procedureCode := id_Write_Replace,
133 criticality := reject,
134 value_ := {
135 Write_Replace_Complete := {
136 protocolIEs := {
137 {
138 id := SABP_Constants.id_Message_Identifier,
139 criticality := reject,
140 value_ := { Message_Identifier := msg_id }
141 }, {
142 id := SABP_Constants.id_New_Serial_Number,
143 criticality := reject,
144 value_ := { New_Serial_Number := ser_nr }
145 }
146 /* Optional: Number of Broadcasts Completed List */
147 /* Optional: Criticality-Diagnostics */
148 },
149 protocolExtensions := omit
150 }
151 }
152 }
153}
154template (present) SABP_PDU
155tr_SABP_WriteCompl(template (present) BIT16 msg_id, template (present) BIT16 ser_nr) := {
156 successfulOutcome := {
157 procedureCode := id_Write_Replace,
158 criticality := reject,
159 value_ := {
160 Write_Replace_Complete := {
161 protocolIEs := {
162 {
163 id := SABP_Constants.id_Message_Identifier,
164 criticality := reject,
165 value_ := { Message_Identifier := msg_id }
166 }, {
167 id := SABP_Constants.id_New_Serial_Number,
168 criticality := reject,
169 value_ := { New_Serial_Number := ser_nr }
170 }, *
171 /* Optional: Number of Broadcasts Completed List */
172 /* Optional: Criticality-Diagnostics */
173 },
174 protocolExtensions := *
175 }
176 }
177 }
178}
179
180/* 9.1.5 WRITE REPLACE FAILURE */
181template (value) SABP_PDU
182ts_SABP_WriteFail(template (value) BIT16 msg_id, template (value) BIT16 ser_nr,
183 template (value) Failure_List fail_list) := {
184 unsuccessfulOutcome := {
185 procedureCode := id_Write_Replace,
186 criticality := reject,
187 value_ := {
188 Write_Replace_Failure := {
189 protocolIEs := {
190 {
191 id := SABP_Constants.id_Message_Identifier,
192 criticality := reject,
193 value_ := { Message_Identifier := msg_id }
194 }, {
195 id := SABP_Constants.id_New_Serial_Number,
196 criticality := reject,
197 value_ := { New_Serial_Number := ser_nr }
198 }, {
199 id := SABP_Constants.id_Failure_List,
200 criticality := reject,
201 value_ := { Failure_List := fail_list }
202 }
203 /* Optional: Number of Broadcasts Completed List */
204 /* Optional: Criticality-Diagnostics */
205 },
206 protocolExtensions := omit
207 }
208 }
209 }
210}
211template (present) SABP_PDU
212tr_SABP_WriteFail(template (present) BIT16 msg_id, template (present) BIT16 ser_nr,
213 template (present) Failure_List fail_list := ?) := {
214 unsuccessfulOutcome := {
215 procedureCode := id_Write_Replace,
216 criticality := reject,
217 value_ := {
218 Write_Replace_Failure := {
219 protocolIEs := {
220 {
221 id := SABP_Constants.id_Message_Identifier,
222 criticality := reject,
223 value_ := { Message_Identifier := msg_id }
224 }, {
225 id := SABP_Constants.id_New_Serial_Number,
226 criticality := reject,
227 value_ := { New_Serial_Number := ser_nr }
228 }, {
229 id := SABP_Constants.id_Failure_List,
230 criticality := reject,
231 value_ := { Failure_List := fail_list }
232 }, *
233 /* Optional: Number of Broadcasts Completed List */
234 /* Optional: Criticality-Diagnostics */
235 },
236 protocolExtensions := *
237 }
238 }
239 }
240}
241
242/* 9.1.6 KILL */
243template (value) SABP_PDU
244ts_SABP_Kill(template (value) BIT16 msg_id, template (value) BIT16 ser_nr,
245 template (value) Service_Areas_List sa_list) := {
246 initiatingMessage := {
247 procedureCode := id_Kill,
248 criticality := reject,
249 value_ := {
250 kill_ := {
251 protocolIEs := {
252 {
253 id := SABP_Constants.id_Message_Identifier,
254 criticality := reject,
255 value_ := { Message_Identifier := msg_id }
256 }, {
257 id := SABP_Constants.id_Old_Serial_Number,
258 criticality := reject,
259 value_ := { Old_Serial_Number := ser_nr }
260 }, {
261 id := SABP_Constants.id_Service_Areas_List,
262 criticality := reject,
263 value_ := { Service_Areas_List := sa_list }
264 }
265 },
266 protocolExtensions := omit
267 }
268 }
269 }
270}
271template (present) SABP_PDU
272tr_SABP_Kill(template (present) BIT16 msg_id, template (present) BIT16 ser_nr,
273 template (present) Service_Areas_List sa_list) := {
274 initiatingMessage := {
275 procedureCode := id_Kill,
276 criticality := reject,
277 value_ := {
278 kill_ := {
279 protocolIEs := {
280 {
281 id := SABP_Constants.id_Message_Identifier,
282 criticality := reject,
283 value_ := { Message_Identifier := msg_id }
284 }, {
285 id := SABP_Constants.id_Old_Serial_Number,
286 criticality := reject,
287 value_ := { Old_Serial_Number := ser_nr }
288 }, {
289 id := SABP_Constants.id_Service_Areas_List,
290 criticality := reject,
291 value_ := { Service_Areas_List := sa_list }
292 }
293 },
294 protocolExtensions := *
295 }
296 }
297 }
298}
299
300/* 9.1.7 KILL COMPLETE */
301template (value) SABP_PDU
302ts_SABP_KillCompl(template (value) BIT16 msg_id, template (value) BIT16 ser_nr,
303 template (value) Number_of_Broadcasts_Completed_List num_bcast_compl) := {
304 successfulOutcome := {
305 procedureCode := id_Kill,
306 criticality := reject,
307 value_ := {
308 Kill_Complete := {
309 protocolIEs := {
310 {
311 id := SABP_Constants.id_Message_Identifier,
312 criticality := reject,
313 value_ := { Message_Identifier := msg_id }
314 }, {
315 id := SABP_Constants.id_Old_Serial_Number,
316 criticality := reject,
317 value_ := { Old_Serial_Number := ser_nr }
318 }, {
319 id := SABP_Constants.id_Number_of_Broadcasts_Completed_List,
320 criticality := reject,
321 value_ := { Number_of_Broadcasts_Completed_List := num_bcast_compl }
322 }
323 },
324 protocolExtensions := omit
325 }
326 }
327 }
328}
329template (present) SABP_PDU
330tr_SABP_KillCompl(template (present) BIT16 msg_id, template (present) BIT16 ser_nr,
331 template (present) Number_of_Broadcasts_Completed_List num_bcast_compl := ?) := {
332 successfulOutcome := {
333 procedureCode := id_Kill,
334 criticality := reject,
335 value_ := {
336 Kill_Complete := {
337 protocolIEs := {
338 {
339 id := SABP_Constants.id_Message_Identifier,
340 criticality := reject,
341 value_ := { Message_Identifier := msg_id }
342 }, {
343 id := SABP_Constants.id_Old_Serial_Number,
344 criticality := reject,
345 value_ := { Old_Serial_Number := ser_nr }
346 }, {
347 id := SABP_Constants.id_Number_of_Broadcasts_Completed_List,
348 criticality := reject,
349 value_ := { Number_of_Broadcasts_Completed_List := num_bcast_compl }
350 }, *
351 },
352 protocolExtensions := *
353 }
354 }
355 }
356}
357
358
359/* 9.1.7 KILL FAILURE */
360template (value) SABP_PDU
361ts_SABP_KillFail(template (value) BIT16 msg_id, template (value) BIT16 ser_nr,
362 template (value) Failure_List fail_list) := {
363 unsuccessfulOutcome := {
364 procedureCode := id_Kill,
365 criticality := reject,
366 value_ := {
367 Kill_Failure := {
368 protocolIEs := {
369 {
370 id := SABP_Constants.id_Message_Identifier,
371 criticality := reject,
372 value_ := { Message_Identifier := msg_id }
373 }, {
374 id := SABP_Constants.id_Old_Serial_Number,
375 criticality := reject,
376 value_ := { Old_Serial_Number := ser_nr }
377 }, {
378 id := SABP_Constants.id_Failure_List,
379 criticality := reject,
380 value_ := { Failure_List := fail_list }
381 }
382 /* Optional: Number-of-Broadcasts-Completed-List */
383 /* Optional: Criticality-Diagnostics */
384 },
385 protocolExtensions := omit
386 }
387 }
388 }
389}
390template (present) SABP_PDU
391tr_SABP_KillFail(template (present) BIT16 msg_id, template (present) BIT16 ser_nr,
392 template (present) Failure_List fail_list := ?) := {
393 unsuccessfulOutcome := {
394 procedureCode := id_Kill,
395 criticality := reject,
396 value_ := {
397 Kill_Failure := {
398 protocolIEs := {
399 {
400 id := SABP_Constants.id_Message_Identifier,
401 criticality := reject,
402 value_ := { Message_Identifier := msg_id }
403 }, {
404 id := SABP_Constants.id_Old_Serial_Number,
405 criticality := reject,
406 value_ := { Old_Serial_Number := ser_nr }
407 }, {
408 id := SABP_Constants.id_Failure_List,
409 criticality := reject,
410 value_ := { Failure_List := fail_list }
411 }, *
412 /* Optional: Number-of-Broadcasts-Completed-List */
413 /* Optional: Criticality-Diagnostics */
414 },
415 protocolExtensions := *
416 }
417 }
418 }
419}
420
421/* TODO: Load Query + Complete + Failure */
422/* TODO: Message Status Query + Complete + Failure */
423
424/* 9.1.15 RESET */
425template (value) SABP_PDU
426ts_SABP_Reset(template (value) Service_Areas_List sa_list) := {
427 initiatingMessage := {
428 procedureCode := id_Reset,
429 criticality := reject,
430 value_ := {
431 Reset := {
432 protocolIEs := {
433 {
434 id := SABP_Constants.id_Service_Areas_List,
435 criticality := reject,
436 value_ := { Service_Areas_List := sa_list }
437 }
438 },
439 protocolExtensions := omit
440 }
441 }
442 }
443}
444template (present) SABP_PDU
445tr_SABP_Reset(template (present) Service_Areas_List sa_list) := {
446 initiatingMessage := {
447 procedureCode := id_Reset,
448 criticality := reject,
449 value_ := {
450 Reset := {
451 protocolIEs := {
452 {
453 id := SABP_Constants.id_Service_Areas_List,
454 criticality := reject,
455 value_ := { Service_Areas_List := sa_list }
456 }
457 },
458 protocolExtensions := *
459 }
460 }
461 }
462}
463
464
465/* 9.1.16 RESET COMPLETE */
466template (value) SABP_PDU
467ts_SABP_ResetCompl(template (value) Service_Areas_List sa_list) := {
468 successfulOutcome := {
469 procedureCode := id_Reset,
470 criticality := reject,
471 value_ := {
472 Reset_Complete := {
473 protocolIEs := {
474 {
475 id := SABP_Constants.id_Service_Areas_List,
476 criticality := reject,
477 value_ := { Service_Areas_List := sa_list }
478 }
479 },
480 protocolExtensions := omit
481 }
482 }
483 }
484}
485template (present) SABP_PDU
486tr_SABP_ResetCompl(template (present) Service_Areas_List sa_list) := {
487 successfulOutcome := {
488 procedureCode := id_Reset,
489 criticality := reject,
490 value_ := {
491 Reset_Complete := {
492 protocolIEs := {
493 {
494 id := SABP_Constants.id_Service_Areas_List,
495 criticality := reject,
496 value_ := { Service_Areas_List := sa_list }
497 }, *
498 },
499 protocolExtensions := *
500 }
501 }
502 }
503}
504
505/* 9.1.17 RESET FAILURE */
506template (value) SABP_PDU
507ts_SABP_ResetFail(template (value) Failure_List f_list) := {
508 unsuccessfulOutcome := {
509 procedureCode := id_Reset,
510 criticality := reject,
511 value_ := {
512 Reset_Failure := {
513 protocolIEs := {
514 {
515 id := SABP_Constants.id_Failure_List,
516 criticality := reject,
517 value_ := { Failure_List := f_list }
518 }
519 /* Optional: Service Area List */
520 },
521 protocolExtensions := omit
522 }
523 }
524 }
525}
526template (present) SABP_PDU
527tr_SABP_ResetFail(template (present) Failure_List f_list := ?) := {
528 unsuccessfulOutcome := {
529 procedureCode := id_Reset,
530 criticality := reject,
531 value_ := {
532 Reset_Failure := {
533 protocolIEs := {
534 {
535 id := SABP_Constants.id_Failure_List,
536 criticality := reject,
537 value_ := { Failure_List := f_list }
538 }, *
539 /* Optional: Service Area List */
540 },
541 protocolExtensions := *
542 }
543 }
544 }
545}
546
547/* 9.1.18 RESTART (RNC->CN) */
548template (value) SABP_PDU
549ts_SABP_Restart(template (value) Service_Areas_List sa_list) := {
550 initiatingMessage := {
551 procedureCode := id_Restart_Indication,
552 criticality := ignore,
553 value_ := {
554 Restart := {
555 protocolIEs := {
556 {
557 id := SABP_Constants.id_Service_Areas_List,
558 criticality := reject,
559 value_ := { Service_Areas_List := sa_list }
560 }
561 /* Optional: Recovery_Indication */
562 },
563 protocolExtensions := omit
564 }
565 }
566 }
567}
568template (present) SABP_PDU
569tr_SABP_Restart(template (present) Service_Areas_List sa_list) := {
570 initiatingMessage := {
571 procedureCode := id_Restart_Indication,
572 criticality := ignore,
573 value_ := {
574 Restart := {
575 protocolIEs := {
576 {
577 id := SABP_Constants.id_Service_Areas_List,
578 criticality := reject,
579 value_ := { Service_Areas_List := sa_list }
580 }, *
581 /* Optional: Recovery_Indication */
582 },
583 protocolExtensions := *
584 }
585 }
586 }
587}
588
589/* 9.1.19 FAILURE (RNC->CN) */
590template (value) SABP_PDU
591ts_SABP_Failure(template (value) Service_Areas_List sa_list) := {
592 initiatingMessage := {
593 procedureCode := id_Failure_Indication,
594 criticality := ignore,
595 value_ := {
596 Failure := {
597 protocolIEs := {
598 {
599 id := SABP_Constants.id_Service_Areas_List,
600 criticality := ignore,
601 value_ := { Service_Areas_List := sa_list }
602 }
603 },
604 protocolExtensions := omit
605 }
606 }
607 }
608}
609template (present) SABP_PDU
610tr_SABP_Failure(template (present) Service_Areas_List sa_list) := {
611 initiatingMessage := {
612 procedureCode := id_Failure_Indication,
613 criticality := ignore,
614 value_ := {
615 Failure := {
616 protocolIEs := {
617 {
618 id := SABP_Constants.id_Service_Areas_List,
619 criticality := ignore,
620 value_ := { Service_Areas_List := sa_list }
621 }
622 },
623 protocolExtensions := *
624 }
625 }
626 }
627}
628
629/* 9.1.20 ERROR INDICATION (RNC->CN) */
630template (value) SABP_PDU
631ts_SABP_ErrorInd(template (value) BIT16 msg_id, template (value) BIT16 ser_nr,
632 template (value) Cause cause) := {
633 initiatingMessage := {
634 procedureCode := id_Error_Indication,
635 criticality := ignore,
636 value_ := {
637 Error_Indication := {
638 protocolIEs := {
639 {
640 id := SABP_Constants.id_Message_Identifier,
641 criticality := ignore,
642 value_ := { Message_Identifier := msg_id }
643 }, {
644 id := SABP_Constants.id_Serial_Number,
645 criticality := ignore,
646 value_ := { Serial_Number := ser_nr }
647 }, {
648 id := SABP_Constants.id_Cause,
649 criticality := ignore,
650 value_ :={ Cause := cause }
651 }
652 /* Optional: Criticality-Diagnostics */
653 },
654 protocolExtensions := omit
655 }
656 }
657 }
658}
659template (present) SABP_PDU
660tr_SABP_ErrorInd := {
661 initiatingMessage := {
662 procedureCode := id_Error_Indication,
663 criticality := ignore,
664 value_ := {
665 Error_Indication := {
666 protocolIEs := {
667 *
668 /* Optional: Message-Identifier */
669 /* Optional: Serial-Number */
670 /* Optional: Cause */
671 /* Optional: Criticality-Diagnostics */
672 },
673 protocolExtensions := *
674 }
675 }
676 }
677}
678
679
680
681}
682