/**********************************************************************//** * * Copyright (c) 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. * **************************************************************************/ #ifndef __ALARM_DEFINITIONS_H__ #define __ALARM_DEFINITIONS_H__ // ********** public definitions ********** typedef enum Alarm_List { ALARM_ID_NO_ALARM = 0, ///< Indication for when no alarms is a possible situation. ALARM_ID_SOFTWARE_FAULT = 1, ///< 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_MC_SPEED_CHECK = 7, ///< Blood pump failed motor controller speed check. ALARM_ID_BLOOD_PUMP_MC_DIRECTION_CHECK = 8, ///< Blood pump failed motor controller direction check. ALARM_ID_BLOOD_PUMP_ROTOR_SPEED_CHECK = 9, ///< Blood pump failed rotor speed check. Mismatch with motor and motor controller 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_MC_SPEED_CHECK = 11, ///< Dialysis inlet pump failed motor controller speed check. ALARM_ID_DIAL_IN_PUMP_MC_DIRECTION_CHECK = 12, ///< Dialysis inlet pump failed motor controller direction check. ALARM_ID_DIAL_IN_PUMP_ROTOR_SPEED_CHECK = 13, ///< Dialysis inlet pump failed rotor speed check. Mismatch with motor and motor controller 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_MC_SPEED_CHECK = 15, ///< Dialysis outlet pump failed motor controller speed check. ALARM_ID_DIAL_OUT_PUMP_MC_DIRECTION_CHECK = 16, ///< Dialysis outlet pump failed motor controller direction check. ALARM_ID_DIAL_OUT_PUMP_ROTOR_SPEED_CHECK = 17, ///< Dialysis outlet pump failed rotor speed check. Mismatch with motor and motor controller 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. NUM_OF_ALARM_IDS ///< Total # of alarms. } ALARM_ID_T; typedef 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. } ALARM_PRIORITY_T; #endif