Wei-Yu Chen | ad55cb8 | 2022-02-15 20:07:01 +0800 | [diff] [blame] | 1 | # SPDX-FileCopyrightText: 2020 The Magma Authors. |
| 2 | # SPDX-FileCopyrightText: 2022 Open Networking Foundation <support@opennetworking.org> |
| 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
Wei-Yu Chen | 49950b9 | 2021-11-08 19:19:18 +0800 | [diff] [blame] | 5 | |
| 6 | class ParameterName(): |
| 7 | # Top-level objects |
| 8 | DEVICE = 'Device' |
| 9 | FAP_SERVICE = 'FAPService' |
| 10 | |
| 11 | # Device info parameters |
Wei-Yu Chen | b91af85 | 2022-03-15 22:24:49 +0800 | [diff] [blame] | 12 | GPS_STATUS = 'gps_status' |
Wei-Yu Chen | 49950b9 | 2021-11-08 19:19:18 +0800 | [diff] [blame] | 13 | PTP_STATUS = 'PTP status' |
| 14 | MME_STATUS = 'MME status' |
| 15 | REM_STATUS = 'REM status' |
| 16 | |
| 17 | LOCAL_GATEWAY_ENABLE = 'Local gateway enable' |
| 18 | GPS_ENABLE = 'GPS enable' |
| 19 | GPS_LAT = 'GPS lat' |
| 20 | GPS_LONG = 'GPS long' |
| 21 | SW_VERSION = 'SW version' |
| 22 | |
| 23 | SERIAL_NUMBER = 'Serial number' |
Wei-Yu Chen | 8d06416 | 2022-05-27 21:06:55 +0800 | [diff] [blame] | 24 | CELL_ID = 'cell_id' |
Wei-Yu Chen | 678f0a5 | 2021-12-21 13:50:52 +0800 | [diff] [blame] | 25 | IP_ADDRESS = "ip_address" |
Wei-Yu Chen | 49950b9 | 2021-11-08 19:19:18 +0800 | [diff] [blame] | 26 | |
| 27 | # Capabilities |
| 28 | DUPLEX_MODE_CAPABILITY = 'Duplex mode capability' |
| 29 | BAND_CAPABILITY = 'Band capability' |
| 30 | |
| 31 | # RF-related parameters |
Wei-Yu Chen | b91af85 | 2022-03-15 22:24:49 +0800 | [diff] [blame] | 32 | EARFCNDL = 'earfcn_downlink1' |
| 33 | EARFCNUL = 'earfcn_uplink1' |
| 34 | EARFCNDL2 = 'earfcn_downlink2' |
| 35 | EARFCNUL2 = 'earfcn_uplink2' |
| 36 | EARFCNDL_LIST = 'earfcn_downlink_list' |
| 37 | EARFCNUL_LIST = 'earfcn_uplink_list' |
Wei-Yu Chen | 678f0a5 | 2021-12-21 13:50:52 +0800 | [diff] [blame] | 38 | |
Wei-Yu Chen | b91af85 | 2022-03-15 22:24:49 +0800 | [diff] [blame] | 39 | FREQ_BAND_1 = "frequency_band_1" |
| 40 | FREQ_BAND_2 = "frequency_band_2" |
Wei-Yu Chen | 8d06416 | 2022-05-27 21:06:55 +0800 | [diff] [blame] | 41 | FREQ_BAND_LIST = "frequency_band_list" |
Wei-Yu Chen | 678f0a5 | 2021-12-21 13:50:52 +0800 | [diff] [blame] | 42 | |
Wei-Yu Chen | 49950b9 | 2021-11-08 19:19:18 +0800 | [diff] [blame] | 43 | BAND = 'Band' |
Wei-Yu Chen | 8d06416 | 2022-05-27 21:06:55 +0800 | [diff] [blame] | 44 | PCI_LIST = 'pci_list' |
| 45 | PCI1 = 'pci1' |
| 46 | PCI2 = 'pci2' |
Wei-Yu Chen | b91af85 | 2022-03-15 22:24:49 +0800 | [diff] [blame] | 47 | DL_BANDWIDTH = 'downlink_bandwidth' |
| 48 | UL_BANDWIDTH = 'uplink_bandwidth' |
Wei-Yu Chen | 678f0a5 | 2021-12-21 13:50:52 +0800 | [diff] [blame] | 49 | TX_POWER = "tx_power" |
| 50 | TUNNEL_TYPE = "tunnel_type" |
| 51 | |
| 52 | # Radio Resource Management (RRM) parameters |
| 53 | CARRIER_AGG_ENABLE = "carrier_agg_enable" |
| 54 | CARRIER_NUMBER = "carrier_number" |
Wei-Yu Chen | b91af85 | 2022-03-15 22:24:49 +0800 | [diff] [blame] | 55 | CONTIGUOUS_CC = "is_ca_frequency_contiguous" |
Wei-Yu Chen | 49950b9 | 2021-11-08 19:19:18 +0800 | [diff] [blame] | 56 | |
| 57 | # Other LTE parameters |
Wei-Yu Chen | b91af85 | 2022-03-15 22:24:49 +0800 | [diff] [blame] | 58 | ADMIN_STATE = 'admin_state' |
Wei-Yu Chen | 49950b9 | 2021-11-08 19:19:18 +0800 | [diff] [blame] | 59 | OP_STATE = 'Opstate' |
| 60 | RF_TX_STATUS = 'RF TX status' |
| 61 | |
| 62 | # RAN parameters |
| 63 | CELL_RESERVED = 'Cell reserved' |
| 64 | CELL_BARRED = 'Cell barred' |
Wei-Yu Chen | b91af85 | 2022-03-15 22:24:49 +0800 | [diff] [blame] | 65 | PRIM_SOURCE = "primary_source" |
Wei-Yu Chen | 49950b9 | 2021-11-08 19:19:18 +0800 | [diff] [blame] | 66 | |
Wei-Yu Chen | ad55cb8 | 2022-02-15 20:07:01 +0800 | [diff] [blame] | 67 | # Cell parameters |
Wei-Yu Chen | b91af85 | 2022-03-15 22:24:49 +0800 | [diff] [blame] | 68 | CELL_ENABLE64QAM = "enable64qam" |
Wei-Yu Chen | 8d06416 | 2022-05-27 21:06:55 +0800 | [diff] [blame] | 69 | SPECIAL_SUBFRAME_PATTERN = 'special_subframe_pattern' |
Wei-Yu Chen | ad55cb8 | 2022-02-15 20:07:01 +0800 | [diff] [blame] | 70 | SUBFRAME_ASSIGNMENT = 'subframe_assignment' |
| 71 | |
Wei-Yu Chen | 49950b9 | 2021-11-08 19:19:18 +0800 | [diff] [blame] | 72 | # Core network parameters |
Wei-Yu Chen | 8d06416 | 2022-05-27 21:06:55 +0800 | [diff] [blame] | 73 | MME_ADDRESS = 'mme_address' |
| 74 | MME_PORT = 'mme_port' |
Wei-Yu Chen | 49950b9 | 2021-11-08 19:19:18 +0800 | [diff] [blame] | 75 | NUM_PLMNS = 'Num PLMNs' |
| 76 | PLMN = 'PLMN' |
Wei-Yu Chen | 8d06416 | 2022-05-27 21:06:55 +0800 | [diff] [blame] | 77 | PLMN_LIST = 'plmn_list' |
Wei-Yu Chen | 49950b9 | 2021-11-08 19:19:18 +0800 | [diff] [blame] | 78 | |
| 79 | # PLMN parameters |
| 80 | PLMN_N = 'PLMN %d' |
| 81 | PLMN_N_CELL_RESERVED = 'PLMN %d cell reserved' |
| 82 | PLMN_N_ENABLE = 'PLMN %d enable' |
| 83 | PLMN_N_PRIMARY = 'PLMN %d primary' |
| 84 | PLMN_N_PLMNID = 'PLMN %d PLMNID' |
| 85 | |
| 86 | # PLMN arrays are added below |
Wei-Yu Chen | 8d06416 | 2022-05-27 21:06:55 +0800 | [diff] [blame] | 87 | TAC1 = 'tac1' |
Wei-Yu Chen | 678f0a5 | 2021-12-21 13:50:52 +0800 | [diff] [blame] | 88 | TAC2 = 'tac2' |
Wei-Yu Chen | b91af85 | 2022-03-15 22:24:49 +0800 | [diff] [blame] | 89 | IP_SEC_ENABLE = 'ipsec_enable' |
| 90 | MME_POOL_ENABLE = 'mme_pool_enable' |
Wei-Yu Chen | 49950b9 | 2021-11-08 19:19:18 +0800 | [diff] [blame] | 91 | |
| 92 | # Management server parameters |
Wei-Yu Chen | b91af85 | 2022-03-15 22:24:49 +0800 | [diff] [blame] | 93 | PERIODIC_INFORM_ENABLE = 'periodic_inform_enable' |
| 94 | PERIODIC_INFORM_INTERVAL = 'periodic_inform_interval' |
| 95 | CWMP_ENABLE = "cwmp_enable" |
Wei-Yu Chen | 49950b9 | 2021-11-08 19:19:18 +0800 | [diff] [blame] | 96 | |
| 97 | # Performance management parameters |
Wei-Yu Chen | b91af85 | 2022-03-15 22:24:49 +0800 | [diff] [blame] | 98 | PERF_MGMT_ENABLE = 'perf_mgmt_enable' |
| 99 | PERF_MGMT_UPLOAD_INTERVAL = 'perf_mgmt_upload_interval' |
| 100 | PERF_MGMT_UPLOAD_URL = 'perf_mgmt_upload_url' |
| 101 | PERF_MGMT_USER = 'perf_mgmt_username' |
| 102 | PERF_MGMT_PASSWORD = 'perf_mgmt_password' |
Wei-Yu Chen | 49950b9 | 2021-11-08 19:19:18 +0800 | [diff] [blame] | 103 | |
Wei-Yu Chen | b91af85 | 2022-03-15 22:24:49 +0800 | [diff] [blame] | 104 | SAS_ENABLE = "sas_enable" |
Wei-Yu Chen | 678f0a5 | 2021-12-21 13:50:52 +0800 | [diff] [blame] | 105 | SAS_SERVER_URL = "sas_server_url" |
| 106 | SAS_UID = "sas_uid" |
| 107 | SAS_CATEGORY = "sas_category" |
| 108 | SAS_CHANNEL_TYPE = "sas_channel_type" |
| 109 | SAS_CERT_SUBJECT = "sas_cert_subject" |
| 110 | SAS_IC_GROUP_ID = "sas_icg_group_id" |
| 111 | SAS_LOCATION = "sas_location" |
| 112 | SAS_HEIGHT_TYPE = "sas_height_type" |
| 113 | SAS_FCCID = "sas_fccid" |
| 114 | SAS_MEAS_CAPS = "sas_measure_capability" |
Wei-Yu Chen | b91af85 | 2022-03-15 22:24:49 +0800 | [diff] [blame] | 115 | SAS_MANU_ENABLE = "manufacturer_prefix_enable" |
Wei-Yu Chen | 678f0a5 | 2021-12-21 13:50:52 +0800 | [diff] [blame] | 116 | |
Wei-Yu Chen | b91af85 | 2022-03-15 22:24:49 +0800 | [diff] [blame] | 117 | SAS_CPI_ENABLE = "cpi_enable" |
Wei-Yu Chen | 678f0a5 | 2021-12-21 13:50:52 +0800 | [diff] [blame] | 118 | SAS_CPI_IPE = "sas_cpi_ipe" |
| 119 | SAS_CPI_NAME = "sas_cpi_name" |
| 120 | SAS_CPI_ID = "sas_cpi_id" |
| 121 | SAS_CPI_DATA = "sas_cpi_signature_data" |
| 122 | SAS_ANTA_AZIMUTH = "sas_antenna_azimuth" |
| 123 | SAS_ANTA_DOWNTILT = "sas_antenna_downtilt" |
| 124 | SAS_ANTA_GAIN = "sas_antenna_gain" |
| 125 | SAS_ANTA_BEAMWIDTH = "sas_antenna_beamwidth" |
| 126 | |
| 127 | FIRMWARE_VERSION = "firmware_version" |
| 128 | FIRMWARE_URL = "firmware_url" |
| 129 | FIRMWARE_SIZE = "firmware_size" |
| 130 | |
Wei-Yu Chen | 8d06416 | 2022-05-27 21:06:55 +0800 | [diff] [blame] | 131 | @classmethod |
| 132 | def all_paramters(cls): |
| 133 | """ Return all possible parameter in the structure """ |
| 134 | ret_dict = dict() |
| 135 | for item in filter(lambda x: x[:2] != "__", cls.__dict__.keys()): |
| 136 | if not callable(getattr(cls, item)): |
| 137 | # The return format is a reversed dictionary |
| 138 | # {'cell_id': 'CELL_ID', ...} |
| 139 | ret_dict[getattr(cls, item)] = item |
| 140 | |
| 141 | return ret_dict |
| 142 | |
| 143 | |
Wei-Yu Chen | 49950b9 | 2021-11-08 19:19:18 +0800 | [diff] [blame] | 144 | |
| 145 | class TrParameterType(): |
| 146 | BOOLEAN = 'boolean' |
| 147 | STRING = 'string' |
| 148 | INT = 'int' |
| 149 | UNSIGNED_INT = 'unsignedInt' |
| 150 | OBJECT = 'object' |