blob: 44704f8725b7fc4c12219c2582ff16c86b0dc5d7 [file] [log] [blame]
Pau Espin Pedrolb54acca2021-11-22 20:35:44 +01001/* HNBAP Templates in TTCN-3
2 * (C) 2021 Pau Espin Pedrol <pespin@sysmocom.de>
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 HNBAP_Templates {
12
13import from General_Types all;
14import from Osmocom_Types all;
15
16import from HNBAP_IEs all;
17import from HNBAP_CommonDataTypes all;
18import from HNBAP_Constants all;
19import from HNBAP_Containers all;
20import from HNBAP_PDU_Contents all;
21import from HNBAP_PDU_Descriptions all;
22
23/*********************************************************************************
24 * 3GPP TS 25.469
25 *********************************************************************************/
26
27template (value) Cause ts_HnbapCause(template (value) CauseRadioNetwork c) := {
28 radioNetwork := c
29}
30
31/* 9.1.3 HNB REGISTER REQUEST */
32template (present) HNBAP_PDU
33tr_HNBAP_HNBRegisterRequest(template (present) octetstring hNB_Identity_Info := ?,
34 template (present) OCT3 plmnid := ?,
35 template (present) BIT28 cell_identity := ?,
36 template (present) OCT2 lac := ?,
37 template (present) OCT1 rac := ?,
38 template (present) OCT2 sac := ?) := {
39 initiatingMessage := {
40 procedureCode := id_HNBRegister,
41 criticality := reject,
42 value_ := {
43 hNBRegisterRequest := {
44 protocolIEs := {
45 {
46 id := HNBAP_Constants.id_HNB_Identity,
47 criticality := reject,
48 value_ := {
49 hNB_Identity := {
50 hNB_Identity_Info := hNB_Identity_Info,
51 iE_Extensions := omit
52 }
53 }
54 }, {
55 id := 8,
56 criticality := reject,
57 value_ := {
58 hNB_Location_Information := {
59 macroCoverageInfo := omit,
60 geographicalCoordinates := omit,
61 iE_Extensions := omit
62 }
63 }
64 }, {
65 id := 9,
66 criticality := reject,
67 value_ := { pLMNidentity := plmnid }
68 }, {
69 id := 11,
70 criticality := reject,
71 value_ := { cellIdentity := cell_identity }
72 }, {
73 id := 6,
74 criticality := reject,
75 value_ := { lAC := lac }
76 }, {
77 id := 7,
78 criticality := reject,
79 value_ := { rAC := rac }
80 }, {
81 id := 10,
82 criticality := reject,
83 value_ := { sAC := sac }
84 }
85 },
86 protocolExtensions := omit
87 }
88 }
89 }
90}
91
92
93/* 9.1.4 HNB REGISTER ACCEPT */
94template (value) HNBAP_PDU
95ts_HNBAP_HNBRegisterAccept(template (value) uint16_t rnc_id) := {
96 successfulOutcome := {
97 procedureCode := id_HNBRegister,
98 criticality := reject,
99 value_ := {
100 hNBRegisterAccept := {
101 protocolIEs := {
102 {
103 id := HNBAP_Constants.id_RNC_ID,
104 criticality := reject,
105 value_ := { RNC_ID := rnc_id }
106 }
107 },
108 protocolExtensions := omit /* TODO: Mux Port Number (optional) 9.2.29 */
109 }
110 }
111 }
112}
113
114/* 9.1.5 HNB REGISTER REJECT */
115template (value) HNBAP_PDU
116ts_HNBAP_HNBRegisterReject(template (value) Cause cause) := {
117 unsuccessfulOutcome := {
118 procedureCode := id_HNBRegister,
119 criticality := reject,
120 value_ := {
121 HNBRegisterReject := {
122 protocolIEs := {
123 {
124 id := HNBAP_Constants.id_Cause,
125 criticality := ignore,
126 value_ := { Cause := cause }
127 }
128 },
129 protocolExtensions := omit /* TODO: CriticalityDiagnostics, BackoffTimer */
130 }
131 }
132 }
133}
134
135}