Skip to content

Commit fb63fe5

Browse files
committed
Update the JS disector data (including PIDs) and add a script to simplify this in future
1 parent 0eaca3d commit fb63fe5

2 files changed

Lines changed: 139 additions & 30 deletions

File tree

js_src/rdm.js

Lines changed: 87 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,14 @@ angular.module('rdmApp', [])
3535
'NR_INVALID_STATIC_CONFIG_TYPE': 0x0010,
3636
'NR_INVALID_IPV4_ADDRESS': 0x0011,
3737
'NR_INVALID_IPV6_ADDRESS': 0x0012,
38-
'NR_INVALID_PORT': 0x0013
38+
'NR_INVALID_PORT': 0x0013,
39+
'NR_DEVICE_ABSENT': 0x0014,
40+
'NR_SENSOR_OUT_OF_RANGE': 0x0015,
41+
'NR_SENSOR_FAULT': 0x0016,
42+
'NR_PACKING_NOT_SUPPORTED': 0x0017,
43+
'NR_ERROR_IN_PACKED_LIST_TRANSACTION': 0x0018,
44+
'NR_PROXY_DROP': 0x0019,
45+
'NR_ALL_CALL_SET_FAIL': 0x0020
3946
},
4047
'PIDS': {
4148
'DISC_UNIQUE_BRANCH': 0x0001,
@@ -44,13 +51,24 @@ angular.module('rdmApp', [])
4451
'PROXIED_DEVICES': 0x0010,
4552
'PROXIED_DEVICE_COUNT': 0x0011,
4653
'COMMS_STATUS': 0x0015,
54+
'TEST_DATA': 0x0016,
55+
'COMMS_STATUS_NSC': 0x0017,
4756
'QUEUED_MESSAGE': 0x0020,
4857
'STATUS_MESSAGES': 0x0030,
4958
'STATUS_ID_DESCRIPTION': 0x0031,
5059
'CLEAR_STATUS_ID': 0x0032,
5160
'SUB_DEVICE_STATUS_REPORT_THRESHOLD': 0x0033,
61+
'QUEUED_MESSAGE_SENSOR_SUBSCRIBE': 0x0034,
5262
'SUPPORTED_PARAMETERS': 0x0050,
5363
'PARAMETER_DESCRIPTION': 0x0051,
64+
'METADATA_PARAMETER_VERSION': 0x0052,
65+
'METADATA_JSON': 0x0053,
66+
'METADATA_JSON_URL': 0x0054,
67+
'SUPPORTED_PARAMETERS_ENHANCED': 0x0055,
68+
'CONTROLLER_FLAG_SUPPORT': 0x0056,
69+
'NACK_DESCRIPTION': 0x0057,
70+
'PACKED_PID_SUB': 0x0058,
71+
'PACKED_PID_INDEX': 0x0059,
5472
'DEVICE_INFO': 0x0060,
5573
'PRODUCT_DETAIL_ID_LIST': 0x0070,
5674
'DEVICE_MODEL_DESCRIPTION': 0x0080,
@@ -62,55 +80,58 @@ angular.module('rdmApp', [])
6280
'SOFTWARE_VERSION_LABEL': 0x00c0,
6381
'BOOT_SOFTWARE_VERSION_ID': 0x00c1,
6482
'BOOT_SOFTWARE_VERSION_LABEL': 0x00c2,
65-
'DMX_PERSONALITY': 0x00E0,
83+
'MANUFACTURER_URL': 0x00d0,
84+
'PRODUCT_URL': 0x00d1,
85+
'FIRMWARE_URL': 0x00d2,
86+
'SERIAL_NUMBER': 0x00d3,
87+
'DEVICE_INFO_OFFSTAGE': 0x00d4,
88+
'DMX_PERSONALITY': 0x00e0,
6689
'DMX_PERSONALITY_DESCRIPTION': 0x00e1,
90+
'DMX_PERSONALITY_ID': 0x00e2,
6791
'DMX_START_ADDRESS': 0x00f0,
6892
'SLOT_INFO': 0x0120,
6993
'SLOT_DESCRIPTION': 0x0121,
7094
'DEFAULT_SLOT_VALUE': 0x0122,
95+
'DMX_BLOCK_ADDRESS': 0x0140,
96+
'DMX_FAIL_MODE': 0x0141,
97+
'DMX_STARTUP_MODE': 0x0142,
7198
'SENSOR_DEFINITION': 0x0200,
7299
'SENSOR_VALUE': 0x0201,
73100
'RECORD_SENSORS': 0x0202,
101+
'SENSOR_TYPE_CUSTOM': 0x0210,
102+
'SENSOR_UNIT_CUSTOM': 0x0211,
103+
'DIMMER_INFO': 0x0340,
104+
'MINIMUM_LEVEL': 0x0341,
105+
'MAXIMUM_LEVEL': 0x0342,
106+
'CURVE': 0x0343,
107+
'CURVE_DESCRIPTION': 0x0344,
108+
'OUTPUT_RESPONSE_TIME': 0x0345,
109+
'OUTPUT_RESPONSE_TIME_DESCRIPTION': 0x0346,
110+
'MODULATION_FREQUENCY': 0x0347,
111+
'MODULATION_FREQUENCY_DESCRIPTION': 0x0348,
74112
'DEVICE_HOURS': 0x0400,
75113
'LAMP_HOURS': 0x0401,
76114
'LAMP_STRIKES': 0x0402,
77115
'LAMP_STATE': 0x0403,
78116
'LAMP_ON_MODE': 0x0404,
79117
'DEVICE_POWER_CYCLES': 0x0405,
118+
'BURN_IN': 0x0440,
80119
'DISPLAY_INVERT': 0x0500,
81120
'DISPLAY_LEVEL': 0x0501,
82121
'PAN_INVERT': 0x0600,
83122
'TILT_INVERT': 0x0601,
84123
'PAN_TILT_SWAP': 0x0602,
85124
'REAL_TIME_CLOCK': 0x0603,
86-
'IDENTIFY_DEVICE': 0x1000,
87-
'RESET_DEVICE': 0x1001,
88-
'POWER_STATE': 0x1010,
89-
'PERFORM_SELFTEST': 0x1020,
90-
'SELF_TEST_DESCRIPTION': 0x1021,
91-
'CAPTURE_PRESET': 0x1030,
92-
'PRESET_PLAYBACK': 0x1031,
93-
'DMX_BLOCK_ADDRESS': 0x0140,
94-
'DMX_FAIL_MODE': 0x0141,
95-
'DMX_STARTUP_MODE': 0x0142,
96-
'DIMMER_INFO': 0x0340,
97-
'MINIMUM_LEVEL': 0x0341,
98-
'MAXIMUM_LEVEL': 0x0342,
99-
'CURVE': 0x0343,
100-
'CURVE_DESCRIPTION': 0x0344,
101-
'OUTPUT_RESPONSE_TIME': 0x0345,
102-
'OUTPUT_RESPONSE_TIME_DESCRIPTION': 0x0346,
103-
'MODULATION_FREQUENCY': 0x0347,
104-
'MODULATION_FREQUENCY_DESCRIPTION': 0x0348,
105-
'BURN_IN': 0x0440,
106125
'LOCK_PIN': 0x0640,
107126
'LOCK_STATE': 0x0641,
108127
'LOCK_STATE_DESCRIPTION': 0x0642,
109-
'IDENTIFY_MODE': 0x1040,
110-
'PRESET_INFO': 0x1041,
111-
'PRESET_STATUS': 0x1042,
112-
'PRESET_MERGEMODE': 0x1043,
113-
'POWER_ON_SELF_TEST': 0x1044,
128+
'SHIPPING_LOCK': 0x0650,
129+
'LIST_TAGS': 0x0651,
130+
'ADD_TAG': 0x0652,
131+
'REMOVE_TAG': 0x0653,
132+
'CHECK_TAG': 0x0654,
133+
'CLEAR_TAGS': 0x0655,
134+
'DEVICE_UNIT_NUMBER': 0x0656,
114135
'LIST_INTERFACES': 0x0700,
115136
'INTERFACE_LABEL': 0x0701,
116137
'INTERFACE_HARDWARE_ADDRESS_TYPE1': 0x0702,
@@ -122,15 +143,51 @@ angular.module('rdmApp', [])
122143
'INTERFACE_RELEASE_DHCP': 0x0708,
123144
'INTERFACE_APPLY_CONFIGURATION': 0x0709,
124145
'IPV4_DEFAULT_ROUTE': 0x070a,
125-
'DNS_NAME_SERVER': 0x070b,
146+
'DNS_IPV4_NAME_SERVER': 0x070b,
126147
'DNS_HOSTNAME': 0x070c,
127-
'DNS_DOMAIN_NAME': 0x070d
148+
'DNS_DOMAIN_NAME': 0x070d,
149+
'COMPONENT_SCOPE': 0x0800,
150+
'SEARCH_DOMAIN': 0x0801,
151+
'TCP_COMMS_STATUS': 0x0802,
152+
'BROKER_STATUS': 0x0803,
153+
'ENDPOINT_LIST': 0x0900,
154+
'ENDPOINT_LIST_CHANGE': 0x0901,
155+
'IDENTIFY_ENDPOINT': 0x0902,
156+
'ENDPOINT_TO_UNIVERSE': 0x0903,
157+
'ENDPOINT_MODE': 0x0904,
158+
'ENDPOINT_LABEL': 0x0905,
159+
'RDM_TRAFFIC_ENABLE': 0x0906,
160+
'DISCOVERY_STATE': 0x0907,
161+
'BACKGROUND_DISCOVERY': 0x0908,
162+
'ENDPOINT_TIMING': 0x0909,
163+
'ENDPOINT_TIMING_DESCRIPTION': 0x090a,
164+
'ENDPOINT_RESPONDERS': 0x090b,
165+
'ENDPOINT_RESPONDER_LIST_CHANGE': 0x090c,
166+
'BINDING_CONTROL_FIELDS': 0x090d,
167+
'BACKGROUND_QUEUED_STATUS_POLICY': 0x090e,
168+
'BACKGROUND_QUEUED_STATUS_POLICY_DESCRIPTION': 0x090f,
169+
'IDENTIFY_DEVICE': 0x1000,
170+
'RESET_DEVICE': 0x1001,
171+
'POWER_STATE': 0x1010,
172+
'PERFORM_SELFTEST': 0x1020,
173+
'SELF_TEST_DESCRIPTION': 0x1021,
174+
'SELFTEST_ENHANCED': 0x1022,
175+
'CAPTURE_PRESET': 0x1030,
176+
'PRESET_PLAYBACK': 0x1031,
177+
'IDENTIFY_MODE': 0x1040,
178+
'PRESET_INFO': 0x1041,
179+
'PRESET_STATUS': 0x1042,
180+
'PRESET_MERGEMODE': 0x1043,
181+
'POWER_ON_SELF_TEST': 0x1044,
182+
'IDENTIFY_TIMEOUT': 0x1050,
183+
'POWER_OFF_READY': 0x1051
128184
},
129185
'RESPONSE_TYPE': {
130186
'ACK': 0,
131187
'ACK_TIMER': 1,
132188
'NACK': 2,
133-
'ACK_OVERFLOW': 3
189+
'ACK_OVERFLOW': 3,
190+
'ACK_TIMER_HI_RES': 4
134191
},
135192
'START_CODE': 0xcc,
136193
'SUB_DEVICE': {

tools/pid_names_to_js.py

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
#!/usr/bin/python
2+
# This program is free software; you can redistribute it and/or modify
3+
# it under the terms of the GNU General Public License as published by
4+
# the Free Software Foundation; either version 2 of the License, or
5+
# (at your option) any later version.
6+
#
7+
# This program is distributed in the hope that it will be useful,
8+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
9+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10+
# GNU Library General Public License for more details.
11+
#
12+
# You should have received a copy of the GNU General Public License
13+
# along with this program; if not, write to the Free Software
14+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
15+
#
16+
# pid_names_to_js.py
17+
# Copyright (C) 2025 Peter Newman
18+
19+
'''Convert rdm-app PID data in Python dict format to JS.'''
20+
21+
__author__ = 'nomis52@gmail.com (Simon Newton)'
22+
23+
import sys
24+
25+
26+
def main():
27+
if len(sys.argv) != 2:
28+
print('Usage: %s <python_pid_file>' % sys.argv[0])
29+
sys.exit()
30+
31+
locals_dict = {}
32+
# Python 2 and 3 compatible version of execfile
33+
exec(open(sys.argv[1]).read(), {}, locals_dict)
34+
raw_esta_pids = locals_dict['ESTA_PIDS']
35+
36+
esta_pids = {}
37+
for pid in raw_esta_pids:
38+
esta_pids[pid['value']] = pid['name']
39+
40+
print(" 'PIDS': {")
41+
42+
for id in sorted(esta_pids):
43+
ending_comma = ","
44+
if id == sorted(esta_pids)[-1]:
45+
ending_comma = ""
46+
print(" '%s': 0x%04x%s" % (esta_pids[id], id, ending_comma))
47+
48+
print(" },")
49+
50+
51+
if __name__ == '__main__':
52+
main()

0 commit comments

Comments
 (0)