########################################################################### # # Copyright (c) 2020-2024 Diality Inc. - All Rights Reserved. # # THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM IN PART OR IN # WHOLE WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. # # @file alarm_defs.py # # @author (last) Vinayakam Mani # @date (last) 10-May-2024 # @author (original) Peter Lucia # @date (original) 07-Aug-2020 # ############################################################################ from enum import unique from ..utils.base import AlarmEnum # Branch: staging @unique class AlarmList(AlarmEnum): ALARM_ID_NO_ALARM = 0 # Indication for when no alarms is a possible situation ALARM_ID_TD_SOFTWARE_FAULT = 1 # TD Software fault. Software found itself in an unexpected state ALARM_ID_DD_SOFTWARE_FAULT = 2 # DD software fault. Software found itself in an unexpected state ALARM_ID_FP_SOFTWARE_FAULT = 3 # FP software fault. Software found itself in an unexpected state ALARM_ID_TD_FPGA_POST_TEST_FAILED = 4 # TD FPGA POST failure ALARM_ID_TD_WATCHDOG_POST_TEST_FAILED = 5 # TD Watchdog POST failure ALARM_ID_TD_UI_COMM_POST_FAILED = 6 # TD UI communication POST failure. UI failed to communicate within a reasonable time after power up ALARM_ID_TD_FPGA_CLOCK_SPEED_CHECK_FAILURE = 7 # TD processor clock speed checks against FPGA clock failure ALARM_ID_TD_FPGA_COMM_TIMEOUT = 8 # TD FPGA communication down for too long ALARM_ID_TD_UI_COMM_TIMEOUT = 9 # TD UI communication timeout ALARM_ID_TD_DD_COMM_TIMEOUT = 10 # TD DD communication timeout ALARM_ID_TD_COMM_TOO_MANY_BAD_CRCS = 11 # TD too many bad communications CRC ALARM_ID_TD_CAN_MESSAGE_NOT_ACKED_BY_UI = 12 # TD didn't get ACK on message to UI that required acknowledgment ALARM_ID_TD_CAN_MESSAGE_NOT_ACKED_BY_DD = 13 # TD didn't get ACK on message to DD that required acknowledgment ALARM_ID_TD_CRITICAL_DATA_ERROR = 14 # TD critical data integrity check failed ALARM_ID_DD_CRITICAL_DATA_ERROR = 15 # DD critical data integrity check failed ALARM_ID_TD_WATCHDOG_EXPIRED = 16 # TD watchdog expired ALARM_ID_DD_WATCHDOG_EXPIRED = 17 # DD watchdog expired ALARM_ID_DD_COMM_TOO_MANY_BAD_CRCS = 18 # DD too many bad communications CRC ALARM_ID_DD_CAN_MESSAGE_NOT_ACKED_BY_FP = 19 # DD didn't get ACK on message to FP that required acknowledgment ALARM_ID_DD_CAN_MESSAGE_NOT_ACKED_BY_TD = 20 # DD didn't get ACK on message to TD that required acknowledgment ALARM_ID_DD_FPGA_POST_TEST_FAILED = 21 # DD FPGA POST failure ALARM_ID_DD_FPGA_CLOCK_SPEED_CHECK_FAILURE = 22 # DD processor clock speed checks against FPGA clock failure ALARM_ID_DD_FPGA_COMM_TIMEOUT = 23 # DD FPGA communication down for too long ALARM_ID_TD_ALARM_AUDIO_SELF_TEST_FAILURE = 24 # TD alarm audio failed POST ALARM_ID_DD_VALVE_CONTROL_FAILURE = 25 # DD FPGA not accepting commanded valve states ALARM_ID_TD_ARTERIAL_SENSOR_TIMEOUT_FAULT = 26 # TD arterial pressure sensor freshness/error timeout fault ALARM_ID_TD_VENOUS_SENSOR_TIMEOUT_FAULT = 27 # TD venous pressure sensor freshness/error timeout fault ALARM_ID_TD_TMP_PRESSURE_LOW = 28 # TD TMP pressure low ALARM_ID_TD_TMP_PRESSURE_HIGH = 29 # TD TMP pressure high ALARM_ID_AVAILABLE_30 = 30 # Available alarms ALARM_ID_AVAILABLE_31 = 31 # Available alarms ALARM_ID_AVAILABLE_32 = 32 # Available alarms ALARM_ID_TD_VOLTAGE_OUT_OF_RANGE = 33 # TD voltage out of range fault ALARM_ID_TD_AC_POWER_LOST = 34 # TD AC power lost ALARM_ID_TD_AC_POWER_LOST_IN_TREATMENT = 35 # TD AC power lost during treatment ALARM_ID_DD_D17_COND_SENSOR_FPGA_FAULT = 36 # DD CD1 conductivity sensor freshness/error timeout fault ALARM_ID_DD_D27_COND_SENSOR_FPGA_FAULT = 37 # DD CD2 conductivity sensor freshness/error timeout fault ALARM_ID_DD_D29_COND_SENSOR_FPGA_FAULT = 38 # DD CD3 conductivity sensor freshness/error timeout fault ALARM_ID_DD_D43_COND_SENSOR_FPGA_FAULT = 39 # DD CD4 conductivity sensor freshness/error timeout fault ALARM_ID_TD_VENOUS_BUBBLE_DETECTED = 40 # TD venous bubble detected ALARM_ID_TD_CARTRIDGE_DOOR_OPENED = 41 # TD front door open ALARM_ID_TD_STUCK_BUTTON_TEST_FAILED = 42 # TD stuck button self test failure ALARM_ID_TD_ARTERIAL_PRESSURE_LOW = 43 # TD arterial pressure low ALARM_ID_TD_ARTERIAL_PRESSURE_HIGH = 44 # TD arterial pressure high ALARM_ID_TD_ARTERIAL_PRESSURE_OUT_OF_RANGE = 45 # TD arterial pressure out of range fault ALARM_ID_TD_ARTERIAL_PRESSURE_SELF_TEST_FAILURE = 46 # TD arterial pressure self-test failure ALARM_ID_TD_VENOUS_PRESSURE_LOW = 47 # TD venous pressure low ALARM_ID_TD_VENOUS_PRESSURE_HIGH = 48 # TD venous pressure high ALARM_ID_TD_VENOUS_PRESSURE_OUT_OF_RANGE = 49 # TD venous pressure out of range fault ALARM_ID_TD_VENOUS_PRESSURE_SELF_TEST_FAILURE = 50 # TD venous pressure self-test failure ALARM_ID_TD_PRE_TREATMENT_DRY_PRESSURE_TEST_FAILURE = 51 # TD set pressure offset is out or range fault ALARM_ID_DD_D11_PUMP_SPEED_CONTROL_ERROR = 52 # DD concentrate pump D11_PUMP speed control error ALARM_ID_DD_D10_PUMP_SPEED_CONTROL_ERROR = 53 # DD concentrate pump D10_PUMP speed control error ALARM_ID_DD_CONC_PUMP_HALL_SENSOR_OUT_OF_RANGE = 54 # DD concentrate pumps hall sensor out of range ALARM_ID_DD_CONCENTRATE_PUMP_FAULT = 55 # DD concentrate pump fault ALARM_ID_DD_TEMPERATURE_SENSOR_OUT_OF_RANGE = 56 # DD temperature sensor out of range ALARM_ID_DD_RTD_SENSORS_FPGA_FAULT = 57 # DD temperature sensors freshness timeout fault ALARM_ID_AVAILABLE_58 = 58 # DD Available alarms ALARM_ID_DD_BAROMETRIC_SENSOR_COEFFS_BAD_CRC = 59 # DD barometric sensor coefficients bad CRC ALARM_ID_DD_D12_PUMP_RPM_OUT_OF_RANGE = 60 # DD fresh dialysate pump RPM out of range ALARM_ID_DD_D12_PUMP_OFF_FAULT = 61 # DD fresh dialysate pump running when it is not commanded to run ALARM_ID_DD_D12_PUMP_CURRENT_OUT_OF_RANGE = 62 # DD fresh dialysate pump current out of range ALARM_ID_DD_D12_PUMP_DIRECTION_INVALID = 63 # DD fresh dialysate pump invalid direction ALARM_ID_DD_D12_PUMP_DIRECTION_FPGA_FAULT = 64 # DD fresh dialysate pump direction error count FPGA fault ALARM_ID_DD_D48_PUMP_RPM_OUT_OF_RANGE = 65 # DD spent dialysate pump RPM out of range ALARM_ID_DD_D48_PUMP_OFF_FAULT = 66 # DD spent dialysate pump running when it is not commanded to run ALARM_ID_DD_D48_PUMP_CURRENT_OUT_OF_RANGE = 67 # DD spent dialysate pump current out of range ALARM_ID_DD_D48_PUMP_DIRECTION_INVALID = 68 # DD spent dialysate pump invalid direction ALARM_ID_DD_D48_PUMP_DIRECTION_FPGA_FAULT = 69 # DD spent dialysate pump direction error count FPGA fault ALARM_ID_DD_FLUID_TOO_LOW_WHILE_D5_HEAT_IS_ON = 70 # DD primary heater is On when no fluid is present ALARM_ID_DD_FLUID_TOO_LOW_WHILE_D45_HEAT_IS_ON = 71 # DD trimmer heater is On when no fluid is present ALARM_ID_TD_BAROMETRIC_SENSOR_COEFFS_BAD_CRC = 72 # TD barometric sensor coefficients bad CRC ALARM_ID_TD_BARO_PRESSURE_OUT_OF_RANGE = 73 # TD barometric sensor pressure out of range ALARM_ID_DD_D76_PUMP_SPEED_CONTROL_ERROR = 74 # DD UF pump speed control error ALARM_ID_DD_SC_STATE1_FILL_START_PRESSURE_OUT_OF_RANGE = 75 # DD spent chamber state 1 fill pressure out of range ALARM_ID_DD_SC_STATE2_FILL_START_PRESSURE_OUT_OF_RANGE = 76 # DD spent chamber state 2 fill pressure out of range ALARM_ID_DD_SC_FILL_TIMEOUT_FAULT = 77 # DD spent chamber fill timeout fault ALARM_ID_TD_AIR_TRAP_FILL_TIMEOUT = 78 # TD air trap fill timeout ALARM_ID_TD_AIR_TRAP_ILLEGAL_LEVELS = 79 # TD air trap illegal levels ALARM_ID_TD_PINCH_VALVE_FAULT = 80 # TD pinch valve fault ALARM_ID_TD_VALVE_HOMING_FAILED = 81 # TD pinch valve homing fault ALARM_ID_TD_VALVE_TRANSITION_TIMEOUT = 82 # TD pinch valve transition timeout ALARM_ID_FP_CAN_MESSAGE_NOT_ACKED_BY_DD = 83 # FP can message not acked by DD fault ALARM_ID_FP_FPGA_COMM_TIMEOUT = 84 # FP FPGA communication timeout ALARM_ID_FP_COMM_TOO_MANY_BAD_CRCS = 85 # FP too many bad crcs ALARM_ID_FP_VALVE_CONTROL_FAILURE = 86 # FP valve control failure ALARM_ID_DD_BC_STATE1_FILL_START_PRESSURE_OUT_OF_RANGE = 87 # DD balance chamber state1 fill start pressure not in range ALARM_ID_DD_BC_STATE1_FILL_END_PRESSURE_OUT_OF_RANGE = 88 # DD balance chamber state1 fill end pressure not in range ALARM_ID_DD_BC_STATE2_FILL_START_PRESSURE_OUT_OF_RANGE = 89 # DD balance chamber state2 fill start pressure not in range ALARM_ID_DD_BC_STATE2_FILL_END_PRESSURE_OUT_OF_RANGE = 90 # DD balance chamber state2 fill end pressure not in range ALARM_ID_DD_GEND_HYD_CHAMBER_PRESS_OUT_OF_RANGE = 91 # DD generate dialysate hydraulics chamber ngative pressure out of range ALARM_ID_DD_BICARB_FILL_TIMEOUT_FAULT = 92 # DD spent chamber fill timeout fault ALARM_ID_DD_D79_RINSE_PUMP_SPEED_OUT_OF_RANGE = 93 # DD D79 rinse pump commanded vs measured speed out of tolerance ALARM_ID_DD_BC_STATE1_FILL_PRESSURE_DROP_OUT_OF_RANGE = 94 # DD balance chamber state1 fill initiated and pressure drop is not in range ALARM_ID_DD_BC_STATE2_FILL_PRESSURE_DROP_OUT_OF_RANGE = 95 # DD balance chamber state2 fill initiated and pressure drop is not in range ALARM_ID_TD_TREATMENT_STOPPED_BY_USER = 96 # TD treatment paused by user ALARM_ID_DD_D74_COND_SENSOR_FPGA_FAULT = 97 # DD D74 bicarb conductivity sensor freshness/error timeout fault ALARM_ID_TD_BLOOD_SITTING_WARNING = 98 # TD blood sitting too long warning ALARM_ID_TD_BLOOD_SITTING_TOO_LONG = 99 # TD blood sitting too long alarm; no resume; no rinseback # Added 30 TD-UI Alarms +1 TD only from 100 to 130 with some reserved IDs ALARM_ID_TD_COMM_TIMEOUT = 100 # TD communication timeout ALARM_ID_UI_POST_FAILURE_OS_VERSION = 101 # UI POST OS version compatibility failure ALARM_ID_UI_POST_FAILURE_SHASUM = 102 # UI POST Application Integrity (Sha256Sum) failure ALARM_ID_UI_POST_FAILURE_CANBUS = 103 # UI POST CANBus failure ALARM_ID_UI_POST_FAILURE_DISPLAY = 104 # UI POST Display failure ALARM_ID_UI_POST_FAILURE_TOUCH = 105 # UI POST Touch failure ALARM_ID_UI_POST_FAILURE_SDCARD = 106 # UI POST SD-Card failure ALARM_ID_UI_POST_FAILURE_RTC = 107 # UI POST RTC failure ALARM_ID_UI_POST_FAILURE_WIFI = 108 # UI POST WiFi failure ALARM_ID_UI_POST_FAILURE_BLUETOOTH = 109 # UI POST Bluetooth failure ALARM_ID_UI_POST_FAILURE_ETHERNET = 110 # UI POST Ethernet failure ALARM_ID_UI_POST_FAILURE_SOUND = 111 # UI POST Sound failure ALARM_ID_UI_POST_FAILURE_CLOUDSYNC = 112 # UI POST CloudSync failure ALARM_ID_UI_POST_FAILURE_INVALID_YEAR = 113 # UI POST Year check failure ALARM_ID_UI_POST_FAILURE_SETTINGS_BAD = 114 # UI POST Configuration check failure ALARM_ID_UI_EVNT_FAILURE_SDCARD = 115 # UI EVNT SD-Card failure ALARM_ID_UI_RESERVED_116 = 116 # UI Reserved failure ALARM_ID_UI_RESERVED_117 = 117 # UI Reserved failure ALARM_ID_UI_RESERVED_118 = 118 # UI Reserved failure ALARM_ID_UI_RESERVED_119 = 119 # UI Reserved failure ALARM_ID_UI_RESERVED_120 = 120 # UI Reserved failure ALARM_ID_UI_RESERVED_121 = 121 # UI Reserved failure ALARM_ID_UI_RESERVED_122 = 122 # UI Reserved failure ALARM_ID_UI_RESERVED_123 = 123 # UI Reserved failure ALARM_ID_UI_RESERVED_124 = 124 # UI Reserved failure ALARM_ID_UI_RESERVED_125 = 125 # UI Reserved failure ALARM_ID_UI_RESERVED_126 = 126 # UI Reserved failure ALARM_ID_UI_RESERVED_127 = 127 # UI Reserved failure ALARM_ID_UI_RESERVED_128 = 128 # UI Reserved failure ALARM_ID_UI_RESERVED_129 = 129 # UI Reserved failure ALARM_ID_UI_RESERVED_130 = 130 # UI Reserved failure ALARM_ID_BATTERY_LOW = 131 # TD Battery Low warning ALARM_ID_DD_DIALYSATE_TEMP_ABOVE_SAFETY_TEMP = 132 # DD dialysate temperature above safety ALARM_ID_DD_DIALYSATE_TEMP_ABOVE_TARGET_TEMP = 133 # DD dialysate temperature high ALARM_ID_DD_DIALYSATE_TEMP_BELOW_TARGET_TEMP = 134 # DD dialysate temperature low ALARM_ID_FP_PRESSURE_RELIEF_OUT_LOW_RANGE = 135 # FP Pressure relief valve low ALARM_ID_FP_PRESSURE_RELIEF_OUT_HIGH_RANGE = 136 # FP Pressure relief valve high ALARM_ID_FP_POWER_BUDGET_OUT_OF_RANGE = 137 # FP Power budget exceeded ALARM_ID_FP_FLOW_RATE_LOW_RANGE = 138 # FP flow rate low ALARM_ID_FP_INLET_TEMPERATURE_OUT_LOW_RANGE = 139 # FP inlet water temperature low ALARM_ID_FP_INLET_TEMPERATURE_OUT_HIGH_RANGE = 140 # FP inlet water temperature high ALARM_ID_FP_INLET_PRESSURE_OUT_LOW_RANGE = 141 # FP inlet pressure low ALARM_ID_FP_INLET_PRESSURE_OUT_HIGH_RANGE = 142 # FP inlet pressure high ALARM_ID_FP_INLET_CONDUCTIVITY_OUT_HIGH_RANGE = 143 # FP inlet conductivity high ALARM_ID_FP_INLET_CONDUCTIVITY_OUT_LOW_RANGE = 144 # FP inlet conductivty low ALARM_ID_FP_RO_INLET_PRESSURE_OUT_HIGH_RANGE = 145 # FP pump inlet pressure high ALARM_ID_FP_RO_OUTLET_CONDUCTIVITY_HIGH_RANGE = 146 # FP pump outlet conductivity high ALARM_ID_FP_RO_INLET_CONDUCTIVITY_HIGH_RANGE = 147 # FP pump inlet conductivity high ALARM_ID_FP_REJECTION_RATIO_LOW_RANGE = 148 # FP rejection ratio low ALARM_ID_FP_INLET_PRESSURE_REGULATOR_OUT_OF_RANGE = 149 # FP inlet pressure regulator out of range ALARM_ID_FP_INLET_TEMPERATURE_OUT_CRITICAL_RANGE = 150 # FP inlet temperature above 40C during filters flush ALARM_ID_FP_PERMEATE_FLUSH_CONDUCTIVITY_TIMEOUT = 151 # FP membrane flush timeout ALARM_ID_FP_CONCENTRATE_FLUSH_TANK_FULL_TIMEOUT = 152 # FP concentrate flush tank full timeout ALARM_ID_FP_GEN_PERMEATE_TANK_FULL_TIMEOUT = 153 # FP tank full time out alarm ALARM_ID_DD_DIALYSATE_TEMPERATURE_SENSORS_OUT_OF_RANGE = 154 # DD dialysate temperature sensors out of range ALARM_ID_DD_BLOOD_LEAK_DETECTED = 155 # DD blood leak detected ALARM_ID_DD_BLOOD_LEAK_INVALID_CAL_RECORD = 156 # DD blood leak invalid calibration record ALARM_ID_DD_BLOOD_LEAK_SENSOR_EMBEDDED_MODE_FAILURE = 157 # DD blood leak sensor embedded mode failure ALARM_ID_DD_BLOOD_LEAK_SENSOR_SET_POINT_SET_FAILURE = 158 # DD blood leak sensor set point failure ALARM_ID_DD_BLOOD_LEAK_RECOVERING_PLEASE_WAIT = 159 # DD blood leak sensor recovering please wait ALARM_ID_FP_GEN_PERMEATE_TANK_FILL_TIMEOUT = 160 # FP tank fill time out alarm. ALARM_ID_FP_INLET_PRESSURE_CRITICAL_OUT_RANGE = 161 # FP inlet pressure high fault ALARM_ID_FP_PERMEATE_FLOW_OUT_HIGH_RANGE = 162 # FP permeate flow high fault ALARM_ID_FP_PERMEATE_FLOW_OUT_LOW_RANGE = 163 # FP permeate flow low fault ALARM_ID_FP_INLET_PRESSURE_LOW_RANGE = 164 # FP inlet pressure low fault ALARM_ID_TD_AIR_TRAP_LOWER_TIMEOUT = 165 # TD air trap lower timeout NUM_OF_ALARM_IDS = 166 # Number of alarms