| /* (C) 2018 by sysmocom s.f.m.c. GmbH <info@sysmocom.de> |
| * All Rights Reserved |
| * |
| * Released under the terms of GNU General Public License, Version 2 or |
| * (at your option) any later version. |
| * |
| * SPDX-License-Identifier: GPL-2.0-or-later |
| */ |
| |
| module SCCP_Templates { |
| |
| import from SCCP_Types all; |
| import from SCCPasp_Types all; |
| import from SCCP_Emulation all; |
| |
| /* construct a SCCP_PAR_Address with just PC + SSN and no GT */ |
| template (value) SCCP_PAR_Address ts_SccpAddr_PC_SSN(integer pc, integer ssn, octetstring sio, |
| charstring sccp_srv_type) := { |
| addressIndicator := { |
| pointCodeIndic := '1'B, |
| ssnIndicator := '1'B, |
| globalTitleIndic := '0000'B, |
| routingIndicator := '1'B |
| }, |
| signPointCode := SCCP_SPC_int2bit(pc, sccp_srv_type, sio), |
| subsystemNumber := ssn, |
| globalTitle := omit |
| } |
| |
| /* construct a SCCP_PAR_Address with only GT */ |
| template (value) SCCP_PAR_Address ts_SccpAddr_GT(hexstring global_address) := { |
| addressIndicator := { |
| pointCodeIndic := '0'B, |
| ssnIndicator := '0'B, |
| globalTitleIndic := '0001'B, // NAI only |
| routingIndicator := cg_route_on_GT // route on GT |
| }, |
| signPointCode := omit, |
| subsystemNumber := omit, |
| globalTitle := { |
| gti0001 := { |
| natureOfAddress := '0000011'B, |
| oddeven := '0'B, |
| globalTitleAddress := global_address |
| } |
| } |
| } |
| |
| } |