Index: leahi_dialin/common/alarm_defs.py =================================================================== diff -u -rbe799e12803dba3054ff893b68f8b79a9dde440b -re9dfb2412b14f3d28824cb3e37c364b8194bb24e --- leahi_dialin/common/alarm_defs.py (.../alarm_defs.py) (revision be799e12803dba3054ff893b68f8b79a9dde440b) +++ leahi_dialin/common/alarm_defs.py (.../alarm_defs.py) (revision e9dfb2412b14f3d28824cb3e37c364b8194bb24e) @@ -8,7 +8,7 @@ # @file alarm_defs.py # # @author (last) Enum Updater Script -# @date (last) 05-Aug-2026 +# @date (last) 11-Aug-2026 # @author (original) Zoltan Miskolci # @date (original) 31-Jul-2026 # @@ -262,4 +262,66 @@ ALARM_ID_DD_NVM_INVALID_INSTIT_BASIC_RECORD_CRC = 236 # DD invalid basic institutional record ALARM_ID_DD_NVM_INVALID_INSTIT_ADVANCED_RECORD_CRC = 237 # DD invalid advanced institutional record ALARM_ID_DD_NVM_INVALID_INSTIT_ADDITIONAL_RECORD_CRC = 238 # DD invalid additional institutional record - NUM_OF_ALARM_IDS = 239 # Number of alarms + ALARM_ID_FP_NVM_INVALID_SERVICE_RECORD_CRC = 239 # FP invalid serivice record + ALARM_ID_FP_NVM_INVALID_USAGE_RECORD_CRC = 240 # FP invalid usage record + ALARM_ID_FW_RESERVED_241 = 241 # FW reserved for use + ALARM_ID_FW_RESERVED_242 = 242 # FW reserved for use + ALARM_ID_FW_RESERVED_243 = 243 # FW reserved for use + ALARM_ID_FW_RESERVED_244 = 244 # FW reserved for use + ALARM_ID_FW_RESERVED_245 = 245 # FW reserved for use + ALARM_ID_FW_RESERVED_246 = 246 # FW reserved for use + ALARM_ID_FW_RESERVED_247 = 247 # FW reserved for use + ALARM_ID_FW_RESERVED_248 = 248 # FW reserved for use + ALARM_ID_FW_RESERVED_249 = 249 # FW reserved for use + ALARM_ID_FW_RESERVED_250 = 250 # FW reserved for use + ALARM_ID_FW_RESERVED_251 = 251 # FW reserved for use + ALARM_ID_FW_RESERVED_252 = 252 # FW reserved for use + ALARM_ID_FW_RESERVED_253 = 253 # FW reserved for use + ALARM_ID_FW_RESERVED_254 = 254 # FW reserved for use + ALARM_ID_FW_RESERVED_255 = 255 # FW reserved for use + ALARM_ID_FW_RESERVED_256 = 256 # FW reserved for use + ALARM_ID_FW_RESERVED_257 = 257 # FW reserved for use + ALARM_ID_FW_RESERVED_258 = 258 # FW reserved for use + ALARM_ID_FW_RESERVED_259 = 259 # FW reserved for use + ALARM_ID_FW_RESERVED_260 = 260 # FW reserved for use + ALARM_ID_FW_RESERVED_261 = 261 # FW reserved for use + ALARM_ID_FW_RESERVED_262 = 262 # FW reserved for use + ALARM_ID_FW_RESERVED_263 = 263 # FW reserved for use + ALARM_ID_FW_RESERVED_264 = 264 # FW reserved for use + ALARM_ID_FW_RESERVED_265 = 265 # FW reserved for use + ALARM_ID_FW_RESERVED_266 = 266 # FW reserved for use + ALARM_ID_FW_RESERVED_267 = 267 # FW reserved for use + ALARM_ID_FW_RESERVED_268 = 268 # FW reserved for use + ALARM_ID_FW_RESERVED_269 = 269 # FW reserved for use + ALARM_ID_FW_RESERVED_270 = 270 # FW reserved for use + ALARM_ID_FW_RESERVED_271 = 271 # FW reserved for use + ALARM_ID_FW_RESERVED_272 = 272 # FW reserved for use + ALARM_ID_FW_RESERVED_273 = 273 # FW reserved for use + ALARM_ID_FW_RESERVED_274 = 274 # FW reserved for use + ALARM_ID_FW_RESERVED_275 = 275 # FW reserved for use + ALARM_ID_FW_RESERVED_276 = 276 # FW reserved for use + ALARM_ID_FW_RESERVED_277 = 277 # FW reserved for use + ALARM_ID_FW_RESERVED_278 = 278 # FW reserved for use + ALARM_ID_FW_RESERVED_279 = 279 # FW reserved for use + ALARM_ID_FW_RESERVED_280 = 280 # FW reserved for use + ALARM_ID_FW_RESERVED_281 = 281 # FW reserved for use + ALARM_ID_FW_RESERVED_282 = 282 # FW reserved for use + ALARM_ID_FW_RESERVED_283 = 283 # FW reserved for use + ALARM_ID_FW_RESERVED_284 = 284 # FW reserved for use + ALARM_ID_FW_RESERVED_285 = 285 # FW reserved for use + ALARM_ID_FW_RESERVED_286 = 286 # FW reserved for use + ALARM_ID_FW_RESERVED_287 = 287 # FW reserved for use + ALARM_ID_FW_RESERVED_288 = 288 # FW reserved for use + ALARM_ID_FW_RESERVED_289 = 289 # FW reserved for use + ALARM_ID_FW_RESERVED_290 = 290 # FW reserved for use + ALARM_ID_FW_RESERVED_291 = 291 # FW reserved for use + ALARM_ID_FW_RESERVED_292 = 292 # FW reserved for use + ALARM_ID_FW_RESERVED_293 = 293 # FW reserved for use + ALARM_ID_FW_RESERVED_294 = 294 # FW reserved for use + ALARM_ID_FW_RESERVED_295 = 295 # FW reserved for use + ALARM_ID_FW_RESERVED_296 = 296 # FW reserved for use + ALARM_ID_FW_RESERVED_297 = 297 # FW reserved for use + ALARM_ID_FW_RESERVED_298 = 298 # FW reserved for use + ALARM_ID_FW_RESERVED_299 = 299 # FW reserved for use + ALARM_ID_FW_RESERVED_300 = 300 # FW reserved for use + NUM_OF_ALARM_IDS = 301 # Number of alarms Index: leahi_dialin/common/msg_defs.py =================================================================== diff -u -rbe799e12803dba3054ff893b68f8b79a9dde440b -re9dfb2412b14f3d28824cb3e37c364b8194bb24e --- leahi_dialin/common/msg_defs.py (.../msg_defs.py) (revision be799e12803dba3054ff893b68f8b79a9dde440b) +++ leahi_dialin/common/msg_defs.py (.../msg_defs.py) (revision e9dfb2412b14f3d28824cb3e37c364b8194bb24e) @@ -8,7 +8,7 @@ # @file msg_defs.py # # @author (last) Enum Updater Script -# @date (last) 05-Aug-2026 +# @date (last) 11-Aug-2026 # @author (original) Zoltan Miskolci # @date (original) 31-Jul-2026 # Index: leahi_dialin/common/msg_ids.py =================================================================== diff -u -rb7d86216a91c9fbf74af7c6233ed0b6eaf74cd75 -re9dfb2412b14f3d28824cb3e37c364b8194bb24e --- leahi_dialin/common/msg_ids.py (.../msg_ids.py) (revision b7d86216a91c9fbf74af7c6233ed0b6eaf74cd75) +++ leahi_dialin/common/msg_ids.py (.../msg_ids.py) (revision e9dfb2412b14f3d28824cb3e37c364b8194bb24e) @@ -8,7 +8,7 @@ # @file msg_ids.py # # @author (last) Enum Updater Script -# @date (last) 05-Aug-2026 +# @date (last) 11-Aug-2026 # @author (original) Zoltan Miskolci # @date (original) 31-Jul-2026 # @@ -282,6 +282,14 @@ MSG_ID_DD_UI_NVM_GET_CONDUCTIVITY_SENSOR_CAL_RECORD_RESPONSE = 0x13D # DD NVM Get Conductivity Sensor Calibration Record Response MSG_ID_UI_DD_NVM_SET_CONDUCTIVITY_SENSOR_CAL_RECORD_REQUEST = 0x13E # DD NVM Set Conductivity Sensor Calibration Record Request MSG_ID_DD_UI_NVM_SET_CONDUCTIVITY_SENSOR_CAL_RECORD_RESPONSE = 0x13F # DD NVM Set Conductivity Sensor Calibration Record Response + MSG_ID_UI_FP_NVM_GET_SERVICE_RECORD_REQUEST = 0x140 # FP NVM Get Service Record Request + MSG_ID_FP_UI_NVM_GET_SERVICE_RECORD_RESPONSE = 0x141 # FP NVM Get Service Record Response + MSG_ID_UI_FP_NVM_SET_SERVICE_RECORD_REQUEST = 0x142 # FP NVM Set Service Record Request + MSG_ID_FP_UI_NVM_SET_SERVICE_RECORD_RESPONSE = 0x143 # FP NVM Set Service Record Response + MSG_ID_UI_FP_NVM_GET_USAGE_INFO_RECORD_REQUEST = 0x144 # FP NVM Get Usage Info Record Request + MSG_ID_FP_UI_NVM_GET_USAGE_INFO_RECORD_RESPONSE = 0x145 # FP NVM Get Usage Info Record Response + MSG_ID_UI_FP_NVM_SET_USAGE_INFO_RECORD_REQUEST = 0x146 # FP NVM Set Usage Info Record Request + MSG_ID_FP_UI_NVM_SET_USAGE_INFO_RECORD_RESPONSE = 0x147 # FP NVM Set Usage Info Record Response MSG_ID_TESTER_LOGIN_REQUEST = 0x8000 # TD tester log-in MSG_ID_TD_SOFTWARE_RESET_REQUEST = 0x8001 # TD reset request Index: leahi_dialin/utils/enum_updater.py =================================================================== diff -u -raf4e5fe9be4be627d61b4b4f75d0ed56c1ce4fa1 -re9dfb2412b14f3d28824cb3e37c364b8194bb24e --- leahi_dialin/utils/enum_updater.py (.../enum_updater.py) (revision af4e5fe9be4be627d61b4b4f75d0ed56c1ce4fa1) +++ leahi_dialin/utils/enum_updater.py (.../enum_updater.py) (revision e9dfb2412b14f3d28824cb3e37c364b8194bb24e) @@ -33,7 +33,12 @@ Read the enums from the C++ file and then update the Python Enum definitions """ - cpp_repo_loc = path.abspath(f'{path.dirname(__file__)}/../../leahi-common') + cpp_repo_loc = path.abspath(f'{path.dirname(__file__)}/../../../leahi-dialin/leahi_common') + if path.exists(cpp_repo_loc) is False: + cpp_repo_loc = path.abspath(f'{path.dirname(__file__)}/../../../leahi-dialin/leahi-common') + + if path.exists(cpp_repo_loc) is False: + return print(f'C++ repo location not found: {cpp_repo_loc}, skipping enum updates!') files_to_check = [] files_to_check.append(f'{cpp_repo_loc}/AlarmDefs.h') files_to_check.append(f'{cpp_repo_loc}/MsgDefs.h') @@ -62,12 +67,13 @@ # Get the enum member list cpp_enum_values = [ item['value'] for item in extracted_cpp_enums[enum_name] ] + cpp_enum_names = [ item['member'] for item in extracted_cpp_enums[enum_name] ] # Add the original Python enum members that are not present in the C++ enum new_enum.extend( item for item in original_py_enums.get(enum_name, []) - if item['value'] not in cpp_enum_values) + if item['value'] not in cpp_enum_values and item['member'] not in cpp_enum_names) # Sort the new enum list by the value to maintain order new_enum.sort(key=lambda x: x['value']) @@ -186,7 +192,11 @@ lines.append('# @date (original) 31-Jul-2026') lines.append('#') lines.append('############################################################################') + lines.append('') + lines.append('# Module import') lines.append('from enum import unique') + lines.append('') + lines.append('# Project import') lines.append(f'from leahi_dialin.utils.enums import {enum_type}') lines.append('') lines.append('')