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