DavMelchi commited on
Commit
1fc2001
·
1 Parent(s): b333e60

update 2g ciq

Browse files
Files changed (1) hide show
  1. queries/process_ciq_2g.py +93 -2
queries/process_ciq_2g.py CHANGED
@@ -29,6 +29,63 @@ BTS_EXPORT_COLUMNS = [
29
  ]
30
 
31
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  def _normalize_col(col: object) -> str:
33
  return re.sub(r"[^0-9A-Za-z]", "", str(col))
34
 
@@ -579,6 +636,7 @@ def _build_trx_sheet_from_assigned_sites(
579
  "tsc": int(bcc) if not pd.isna(bcc) else None,
580
  "FrequencyBandinUse": int(freq_band),
581
  }
 
582
 
583
  bcch_row = dict(base)
584
  bcch_row["TRX"] = None
@@ -621,10 +679,43 @@ def _build_trx_sheet_from_assigned_sites(
621
  "tsc",
622
  "FrequencyBandinUse",
623
  "initialFrequency",
 
 
 
 
 
624
  ]
625
  for i in range(8):
626
- ordered_cols.append(f"channel{i}Maio")
627
- ordered_cols.append(f"channel{i}Type")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
628
 
629
  df_trx = df_trx.sort_values(
630
  by=["bscid", "bcfId", "btsId", "_sort_type", "_sort_maio"], kind="stable"
 
29
  ]
30
 
31
 
32
+ TRX_STATIC_DEFAULTS = {
33
+ "template_name": "",
34
+ "adminState": 1,
35
+ "lapdLinkNumber": "",
36
+ "lapdLinkName": "",
37
+ "bbUnitSupportsEdge": 1,
38
+ "channel0AdminState": 1,
39
+ "channel0Pcm": 65535,
40
+ "channel0Subslot": 255,
41
+ "channel0Tsl": 255,
42
+ "channel1AdminState": 1,
43
+ "channel1Pcm": 65535,
44
+ "channel1Subslot": 255,
45
+ "channel1Tsl": 255,
46
+ "channel2AdminState": 1,
47
+ "channel2Pcm": 65535,
48
+ "channel2Subslot": 255,
49
+ "channel2Tsl": 255,
50
+ "channel3AdminState": 1,
51
+ "channel3Pcm": 65535,
52
+ "channel3Subslot": 255,
53
+ "channel3Tsl": 255,
54
+ "channel4AdminState": 1,
55
+ "channel4Pcm": 65535,
56
+ "channel4Subslot": 255,
57
+ "channel4Tsl": 255,
58
+ "channel5AdminState": 1,
59
+ "channel5Pcm": 65535,
60
+ "channel5Subslot": 255,
61
+ "channel5Tsl": 255,
62
+ "channel6AdminState": 1,
63
+ "channel6Pcm": 65535,
64
+ "channel6Subslot": 255,
65
+ "channel6Tsl": 255,
66
+ "channel7AdminState": 1,
67
+ "channel7Pcm": 65535,
68
+ "channel7Subslot": 255,
69
+ "channel7Tsl": 255,
70
+ "daPool_ID": 65535,
71
+ "dfcaIndication": 0,
72
+ "directAccessLevel": 0,
73
+ "gprsEnabledTrx": 1,
74
+ "halfRateSupport": 1,
75
+ "mcpaTrxNumber": 1,
76
+ "mcpaTrxPortId": 1,
77
+ "mcpaTrxPosition": 1,
78
+ "numberOfTrxRfPowerLevels": 16,
79
+ "optimumRxLevDL": 0,
80
+ "optimumRxLevUL": 0,
81
+ "preferredBcchMark": 1,
82
+ "subslotsForSignalling": 255,
83
+ "trxAbilities": 1,
84
+ "trxFrequencyType": 0,
85
+ "trxRfPower": 20000,
86
+ }
87
+
88
+
89
  def _normalize_col(col: object) -> str:
90
  return re.sub(r"[^0-9A-Za-z]", "", str(col))
91
 
 
636
  "tsc": int(bcc) if not pd.isna(bcc) else None,
637
  "FrequencyBandinUse": int(freq_band),
638
  }
639
+ base.update(TRX_STATIC_DEFAULTS)
640
 
641
  bcch_row = dict(base)
642
  bcch_row["TRX"] = None
 
679
  "tsc",
680
  "FrequencyBandinUse",
681
  "initialFrequency",
682
+ "template_name",
683
+ "adminState",
684
+ "lapdLinkNumber",
685
+ "lapdLinkName",
686
+ "bbUnitSupportsEdge",
687
  ]
688
  for i in range(8):
689
+ ordered_cols.extend(
690
+ [
691
+ f"channel{i}AdminState",
692
+ f"channel{i}Maio",
693
+ f"channel{i}Pcm",
694
+ f"channel{i}Subslot",
695
+ f"channel{i}Tsl",
696
+ f"channel{i}Type",
697
+ ]
698
+ )
699
+ ordered_cols.extend(
700
+ [
701
+ "daPool_ID",
702
+ "dfcaIndication",
703
+ "directAccessLevel",
704
+ "gprsEnabledTrx",
705
+ "halfRateSupport",
706
+ "mcpaTrxNumber",
707
+ "mcpaTrxPortId",
708
+ "mcpaTrxPosition",
709
+ "numberOfTrxRfPowerLevels",
710
+ "optimumRxLevDL",
711
+ "optimumRxLevUL",
712
+ "preferredBcchMark",
713
+ "subslotsForSignalling",
714
+ "trxAbilities",
715
+ "trxFrequencyType",
716
+ "trxRfPower",
717
+ ]
718
+ )
719
 
720
  df_trx = df_trx.sort_values(
721
  by=["bscid", "bcfId", "btsId", "_sort_type", "_sort_maio"], kind="stable"