• Kirill Smelkov's avatar
    software/ors-amarisoft: enb: Start to generalize the code to handle multiple peer cells · a9101bd9
    Kirill Smelkov authored
    As with Radio Units and cells organize a registry of peer cells and start to handle
    that registry generally everywhere. The registry is still populated with only
    LTE cells on enb and only NR cells on gnb, but the only place that is aware of
    that is registry loading routine.
    
    In the old code defaults were noticed for tac to be 1 if not provided, and so
    those defaults are pushed to live in ORS now. ORS schemas are also updated
    because that defaults were not declared there.
    
    Generic switches to use peer/cell/lte directly which means that now it accepts
    e_cell_id instead of cell_id as the name for full E-UTRAN cell identity. Full
    backward compatibility is provided for ORS which implements translation of its
    original schema to the new generic one.
    
    Tests will be added later as full tests for generic MultiRU.
    
    Rendered enb.cfg and gnb.cfg change a bit, but the changes are mostly due to
    reordering of fields. The only change with semantic value is
    
        -          ssb_nr_arfcn: ,
        +          ssb_nr_arfcn: 520090,
    
    in gnb.cfg .
    
    The old configuration was invalid anyway because if it is only
    
                  ssb_nr_arfcn: ,
    
    then enb does not start with the following error:
    
        # ../lteenb gnb.cfg
        gnb.cfg:119: unexpected token: ','
    
    Like with many other handover-related fields
    https://tech-academy.amarisoft.com/lteenb.doc#prop.ncell_list.ssb_nr_arfcn
    documents that ssb_nr_arfcn "Must be present" for Inter-gNB HO case. The old
    code was erroneously doing `ncell.get(name, '')` with yielding empty string in
    case a parameter is missing, which is corrected here.
    
    --------
    
    Appendix. Diff for rendered enb.cfg and gnb.cfg before and after this patch:
    
    ```
    $ ./pythonwitheggs slapos-render-config.py && xdiff -w config/{old,out}
    ```
    
    ```diff
    diff --git a/config/old/enb.cfg b/config/out/enb.cfg
    index 1a2c41b6b..252c2e379 100644
    --- a/config/old/enb.cfg
    +++ b/config/out/enb.cfg
    @@ -46,9 +46,9 @@
             // Inter-ENB HO
             {
               rat:          "eutra",
    +          cell_id:      0x12345,  // -> 1
               n_id_cell:    35,
               dl_earfcn:    700,
    -          cell_id:      0x12345,
               tac:          123,
             },
           ],
    diff --git a/config/old/gnb.cfg b/config/out/gnb.cfg
    index 635c4baf2..b401f3513 100644
    --- a/config/old/gnb.cfg
    +++ b/config/out/gnb.cfg
    @@ -58,14 +58,14 @@
             // Inter-ENB HO
             {
               rat:          "nr",
    +          nr_cell_id:   0x77712, // -> 1
    +          gnb_id_bits:  22,
    +          n_id_cell:    75,
               dl_nr_arfcn:  520000,
    -          ssb_nr_arfcn: ,
    +          band:         38,
    +          ssb_nr_arfcn: 520090,
               ul_nr_arfcn:  520000,
    -          n_id_cell:    75,
    -          gnb_id_bits:  22,
    -          nr_cell_id:   0x77712,
               tac:          321,
    -          band:         38,
               ssb_subcarrier_spacing: 30,
               ssb_period: 20,
               ssb_offset: 0,
    ```
    a9101bd9
instance-ors-enb-input-schema.json 5.51 KB