Debian Codegraph @

asusrouter/modules/endpoint/devicemap_const.py

raw
1 """Constants for the devicemap endpoint module."""
2
3 # These values are just stored directly in this order in the corresponding node
4 # Format: (output_group, input_group, [input_values])
5 DEVICEMAP_BY_INDEX = [
6 ("wan", "wan", ["status", "sbstatus", "auxstatus"]),
7 ("wan0", "first_wan", ["status", "sbstatus", "auxstatus"]),
8 ("wan1", "second_wan", ["status", "sbstatus", "auxstatus"]),
9 ("usb", "usb", ["status"]),
10 ]
11
12 # These values are stored as "key=value"
13 # Format: (output_group, input_group, [input_values])
14 DEVICEMAP_BY_KEY = [
15 (
16 "wan",
17 "wan",
18 [
19 "monoClient",
20 "wlc_state",
21 "wlc_sbstate",
22 "wifi_hw_switch",
23 "ddnsRet",
24 "ddnsUpdate",
25 "wan_line_state",
26 "wlan0_radio_flag",
27 "wlan1_radio_flag",
28 "wlan2_radio_flag",
29 "data_rate_info_2g",
30 "data_rate_info_5g",
31 "data_rate_info_5g_2",
32 "wan_diag_state",
33 "active_wan_unit",
34 "wlc0_state",
35 "wlc1_state",
36 "rssi_2g",
37 "rssi_5g",
38 "rssi_5g_2",
39 "link_internet",
40 "wlc2_state",
41 "le_restart_httpd",
42 ],
43 ),
44 (
45 "vpn",
46 "vpn",
47 [
48 "vpnc_proto",
49 "vpnc_state_t",
50 "vpnc_sbstate_t",
51 "vpn_client1_state",
52 "vpn_client2_state",
53 "vpn_client3_state",
54 "vpn_client4_state",
55 "vpn_client5_state",
56 "vpnd_state",
57 "vpn_client1_errno",
58 "vpn_client2_errno",
59 "vpn_client3_errno",
60 "vpn_client4_errno",
61 "vpn_client5_errno",
62 "vpn_server1_state",
63 "vpn_server2_state",
64 ],
65 ),
66 (
67 "sys",
68 "sys",
69 [
70 "uptimeStr",
71 ],
72 ),
73 (
74 "qtn",
75 "qtn",
76 [
77 "qtn_state",
78 ],
79 ),
80 (
81 "usb",
82 "usb",
83 [
84 "modem_enable",
85 ],
86 ),
87 (
88 "wan0",
89 "wan",
90 [
91 "wan0_enable",
92 "wan0_realip_state",
93 "wan0_ipaddr",
94 "wan0_realip_ip",
95 ],
96 ),
97 (
98 "wan1",
99 "wan",
100 [
101 "wan1_enable",
102 "wan1_realip_state",
103 "wan1_ipaddr",
104 "wan1_realip_ip",
105 ],
106 ),
107 (
108 "sim",
109 "sim",
110 [
111 "sim_state",
112 "sim_signal",
113 "sim_operation",
114 "sim_isp",
115 "roaming",
116 "roaming_imsi",
117 "sim_imsi",
118 "g3err_pin",
119 "pin_remaining_count",
120 "modem_act_provider",
121 "rx_bytes",
122 "tx_bytes",
123 "modem_sim_order",
124 ],
125 ),
126 (
127 "dhcp",
128 "dhcp",
129 [
130 "dnsqmode",
131 ],
132 ),
133 (
134 "diag",
135 "diag",
136 [
137 "diag_dblog_enable",
138 "diag_dblog_remaining",
139 ],
140 ),
141 ]
142
143 # This data should be cleared from some symbols
144 # Format: {output_group: {key: value_to_remove}}
145 DEVICEMAP_CLEAR = {
146 "wan": {
147 "data_rate_info_2g": '"',
148 "data_rate_info_5g": '"',
149 "data_rate_info_5g_2": '"',
150 }
151 }
152
153 # This data is stored in a special way
154 # psta:wlc_state=0;wlc_state_auth=0;
155 # as a single value
156 # We need to split it into multiple values and store them in the corresponding
157 # group. Format: (output_group, input_group, input_subgroup, [input_values])
158 # This part is not used in the current version of the library
159 DEVICEMAP_SPECIAL = [
160 ("wan", "wan", "psta", ["wlc_state", "wlc_state_auth"]),
161 ]