Add R5 content to master
[ric-plt/e2mgr.git] / E2Manager / converters / x2_setup_response_converter_test.go
1 /*
2  *   Copyright (c) 2019 AT&T Intellectual Property.
3  *
4  *   Licensed under the Apache License, Version 2.0 (the "License");
5  *   you may not use this file except in compliance with the License.
6  *   You may obtain a copy of the License at
7  *
8  *       http://www.apache.org/licenses/LICENSE-2.0
9  *
10  *   Unless required by applicable law or agreed to in writing, software
11  *   distributed under the License is distributed on an "AS IS" BASIS,
12  *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  *   See the License for the specific language governing permissions and
14  *   limitations under the License.
15  */
16
17 /*
18  * This source code is part of the near-RT RIC (RAN Intelligent Controller)
19  * platform project (RICP).
20  */
21
22 package converters
23
24 import (
25         "e2mgr/logger"
26         "fmt"
27         "gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/entities"
28         "regexp"
29         "strings"
30         "testing"
31 )
32
33 /*
34 Test permutations of x2 setup response to protobuf enb
35 */
36
37 func TestUnpackX2SetupResponseAndExtract(t *testing.T) {
38         logger, _ := logger.InitLogger(logger.InfoLevel)
39
40         var testCases = []struct {
41                 key       *entities.GlobalNbId
42                 enb       string
43                 packedPdu string
44                 failure   error
45         }{
46                 {
47                         key: &entities.GlobalNbId{PlmnId: "02f829", NbId: "007a80"},
48                         enb: "CONNECTED MACRO_ENB [pci:99  cell_id:\"02f829:0007ab50\"  tac:\"0102\"  broadcast_plmns:\"02f829\"  choice_eutra_mode:{fdd:{ulear_fcn:1  dlear_fcn:1  ul_transmission_bandwidth:BW50  dl_transmission_bandwidth:BW50}}  eutra_mode:FDD] []",
49                         /*
50                                 X2AP-PDU:
51                                  successfulOutcome_t
52                                   procedureCode_t = 0x6
53                                   criticality_t = 0
54                                   X2SetupResponse
55                                    protocolIEs_t:
56                                     ProtocolIE_Container_elm
57                                      id_t = 0x15
58                                      criticality_t = 0
59                                      GlobalENB-ID
60                                       pLMN_Identity_t = 02 f8 29
61                                       eNB_ID_t:
62                                        macro_eNB_ID_t = 00 7a 80 (20 bits)
63                                     ProtocolIE_Container_elm
64                                      id_t = 0x14
65                                      criticality_t = 0
66                                      ServedCells:
67                                       ServedCells_elm
68                                        servedCellInfo_t
69                                         pCI_t = 0x63
70                                         cellId_t
71                                          pLMN_Identity_t = 02 f8 29
72                                          eUTRANcellIdentifier_t = 00 07 ab 50 (28 bits)
73                                         tAC_t = 01 02
74                                         broadcastPLMNs_t:
75                                          BroadcastPLMNs_Item_elm = 02 f8 29
76                                         eUTRA_Mode_Info_t:
77                                          fDD_t
78                                           uL_EARFCN_t = 0x1
79                                           dL_EARFCN_t = 0x1
80                                           uL_Transmission_Bandwidth_t = 0x3
81                                           dL_Transmission_Bandwidth_t = 0x3`
82                         */
83                         packedPdu: "2006002a000002001500080002f82900007a8000140017000000630002f8290007ab50102002f829000001000133"},
84                 {
85                         key: &entities.GlobalNbId{PlmnId: "02f829", NbId: "007a80"},
86                         enb: "CONNECTED MACRO_ENB [pci:99  cell_id:\"02f829:0007ab50\"  tac:\"0102\"  broadcast_plmns:\"02f829\"  choice_eutra_mode:{fdd:{ulear_fcn:1  dlear_fcn:1  ul_transmission_bandwidth:BW50  dl_transmission_bandwidth:BW50}}  eutra_mode:FDD pci:100  cell_id:\"02f929:0007ac50\"  tac:\"0203\"  broadcast_plmns:\"02f829\"  broadcast_plmns:\"02f929\"  choice_eutra_mode:{fdd:{ulear_fcn:2  dlear_fcn:3  ul_transmission_bandwidth:BW75  dl_transmission_bandwidth:BW75}}  eutra_mode:FDD] []",
87                         /*
88                                 X2AP-PDU:
89                                  successfulOutcome_t
90                                   procedureCode_t = 0x6
91                                   criticality_t = 0
92                                   X2SetupResponse
93                                    protocolIEs_t:
94                                     ProtocolIE_Container_elm
95                                      id_t = 0x15
96                                      criticality_t = 0
97                                      GlobalENB-ID
98                                       pLMN_Identity_t = 02 f8 29
99                                       eNB_ID_t:
100                                        macro_eNB_ID_t = 00 7a 80 (20 bits)
101                                     ProtocolIE_Container_elm
102                                      id_t = 0x14
103                                      criticality_t = 0
104                                      ServedCells:
105                                       ServedCells_elm
106                                        servedCellInfo_t
107                                         pCI_t = 0x63
108                                         cellId_t
109                                          pLMN_Identity_t = 02 f8 29
110                                          eUTRANcellIdentifier_t = 00 07 ab 50 (28 bits)
111                                         tAC_t = 01 02
112                                         broadcastPLMNs_t:
113                                          BroadcastPLMNs_Item_elm = 02 f8 29
114                                         eUTRA_Mode_Info_t:
115                                          fDD_t
116                                           uL_EARFCN_t = 0x1
117                                           dL_EARFCN_t = 0x1
118                                           uL_Transmission_Bandwidth_t = 0x3
119                                           dL_Transmission_Bandwidth_t = 0x3
120                                       ServedCells_elm
121                                        servedCellInfo_t
122                                         pCI_t = 0x64
123                                         cellId_t
124                                          pLMN_Identity_t = 02 f9 29
125                                          eUTRANcellIdentifier_t = 00 07 ac 50 (28 bits)
126                                         tAC_t = 02 03
127                                         broadcastPLMNs_t:
128                                          BroadcastPLMNs_Item_elm = 02 f8 29
129                                          BroadcastPLMNs_Item_elm = 02 f9 29
130                                         eUTRA_Mode_Info_t:
131                                          fDD_t
132                                           uL_EARFCN_t = 0x2
133                                           dL_EARFCN_t = 0x3
134                                           uL_Transmission_Bandwidth_t = 0x4
135                                           dL_Transmission_Bandwidth_t = 0x4
136                         */
137                         packedPdu: "20060043000002001500080002f82900007a8000140030010000630002f8290007ab50102002f8290000010001330000640002f9290007ac50203202f82902f929000002000344"},
138
139                 {key: &entities.GlobalNbId{PlmnId: "02f829", NbId: "007a80"},
140                         enb: "CONNECTED MACRO_ENB [pci:99  cell_id:\"02f829:0007ab50\"  tac:\"0102\"  broadcast_plmns:\"02f829\"  choice_eutra_mode:{fdd:{ulear_fcn:2  dlear_fcn:1  ul_transmission_bandwidth:BW50  dl_transmission_bandwidth:BW50}}  eutra_mode:FDD] []",
141                         /*
142                                 X2AP-PDU:
143                                  successfulOutcome_t
144                                   procedureCode_t = 0x6
145                                   criticality_t = 0
146                                   X2SetupResponse
147                                    protocolIEs_t:
148                                     ProtocolIE_Container_elm
149                                      id_t = 0x15
150                                      criticality_t = 0
151                                      GlobalENB-ID
152                                       pLMN_Identity_t = 02 f8 29
153                                       eNB_ID_t:
154                                        macro_eNB_ID_t = 00 7a 80 (20 bits)
155                                     ProtocolIE_Container_elm
156                                      id_t = 0x14
157                                      criticality_t = 0
158                                      ServedCells:
159                                       ServedCells_elm
160                                        servedCellInfo_t
161                                         pCI_t = 0x63
162                                         cellId_t
163                                          pLMN_Identity_t = 02 f8 29
164                                          eUTRANcellIdentifier_t = 00 07 ab 50 (28 bits)
165                                         tAC_t = 01 02
166                                         broadcastPLMNs_t:
167                                          BroadcastPLMNs_Item_elm = 02 f8 29
168                                         eUTRA_Mode_Info_t:
169                                          fDD_t
170                                           uL_EARFCN_t = 0x1
171                                           dL_EARFCN_t = 0x1
172                                           uL_Transmission_Bandwidth_t = 0x3
173                                           dL_Transmission_Bandwidth_t = 0x3
174                                           iE_Extensions_t:
175                                            ProtocolExtensionContainer_elm
176                                             id_t = 0x5f  //ul_EARFCN
177                                             criticality_t = 0
178                                             EARFCNExtension = 0x2
179                         */
180                         packedPdu: "20060033000002001500080002f82900007a8000140020000000630002f8290007ab50102002f8291000010001330000005f0003800102"},
181                 {key: &entities.GlobalNbId{PlmnId: "02f829", NbId: "007a80"},
182                         enb: "CONNECTED MACRO_ENB [pci:99  cell_id:\"02f829:0007ab50\"  tac:\"0102\"  broadcast_plmns:\"02f829\"  choice_eutra_mode:{fdd:{ulear_fcn:1  dlear_fcn:1  ul_transmission_bandwidth:BW50  dl_transmission_bandwidth:BW50}}  eutra_mode:FDD] [02f729:0203 02f929:0304]",
183                         /*
184                                 X2AP-PDU:
185                                  successfulOutcome_t
186                                   procedureCode_t = 0x6
187                                   criticality_t = 0
188                                   X2SetupResponse
189                                    protocolIEs_t:
190                                     ProtocolIE_Container_elm
191                                      id_t = 0x15
192                                      criticality_t = 0
193                                      GlobalENB-ID
194                                       pLMN_Identity_t = 02 f8 29
195                                       eNB_ID_t:
196                                        macro_eNB_ID_t = 00 7a 80 (20 bits)
197                                     ProtocolIE_Container_elm
198                                      id_t = 0x14
199                                      criticality_t = 0
200                                      ServedCells:
201                                       ServedCells_elm
202                                        servedCellInfo_t
203                                         pCI_t = 0x63
204                                         cellId_t
205                                          pLMN_Identity_t = 02 f8 29
206                                          eUTRANcellIdentifier_t = 00 07 ab 50 (28 bits)
207                                         tAC_t = 01 02
208                                         broadcastPLMNs_t:
209                                          BroadcastPLMNs_Item_elm = 02 f8 29
210                                         eUTRA_Mode_Info_t:
211                                          fDD_t
212                                           uL_EARFCN_t = 0x1
213                                           dL_EARFCN_t = 0x1
214                                           uL_Transmission_Bandwidth_t = 0x3
215                                           dL_Transmission_Bandwidth_t = 0x3
216                                     ProtocolIE_Container_elm
217                                      id_t = 0x18
218                                      criticality_t = 0
219                                      GUGroupIDList:
220                                       GUGroupIDList_elm
221                                        pLMN_Identity_t = 02 f7 29
222                                        mME_Group_ID_t = 02 03
223                                       GUGroupIDList_elm
224                                        pLMN_Identity_t = 02 f9 29
225                                        mME_Group_ID_t = 03 04
226                         */
227                         packedPdu: "2006003a000003001500080002f82900007a8000140017000000630002f8290007ab50102002f8290000010001330018000c1002f72902030002f9290304"},
228
229                 {key: &entities.GlobalNbId{PlmnId: "02f829", NbId: "007a80"},
230                         enb: "CONNECTED MACRO_ENB [pci:99  cell_id:\"02f829:0007ab50\"  tac:\"0102\"  broadcast_plmns:\"02f829\"  choice_eutra_mode:{tdd:{ear_fcn:1  transmission_bandwidth:BW50  subframe_assignment:SA2  special_subframe_info:{special_subframe_patterns:SSP4  cyclic_prefix_dl:NORMAL  cyclic_prefix_ul:EXTENDED}}}  eutra_mode:TDD] []",
231                         /*
232                                 X2AP-PDU:
233                                  successfulOutcome_t
234                                   procedureCode_t = 0x6
235                                   criticality_t = 0
236                                   X2SetupResponse
237                                    protocolIEs_t:
238                                     ProtocolIE_Container_elm
239                                      id_t = 0x15
240                                      criticality_t = 0
241                                      GlobalENB-ID
242                                       pLMN_Identity_t = 02 f8 29
243                                       eNB_ID_t:
244                                        macro_eNB_ID_t = 00 7a 80 (20 bits)
245                                     ProtocolIE_Container_elm
246                                      id_t = 0x14
247                                      criticality_t = 0
248                                      ServedCells:
249                                       ServedCells_elm
250                                        servedCellInfo_t
251                                         pCI_t = 0x63
252                                         cellId_t
253                                          pLMN_Identity_t = 02 f8 29
254                                          eUTRANcellIdentifier_t = 00 07 ab 50 (28 bits)
255                                         tAC_t = 01 02
256                                         broadcastPLMNs_t:
257                                          BroadcastPLMNs_Item_elm = 02 f8 29
258                                         eUTRA_Mode_Info_t:
259                                          tDD_t
260                                           eARFCN_t = 0x1
261                                           transmission_Bandwidth_t = 0x3
262                                           subframeAssignment_t = 0x2
263                                           specialSubframe_Info_t
264                                            specialSubframePatterns_t = 0x4
265                                            cyclicPrefixDL_t = 0
266                                            cyclicPrefixUL_t = 0x1
267                         */
268                         packedPdu: "2006002a000002001500080002f82900007a8000140017000000630002f8290007ab50102002f829400001320820"},
269                 {key: &entities.GlobalNbId{PlmnId: "02f829", NbId: "007a80"},
270                         enb: "CONNECTED MACRO_ENB [pci:99  cell_id:\"02f829:0007ab50\"  tac:\"0102\"  broadcast_plmns:\"02f829\"  choice_eutra_mode:{tdd:{ear_fcn:1  transmission_bandwidth:BW50  subframe_assignment:SA2  special_subframe_info:{special_subframe_patterns:SSP4  cyclic_prefix_dl:EXTENDED  cyclic_prefix_ul:NORMAL}  additional_special_subframe_info:{additional_special_subframe_patterns:SSP9  cyclic_prefix_dl:NORMAL  cyclic_prefix_ul:EXTENDED}}}  eutra_mode:TDD] []",
271                         /*
272                                 X2AP-PDU:
273                                  successfulOutcome_t
274                                   procedureCode_t = 0x6
275                                   criticality_t = 0
276                                   X2SetupResponse
277                                    protocolIEs_t:
278                                     ProtocolIE_Container_elm
279                                      id_t = 0x15
280                                      criticality_t = 0
281                                      GlobalENB-ID
282                                       pLMN_Identity_t = 02 f8 29
283                                       eNB_ID_t:
284                                        macro_eNB_ID_t = 00 7a 80 (20 bits)
285                                     ProtocolIE_Container_elm
286                                      id_t = 0x14
287                                      criticality_t = 0
288                                      ServedCells:
289                                       ServedCells_elm
290                                        servedCellInfo_t
291                                         pCI_t = 0x63
292                                         cellId_t
293                                          pLMN_Identity_t = 02 f8 29
294                                          eUTRANcellIdentifier_t = 00 07 ab 50 (28 bits)
295                                         tAC_t = 01 02
296                                         broadcastPLMNs_t:
297                                          BroadcastPLMNs_Item_elm = 02 f8 29
298                                         eUTRA_Mode_Info_t:
299                                          tDD_t
300                                           eARFCN_t = 0x1
301                                           transmission_Bandwidth_t = 0x3
302                                           subframeAssignment_t = 0x2
303                                           specialSubframe_Info_t
304                                            specialSubframePatterns_t = 0x4
305                                            cyclicPrefixDL_t = 0x1
306                                            cyclicPrefixUL_t = 0
307                                           iE_Extensions_t:
308                                            ProtocolExtensionContainer_elm
309                                             id_t = 0x61
310                                             criticality_t = 0x1
311                                             AdditionalSpecialSubframe-Info
312                                              additionalspecialSubframePatterns_t = 0x9
313                                              cyclicPrefixDL_t = 0
314                                              cyclicPrefixUL_t = 0x1
315                         */
316                         packedPdu: "20060032000002001500080002f82900007a800014001f000000630002f8290007ab50102002f8295000013208800000006140021220"},
317
318                 {key: &entities.GlobalNbId{PlmnId: "02f829", NbId: "007a80"},
319                         enb: "CONNECTED MACRO_ENB [pci:99  cell_id:\"02f829:0007ab50\"  tac:\"0102\"  broadcast_plmns:\"02f829\"  choice_eutra_mode:{tdd:{ear_fcn:2  transmission_bandwidth:BW50  subframe_assignment:SA2  special_subframe_info:{special_subframe_patterns:SSP4  cyclic_prefix_dl:EXTENDED  cyclic_prefix_ul:NORMAL}}}  eutra_mode:TDD] []",
320                         /*
321                                 X2AP-PDU:
322                                  successfulOutcome_t
323                                   procedureCode_t = 0x6
324                                   criticality_t = 0
325                                   X2SetupResponse
326                                    protocolIEs_t:
327                                     ProtocolIE_Container_elm
328                                      id_t = 0x15
329                                      criticality_t = 0
330                                      GlobalENB-ID
331                                       pLMN_Identity_t = 02 f8 29
332                                       eNB_ID_t:
333                                        macro_eNB_ID_t = 00 7a 80 (20 bits)
334                                     ProtocolIE_Container_elm
335                                      id_t = 0x14
336                                      criticality_t = 0
337                                      ServedCells:
338                                       ServedCells_elm
339                                        servedCellInfo_t
340                                         pCI_t = 0x63
341                                         cellId_t
342                                          pLMN_Identity_t = 02 f8 29
343                                          eUTRANcellIdentifier_t = 00 07 ab 50 (28 bits)
344                                         tAC_t = 01 02
345                                         broadcastPLMNs_t:
346                                          BroadcastPLMNs_Item_elm = 02 f8 29
347                                         eUTRA_Mode_Info_t:
348                                          tDD_t
349                                           eARFCN_t = 0x1
350                                           transmission_Bandwidth_t = 0x3
351                                           subframeAssignment_t = 0x2
352                                           specialSubframe_Info_t
353                                            specialSubframePatterns_t = 0x4
354                                            cyclicPrefixDL_t = 0x1
355                                            cyclicPrefixUL_t = 0
356                                           iE_Extensions_t:
357                                            ProtocolExtensionContainer_elm
358                                             id_t = 0x5e
359                                             criticality_t = 0
360                                             EARFCNExtension = 0x2
361                         */
362                         packedPdu: "20060033000002001500080002f82900007a8000140020000000630002f8290007ab50102002f8295000013208800000005e0003800102"},
363
364                 {key: &entities.GlobalNbId{PlmnId: "02f829", NbId: "007a80"},
365                         enb: "CONNECTED MACRO_ENB [pci:99 cell_id:\"02f829:0007ab50\" tac:\"0102\" broadcast_plmns:\"02f829\" choice_eutra_mode:{tdd:{ear_fcn:1 transmission_bandwidth:BW50 subframe_assignment:SA2 special_subframe_info:{special_subframe_patterns:SSP4 cyclic_prefix_dl:EXTENDED cyclic_prefix_ul:NORMAL} additional_special_subframe_extension_info:{additional_special_subframe_patterns_extension:SSP10 cyclic_prefix_dl:NORMAL cyclic_prefix_ul:NORMAL}}} eutra_mode:TDD] []",
366                         /*
367                                 X2AP-PDU:
368                                  successfulOutcome_t
369                                   procedureCode_t = 0x6
370                                   criticality_t = 0
371                                   X2SetupResponse
372                                    protocolIEs_t:
373                                     ProtocolIE_Container_elm
374                                      id_t = 0x15
375                                      criticality_t = 0
376                                      GlobalENB-ID
377                                       pLMN_Identity_t = 02 f8 29
378                                       eNB_ID_t:
379                                        macro_eNB_ID_t = 00 7a 80 (20 bits)
380                                     ProtocolIE_Container_elm
381                                      id_t = 0x14
382                                      criticality_t = 0
383                                      ServedCells:
384                                       ServedCells_elm
385                                        servedCellInfo_t
386                                         pCI_t = 0x63
387                                         cellId_t
388                                          pLMN_Identity_t = 02 f8 29
389                                          eUTRANcellIdentifier_t = 00 07 ab 50 (28 bits)
390                                         tAC_t = 01 02
391                                         broadcastPLMNs_t:
392                                          BroadcastPLMNs_Item_elm = 02 f8 29
393                                         eUTRA_Mode_Info_t:
394                                          tDD_t
395                                           eARFCN_t = 0x1
396                                           transmission_Bandwidth_t = 0x3
397                                           subframeAssignment_t = 0x2
398                                           specialSubframe_Info_t
399                                            specialSubframePatterns_t = 0x4
400                                            cyclicPrefixDL_t = 0x1
401                                            cyclicPrefixUL_t = 0
402                                           iE_Extensions_t:
403                                            ProtocolExtensionContainer_elm
404                                             id_t = 0xb3
405                                             criticality_t = 0x1
406                                             AdditionalSpecialSubframeExtension-Info
407                                              additionalspecialSubframePatternsExtension_t = 0
408                                              cyclicPrefixDL_t = 0
409                                              cyclicPrefixUL_t = 0
410                         */
411                         packedPdu: "20060031000002001500080002f82900007a800014001e000000630002f8290007ab50102002f829500001320880000000b3400100"},
412
413                 {key: &entities.GlobalNbId{PlmnId: "02f829", NbId: "007a80"},
414                         enb: "CONNECTED MACRO_ENB [pci:99 cell_id:\"02f829:0007ab50\" tac:\"0102\" broadcast_plmns:\"02f829\" choice_eutra_mode:{tdd:{ear_fcn:2 transmission_bandwidth:BW50 subframe_assignment:SA2 special_subframe_info:{special_subframe_patterns:SSP4 cyclic_prefix_dl:EXTENDED cyclic_prefix_ul:NORMAL} additional_special_subframe_info:{additional_special_subframe_patterns:SSP9 cyclic_prefix_dl:NORMAL cyclic_prefix_ul:EXTENDED} additional_special_subframe_extension_info:{additional_special_subframe_patterns_extension:SSP10 cyclic_prefix_dl:NORMAL cyclic_prefix_ul:NORMAL}}} eutra_mode:TDD] []",
415                         /*
416                                 X2AP-PDU:
417                                  successfulOutcome_t
418                                   procedureCode_t = 0x6
419                                   criticality_t = 0
420                                   X2SetupResponse
421                                    protocolIEs_t:
422                                     ProtocolIE_Container_elm
423                                      id_t = 0x15
424                                      criticality_t = 0
425                                      GlobalENB-ID
426                                       pLMN_Identity_t = 02 f8 29
427                                       eNB_ID_t:
428                                        macro_eNB_ID_t = 00 7a 80 (20 bits)
429                                     ProtocolIE_Container_elm
430                                      id_t = 0x14
431                                      criticality_t = 0
432                                      ServedCells:
433                                       ServedCells_elm
434                                        servedCellInfo_t
435                                         pCI_t = 0x63
436                                         cellId_t
437                                          pLMN_Identity_t = 02 f8 29
438                                          eUTRANcellIdentifier_t = 00 07 ab 50 (28 bits)
439                                         tAC_t = 01 02
440                                         broadcastPLMNs_t:
441                                          BroadcastPLMNs_Item_elm = 02 f8 29
442                                         eUTRA_Mode_Info_t:
443                                          tDD_t
444                                           eARFCN_t = 0x1
445                                           transmission_Bandwidth_t = 0x3
446                                           subframeAssignment_t = 0x2
447                                           specialSubframe_Info_t
448                                            specialSubframePatterns_t = 0x4
449                                            cyclicPrefixDL_t = 0x1
450                                            cyclicPrefixUL_t = 0
451                                           iE_Extensions_t:
452                                            ProtocolExtensionContainer_elm
453                                             id_t = 0xb3
454                                             criticality_t = 0x1
455                                             AdditionalSpecialSubframeExtension-Info
456                                              additionalspecialSubframePatternsExtension_t = 0
457                                              cyclicPrefixDL_t = 0
458                                              cyclicPrefixUL_t = 0
459                                            ProtocolExtensionContainer_elm
460                                             id_t = 0x61
461                                             criticality_t = 0x1
462                                             AdditionalSpecialSubframe-Info
463                                              additionalspecialSubframePatterns_t = 0x9
464                                              cyclicPrefixDL_t = 0
465                                              cyclicPrefixUL_t = 0x1
466                                            ProtocolExtensionContainer_elm
467                                             id_t = 0x5e
468                                             criticality_t = 0
469                                             EARFCNExtension = 0x2
470
471                         */
472                         packedPdu: "2006003e000002001500080002f82900007a800014002b000000630002f8290007ab50102002f829500001320880000200b3400100006140021220005e0003800102"},
473
474                 {key: &entities.GlobalNbId{PlmnId: "02f829", NbId: "007a80b0"},
475                         enb: "CONNECTED HOME_ENB [pci:99 cell_id:\"02f829:0007ab50\" tac:\"0102\" broadcast_plmns:\"02f829\" choice_eutra_mode:{fdd:{ulear_fcn:1 dlear_fcn:1 ul_transmission_bandwidth:BW50 dl_transmission_bandwidth:BW50}} eutra_mode:FDD number_of_antenna_ports:AN1 pci:100 cell_id:\"02f929:0007ac50\" tac:\"0203\" broadcast_plmns:\"02f829\" broadcast_plmns:\"02f929\" choice_eutra_mode:{fdd:{ulear_fcn:2 dlear_fcn:3 ul_transmission_bandwidth:BW75 dl_transmission_bandwidth:BW75}} eutra_mode:FDD] []",
476                         /*
477                                 X2AP-PDU:
478                                  successfulOutcome_t
479                                   procedureCode_t = 0x6
480                                   criticality_t = 0
481                                   X2SetupResponse
482                                    protocolIEs_t:
483                                     ProtocolIE_Container_elm
484                                      id_t = 0x15
485                                      criticality_t = 0
486                                      GlobalENB-ID
487                                       pLMN_Identity_t = 02 f8 29
488                                       eNB_ID_t:
489                                        home_eNB_ID_t = 00 7a 80 b0 (28 bits)
490                                     ProtocolIE_Container_elm
491                                      id_t = 0x14
492                                      criticality_t = 0
493                                      ServedCells:
494                                       ServedCells_elm
495                                        servedCellInfo_t
496                                         pCI_t = 0x63
497                                         cellId_t
498                                          pLMN_Identity_t = 02 f8 29
499                                          eUTRANcellIdentifier_t = 00 07 ab 50 (28 bits)
500                                         tAC_t = 01 02
501                                         broadcastPLMNs_t:
502                                          BroadcastPLMNs_Item_elm = 02 f8 29
503                                         eUTRA_Mode_Info_t:
504                                          fDD_t
505                                           uL_EARFCN_t = 0x1
506                                           dL_EARFCN_t = 0x1
507                                           uL_Transmission_Bandwidth_t = 0x3
508                                           dL_Transmission_Bandwidth_t = 0x3
509                                         iE_Extensions_t:
510                                          ProtocolExtensionContainer_elm
511                                           id_t = 0x29
512                                           criticality_t = 0x1
513                                           Number-of-Antennaports = 0
514                                       ServedCells_elm
515                                        servedCellInfo_t
516                                         pCI_t = 0x64
517                                         cellId_t
518                                          pLMN_Identity_t = 02 f9 29
519                                          eUTRANcellIdentifier_t = 00 07 ac 50 (28 bits)
520                                         tAC_t = 02 03
521                                         broadcastPLMNs_t:
522                                          BroadcastPLMNs_Item_elm = 02 f8 29
523                                          BroadcastPLMNs_Item_elm = 02 f9 29
524                                         eUTRA_Mode_Info_t:nb_id
525                                          fDD_t
526                                           uL_EARFCN_t = 0x2
527                                           dL_EARFCN_t = 0x3
528                                           uL_Transmission_Bandwidth_t = 0x4
529                                           dL_Transmission_Bandwidth_t = 0x4
530
531                         */
532                         packedPdu: "2006004b000002001500090002f82940007a80b000140037010800630002f8290007ab50102002f829000001000133000000294001000000640002f9290007ac50203202f82902f929000002000344"},
533
534                 {key: &entities.GlobalNbId{PlmnId: "02f829", NbId: "007a40"},
535                         enb: "CONNECTED SHORT_MACRO_ENB [pci:99  cell_id:\"02f829:0007ab50\"  tac:\"0102\"  broadcast_plmns:\"02f829\"  choice_eutra_mode:{fdd:{ulear_fcn:1  dlear_fcn:1  ul_transmission_bandwidth:BW50  dl_transmission_bandwidth:BW50}}  eutra_mode:FDD  number_of_antenna_ports:AN1 pci:100  cell_id:\"02f929:0007ac50\"  tac:\"0203\"  broadcast_plmns:\"02f829\"  broadcast_plmns:\"02f929\"  choice_eutra_mode:{fdd:{ulear_fcn:2  dlear_fcn:3  ul_transmission_bandwidth:BW75  dl_transmission_bandwidth:BW75}}  eutra_mode:FDD  prach_configuration:{root_sequence_index:15  zero_correlation_zone_configuration:7  high_speed_flag:true  prach_frequency_offset:30}] []",
536                         /*
537                                 X2AP-PDU:
538                                  successfulOutcome_t
539                                   procedureCode_t = 0x6
540                                   criticality_t = 0
541                                   X2SetupResponse
542                                    protocolIEs_t:
543                                         ProtocolIE_Container_elm
544                                          id_t = 0x15
545                                          criticality_t = 0
546                                          GlobalENB-ID
547                                           pLMN_Identity_t = 02 f8 29
548                                           eNB_ID_t:
549                                            short_Macro_eNB_ID_t = 00 7a 40 (18 bits)
550                                         ProtocolIE_Container_elm
551                                          id_t = 0x14
552                                          criticality_t = 0
553                                          ServedCells:
554                                           ServedCells_elm
555                                            servedCellInfo_t
556                                                 pCI_t = 0x63
557                                                 cellId_t
558                                                  pLMN_Identity_t = 02 f8 29
559                                                  eUTRANcellIdentifier_t = 00 07 ab 50 (28 bits)
560                                                 tAC_t = 01 02
561                                                 broadcastPLMNs_t:
562                                                  BroadcastPLMNs_Item_elm = 02 f8 29
563                                                 eUTRA_Mode_Info_t:
564                                                  fDD_t
565                                                   uL_EARFCN_t = 0x1
566                                                   dL_EARFCN_t = 0x1
567                                                   uL_Transmission_Bandwidth_t = 0x3
568                                                   dL_Transmission_Bandwidth_t = 0x3
569                                                 iE_Extensions_t:
570                                                  ProtocolExtensionContainer_elm
571                                                   id_t = 0x29
572                                                   criticality_t = 0x1
573                                                   Number-of-Antennaports = 0
574                                           ServedCells_elm
575                                            servedCellInfo_t
576                                                 pCI_t = 0x64
577                                                 cellId_t
578                                                  pLMN_Identity_t = 02 f9 29
579                                                  eUTRANcellIdentifier_t = 00 07 ac 50 (28 bits)
580                                                 tAC_t = 02 03
581                                                 broadcastPLMNs_t:
582                                                  BroadcastPLMNs_Item_elm = 02 f8 29
583                                                  BroadcastPLMNs_Item_elm = 02 f9 29
584                                                 eUTRA_Mode_Info_t:
585                                                  fDD_t
586                                                   uL_EARFCN_t = 0x2
587                                                   dL_EARFCN_t = 0x3
588                                                   uL_Transmission_Bandwidth_t = 0x4
589                                                   dL_Transmission_Bandwidth_t = 0x4
590                                                 iE_Extensions_t:
591                                                  ProtocolExtensionContainer_elm
592                                                   id_t = 0x37
593                                                   criticality_t = 0x1
594                                                   PRACH-Configuration
595                                                    rootSequenceIndex_t = 0xf
596                                                    zeroCorrelationIndex_t = 0x7
597                                                    highSpeedFlag_t = true
598                                                    prach_FreqOffset_t = 0x1e
599
600                         */
601                         packedPdu: "20060056000002001500090002f8298003007a4000140042010800630002f8290007ab50102002f829000001000133000000294001000800640002f9290007ac50203202f82902f92900000200034400000037400500000f79e0"},
602
603                 {key: &entities.GlobalNbId{PlmnId: "02f829", NbId: "007a40"},
604                         enb: "CONNECTED SHORT_MACRO_ENB [pci:99  cell_id:\"02f829:0007ab50\"  tac:\"0102\"  broadcast_plmns:\"02f829\"  choice_eutra_mode:{fdd:{ulear_fcn:1  dlear_fcn:1  ul_transmission_bandwidth:BW50  dl_transmission_bandwidth:BW50}}  eutra_mode:FDD  number_of_antenna_ports:AN1 pci:100  cell_id:\"02f929:0007ac50\"  tac:\"0203\"  broadcast_plmns:\"02f829\"  broadcast_plmns:\"02f929\"  choice_eutra_mode:{fdd:{ulear_fcn:2  dlear_fcn:3  ul_transmission_bandwidth:BW75  dl_transmission_bandwidth:BW75}}  eutra_mode:FDD  mbsfn_subframe_infos:{radioframe_allocation_period:N8  radioframe_allocation_offset:3  subframe_allocation:\"28\"  subframe_allocation_type:ONE_FRAME}] []",
605                         /*
606                                 X2AP-PDU:
607                                  successfulOutcome_t
608                                   procedureCode_t = 0x6
609                                   criticality_t = 0
610                                   X2SetupResponse
611                                    protocolIEs_t:
612                                         ProtocolIE_Container_elm
613                                          id_t = 0x15
614                                          criticality_t = 0
615                                          GlobalENB-ID
616                                           pLMN_Identity_t = 02 f8 29
617                                           eNB_ID_t:
618                                            short_Macro_eNB_ID_t = 00 7a 40 (18 bits)
619                                         ProtocolIE_Container_elm
620                                          id_t = 0x14
621                                          criticality_t = 0
622                                          ServedCells:
623                                           ServedCells_elm
624                                            servedCellInfo_t
625                                                 pCI_t = 0x63
626                                                 cellId_t
627                                                  pLMN_Identity_t = 02 f8 29
628                                                  eUTRANcellIdentifier_t = 00 07 ab 50 (28 bits)
629                                                 tAC_t = 01 02
630                                                 broadcastPLMNs_t:
631                                                  BroadcastPLMNs_Item_elm = 02 f8 29
632                                                 eUTRA_Mode_Info_t:
633                                                  fDD_t
634                                                   uL_EARFCN_t = 0x1
635                                                   dL_EARFCN_t = 0x1
636                                                   uL_Transmission_Bandwidth_t = 0x3
637                                                   dL_Transmission_Bandwidth_t = 0x3
638                                                 iE_Extensions_t:
639                                                  ProtocolExtensionContainer_elm
640                                                   id_t = 0x29
641                                                   criticality_t = 0x1
642                                                   Number-of-Antennaports = 0
643                                           ServedCells_elm
644                                            servedCellInfo_t
645                                                 pCI_t = 0x64
646                                                 cellId_t
647                                                  pLMN_Identity_t = 02 f9 29
648                                                  eUTRANcellIdentifier_t = 00 07 ac 50 (28 bits)
649                                                 tAC_t = 02 03
650                                                 broadcastPLMNs_t:
651                                                  BroadcastPLMNs_Item_elm = 02 f8 29
652                                                  BroadcastPLMNs_Item_elm = 02 f9 29
653                                                 eUTRA_Mode_Info_t:
654                                                  fDD_t
655                                                   uL_EARFCN_t = 0x2
656                                                   dL_EARFCN_t = 0x3
657                                                   uL_Transmission_Bandwidth_t = 0x4
658                                                   dL_Transmission_Bandwidth_t = 0x4
659                                                 iE_Extensions_t:
660                                                  ProtocolExtensionContainer_elm
661                                                   id_t = 0x38
662                                                   criticality_t = 0x1
663                                                   MBSFN-Subframe-Infolist:
664                                                    MBSFN_Subframe_Infolist_elm
665                                                         radioframeAllocationPeriod_t = 0x3
666                                                         radioframeAllocationOffset_t = 0x3
667                                                         subframeAllocation_t:
668                                                          oneframe_t = 28 (6 bits)
669                         */
670                         packedPdu: "20060054000002001500090002f8298003007a4000140040010800630002f8290007ab50102002f829000001000133000000294001000800640002f9290007ac50203202f82902f929000002000344000000384003019850"},
671                 {key: &entities.GlobalNbId{PlmnId: "02f829", NbId: "007a40"},
672                         enb: "CONNECTED SHORT_MACRO_ENB [pci:99  cell_id:\"02f829:0007ab50\"  tac:\"0102\"  broadcast_plmns:\"02f829\"  choice_eutra_mode:{fdd:{ulear_fcn:1  dlear_fcn:1  ul_transmission_bandwidth:BW50  dl_transmission_bandwidth:BW50}}  eutra_mode:FDD  number_of_antenna_ports:AN1  mbsfn_subframe_infos:{radioframe_allocation_period:N8  radioframe_allocation_offset:3  subframe_allocation:\"28\"  subframe_allocation_type:ONE_FRAME} pci:100  cell_id:\"02f929:0007ac50\"  tac:\"0203\"  broadcast_plmns:\"02f829\"  broadcast_plmns:\"02f929\"  choice_eutra_mode:{fdd:{ulear_fcn:2  dlear_fcn:3  ul_transmission_bandwidth:BW75  dl_transmission_bandwidth:BW75}}  eutra_mode:FDD] []",
673                         /*
674                                 X2AP-PDU:
675                                  successfulOutcome_t
676                                   procedureCode_t = 0x6
677                                   criticality_t = 0
678                                   X2SetupResponse
679                                    protocolIEs_t:
680                                     ProtocolIE_Container_elm
681                                      id_t = 0x15
682                                      criticality_t = 0
683                                      GlobalENB-ID
684                                       pLMN_Identity_t = 02 f8 29
685                                       eNB_ID_t:
686                                        short_Macro_eNB_ID_t = 00 7a 40 (18 bits)
687                                     ProtocolIE_Container_elm
688                                      id_t = 0x14
689                                      criticality_t = 0
690                                      ServedCells:
691                                       ServedCells_elm
692                                        servedCellInfo_t
693                                         pCI_t = 0x63
694                                         cellId_t
695                                          pLMN_Identity_t = 02 f8 29
696                                          eUTRANcellIdentifier_t = 00 07 ab 50 (28 bits)
697                                         tAC_t = 01 02
698                                         broadcastPLMNs_t:
699                                          BroadcastPLMNs_Item_elm = 02 f8 29
700                                         eUTRA_Mode_Info_t:
701                                          fDD_t
702                                           uL_EARFCN_t = 0x1
703                                           dL_EARFCN_t = 0x1
704                                           uL_Transmission_Bandwidth_t = 0x3
705                                           dL_Transmission_Bandwidth_t = 0x3
706                                         iE_Extensions_t:
707                                          ProtocolExtensionContainer_elm
708                                           id_t = 0x29
709                                           criticality_t = 0x1
710                                           Number-of-Antennaports = 0
711                                          ProtocolExtensionContainer_elm
712                                           id_t = 0x38
713                                           criticality_t = 0x1
714                                           MBSFN-Subframe-Infolist:
715                                            MBSFN_Subframe_Infolist_elm
716                                             radioframeAllocationPeriod_t = 0x3
717                                             radioframeAllocationOffset_t = 0x3
718                                             subframeAllocation_t:
719                                              oneframe_t = 28 (6 bits)
720                                       ServedCells_elm
721                                        servedCellInfo_t
722                                         pCI_t = 0x64
723                                         cellId_t
724                                          pLMN_Identity_t = 02 f9 29
725                                          eUTRANcellIdentifier_t = 00 07 ac 50 (28 bits)
726                                         tAC_t = 02 03
727                                         broadcastPLMNs_t:
728                                          BroadcastPLMNs_Item_elm = 02 f8 29
729                                          BroadcastPLMNs_Item_elm = 02 f9 29
730                                         eUTRA_Mode_Info_t:
731                                          fDD_t
732                                           uL_EARFCN_t = 0x2
733                                           dL_EARFCN_t = 0x3
734                                           uL_Transmission_Bandwidth_t = 0x4
735                                           dL_Transmission_Bandwidth_t = 0x4
736                         */
737                         packedPdu: "20060052000002001500090002f8298003007a400014003e010800630002f8290007ab50102002f82900000100013300010029400100003840030198500000640002f9290007ac50203202f82902f929000002000344"},
738                 {key: &entities.GlobalNbId{PlmnId: "02f829", NbId: "007a40"},
739                         enb: "CONNECTED SHORT_MACRO_ENB [pci:99  cell_id:\"02f829:0007ab50\"  tac:\"0102\"  broadcast_plmns:\"02f829\"  choice_eutra_mode:{fdd:{ulear_fcn:1  dlear_fcn:1  ul_transmission_bandwidth:BW50  dl_transmission_bandwidth:BW50}}  eutra_mode:FDD  number_of_antenna_ports:AN1  prach_configuration:{root_sequence_index:15  zero_correlation_zone_configuration:7  high_speed_flag:true  prach_frequency_offset:30} pci:100  cell_id:\"02f929:0007ac50\"  tac:\"0203\"  broadcast_plmns:\"02f829\"  broadcast_plmns:\"02f929\"  choice_eutra_mode:{fdd:{ulear_fcn:2  dlear_fcn:3  ul_transmission_bandwidth:BW75  dl_transmission_bandwidth:BW75}}  eutra_mode:FDD] []",
740                         /*
741                                 X2AP-PDU:
742                                  successfulOutcome_t
743                                   procedureCode_t = 0x6
744                                   criticality_t = 0
745                                   X2SetupResponse
746                                    protocolIEs_t:
747                                     ProtocolIE_Container_elm
748                                      id_t = 0x15
749                                      criticality_t = 0
750                                      GlobalENB-ID
751                                       pLMN_Identity_t = 02 f8 29
752                                       eNB_ID_t:
753                                        short_Macro_eNB_ID_t = 00 7a 40 (18 bits)
754                                     ProtocolIE_Container_elm
755                                      id_t = 0x14
756                                      criticality_t = 0
757                                      ServedCells:
758                                       ServedCells_elm
759                                        servedCellInfo_t
760                                         pCI_t = 0x63
761                                         cellId_t
762                                          pLMN_Identity_t = 02 f8 29
763                                          eUTRANcellIdentifier_t = 00 07 ab 50 (28 bits)
764                                         tAC_t = 01 02
765                                         broadcastPLMNs_t:
766                                          BroadcastPLMNs_Item_elm = 02 f8 29
767                                         eUTRA_Mode_Info_t:
768                                          fDD_t
769                                           uL_EARFCN_t = 0x1
770                                           dL_EARFCN_t = 0x1
771                                           uL_Transmission_Bandwidth_t = 0x3
772                                           dL_Transmission_Bandwidth_t = 0x3
773                                         iE_Extensions_t:
774                                          ProtocolExtensionContainer_elm
775                                           id_t = 0x29
776                                           criticality_t = 0x1
777                                           Number-of-Antennaports = 0
778                                          ProtocolExtensionContainer_elm
779                                           id_t = 0x37
780                                           criticality_t = 0x1
781                                           PRACH-Configuration
782                                            rootSequenceIndex_t = 0xf
783                                            zeroCorrelationIndex_t = 0x7
784                                            highSpeedFlag_t = true
785                                            prach_FreqOffset_t = 0x1e
786                                       ServedCells_elm
787                                        servedCellInfo_t
788                                         pCI_t = 0x64
789                                         cellId_t
790                                          pLMN_Identity_t = 02 f9 29
791                                          eUTRANcellIdentifier_t = 00 07 ac 50 (28 bits)
792                                         tAC_t = 02 03
793                                         broadcastPLMNs_t:
794                                          BroadcastPLMNs_Item_elm = 02 f8 29
795                                          BroadcastPLMNs_Item_elm = 02 f9 29
796                                         eUTRA_Mode_Info_t:
797                                          fDD_t
798                                           uL_EARFCN_t = 0x2
799                                           dL_EARFCN_t = 0x3
800                                           uL_Transmission_Bandwidth_t = 0x4
801                                           dL_Transmission_Bandwidth_t = 0x4
802                         */
803                         packedPdu: "20060054000002001500090002f8298003007a4000140040010800630002f8290007ab50102002f829000001000133000100294001000037400500000f79e00000640002f9290007ac50203202f82902f929000002000344"},
804                 {key: &entities.GlobalNbId{PlmnId: "02f829", NbId: "007a08"},
805                         enb: "CONNECTED LONG_MACRO_ENB [pci:99 cell_id:\"02f829:0007ab50\" tac:\"0102\" broadcast_plmns:\"02f829\" choice_eutra_mode:{fdd:{ulear_fcn:1 dlear_fcn:1 ul_transmission_bandwidth:BW50 dl_transmission_bandwidth:BW50}} eutra_mode:FDD prach_configuration:{root_sequence_index:15 zero_correlation_zone_configuration:7 high_speed_flag:true prach_frequency_offset:30 prach_configuration_index:60} pci:100 cell_id:\"02f929:0007ac50\" tac:\"0203\" broadcast_plmns:\"02f829\" broadcast_plmns:\"02f929\" choice_eutra_mode:{fdd:{ulear_fcn:2 dlear_fcn:3 ul_transmission_bandwidth:BW75 dl_transmission_bandwidth:BW75}} eutra_mode:FDD] []",
806                         /*
807                                 X2AP-PDU:
808                                  successfulOutcome_t
809                                   procedureCode_t = 0x6
810                                   criticality_t = 0
811                                   X2SetupResponse
812                                    protocolIEs_t:
813                                         ProtocolIE_Container_elm
814                                          id_t = 0x15
815                                          criticality_t = 0
816                                          GlobalENB-ID
817                                           pLMN_Identity_t = 02 f8 29
818                                           eNB_ID_t:
819                                            long_Macro_eNB_ID_t = 00 7a 08 (21 bits)
820                                         ProtocolIE_Container_elm
821                                          id_t = 0x14
822                                          criticality_t = 0
823                                          ServedCells:
824                                           ServedCells_elm
825                                            servedCellInfo_t
826                                                 pCI_t = 0x63
827                                                 cellId_t
828                                                  pLMN_Identity_t = 02 f8 29
829                                                  eUTRANcellIdentifier_t = 00 07 ab 50 (28 bits)
830                                                 tAC_t = 01 02
831                                                 broadcastPLMNs_t:
832                                                  BroadcastPLMNs_Item_elm = 02 f8 29
833                                                 eUTRA_Mode_Info_t:
834                                                  fDD_t
835                                                   uL_EARFCN_t = 0x1
836                                                   dL_EARFCN_t = 0x1
837                                                   uL_Transmission_Bandwidth_t = 0x3
838                                                   dL_Transmission_Bandwidth_t = 0x3
839                                                 iE_Extensions_t:
840                                                  ProtocolExtensionContainer_elm
841                                                   id_t = 0x37
842                                                   criticality_t = 0x1
843                                                   PRACH-Configuration
844                                                    rootSequenceIndex_t = 0xf
845                                                    zeroCorrelationIndex_t = 0x7
846                                                    highSpeedFlag_t = true
847                                                    prach_FreqOffset_t = 0x1e
848                                                    prach_ConfigIndex_t = 0x3c
849                                           ServedCells_elm
850                                            servedCellInfo_t
851                                                 pCI_t = 0x64
852                                                 cellId_t
853                                                  pLMN_Identity_t = 02 f9 29
854                                                  eUTRANcellIdentifier_t = 00 07 ac 50 (28 bits)
855                                                 tAC_t = 02 03
856                                                 broadcastPLMNs_t:
857                                                  BroadcastPLMNs_Item_elm = 02 f8 29
858                                                  BroadcastPLMNs_Item_elm = 02 f9 29
859                                                 eUTRA_Mode_Info_t:
860                                                  fDD_t
861                                                   uL_EARFCN_t = 0x2
862                                                   dL_EARFCN_t = 0x3
863                                                   uL_Transmission_Bandwidth_t = 0x4
864                                                   dL_Transmission_Bandwidth_t = 0x4
865                         */
866                         //packedPdu: "20060050000002001500090002f8298103007a080014003c010800630002f8290007ab50102002f82900000100013300000037400640000f79ef000000640002f9290007ac50203202f82902f929000002000344"},
867                         packedPdu: "20060050000002001500090002f829c003007a080014003c010800630002f8290007ab50102002f82900000100013300000037400640000f79ef000000640002f9290007ac50203202f82902f929000002000344"},
868
869                 {key: &entities.GlobalNbId{PlmnId: "02f829", NbId: "007a80"},
870                         enb: "CONNECTED MACRO_ENB [pci:99 cell_id:\"02f829:0007ab50\" tac:\"0102\" broadcast_plmns:\"02f829\" choice_eutra_mode:{fdd:{ulear_fcn:1 dlear_fcn:1 ul_transmission_bandwidth:BW50 dl_transmission_bandwidth:BW50}} eutra_mode:FDD csg_id:\"0007aba0\" freq_band_indicator_priority:BROADCASTED bandwidth_reduced_si:SCHEDULED] []",
871                         /*
872                                 X2AP-PDU:
873                                  successfulOutcome_t
874                                   procedureCode_t = 0x6
875                                   criticality_t = 0
876                                   X2SetupResponse
877                                    protocolIEs_t:
878                                     ProtocolIE_Container_elm
879                                      id_t = 0x15
880                                      criticality_t = 0
881                                      GlobalENB-ID
882                                       pLMN_Identity_t = 02 f8 29
883                                       eNB_ID_t:
884                                        macro_eNB_ID_t = 00 7a 80 (20 bits)
885                                     ProtocolIE_Container_elm
886                                      id_t = 0x14
887                                      criticality_t = 0
888                                      ServedCells:
889                                       ServedCells_elm
890                                        servedCellInfo_t
891                                         pCI_t = 0x63
892                                         cellId_t
893                                          pLMN_Identity_t = 02 f8 29
894                                          eUTRANcellIdentifier_t = 00 07 ab 50 (28 bits)
895                                         tAC_t = 01 02
896                                         broadcastPLMNs_t:
897                                          BroadcastPLMNs_Item_elm = 02 f8 29
898                                         eUTRA_Mode_Info_t:
899                                          fDD_t
900                                           uL_EARFCN_t = 0x1
901                                           dL_EARFCN_t = 0x1
902                                           uL_Transmission_Bandwidth_t = 0x3
903                                           dL_Transmission_Bandwidth_t = 0x3
904                                         iE_Extensions_t:
905                                          ProtocolExtensionContainer_elm
906                                           id_t = 0x46
907                                           criticality_t = 0x1
908                                           CSG-Id = 00 07 ab a0 (27 bits)
909                                          ProtocolExtensionContainer_elm
910                                           id_t = 0xa0
911                                           criticality_t = 0x1
912                                           FreqBandIndicatorPriority = 0x1
913                                          ProtocolExtensionContainer_elm
914                                           id_t = 0xb4
915                                           criticality_t = 0x1
916                                           BandwidthReducedSI = 0
917                         */
918                         packedPdu: "2006003e000002001500080002f82900007a800014002b000800630002f8290007ab50102002f8290000010001330002004640040007aba000a040014000b4400100"},
919
920                 {key: &entities.GlobalNbId{PlmnId: "02f829", NbId: "007a80"},
921                         enb: "CONNECTED MACRO_ENB [pci:99 cell_id:\"02f829:0007ab50\" tac:\"0102\" broadcast_plmns:\"02f829\" choice_eutra_mode:{fdd:{ulear_fcn:1 dlear_fcn:1 ul_transmission_bandwidth:BW50 dl_transmission_bandwidth:BW50}} eutra_mode:FDD mbms_service_area_identities:\"02f8\" mbms_service_area_identities:\"03f9\" multiband_infos:1 multiband_infos:2 multiband_infos:3 freq_band_indicator_priority:NOT_BROADCASTED] []",
922                         /*
923                                 X2AP-PDU:
924                                  successfulOutcome_t
925                                   procedureCode_t = 0x6
926                                   criticality_t = 0
927                                   X2SetupResponse
928                                    protocolIEs_t:
929                                     ProtocolIE_Container_elm
930                                      id_t = 0x15
931                                      criticality_t = 0
932                                      GlobalENB-ID
933                                       pLMN_Identity_t = 02 f8 29
934                                       eNB_ID_t:
935                                        macro_eNB_ID_t = 00 7a 80 (20 bits)
936                                     ProtocolIE_Container_elm
937                                      id_t = 0x14
938                                      criticality_t = 0
939                                      ServedCells:
940                                       ServedCells_elm
941                                        servedCellInfo_t
942                                         pCI_t = 0x63
943                                         cellId_t
944                                          pLMN_Identity_t = 02 f8 29
945                                          eUTRANcellIdentifier_t = 00 07 ab 50 (28 bits)
946                                         tAC_t = 01 02
947                                         broadcastPLMNs_t:
948                                          BroadcastPLMNs_Item_elm = 02 f8 29
949                                         eUTRA_Mode_Info_t:
950                                          fDD_t
951                                           uL_EARFCN_t = 0x1
952                                           dL_EARFCN_t = 0x1
953                                           uL_Transmission_Bandwidth_t = 0x3
954                                           dL_Transmission_Bandwidth_t = 0x3
955                                         iE_Extensions_t:
956                                          ProtocolExtensionContainer_elm
957                                           id_t = 0x4f
958                                           criticality_t = 0x1
959                                           MBMS-Service-Area-Identity-List:
960                                            MBMS_Service_Area_Identity_List_elm = 02 f8
961                                            MBMS_Service_Area_Identity_List_elm = 03 f9
962                                          ProtocolExtensionContainer_elm
963                                           id_t = 0xa0
964                                           criticality_t = 0x1
965                                           FreqBandIndicatorPriority = 0
966                                          ProtocolExtensionContainer_elm
967                                           id_t = 0x54
968                                           criticality_t = 0x1
969                                           MultibandInfoList:
970                                            MultibandInfoList_elm
971                                             freqBandIndicator_t = 0x1
972                                            MultibandInfoList_elm
973                                             freqBandIndicator_t = 0x2
974                                            MultibandInfoList_elm
975                                             freqBandIndicator_t = 0x3
976                         */
977                         packedPdu: "20060044000002001500080002f82900007a8000140031000800630002f8290007ab50102002f8290000010001330002004f40050102f803f900a040010000544006200000010002"},
978                 {key: &entities.GlobalNbId{PlmnId: "02f829", NbId: "007a80"},
979                         enb: "CONNECTED MACRO_ENB [pci:99  cell_id:\"02f829:0007ab50\"  tac:\"0102\"  broadcast_plmns:\"02f829\"  choice_eutra_mode:{fdd:{ulear_fcn:1  dlear_fcn:1  ul_transmission_bandwidth:BW50  dl_transmission_bandwidth:BW50}}  eutra_mode:FDD  neighbour_infos:{ecgi:\"02f829:0007ab50\"  pci:99  ear_fcn:1}  neighbour_infos:{ecgi:\"03f930:0008bc50\"  pci:100  ear_fcn:2}] []",
980                         /*
981                                 X2AP-PDU:
982                                  successfulOutcome_t
983                                   procedureCode_t = 0x6
984                                   criticality_t = 0
985                                   X2SetupResponse
986                                    protocolIEs_t:
987                                     ProtocolIE_Container_elm
988                                      id_t = 0x15
989                                      criticality_t = 0
990                                      GlobalENB-ID
991                                       pLMN_Identity_t = 02 f8 29
992                                       eNB_ID_t:
993                                        macro_eNB_ID_t = 00 7a 80 (20 bits)
994                                     ProtocolIE_Container_elm
995                                      id_t = 0x14
996                                      criticality_t = 0
997                                      ServedCells:
998                                       ServedCells_elm
999                                        servedCellInfo_t
1000                                         pCI_t = 0x63
1001                                         cellId_t
1002                                          pLMN_Identity_t = 02 f8 29
1003                                          eUTRANcellIdentifier_t = 00 07 ab 50 (28 bits)
1004                                         tAC_t = 01 02
1005                                         broadcastPLMNs_t:
1006                                          BroadcastPLMNs_Item_elm = 02 f8 29
1007                                         eUTRA_Mode_Info_t:
1008                                          fDD_t
1009                                           uL_EARFCN_t = 0x1
1010                                           dL_EARFCN_t = 0x1
1011                                           uL_Transmission_Bandwidth_t = 0x3
1012                                           dL_Transmission_Bandwidth_t = 0x3
1013                                        neighbour_Info_t:
1014                                         Neighbour_Information_elm
1015                                          eCGI_t
1016                                           pLMN_Identity_t = 02 f8 29
1017                                           eUTRANcellIdentifier_t = 00 07 ab 50 (28 bits)
1018                                          pCI_t = 0x63
1019                                          eARFCN_t = 0x1
1020                                         Neighbour_Information_elm
1021                                          eCGI_t
1022                                           pLMN_Identity_t = 03 f9 30
1023                                           eUTRANcellIdentifier_t = 00 08 bc 50 (28 bits)
1024                                          pCI_t = 0x64
1025                                          eARFCN_t = 0x2
1026                         */
1027                         packedPdu: "20060044000002001500080002f82900007a8000140031004000630002f8290007ab50102002f82900000100013300020002f8290007ab50006300010003f9300008bc5000640002"},
1028
1029                 {key: &entities.GlobalNbId{PlmnId: "02f829", NbId: "007a80"},
1030                         enb: "CONNECTED MACRO_ENB [pci:99 cell_id:\"02f829:0007ab50\" tac:\"0102\" broadcast_plmns:\"02f829\" choice_eutra_mode:{fdd:{ulear_fcn:1 dlear_fcn:1 ul_transmission_bandwidth:BW50 dl_transmission_bandwidth:BW50}} eutra_mode:FDD neighbour_infos:{ecgi:\"02f829:0007ab50\" pci:99 ear_fcn:1 tac:\"0102\"} neighbour_infos:{ecgi:\"03f930:0008bc50\" pci:100 ear_fcn:3}] []",
1031                         /*
1032                                 X2AP-PDU:
1033                                  successfulOutcome_t
1034                                   procedureCode_t = 0x6
1035                                   criticality_t = 0
1036                                   X2SetupResponse
1037                                    protocolIEs_t:
1038                                     ProtocolIE_Container_elm
1039                                      id_t = 0x15
1040                                      criticality_t = 0
1041                                      GlobalENB-ID
1042                                       pLMN_Identity_t = 02 f8 29
1043                                       eNB_ID_t:
1044                                        macro_eNB_ID_t = 00 7a 80 (20 bits)
1045                                     ProtocolIE_Container_elm
1046                                      id_t = 0x14
1047                                      criticality_t = 0
1048                                      ServedCells:
1049                                       ServedCells_elm
1050                                        servedCellInfo_t
1051                                         pCI_t = 0x63
1052                                         cellId_t
1053                                          pLMN_Identity_t = 02 f8 29
1054                                          eUTRANcellIdentifier_t = 00 07 ab 50 (28 bits)
1055                                         tAC_t = 01 02
1056                                         broadcastPLMNs_t:
1057                                          BroadcastPLMNs_Item_elm = 02 f8 29
1058                                         eUTRA_Mode_Info_t:
1059                                          fDD_t
1060                                           uL_EARFCN_t = 0x1
1061                                           dL_EARFCN_t = 0x1
1062                                           uL_Transmission_Bandwidth_t = 0x3
1063                                           dL_Transmission_Bandwidth_t = 0x3
1064                                        neighbour_Info_t:
1065                                         Neighbour_Information_elm
1066                                          eCGI_t
1067                                           pLMN_Identity_t = 02 f8 29
1068                                           eUTRANcellIdentifier_t = 00 07 ab 50 (28 bits)
1069                                          pCI_t = 0x63
1070                                          eARFCN_t = 0x1
1071                                          iE_Extensions_t:
1072                                           ProtocolExtensionContainer_elm
1073                                            id_t = 0x4c
1074                                            criticality_t = 0x1
1075                                            TAC = 01 02
1076                                         Neighbour_Information_elm
1077                                          eCGI_t
1078                                           pLMN_Identity_t = 03 f9 30
1079                                           eUTRANcellIdentifier_t = 00 08 bc 50 (28 bits)
1080                                          pCI_t = 0x64
1081                                          eARFCN_t = 0x2
1082                                          iE_Extensions_t:
1083                                           ProtocolExtensionContainer_elm
1084                                            id_t = 0x5e
1085                                            criticality_t = 0
1086                                            EARFCNExtension = 0x3
1087                         */
1088                         packedPdu: "20060055000002001500080002f82900007a8000140042004000630002f8290007ab50102002f82900000100013300024002f8290007ab50006300010000004c400201024003f9300008bc50006400020000005e0003800103"},
1089
1090                 {key: &entities.GlobalNbId{PlmnId: "02f829", NbId: "007a80"},
1091                         enb: "CONNECTED MACRO_ENB [pci:99  cell_id:\"02f829:0007ab50\"  tac:\"0102\"  broadcast_plmns:\"02f829\"  choice_eutra_mode:{fdd:{ulear_fcn:1  dlear_fcn:1  ul_transmission_bandwidth:BW50  dl_transmission_bandwidth:BW50}}  eutra_mode:FDD  neighbour_infos:{ecgi:\"02f829:0007ab50\"  pci:99  ear_fcn:1  tac:\"0102\"}  neighbour_infos:{ecgi:\"03f930:0008bc50\"  pci:100  ear_fcn:3}] []",
1092                         /*
1093                                 X2AP-PDU:
1094                                  successfulOutcome_t
1095                                   procedureCode_t = 0x6
1096                                   criticality_t = 0
1097                                   X2SetupResponse
1098                                    protocolIEs_t:
1099                                     ProtocolIE_Container_elm
1100                                      id_t = 0x15
1101                                      criticality_t = 0
1102                                      GlobalENB-ID
1103                                       pLMN_Identity_t = 02 f8 29
1104                                       eNB_ID_t:
1105                                        macro_eNB_ID_t = 00 7a 80 (20 bits)
1106                                     ProtocolIE_Container_elm
1107                                      id_t = 0x14
1108                                      criticality_t = 0
1109                                      ServedCells:
1110                                       ServedCells_elm
1111                                        servedCellInfo_t
1112                                         pCI_t = 0x63
1113                                         cellId_t
1114                                          pLMN_Identity_t = 02 f8 29
1115                                          eUTRANcellIdentifier_t = 00 07 ab 50 (28 bits)
1116                                         tAC_t = 01 02
1117                                         broadcastPLMNs_t:
1118                                          BroadcastPLMNs_Item_elm = 02 f8 29
1119                                         eUTRA_Mode_Info_t:
1120                                          fDD_t
1121                                           uL_EARFCN_t = 0x1
1122                                           dL_EARFCN_t = 0x1
1123                                           uL_Transmission_Bandwidth_t = 0x3
1124                                           dL_Transmission_Bandwidth_t = 0x3
1125                                        neighbour_Info_t:
1126                                         Neighbour_Information_elm
1127                                          eCGI_t
1128                                           pLMN_Identity_t = 02 f8 29
1129                                           eUTRANcellIdentifier_t = 00 07 ab 50 (28 bits)
1130                                          pCI_t = 0x63
1131                                          eARFCN_t = 0x1
1132                                          iE_Extensions_t:
1133                                           ProtocolExtensionContainer_elm
1134                                            id_t = 0x4c
1135                                            criticality_t = 0x1
1136                                            TAC = 01 02
1137                                         Neighbour_Information_elm
1138                                          eCGI_t
1139                                           pLMN_Identity_t = 03 f9 30
1140                                           eUTRANcellIdentifier_t = 00 08 bc 50 (28 bits)
1141                                          pCI_t = 0x64
1142                                          eARFCN_t = 0x2
1143                                          iE_Extensions_t:
1144                                           ProtocolExtensionContainer_elm
1145                                            id_t = 0x5e
1146                                            criticality_t = 0
1147                                            EARFCNExtension = 0x3
1148                         */
1149                         packedPdu: "20060055000002001500080002f82900007a8000140042004000630002f8290007ab50102002f82900000100013300024002f8290007ab50006300010000004c400201024003f9300008bc50006400020000005e0003800103",
1150                         /*failure: fmt.Errorf("getAtom for path [successfulOutcome_t X2SetupResponse protocolIEs_t ProtocolIE_Container_elm GlobalENB-ID pLMN_Identity_t] failed, rc = 2" /NO_SPACE_LEFT),*/},
1151         }
1152
1153         converter := NewX2SetupResponseConverter(logger)
1154
1155         for _, tc := range testCases {
1156                 t.Run(tc.packedPdu, func(t *testing.T) {
1157
1158                         var payload []byte
1159                         _, err := fmt.Sscanf(tc.packedPdu, "%x", &payload)
1160                         if err != nil {
1161                                 t.Errorf("convert inputPayloadAsStr to payloadAsByte. Error: %v\n", err)
1162                         }
1163
1164                         key, enb, err := converter.UnpackX2SetupResponseAndExtract(payload)
1165
1166                         if err != nil {
1167                                 if tc.failure == nil {
1168                                         t.Errorf("want: success, got: error: %v\n", err)
1169                                 } else {
1170                                         if strings.Compare(err.Error(), tc.failure.Error()) != 0 {
1171                                                 t.Errorf("want: %s, got: %s", tc.failure, err)
1172                                         }
1173                                 }
1174                         }
1175
1176                         if key == nil {
1177                                 if tc.failure == nil {
1178                                         t.Errorf("want: key=%v, got: empty key", tc.key)
1179                                 }
1180                         } else {
1181                                 if strings.Compare(key.PlmnId, tc.key.PlmnId) != 0 || strings.Compare(key.NbId, tc.key.NbId) != 0 {
1182                                         t.Errorf("want: key=%s, got: %s", tc.key, key)
1183                                 }
1184                         }
1185
1186                         if enb == nil {
1187                                 if tc.failure == nil {
1188                                         t.Errorf("want: enb=%s, got: empty enb", tc.enb)
1189                                 }
1190                         } else {
1191                                 nb := &entities.NodebInfo{}
1192                                 nb.ConnectionStatus = entities.ConnectionStatus_CONNECTED
1193                                 nb.Configuration = &entities.NodebInfo_Enb{Enb: enb}
1194                                 embStr := fmt.Sprintf("%s %s %s %s", nb.ConnectionStatus, enb.EnbType, enb.ServedCells, enb.GuGroupIds)
1195
1196                                 space := regexp.MustCompile(`\s+`)
1197                                 s1 := space.ReplaceAllString(embStr, " ")
1198                                 s2 := space.ReplaceAllString(tc.enb," ")
1199
1200
1201
1202                                 if !strings.EqualFold(s1, s2) {
1203                                         t.Errorf("want: enb=%s, got: %s", tc.enb, embStr)
1204                                 }
1205                         }
1206                 })
1207         }
1208 }