enb: Support cells from different ENBs in ncell_list
Change-Id: I1242c56ff42caea06e7f96317def82064fd11325
diff --git a/src/osmo_gsm_tester/obj/enb.py b/src/osmo_gsm_tester/obj/enb.py
index f258b52..cdf9505 100644
--- a/src/osmo_gsm_tester/obj/enb.py
+++ b/src/osmo_gsm_tester/obj/enb.py
@@ -60,7 +60,10 @@
'cell_list[].cell_id': schema.UINT,
'cell_list[].rf_port': schema.UINT,
'cell_list[].pci': schema.UINT,
- 'cell_list[].ncell_list[]': schema.UINT,
+ 'cell_list[].ncell_list[].enb_id': schema.UINT,
+ 'cell_list[].ncell_list[].cell_id': schema.UINT,
+ 'cell_list[].ncell_list[].pci': schema.UINT,
+ 'cell_list[].ncell_list[].dl_earfcn': schema.UINT,
'cell_list[].scell_list[]': schema.UINT,
'cell_list[].dl_earfcn': schema.UINT,
'cell_list[].root_seq_idx': schema.UINT,
diff --git a/src/osmo_gsm_tester/templates/amarisoft_enb.cfg.tmpl b/src/osmo_gsm_tester/templates/amarisoft_enb.cfg.tmpl
index a0f22ff..4c7aa33 100644
--- a/src/osmo_gsm_tester/templates/amarisoft_enb.cfg.tmpl
+++ b/src/osmo_gsm_tester/templates/amarisoft_enb.cfg.tmpl
@@ -77,10 +77,8 @@
root_sequence_index: ${loop.index * 10 + 204}, /* PRACH root sequence index */
ncell_list: [
-%for ncell in enb.cell_list:
-%if ncell.cell_id in cell.ncell_list:
- { n_id_cell: ${ncell.pci}, dl_earfcn: ${ncell.dl_earfcn}, cell_id: ${ncell.cell_id}, tac: 1 },
-%endif
+%for ncell in cell.ncell_list:
+ { n_id_cell: ${ncell.pci}, dl_earfcn: ${ncell.dl_earfcn}, cell_id: ${ncell.cell_id}, tac: 7 },
%endfor
],
diff --git a/src/osmo_gsm_tester/templates/srsenb_rr.conf.tmpl b/src/osmo_gsm_tester/templates/srsenb_rr.conf.tmpl
index ff51bfd..a906df7 100644
--- a/src/osmo_gsm_tester/templates/srsenb_rr.conf.tmpl
+++ b/src/osmo_gsm_tester/templates/srsenb_rr.conf.tmpl
@@ -82,17 +82,13 @@
// Cells available for handover
meas_cell_list =
(
-%for ncell in enb.cell_list:
- <% loop.my_num_items = 0 if loop.index == 0 else loop.my_num_items %>
-%if ncell.cell_id in cell.ncell_list:
- ${',' if loop.my_num_items != 0 else ''}
- <% loop.my_num_items += 1 %>
+%for ncell in cell.ncell_list:
+ ${',' if loop.index != 0 else ''}
{
- eci = ${hex((int(enb.id)<<8) + int(ncell.cell_id))};
+ eci = ${hex((int(ncell.enb_id)<<8) + int(ncell.cell_id))};
dl_earfcn = ${ncell.dl_earfcn};
pci = ${ncell.pci};
}
-%endif
%endfor
);