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