/************************************************************************** * * Copyright (c) 2019-2020 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 AlarmDefs.h * * @author (last) Sean Nash * @date (last) 14-Oct-2020 * * @author (original) Sean * @date (original) 11-Feb-2020 * ***************************************************************************/ #ifndef __ALARM_DEFINITIONS_H__ #define __ALARM_DEFINITIONS_H__ // ********** public definitions ********** /** * @addtogroup AlarmManagement * @{ */ /// Enumeration of alarm IDs. enum Alarm_List { ALARM_ID_NO_ALARM = 0, ///< Indication for when no alarms is a possible situation ALARM_ID_HD_SOFTWARE_FAULT = 1, ///< HD Software fault. Software found itself in an unexpected state ALARM_ID_STUCK_BUTTON_TEST_FAILED = 2, ///< Stuck button POST failure. Stop or Off button detected to be pressed for at least 1 second during test shortly after power up ALARM_ID_FPGA_POST_TEST_FAILED = 3, ///< FPGA POST failure ALARM_ID_WATCHDOG_POST_TEST_FAILED = 4, ///< Watchdog POST failure ALARM_ID_UI_COMM_POST_FAILED = 5, ///< UI communication POST failure. UI failed to communicate within a reasonable time after power up ALARM_ID_BLOOD_PUMP_MC_CURRENT_CHECK = 6, ///< Blood pump failed motor controller current check. Too high when pump should be off or out of range when pump should be running ALARM_ID_BLOOD_PUMP_OFF_CHECK = 7, ///< Blood pump failed motor off check. Measured speed while commanded off ALARM_ID_BLOOD_PUMP_MC_DIRECTION_CHECK = 8, ///< Blood pump failed motor direction check. Measured vs. commanded ALARM_ID_BLOOD_PUMP_ROTOR_SPEED_CHECK = 9, ///< Blood pump failed rotor speed check. Mismatch with rotor and motor speeds ALARM_ID_DIAL_IN_PUMP_MC_CURRENT_CHECK = 10, ///< Dialysis inlet pump failed motor controller current check. Too high when pump should be off or out of range when pump should be running ALARM_ID_DIAL_IN_PUMP_OFF_CHECK = 11, ///< Dialysis inlet pump failed motor off check. Measured speed while commanded off ALARM_ID_DIAL_IN_PUMP_MC_DIRECTION_CHECK = 12, ///< Dialysis inlet pump failed motor direction check. Measured vs. commanded ALARM_ID_DIAL_IN_PUMP_ROTOR_SPEED_CHECK = 13, ///< Dialysis inlet pump failed rotor speed check. Mismatch with rotor and motor speeds ALARM_ID_DIAL_OUT_PUMP_MC_CURRENT_CHECK = 14, ///< Dialysis outlet pump failed motor controller current check. Too high when pump should be off or out of range when pump should be running ALARM_ID_DIAL_OUT_PUMP_OFF_CHECK = 15, ///< Dialysis outlet pump failed motor off check. Measured speed while commanded off ALARM_ID_DIAL_OUT_PUMP_MC_DIRECTION_CHECK = 16, ///< Dialysis outlet pump failed motor direction check. Measured vs. commanded ALARM_ID_DIAL_OUT_PUMP_ROTOR_SPEED_CHECK = 17, ///< Dialysis outlet pump failed rotor speed check. Mismatch with rotor and motor speeds ALARM_ID_WATCHDOG_EXPIRED = 18, ///< Watchdog expired error. Watchdog was not "pet" within the appropriate time ALARM_ID_RTC_COMM_ERROR = 19, ///< Real-time clock communication error ALARM_ID_RTC_CONFIG_ERROR = 20, ///< Real-time clock configuration error ALARM_ID_DG_COMM_TIMEOUT = 21, ///< Dialysate generator communication timeout ALARM_ID_UI_COMM_TIMEOUT = 22, ///< User interface communication timeout ALARM_ID_COMM_TOO_MANY_BAD_CRCS = 23, ///< Too many bad CRCs detected on received system messages ALARM_ID_TREATMENT_STOPPED_BY_USER = 24, ///< Treatment stopped by user action - pressed stop button ALARM_ID_BLOOD_SITTING_WARNING = 25, ///< Blood sitting too long warning (>4 min) ALARM_ID_BLOOD_SITTING_TOO_LONG_NO_RESUME = 26, ///< Blood sitting too long alarm (>5 min) ALARM_ID_BLOOD_SITTING_TOO_LONG_NO_RINSEBACK = 27, ///< Blood sitting too long alarm (>10 min) ALARM_ID_CAN_MESSAGE_NOT_ACKED = 28, ///< System message that required acknowledgment was not acknowledged ALARM_ID_OCCLUSION_BLOOD_PUMP = 29, ///< Blood pump occlusion detected ALARM_ID_OCCLUSION_DIAL_IN_PUMP = 30, ///< Dialysate inlet pump occlusion detected ALARM_ID_OCCLUSION_DIAL_OUT_PUMP = 31, ///< Dialysate outlet pump occlusion detected ALARM_ID_ARTERIAL_PRESSURE_LOW = 32, ///< Arterial pressure too low during treatment ALARM_ID_ARTERIAL_PRESSURE_HIGH = 33, ///< Arterial pressure too high during treatment ALARM_ID_VENOUS_PRESSURE_LOW = 34, ///< Venous pressure too low during treatment ALARM_ID_VENOUS_PRESSURE_HIGH = 35, ///< Venous pressure too high during treatment ALARM_ID_UF_RATE_TOO_HIGH_ERROR = 36, ///< Ultrafiltration rate is too high error during treatment ALARM_ID_UF_VOLUME_ACCURACY_ERROR = 37, ///< Ultrafiltration volume accuracy error during treatment ALARM_ID_RTC_BATTERY_LOW = 38, ///< RTC battery low ALARM_ID_RTC_OR_TIMER_ACCURACY_FAILURE = 39, ///< RTC or MCU timer inaccurate ALARM_ID_RTC_RAM_OPS_ERROR = 40, ///< RTC (i.e read time) or RAM operations failure (read or write) ALARM_ID_NVDATA_EEPROM_OPS_FAILURE = 41, ///< EEPROM operations (read, write, erase) failure ALARM_ID_NVDATA_MFG_RECORD_CRC_ERROR = 42, ///< Manufacturing record CRC failure ALARM_ID_NVDATA_SRVC_RECORD_CRC_ERROR = 43, ///< Service record CRC failure ALARM_ID_NVDATA_CAL_RECORD_CRC_ERROR = 44, ///< Calibration record CRC failure ALARM_ID_NVDATA_HW_USAGE_DATA_CRC_ERROR = 45, ///< HW usage data (treatment time in HD and total consumed water in DG) failure AlARM_ID_NVDATA_DISINFECTION_DATE_CRC_ERROR = 46, ///< Last disinfection date CRC error ALARM_ID_RO_PUMP_OUT_PRESSURE_OUT_OF_RANGE = 47, ///< Pressure at outlet of RO pump is out of range ALARM_ID_TEMPERATURE_SENSORS_FAULT = 48, ///< DG temperature sensors fault ALARM_ID_TEMPERATURE_SENSORS_INCONSISTENT = 49, ///< DG temperature sensors values are inconsistent with respect to each other ALARM_ID_HD_COMM_TIMEOUT = 50, ///< HD communication timeout ALARM_ID_VALVE_CONTROL_FAILURE = 51, ///< FPGA not accepting commanded valve states ALARM_ID_BLOOD_PUMP_FLOW_VS_MOTOR_SPEED_CHECK = 52, ///< Blood pump failed flow vs. motor speed check. Mismatch with flow rate and rate implied by motor speed ALARM_ID_DIAL_IN_PUMP_FLOW_VS_MOTOR_SPEED_CHECK = 53, ///< Dialysate inlet pump failed flow vs. motor speed check. Mismatch with flow rate and rate implied by motor speed ALARM_ID_DIAL_OUT_PUMP_FLOW_VS_MOTOR_SPEED_CHECK = 54, ///< Dialysate outlet pump failed flow vs. motor speed check. Mismatch with flow rate and rate implied by motor speed ALARM_ID_BLOOD_PUMP_MOTOR_SPEED_CHECK = 55, ///< Blood pump failed motor speed check. Measured vs. commanded ALARM_ID_DIAL_IN_PUMP_MOTOR_SPEED_CHECK = 56, ///< Dialysate inlet pump failed motor speed check. Measured vs. commanded ALARM_ID_DIAL_OUT_PUMP_MOTOR_SPEED_CHECK = 57, ///< Dialysate outlet pump failed motor speed check. Measured vs. commanded ALARM_ID_BLOOD_PUMP_ROTOR_SPEED_TOO_HIGH = 58, ///< Blood pump rotor speed too high ALARM_ID_INLET_WATER_LOW_CONDUCTIVITY = 59, ///< Inlet water conductivity too low ALARM_ID_INLET_WATER_HIGH_CONDUCTIVITY = 60, ///< Inlet water conductivity too high ALARM_ID_DG_SOFTWARE_FAULT = 61, ///< DG software fault. Software found itself in an unexpected state ALARM_ID_CONDUCTIVITY_SENSOR_FAULT = 62, ///< Conductivity sensor fault ALARM_ID_INLET_WATER_LOW_TEMPERATURE = 63, ///< Inlet water temperature too low ALARM_ID_INLET_WATER_HIGH_TEMPERATURE = 64, ///< Inlet water temperature too high ALARM_ID_PRESSURE_SENSOR_FAULT = 65, ///< Pressure sensor fault ALARM_ID_INLET_WATER_LOW_PRESSURE = 66, ///< Inlet water pressure too low ALARM_ID_HD_CRITICAL_DATA_ERROR = 67, ///< HD critical data integrity check failed ALARM_ID_HD_ACCELEROMETER_SELF_TEST_FAILURE = 68, ///< HD accelerometer failed POST ALARM_ID_DG_ACCELEROMETER_SELF_TEST_FAILURE = 69, ///< DG accelerometer failed POST ALARM_ID_HD_EXCESSIVE_TILT = 70, ///< HD tilt exceeds maximum ALARM_ID_DG_EXCESSIVE_TILT = 71, ///< DG tilt exceeds maximum ALARM_ID_HD_SHOCK = 72, ///< HD experienced large acceleration ALARM_ID_DG_SHOCK = 73, ///< DG experienced large acceleration ALARM_ID_HD_ACCELEROMETER_FAILURE = 74, ///< HD accelerometer error (no readings or FPGA reports error) ALARM_ID_DG_ACCELEROMETER_FAILURE = 75, ///< DG accelerometer error (no readings or FPGA reports error) ALARM_ID_DG_CRITICAL_DATA_ERROR = 76, ///< DG critical data integrity check failed ALARM_ID_RO_REJECTION_RATIO_OUT_OF_RANGE = 77, ///< RO rejection ratio out of range ALARM_ID_INLET_WATER_PRESSURE_FAULT = 78, ///< Inlet water pressure fault ALARM_ID_HD_VALVE_HOMING_FAILED = 79, ///< HD valve homing failed ALARM_ID_HD_VALVE_TRANSITION_TIMEOUT = 80, ///< HD valve transition time out ALARM_ID_HD_VALVE_NOT_FUNCTIONAL = 81, ///< HD valve not functional ALARM_ID_HD_VALVE_CURRENT_OUT_OF_RANGE = 82, ///< HD valve current out of range ALARM_ID_HD_VALVE_POSITION_OUT_OF_RANGE = 83, ///< HD valve position out of target ALARM_ID_AIR_TRAP_ILLEGAL_LEVELS = 84, ///< Air trap level sensors reporting illegal combination of air/fluid ALARM_ID_AIR_TRAP_FILL_DURING_PRIME = 85, ///< Air trap fill timeout during priming ALARM_ID_AIR_TRAP_FILL_DURING_TREATMENT = 86, ///< Air trap fill timeout during treatment ALARM_ID_BLOOD_FLOW_SIGNAL_STRENGTH_TOO_LOW = 87, ///< Blood flow sensor signal strength too low ALARM_ID_DIALYSATE_FLOW_SIGNAL_STRENGTH_TOO_LOW = 88, ///< Dialysate flow sensor signal strength too low ALARM_ID_EMPTY_SALINE_BAG = 89, ///< Saline bag is empty ALARM_ID_SALINE_BOLUS_VOLUME_CHECK_FAILURE = 90, ///< Saline bolus volume check failure. ALARM_ID_ARTERIAL_PRESSURE_SENSOR_FAULT = 91, ///< FPGA reports failure reading arterial pressure sensor. ALARM_ID_VENOUS_PRESSURE_SENSOR_FAULT = 92, ///< FPGA reports failure reading venous pressure sensor. ALARM_ID_UV_REACTOR_NOT_HEALTHY = 93, ///< UV reactor not healthy (either inlet or outlet) ALARM_ID_POST_ACID_CONDUCTIVITY_OUT_OF_RANGE = 94, ///< Post-acid concentrate conductivity out of range. ALARM_ID_POST_BICARB_CONDUCTIVITY_OUT_OF_RANGE = 95, ///< Post-bicarb concentrate conductivity out of range. ALARM_ID_RO_PUMP_FLOW_RATE_OUT_OF_RANGE = 96, ///< RO pump flow rate out of range. NUM_OF_ALARM_IDS ///< Total number of alarms }; typedef enum Alarm_List ALARM_ID_T; ///< Type for alarm list enumeration /// Enumeration of alarm priorities. enum Alarm_Priorities { ALARM_PRIORITY_NONE = 0, ///< Indicates not an alarm or no alarms active at this time ALARM_PRIORITY_LOW = 1, ///< Low priority alarm ALARM_PRIORITY_MEDIUM = 2, ///< Medium priority alarm ALARM_PRIORITY_HIGH = 3, ///< High priority alarm NUM_OF_ALARM_PRIORITIES ///< Total number of alarm priorities }; typedef enum Alarm_Priorities ALARM_PRIORITY_T; ///< Type for alarm priorities enumeration /// Enumeration of alarm sources. enum Alarm_Sources { ALARM_SOURCE_UI = 0, ///< User interface alarm source ALARM_SOURCE_HD, ///< HD firmware alarm source ALARM_SOURCE_DG, ///< DG firmware alarm source NUMBER_OF_ALARM_SOURCES ///< Number of alarm sources }; typedef enum Alarm_Sources ALARM_SOURCE_T; ///< Type for alarm sources enumeration /**@}*/ #endif