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