blob: f4019b82780cd0ab2951006ae19a0263cd42c93f [file] [log] [blame]
Stefan Sperlingc307e682018-06-14 15:15:46 +02001/* (C) 2018 by sysmocom s.f.m.c. GmbH <info@sysmocom.de>
2 * All Rights Reserved
3 *
4 * Released under the terms of GNU General Public License, Version 2 or
5 * (at your option) any later version.
6 */
7
8module SCCP_Templates {
9
10import from SCCP_Types all;
11import from SCCPasp_Types all;
12import from SCCP_Emulation all;
13
14/* construct a SCCP_PAR_Address with just PC + SSN and no GT */
15template (value) SCCP_PAR_Address ts_SccpAddr_PC_SSN(integer pc, integer ssn, octetstring sio,
16 charstring sccp_srv_type) := {
17 addressIndicator := {
18 pointCodeIndic := '1'B,
19 ssnIndicator := '1'B,
20 globalTitleIndic := '0000'B,
21 routingIndicator := '1'B
22 },
23 signPointCode := SCCP_SPC_int2bit(pc, sccp_srv_type, sio),
24 subsystemNumber := ssn,
25 globalTitle := omit
26}
27
28/* construct a SCCP_PAR_Address with only GT */
29template (value) SCCP_PAR_Address ts_SccpAddr_GT(hexstring global_address) := {
30 addressIndicator := {
31 pointCodeIndic := '0'B,
32 ssnIndicator := '0'B,
33 globalTitleIndic := '0001'B, // NAI only
34 routingIndicator := cg_route_on_GT // route on GT
35 },
36 signPointCode := omit,
37 subsystemNumber := omit,
38 globalTitle := {
39 gti0001 := {
40 natureOfAddress := '0000011'B,
41 oddeven := '0'B,
42 globalTitleAddress := global_address
43 }
44 }
45}
46
47}