blob: 3667ca0bcd666adba6c2ed6154f34e680e24c828 [file] [log] [blame]
Harald Welte0db44132019-10-17 11:09:05 +02001module M3UA_Templates {
2
3/* M3UA Templates, building on top of M3UA_Types from Ericsson.
4 *
5 * (C) 2019 by Harald Welte <laforge@gnumonks.org>
6 * All rights reserved.
7 *
8 * Released under the terms of GNU General Public License, Version 2 or
9 * (at your option) any later version.
10 *
11 * SPDX-License-Identifier: GPL-2.0-or-later
12 */
13
14import from M3UA_Types all;
15import from General_Types all;
16import from Osmocom_Types all;
17
18const OCT1 c_M3UA_VERSION := '01'O;
19
Harald Welte95e3d992021-04-25 14:27:44 +020020const OCT1 c_M3UA_NI_NATIONAL := '02'O;
21const OCT1 c_M3UA_NI_INTERNATIONAL := '00'O;
22
Harald Welte0db44132019-10-17 11:09:05 +020023const OCT2 c_M3UA_ST_T_STATE_CHG := '0001'O;
24const OCT2 c_M3UA_ST_I_RESERVED := '0001'O;
25const OCT2 c_M3UA_ST_I_AS_INACTIVE := '0002'O;
26const OCT2 c_M3UA_ST_I_AS_ACTIVE := '0003'O;
27const OCT2 c_M3UA_ST_I_AS_PENDING := '0004'O;
28
29const OCT2 c_M3UA_ST_T_OTHER := '0002'O;
30const OCT2 c_M3UA_ST_I_INSUFF_RESRC := '0001'O
31const OCT2 c_M3UA_ST_I_ALTERNATE_ASP := '0002'O
32const OCT2 c_M3UA_ST_I_ASP_FAILUREP := '0003'O
33
34private function f_aspid_or_omit(template (omit) OCT4 aspid)
35return template (omit) M3UA_ASP_Identifier {
36 var template (omit) M3UA_ASP_Identifier id;
37 if (istemplatekind(aspid, "omit")) {
38 return omit;
39 } else {
40 id.tag := '0011'O;
41 id.lengthInd := 8;
42 id.aSPIdentifier := aspid;
43 return id;
44 }
45}
46
47function tr_M3UA_asp_id(template OCT4 aspid)
48return template M3UA_ASP_Identifier {
49 var template M3UA_ASP_Identifier id := {
50 tag := '0011'O,
51 lengthInd := 8,
52 aSPIdentifier := aspid
53 };
54 if (istemplatekind(aspid, "omit")) {
55 return omit;
56 } else if (istemplatekind(aspid, "*")) {
57 return *;
58 } else {
59 return id;
60 }
61}
62
63
64/***********************************************************************
65 * ASPSM Class
66 ***********************************************************************/
67
68template (value) PDU_M3UA ts_M3UA_ASPUP(template (omit) OCT4 aspid := omit,
69 template (omit) octetstring infostr := omit) := {
70 m3UA_ASPUP := {
71 version := c_M3UA_VERSION,
72 reserved := '00'O,
73 messageClassAndType := '0301'O,
74 messageLength := 0, // overwritten
75 messageParameters := {
76 aSP_Identifier := f_aspid_or_omit(aspid),
77 info_String := omit
78 }
79 }
80}
81template (present) PDU_M3UA tr_M3UA_ASPUP(template OCT4 aspid := *,
82 template octetstring infostr := omit) := {
83 m3UA_ASPUP := {
84 version := c_M3UA_VERSION,
85 reserved := '00'O,
86 messageClassAndType := '0301'O,
Harald Weltedc9b6912019-11-05 16:53:56 +010087 messageLength := ?, // overwritten
Harald Welte0db44132019-10-17 11:09:05 +020088 messageParameters := {
89 aSP_Identifier := tr_M3UA_asp_id(aspid),
90 info_String := *
91 }
92 }
93}
94
95template (value) PDU_M3UA ts_M3UA_ASPUP_ACK := {
96 m3UA_ASPUP_Ack := {
97 version := c_M3UA_VERSION,
98 reserved := '00'O,
99 messageClassAndType := '0304'O,
100 messageLength := 0, // overwritten
101 messageParameters := {
102 info_String := omit
103 }
104 }
105}
106template (present) PDU_M3UA tr_M3UA_ASPUP_ACK := {
107 m3UA_ASPUP_Ack := {
108 version := c_M3UA_VERSION,
109 reserved := '00'O,
110 messageClassAndType := '0304'O,
111 messageLength := ?,
112 messageParameters := {
113 info_String := *
114 }
115 }
116}
117
118template (value) PDU_M3UA ts_M3UA_ASPDN := {
119 m3UA_ASPDN := {
120 version := c_M3UA_VERSION,
121 reserved := '00'O,
122 messageClassAndType := '0302'O,
123 messageLength := 0, // overwritten
124 messageParameters := {
125 info_String := omit
126 }
127 }
128}
129template (present) PDU_M3UA tr_M3UA_ASPDN := {
130 m3UA_ASPDN := {
131 version := c_M3UA_VERSION,
132 reserved := '00'O,
133 messageClassAndType := '0302'O,
134 messageLength := ?,
135 messageParameters := {
136 info_String := *
137 }
138 }
139}
140
141template (value) PDU_M3UA ts_M3UA_ASPDN_ACK := {
142 m3UA_ASPUP_Ack := {
143 version := c_M3UA_VERSION,
144 reserved := '00'O,
145 messageClassAndType := '0305'O,
146 messageLength := 0, // overwritten
147 messageParameters := {
148 info_String := omit
149 }
150 }
151}
152template (present) PDU_M3UA tr_M3UA_ASPDN_ACK := {
153 m3UA_ASPUP_Ack := {
154 version := c_M3UA_VERSION,
155 reserved := '00'O,
156 messageClassAndType := '0305'O,
157 messageLength := ?,
158 messageParameters := {
159 info_String := *
160 }
161 }
162}
163
164template (value) M3UA_Heartbeat_Data ts_M3UA_hb_data(template (value) octetstring hb_data) := {
165 tag := '0009'O,
166 lengthInd := 0, // overwritten
167 heartbeat_Data := hb_data
168}
169
170template (present) M3UA_Heartbeat_Data tr_M3UA_hb_data(template (present) octetstring hb_data) := {
171 tag := '0009'O,
172 lengthInd := ?,
173 heartbeat_Data := hb_data
174}
175
176template (value) PDU_M3UA ts_M3UA_BEAT(template (omit) M3UA_Heartbeat_Data hbd := omit) := {
177 m3UA_BEAT := {
178 version := c_M3UA_VERSION,
179 reserved := '00'O,
180 messageClassAndType := '0303'O,
181 messageLength := 0, // overwritten
182 messageParameters := {
183 heartbeat_Data := hbd
184 }
185 }
186}
187template (present) PDU_M3UA tr_M3UA_BEAT(template M3UA_Heartbeat_Data hbd := *) := {
188 m3UA_BEAT := {
189 version := c_M3UA_VERSION,
190 reserved := '00'O,
191 messageClassAndType := '0303'O,
192 messageLength := ?,
193 messageParameters := {
194 heartbeat_Data := hbd
195 }
196 }
197}
198
199template (value) PDU_M3UA ts_M3UA_BEAT_ACK(template (omit) M3UA_Heartbeat_Data hb_data) := {
200 m3UA_BEAT_Ack := {
201 version := c_M3UA_VERSION,
202 reserved := '00'O,
203 messageClassAndType := '0306'O,
204 messageLength := 0, // overwritten
205 messageParameters := {
206 heartbeat_Data := hb_data
207 }
208 }
209}
210template (present) PDU_M3UA tr_M3UA_BEAT_ACK(template M3UA_Heartbeat_Data hb_data := *) := {
211 m3UA_BEAT_Ack := {
212 version := c_M3UA_VERSION,
213 reserved := '00'O,
214 messageClassAndType := '0306'O,
215 messageLength := ?,
216 messageParameters := {
217 heartbeat_Data := hb_data
218 }
219 }
220}
221
222
223
224
225/***********************************************************************
226 * ASPTM Class
227 ***********************************************************************/
228
229
230const M3UA_Traffic_Mode_Type c_M3UA_TMT_override := {
231 tag := '000B'O,
232 lengthInd := 8,
233 trafficModeType := int2oct(1, 4)
234}
235
236const M3UA_Traffic_Mode_Type c_M3UA_TMT_loadshare := {
237 tag := '000B'O,
238 lengthInd := 8,
239 trafficModeType := int2oct(2, 4)
240}
241
242const M3UA_Traffic_Mode_Type c_M3UA_TMT_broadcast := {
243 tag := '000B'O,
244 lengthInd := 8,
245 trafficModeType := int2oct(3, 4)
246}
247
248function ts_M3UA_routing_ctx(template (omit) octetstring rctx)
249return template (omit) M3UA_Routing_Context {
250 var template (omit) M3UA_Routing_Context id;
251 if (istemplatekind(rctx, "omit")) {
252 return omit;
253 } else {
254 id.tag := '0006'O;
255 id.lengthInd := 0; // overwritten
256 id.routingContext := rctx;
257 return id;
258 }
259}
260
261function tr_M3UA_routing_ctx(template octetstring rctx)
262return template M3UA_Routing_Context {
263 var template M3UA_Routing_Context id;
264 if (istemplatekind(rctx, "omit")) {
265 return omit;
266 } else if (istemplatekind(rctx, "*")) {
267 return *;
268 } else {
269 id.tag := '0006'O;
270 id.lengthInd := ?;
271 id.routingContext := rctx;
272 return id;
273 }
274}
275
276template (value) PDU_M3UA ts_M3UA_ASPAC(template (omit) M3UA_Traffic_Mode_Type tmt,
277 template (omit) OCT4 rctx) := {
278 m3UA_ASPAC := {
279 version := c_M3UA_VERSION,
280 reserved := '00'O,
281 messageClassAndType := '0401'O,
282 messageLength := 0, // overwritten
283 messageParameters := {
284 traffic_Mode_Type := tmt,
285 routing_Context := ts_M3UA_routing_ctx(rctx),
286 info_String := omit
287 }
288 }
289}
290template (present) PDU_M3UA tr_M3UA_ASPAC(template M3UA_Traffic_Mode_Type tmt,
291 template OCT4 rctx) := {
292 m3UA_ASPAC := {
293 version := c_M3UA_VERSION,
294 reserved := '00'O,
295 messageClassAndType := '0401'O,
296 messageLength := ?,
297 messageParameters := {
298 traffic_Mode_Type := tmt,
299 routing_Context := tr_M3UA_routing_ctx(rctx),
300 info_String := *
301 }
302 }
303}
304
305template (value) PDU_M3UA ts_M3UA_ASPAC_ACK(template (omit) M3UA_Traffic_Mode_Type tmt,
306 template (omit) OCT4 rctx) := {
307 m3UA_ASPAC_Ack := {
308 version := c_M3UA_VERSION,
309 reserved := '00'O,
310 messageClassAndType := '0403'O,
311 messageLength := 0, // overwritten
312 messageParameters := {
313 traffic_Mode_Type := tmt,
314 routing_Context := ts_M3UA_routing_ctx(rctx),
315 info_String := omit
316 }
317 }
318}
319template (present) PDU_M3UA tr_M3UA_ASPAC_ACK(template M3UA_Traffic_Mode_Type tmt,
320 template OCT4 rctx) := {
321 m3UA_ASPAC_Ack := {
322 version := c_M3UA_VERSION,
323 reserved := '00'O,
324 messageClassAndType := '0403'O,
325 messageLength := ?,
326 messageParameters := {
327 traffic_Mode_Type := tmt,
328 routing_Context := tr_M3UA_routing_ctx(rctx),
329 info_String := *
330 }
331 }
332}
333
334template (value) PDU_M3UA ts_M3UA_ASPIA(template (omit) OCT4 rctx) := {
335 m3UA_ASPIA := {
336 version := c_M3UA_VERSION,
337 reserved := '00'O,
338 messageClassAndType := '0402'O,
339 messageLength := 0, // overwritten
340 messageParameters := {
341 routing_Context := ts_M3UA_routing_ctx(rctx),
342 info_String := omit
343 }
344 }
345}
346template (present) PDU_M3UA tr_M3UA_ASPIA(template OCT4 rctx) := {
347 m3UA_ASPIA := {
348 version := c_M3UA_VERSION,
349 reserved := '00'O,
350 messageClassAndType := '0402'O,
351 messageLength := ?,
352 messageParameters := {
353 routing_Context := tr_M3UA_routing_ctx(rctx),
354 info_String := *
355 }
356 }
357}
358
359
360template (value) PDU_M3UA ts_M3UA_ASPIA_ACK(template (omit) OCT4 rctx) := {
361 m3UA_ASPIA_Ack := {
362 version := c_M3UA_VERSION,
363 reserved := '00'O,
364 messageClassAndType := '0404'O,
365 messageLength := 0, // overwritten
366 messageParameters := {
367 routing_Context := ts_M3UA_routing_ctx(rctx),
368 info_String := omit
369 }
370 }
371}
372template (present) PDU_M3UA tr_M3UA_ASPIA_ACK(template OCT4 rctx) := {
373 m3UA_ASPIA_Ack := {
374 version := c_M3UA_VERSION,
375 reserved := '00'O,
376 messageClassAndType := '0404'O,
377 messageLength := ?,
378 messageParameters := {
379 routing_Context := tr_M3UA_routing_ctx(rctx),
380 info_String := *
381 }
382 }
383}
384
Harald Welte42bcc442021-02-07 21:26:30 +0100385/***********************************************************************
386 * SSNM Class
387 ***********************************************************************/
388
389template (value) M3UA_Point_Code ts_M3UA_PC(uint24_t pc, uint8_t mask := 0) := {
390 mask := int2oct(mask, 1),
391 affected_Point_Code := int2oct(pc, 3)
392}
393
394template (value) M3UA_Affected_Point_Codes ts_M3UA_AffPc(template (value) M3UA_Point_Codes pcs) := {
395 tag := '0012'O,
396 lengthInd := 0,
397 pointCodes := pcs
398}
399template (present) M3UA_Affected_Point_Codes tr_M3UA_AffPc(template (present) M3UA_Point_Codes pcs) := {
400 tag := '0012'O,
401 lengthInd := ?,
402 pointCodes := pcs
403}
404
405template (value) M3UA_User_Cause ts_M3UA_UserCause(template (value) OCT2 cause,
406 template (value) OCT2 user) := {
407 tag := '0204'O,
408 lengthInd := 0,
409 cause := cause,
410 user := user
411}
412template (present) M3UA_User_Cause tr_M3UA_UserCause(template (present) OCT2 cause,
413 template (present) OCT2 user) := {
414 tag := '0204'O,
415 lengthInd := ?,
416 cause := cause,
417 user := user
418}
419
420template (value) PDU_M3UA ts_M3UA_DUNA(template (value) M3UA_Point_Codes affected_pcs,
421 template (omit) OCT4 rctx := omit) := {
422 m3UA_DUNA := {
423 version := c_M3UA_VERSION,
424 reserved := '00'O,
425 messageClassAndType := '0201'O,
426 messageLength := 0,
427 messageParameters := {
428 network_Appearance := omit,
429 routing_Context := ts_M3UA_routing_ctx(rctx),
430 affected_Point_Codes := ts_M3UA_AffPc(affected_pcs),
431 info_String := omit
432 }
433 }
434}
435template (present) PDU_M3UA tr_M3UA_DUNA(template (present) M3UA_Point_Codes affected_pcs := ?,
436 template OCT4 rctx := *):= {
437 m3UA_DUNA := {
438 version := c_M3UA_VERSION,
439 reserved := '00'O,
440 messageClassAndType := '0201'O,
441 messageLength := ?,
442 messageParameters := {
443 network_Appearance := *,
444 routing_Context := tr_M3UA_routing_ctx(rctx),
445 affected_Point_Codes := tr_M3UA_AffPc(affected_pcs),
446 info_String := *
447 }
448 }
449}
450
451template (value) PDU_M3UA ts_M3UA_DAVA(template (value) M3UA_Point_Codes affected_pcs,
452 template (omit) OCT4 rctx := omit) := {
453 m3UA_DAVA := {
454 version := c_M3UA_VERSION,
455 reserved := '00'O,
456 messageClassAndType := '0202'O,
457 messageLength := 0,
458 messageParameters := {
459 network_Appearance := omit,
460 routing_Context := ts_M3UA_routing_ctx(rctx),
461 affected_Point_Codes := ts_M3UA_AffPc(affected_pcs),
462 info_String := omit
463 }
464 }
465}
466template (present) PDU_M3UA tr_M3UA_DAVA(template (present) M3UA_Point_Codes affected_pcs := ?,
467 template OCT4 rctx := *):= {
468 m3UA_DAVA := {
469 version := c_M3UA_VERSION,
470 reserved := '00'O,
471 messageClassAndType := '0202'O,
472 messageLength := ?,
473 messageParameters := {
474 network_Appearance := *,
475 routing_Context := tr_M3UA_routing_ctx(rctx),
476 affected_Point_Codes := tr_M3UA_AffPc(affected_pcs),
477 info_String := *
478 }
479 }
480}
481
482template (value) PDU_M3UA ts_M3UA_DAUD(template (value) M3UA_Point_Codes affected_pcs,
483 template (omit) OCT4 rctx := omit) := {
484 m3UA_DAUD := {
485 version := c_M3UA_VERSION,
486 reserved := '00'O,
487 messageClassAndType := '0203'O,
488 messageLength := 0,
489 messageParameters := {
490 network_Appearance := omit,
491 routing_Context := ts_M3UA_routing_ctx(rctx),
492 affected_Point_Codes := ts_M3UA_AffPc(affected_pcs),
493 info_String := omit
494 }
495 }
496}
497template (present) PDU_M3UA tr_M3UA_DAUD(template (present) M3UA_Point_Codes affected_pcs := ?,
498 template OCT4 rctx := *):= {
499 m3UA_DAUD := {
500 version := c_M3UA_VERSION,
501 reserved := '00'O,
502 messageClassAndType := '0203'O,
503 messageLength := ?,
504 messageParameters := {
505 network_Appearance := *,
506 routing_Context := tr_M3UA_routing_ctx(rctx),
507 affected_Point_Codes := tr_M3UA_AffPc(affected_pcs),
508 info_String := *
509 }
510 }
511}
512
513template (value) PDU_M3UA ts_M3UA_SCON(template (value) M3UA_Point_Codes affected_pcs,
514 template (omit) OCT4 rctx := omit) := {
515 m3UA_SCON := {
516 version := c_M3UA_VERSION,
517 reserved := '00'O,
518 messageClassAndType := '0204'O,
519 messageLength := 0,
520 messageParameters := {
521 network_Appearance := omit,
522 routing_Context := ts_M3UA_routing_ctx(rctx),
523 affected_Point_Codes := ts_M3UA_AffPc(affected_pcs),
524 concerned_Destination := omit,
525 congestion_Indicators := omit,
526 info_String := omit
527 }
528 }
529}
530template (present) PDU_M3UA tr_M3UA_SCON(template (present) M3UA_Point_Codes affected_pcs := ?,
531 template OCT4 rctx := *):= {
532 m3UA_SCON := {
533 version := c_M3UA_VERSION,
534 reserved := '00'O,
535 messageClassAndType := '0204'O,
536 messageLength := ?,
537 messageParameters := {
538 network_Appearance := *,
539 routing_Context := tr_M3UA_routing_ctx(rctx),
540 affected_Point_Codes := tr_M3UA_AffPc(affected_pcs),
541 concerned_Destination := *,
542 congestion_Indicators := *,
543 info_String := *
544 }
545 }
546}
547
548template (value) PDU_M3UA ts_M3UA_DUPU(template (value) M3UA_Point_Codes affected_pcs,
549 template (value) OCT2 cause,
550 template (value) OCT2 user,
551 template (omit) OCT4 rctx := omit) := {
552 m3UA_DUPU := {
553 version := c_M3UA_VERSION,
554 reserved := '00'O,
555 messageClassAndType := '0205'O,
556 messageLength := 0,
557 messageParameters := {
558 network_Appearance := omit,
559 routing_Context := ts_M3UA_routing_ctx(rctx),
560 affected_Point_Codes := ts_M3UA_AffPc(affected_pcs),
561 user_Cause := ts_M3UA_UserCause(cause, user),
562 info_String := omit
563 }
564 }
565}
566template (present) PDU_M3UA tr_M3UA_DUPU(template (present) M3UA_Point_Codes affected_pcs := ?,
567 template (present) OCT2 cause := ?,
568 template (present) OCT2 user := ?,
569 template OCT4 rctx := *):= {
570 m3UA_DUPU := {
571 version := c_M3UA_VERSION,
572 reserved := '00'O,
573 messageClassAndType := '0205'O,
574 messageLength := ?,
575 messageParameters := {
576 network_Appearance := *,
577 routing_Context := tr_M3UA_routing_ctx(rctx),
578 affected_Point_Codes := tr_M3UA_AffPc(affected_pcs),
579 user_Cause := tr_M3UA_UserCause(cause, user),
580 info_String := *
581 }
582 }
583}
584
585template (present) PDU_M3UA tr_M3UA_DRST := {
586 m3UA_DRST := {
587 version := c_M3UA_VERSION,
588 reserved := '00'O,
589 messageClassAndType := '0206'O,
590 messageLength := ?,
591 messageParameters := ?
592 }
593}
594
595template (present) PDU_M3UA tr_M3UA_SSNM := (tr_M3UA_DUNA, tr_M3UA_DAVA, tr_M3UA_DAUD,
596 tr_M3UA_SCON, tr_M3UA_DUPU, tr_M3UA_DRST);
Harald Welte0db44132019-10-17 11:09:05 +0200597
598/***********************************************************************
599 * MGMT Class
600 ***********************************************************************/
601
602template (value) M3UA_Error_Code ts_M3UA_err_code(template (value) OCT4 val) := {
603 tag := '000C'O,
604 lengthInd := 8,
605 errorCode := val
606}
607template (present) M3UA_Error_Code tr_M3UA_err_code(template (present) OCT4 val) := {
608 tag := '000C'O,
609 lengthInd := 8,
610 errorCode := val
611}
612
613template (value) M3UA_Status ts_M3UA_status(template (value) OCT2 status_type,
614 template (value) OCT2 status_info) := {
615 tag := '000D'O,
616 lengthInd := 8,
617 statusType := status_type,
618 statusInfo := status_info
619}
620
621template (present) M3UA_Status tr_M3UA_status(template (present) OCT2 status_type,
622 template (present) OCT2 status_info) := {
623 tag := '000D'O,
624 lengthInd := 8,
625 statusType := status_type,
626 statusInfo := status_info
627}
628
629
630template (value) PDU_M3UA ts_M3UA_ERR(template (value) OCT4 err_code,
631 template (omit) OCT4 rctx) := {
632 m3UA_ERR := {
633 version := c_M3UA_VERSION,
634 reserved := '00'O,
635 messageClassAndType := '0000'O,
636 messageLength := 0, // overwritten
637 messageParameters := {
638 error_Code := ts_M3UA_err_code(err_code),
639 routing_Context := ts_M3UA_routing_ctx(rctx),
640 affected_Point_Codes := omit,
641 network_Appearance := omit,
642 diagnostic_information := omit
643 }
644 }
645}
646template (present) PDU_M3UA tr_M3UA_ERR(template (present) OCT4 err_code,
647 template OCT4 rctx) := {
648 m3UA_ERR := {
649 version := c_M3UA_VERSION,
650 reserved := '00'O,
651 messageClassAndType := '0000'O,
652 messageLength := ?,
653 messageParameters := {
654 error_Code := tr_M3UA_err_code(err_code),
655 routing_Context := tr_M3UA_routing_ctx(rctx),
656 affected_Point_Codes := *,
657 network_Appearance := *,
658 diagnostic_information := *
659 }
660 }
661}
662
663
664template (value) PDU_M3UA ts_M3UA_NOTIFY(template (value) OCT2 status_type,
665 template (value) OCT2 status_info,
666 template (omit) OCT4 rctx,
667 template (omit) OCT4 aspid := omit,
668 template (omit) octetstring infostr := omit) := {
669 m3UA_NOTIFY := {
670 version := c_M3UA_VERSION,
671 reserved := '00'O,
672 messageClassAndType := '0001'O,
673 messageLength := 0, // overwritten
674 messageParameters := {
675 status := ts_M3UA_status(status_type, status_info),
676 aSP_Identifier := f_aspid_or_omit(aspid),
677 routing_Context := ts_M3UA_routing_ctx(rctx),
678 info_String := omit
679 }
680 }
681}
682template (present) PDU_M3UA tr_M3UA_NOTIFY(template (present) OCT2 status_type,
683 template (present) OCT2 status_info,
684 template OCT4 rctx,
685 template OCT4 aspid := *,
686 template octetstring infostr := *) := {
687 m3UA_NOTIFY := {
688 version := c_M3UA_VERSION,
689 reserved := '00'O,
690 messageClassAndType := '0001'O,
691 messageLength := ?,
692 messageParameters := {
693 status := tr_M3UA_status(status_type, status_info),
694 aSP_Identifier := *,
695 routing_Context := tr_M3UA_routing_ctx(rctx),
696 info_String := *
697 }
698 }
699}
700
701/***********************************************************************
702 * Message Transfer Class
703 ***********************************************************************/
704
705template (value) M3UA_Protocol_Data ts_M3UA_protocol_data(template (value) OCT4 opc,
706 template (value) OCT4 dpc,
707 template (value) OCT1 si,
708 template (value) OCT1 ni,
709 template (value) OCT1 mp,
710 template (value) OCT1 sls,
711 template (value) octetstring data) := {
712 tag := '0210'O,
713 lengthInd := 0, // overwritten
714 oPC := opc,
715 dPC := dpc,
716 sI := si,
717 nI := ni,
718 mP := mp,
719 sLS := sls,
720 userProtocolData := data
721}
722template (present) M3UA_Protocol_Data tr_M3UA_protocol_data(template (present) OCT4 opc,
723 template (present) OCT4 dpc,
724 template (present) OCT1 si,
725 template (present) OCT1 ni,
726 template (present) OCT1 mp,
727 template (present) OCT1 sls,
728 template (present) octetstring data) := {
729 tag := '0210'O,
730 lengthInd := ?,
731 oPC := opc,
732 dPC := dpc,
733 sI := si,
734 nI := ni,
735 mP := mp,
736 sLS := sls,
737 userProtocolData := data
738}
739
740
741template (value) PDU_M3UA ts_M3UA_DATA(template (omit) OCT4 rctx,
742 template (value) M3UA_Protocol_Data data) := {
743 m3UA_DATA := {
744 version := c_M3UA_VERSION,
745 reserved := '00'O,
746 messageClassAndType := '0101'O,
747 messageLength := 0, // overwritten
748 messageParameters :={
749 network_Appearance := omit,
750 routing_Context := ts_M3UA_routing_ctx(rctx),
751 protocol_Data := data,
752 correlation_ID := omit
753 }
754 }
755}
756template (present) PDU_M3UA tr_M3UA_DATA(template OCT4 rctx,
757 template (present) M3UA_Protocol_Data data) := {
758 m3UA_DATA := {
759 version := c_M3UA_VERSION,
760 reserved := '00'O,
761 messageClassAndType := '0101'O,
762 messageLength := ?, // overwritten
763 messageParameters := {
764 network_Appearance := *,
765 routing_Context := tr_M3UA_routing_ctx(rctx),
766 protocol_Data := data,
767 correlation_ID := *
768 }
769 }
770}
771
772/***********************************************************************
773 * Routing Key Management
774 ***********************************************************************/
775
776template (value) M3UA_Local_Routing_Key_Id ts_M3UA_lrkid(template (value) OCT4 id) := {
777 tag := '020a'O,
778 lengthInd := 8,
779 localRkId := id
780}
781
782template (present) M3UA_Local_Routing_Key_Id tr_M3UA_lrkid(template (present) OCT4 id) := {
783 tag := '020a'O,
784 lengthInd := 8,
785 localRkId := id
786}
787
788
789template (value) M3UA_Routing_Key ts_M3UA_rkey(OCT4 id, OCT3 dpc,
790 template (omit) M3UA_Traffic_Mode_Type tmt := omit,
791 template (omit) OCT4 rctx := omit) := {
792 tag := '0207'O,
793 lengthInd := 0, // overwritten
794 routingKey := {
795 local_Routing_Key_Id := ts_M3UA_lrkid(id),
796 routing_Context := ts_M3UA_routing_ctx(rctx),
797 traffic_Mode_Type := tmt,
798 destination_Point_Code := {
799 tag := '020b'O,
800 lengthInd := 8,
801 pointCode := { '00'O, dpc }
802 },
803 network_Appearance := omit,
804 service_Indicators := omit,
805 opc_List := omit
806 }
807}
808template (present) M3UA_Routing_Key tr_M3UA_rkey(template (present) OCT4 id, template (present) OCT3 dpc,
809 template M3UA_Traffic_Mode_Type tmt := *,
810 template OCT4 rctx := *) := {
811 tag := '0207'O,
812 lengthInd := ?,
813 routingKey := {
814 local_Routing_Key_Id := tr_M3UA_lrkid(id),
815 routing_Context := tr_M3UA_routing_ctx(rctx),
816 traffic_Mode_Type := tmt,
817 destination_Point_Code := {
818 tag := '020b'O,
819 lengthInd := 8,
820 pointCode := { '00'O, dpc }
821 },
822 network_Appearance := omit,
823 service_Indicators := omit,
824 opc_List := omit
825 }
826}
827
828
829const OCT4 c_M3UA_REGSTS_SUCCESS := '00000000'O;
830const OCT4 c_M3UA_REGSTS_ERR_UNKNOWN := '00000001'O;
831const OCT4 c_M3UA_REGSTS_ERR_INVAL_DPC := '00000002'O;
832const OCT4 c_M3UA_REGSTS_ERR_INVAL_NA := '00000003'O;
833const OCT4 c_M3UA_REGSTS_ERR_INVAL_RKEY := '00000004'O;
834const OCT4 c_M3UA_REGSTS_ERR_EPERM := '00000005'O;
835// ...
836
837const OCT4 c_m3UA_DEREGSTS_SUCCESS := '00000000'O;
838const OCT4 c_m3UA_DEREGSTS_ERR_UNKNOWN := '00000001'O;
839const OCT4 c_m3UA_DEREGSTS_ERR_INVAL_RCTX := '00000002'O;
840const OCT4 c_m3UA_DEREGSTS_ERR_EPERM := '00000003'O;
841const OCT4 c_m3UA_DEREGSTS_ERR_NOT_REG := '00000004'O;
842const OCT4 c_m3UA_DEREGSTS_ERR_ASP_ACTIVE := '00000005'O;
843
844template (value) M3UA_Registration_Result ts_M3UA_reg_res(template (value) OCT4 id,
845 template (value) OCT4 status,
846 template (value) OCT4 rctx) := {
847 tag := '0208'O,
848 lengthInd := 0, // overwritten
849 registrationResult := {
850 local_Routing_Key_Id := ts_M3UA_lrkid(id),
851 registration_Status := {
852 tag := '0212'O,
853 lengthInd := 8,
854 registrationStatus := status
855 },
856 routing_Context := ts_M3UA_routing_ctx(rctx)
857 }
858}
859template (present) M3UA_Registration_Result tr_M3UA_reg_res(template (present) OCT4 id,
860 template (present) OCT4 status,
861 template (present) OCT4 rctx) := {
862 tag := '0208'O,
863 lengthInd := ?,
864 registrationResult := {
865 local_Routing_Key_Id := tr_M3UA_lrkid(id),
866 registration_Status := {
867 tag := '0212'O,
868 lengthInd := 8,
869 registrationStatus := status
870 },
871 routing_Context := tr_M3UA_routing_ctx(rctx)
872 }
873}
874
875template (value) M3UA_Deregistration_Result ts_M3UA_dereg_res(template (value) OCT4 rctx,
876 template (value) OCT4 status) := {
877 tag := '0209'O,
878 lengthInd := 0, // overwritten
879 deregistrationResult := {
880 routing_Context := ts_M3UA_routing_ctx(rctx),
881 deregistration_Status := {
882 tag := '0213'O,
883 lengthInd := 8,
884 deregistrationStatus := status
885 }
886 }
887}
888template (present) M3UA_Deregistration_Result tr_M3UA_dereg_res(template (present) OCT4 rctx,
889 template (present) OCT4 status) := {
890 tag := '0209'O,
891 lengthInd := ?,
892 deregistrationResult := {
893 routing_Context := tr_M3UA_routing_ctx(rctx),
894 deregistration_Status := {
895 tag := '0213'O,
896 lengthInd := 8,
897 deregistrationStatus := status
898 }
899 }
900}
901
902
903template (value) PDU_M3UA ts_M3UA_REG_REQ(template (value) M3UA_Routing_Keys rkeys) := {
904 m3UA_REG_REQ := {
905 version := c_M3UA_VERSION,
906 reserved := '00'O,
907 messageClassAndType := '0901'O,
908 messageLength := 0, // overwritten
909 messageParameters := rkeys
910 }
911}
912template (present) PDU_M3UA tr_M3UA_REG_REQ(template (present) M3UA_Routing_Keys rkeys) := {
913 m3UA_REG_REQ := {
914 version := c_M3UA_VERSION,
915 reserved := '00'O,
916 messageClassAndType := '0901'O,
917 messageLength := ?,
918 messageParameters := rkeys
919 }
920}
921
922
923template (value) PDU_M3UA ts_M3UA_REG_RSP(template (value) M3UA_Registration_Results res) := {
924 m3UA_REG_RSP := {
925 version := c_M3UA_VERSION,
926 reserved := '00'O,
927 messageClassAndType := '0902'O,
928 messageLength := 0, // overwritten
929 messageParameters := res
930 }
931}
932template (present) PDU_M3UA tr_M3UA_REG_RSP(template (present) M3UA_Registration_Results res) := {
933 m3UA_REG_RSP := {
934 version := c_M3UA_VERSION,
935 reserved := '00'O,
936 messageClassAndType := '0902'O,
937 messageLength := ?,
938 messageParameters := res
939 }
940}
941
942template (value) PDU_M3UA ts_M3UA_DEREG_REQ(template (value) M3UA_Routing_Context rctx) := {
943 m3UA_DEREG_REQ := {
944 version := c_M3UA_VERSION,
945 reserved := '00'O,
946 messageClassAndType := '0903'O,
947 messageLength := 0, // overwritten
948 messageParameters := {
949 routing_Context := rctx
950 }
951 }
952}
953template (present) PDU_M3UA tr_M3UA_DEREG_REQ(template (present) M3UA_Routing_Context rctx) := {
954 m3UA_DEREG_REQ := {
955 version := c_M3UA_VERSION,
956 reserved := '00'O,
957 messageClassAndType := '0903'O,
958 messageLength := ?,
959 messageParameters := {
960 routing_Context := rctx
961 }
962 }
963}
964
965template (value) PDU_M3UA ts_M3UA_DEREG_RSP(template (value) M3UA_Deregistration_Results res) := {
966 m3UA_DEREG_RSP := {
967 version := c_M3UA_VERSION,
968 reserved := '00'O,
969 messageClassAndType := '0904'O,
970 messageLength := 0, // overwritten
971 messageParameters := res
972 }
973}
974template (present) PDU_M3UA tr_M3UA_DEREG_RSP(template (present) M3UA_Deregistration_Results res) := {
975 m3UA_DEREG_RSP := {
976 version := c_M3UA_VERSION,
977 reserved := '00'O,
978 messageClassAndType := '0904'O,
979 messageLength := ?,
980 messageParameters := res
981 }
982}
983
984
985
986}