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