Index: AlarmDefs.h =================================================================== diff -u -r9aa512200939748404936f730e9b4027de78640d -r9542514374e5a45a30ee4533ee9ceb3cdc30e2e9 --- AlarmDefs.h (.../AlarmDefs.h) (revision 9aa512200939748404936f730e9b4027de78640d) +++ AlarmDefs.h (.../AlarmDefs.h) (revision 9542514374e5a45a30ee4533ee9ceb3cdc30e2e9) @@ -1,105 +1,151 @@ -/**********************************************************************//** - * - * 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 - * - * @date 22-Nov-2020 - * @author S. Nash - * - * @brief header file for Alarm Definitions module. - * - **************************************************************************/ +/************************************************************************** +* +* 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) 05-Aug-2020 +* +* @author (original) Sean +* @date (original) 11-Feb-2020 +* +***************************************************************************/ #ifndef __ALARM_DEFINITIONS_H__ #define __ALARM_DEFINITIONS_H__ // ********** public definitions ********** + +/** + * @addtogroup AlarmDefs + * @{ + */ -/// Enumeration of alarm IDs. +/// 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, ///< EEPRON 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_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_OUT_OF_RANGE = 48, ///< DG temperature sensors ADC read out of range + 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_TEMPERATURE_OUT_OF_RANGE = 59, ///< Inlet water temperature out of range. - ALARM_ID_INLET_WATER_LOW_CONDUCTIVITY = 60, ///< Inlet water conductivity too low. - ALARM_ID_INLET_WATER_HIGH_CONDUCTIVITY = 61, ///< Inlet water conductivity too high. - ALARM_ID_DG_SOFTWARE_FAULT = 62, ///< DG software fault. Software found itself in an unexpected state. - ALARM_ID_CONDUCTIVITY_SENSOR_FAULT = 63, ///< Conductivity sensor fault. - NUM_OF_ALARM_IDS ///< Total # of alarms. -}; -/// Type for alarm list enumeration. -typedef enum Alarm_List ALARM_ID_T; - + 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 = 77, ///< Inlet water pressure fault + NUM_OF_ALARM_IDS ///< Total number of alarms +}; +typedef enum Alarm_List ALARM_ID_T; ///< Type for alarm list enumeration + +/**@}*/ + +/** + * @addtogroup AlarmPriorities + * @{ + */ + +/// 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 # of alarm priorities. -}; -/// Type for alarm priorities enumeration. -typedef enum Alarm_Priorities ALARM_PRIORITY_T; + 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 + +/**@}*/ + +/** + * @addtogroup AlarmSources + * @{ + */ + +/// 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 +#endif