Index: HDDefs.h =================================================================== diff -u -rcc61014d5c5f5d994a5adad62fe3a598864aa5ee -r218b836a22f8fd53a4d7f547741ba00e00dbe0fd --- HDDefs.h (.../HDDefs.h) (revision cc61014d5c5f5d994a5adad62fe3a598864aa5ee) +++ HDDefs.h (.../HDDefs.h) (revision 218b836a22f8fd53a4d7f547741ba00e00dbe0fd) @@ -1,148 +1,288 @@ /************************************************************************** * -* Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. +* Copyright (c) 2020-2022 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 HDDefs.h +* @file HDDefs.h * -* @author (last) Sean Nash -* @date (last) 14-Oct-2020 +* @author (last) Michael Garthwaite +* @date (last) 07-Sep-2022 * -* @author (original) Sean Nash -* @date (original) 29-May-2020 +* @author (original) Sean Nash +* @date (original) 29-May-2020 * ***************************************************************************/ - -#ifndef __HD_DEFS_H__ -#define __HD_DEFS_H__ - -// ********** public definitions ********** - -/** - * @addtogroup HDOperationModes - * @{ - */ - -/// Enumeration of operation modes. These are in order of priority (highest to lowest). -enum HD_Op_Modes -{ - MODE_FAUL = 0, ///< Fault mode - MODE_SERV, ///< Service mode - MODE_INIT, ///< Initialization & POST mode - MODE_STAN, ///< Standby mode - MODE_TPAR, ///< Treatment Parameters mode - MODE_PRET, ///< Pre-Treatment mode - MODE_TREA, ///< Treatment mode - MODE_POST, ///< Post-Treatment mode - MODE_NLEG, ///< Not legal - an illegale mode transition occurred - NUM_OF_MODES ///< Number of HD operation modes -}; -typedef enum HD_Op_Modes HD_OP_MODE_T; ///< Type for HD operation modes enumeration - -/**@}*/ - -/** - * @addtogroup HDInitAndPOSTMode - * @{ - */ - -/// Enumeration of init & POST mode states. -enum HD_POST_States -{ - POST_STATE_START = 0, ///< Start initialize & POST mode state - POST_STATE_WATCHDOG, ///< Run watchdog test mode state - POST_STATE_FPGA, ///< Run FPGA test mode state - POST_STATE_RTC, ///< Run RTC test mode state - POST_STATE_NVDATAMGMT, ///< Run NV Data Mgmt. test mode state - POST_STATE_BLOOD_FLOW, ///< Run Blood Flow test mode state - POST_STATE_DIALYSATE_FLOW, ///< Run Dialysate Flow test mode state - POST_STATE_ACCELEROMETER, ///< Run Accelerometer test mode state - POST_STATE_VALVES, ///< Run Valves test mode state - POST_STATE_ALARM_LAMP, ///< Run alarm lamp test mode state - POST_STATE_STUCK_BUTTON, ///< Run stuck button test mode state - POST_STATE_COMPLETED, ///< POST self-tests completed mode state - POST_STATE_FAILED, ///< POST self-tests failed mode state - NUM_OF_POST_STATES ///< Number of initialize & POST mode states -}; -typedef enum HD_POST_States HD_POST_STATE_T; ///< Type for HD POST states enumeration - -/**@}*/ - -/** - * @addtogroup HDFaultMode - * @{ - */ - -/// Enumeration of fault mode states. -enum HD_Fault_States -{ - HD_FAULT_STATE_START = 0, ///< Start fault state - NUM_OF_HD_FAULT_STATES ///< Number of fault mode states -}; -typedef enum HD_Fault_States HD_FAULT_STATE_T; ///< Type for HD fault states enumeration - -/**@}*/ - -/** - * @addtogroup HDStandbyMode - * @{ - */ - -/// Sub-mode states while in standby mode -enum HD_Standby_States -{ - STANDBY_START_STATE = 0, ///< Start standby - STANDBY_WAIT_FOR_TREATMENT_STATE, ///< Wait for treatment - NUM_OF_STANDBY_STATES ///< Number of standby states (sub-modes) -}; -typedef enum HD_Standby_States HD_STANDBY_STATE_T; ///< Type for HD standby states enumeration - -/**@}*/ - -/** - * @addtogroup HDTreatmentParamsMode - * @{ - */ - -/// Enumeration of treatment parameters mode states. -enum HD_Treatment_Parameters_Mode_States -{ + +#ifndef __HD_DEFS_H__ +#define __HD_DEFS_H__ + +// ********** public definitions ********** + +/** + * @addtogroup HDOperationModes + * @{ + */ + +/// Enumeration of operation modes. These are in order of priority (highest to lowest). +enum HD_Op_Modes +{ + MODE_FAUL = 0, ///< Fault mode + MODE_SERV, ///< Service mode + MODE_INIT, ///< Initialization & POST mode + MODE_STAN, ///< Standby mode + MODE_TPAR, ///< Treatment Parameters mode + MODE_PRET, ///< Pre-Treatment mode + MODE_TREA, ///< Treatment mode + MODE_POST, ///< Post-Treatment mode + MODE_NLEG, ///< Not legal - an illegal mode transition occurred + NUM_OF_MODES ///< Number of HD operation modes +}; +typedef enum HD_Op_Modes HD_OP_MODE_T; ///< Type for HD operation modes enumeration + +/**@}*/ + +/** + * @addtogroup HDInitAndPOSTMode + * @{ + */ + +/// Enumeration of init & POST mode states. +enum HD_POST_States +{ + POST_STATE_START = 0, ///< Start initialize & POST mode state + POST_STATE_FW_INTEGRITY, ///< Run firmware integrity test state + POST_STATE_WATCHDOG, ///< Run watchdog test state + POST_STATE_SAFETY_SHUTDOWN, ///< Run safety shutdown test state + POST_STATE_RTC, ///< Run RTC test state + POST_STATE_NVDATAMGMT, ///< Run NV Data Mgmt. test state + POST_STATE_BLOOD_FLOW, ///< Run blood flow test state + POST_STATE_DIALYSATE_INLET_FLOW, ///< Run dialysate inlet flow test state + POST_STATE_DIALYSATE_OUTLET_FLOW, ///< Run dialysate outlet flow test state + POST_STATE_BLOOD_LEAK, ///< Run blood leak sensor test state + POST_STATE_VALVES, ///< Run valves test state + POST_STATE_SYRINGE_PUMP, ///< Run syringe pump test state + POST_STATE_PRES_OCCL, ///< Run pressure occlusion state + POST_STATE_ALARM_AUDIO, ///< Run alarm audio test state + POST_STATE_ALARM_LAMP, ///< Run alarm lamp test state + POST_STATE_ACCELEROMETER, ///< Run Accelerometer test state + POST_STATE_TEMPERATURES, ///< Run temperatures POST state + POST_STATE_FANS, ///< Run fans POST state + POST_STATE_STUCK_BUTTON, ///< Run stuck button test state + POST_STATE_UI_POST, ///< Check whether UI passed its POST tests + POST_STATE_FW_COMPATIBILITY, ///< Run firmware compatibility test state + POST_STATE_FPGA, ///< Run FPGA test state + POST_STATE_COMPLETED, ///< POST self-tests completed state + POST_STATE_FAILED, ///< POST self-tests failed state + NUM_OF_POST_STATES ///< Number of initialize & POST mode states +}; +typedef enum HD_POST_States HD_POST_STATE_T; ///< Type for HD POST states enumeration + +/**@}*/ + +/** + * @addtogroup HDFaultMode + * @{ + */ + +/// Enumeration of fault mode states. +enum HD_Fault_States +{ + HD_FAULT_STATE_START = 0, ///< HD fault start state + HD_FAULT_STATE_RUN_NV_POSTS, ///< HD fault run NV posts state + HD_FAULT_STATE_COMPLETE, ///< HD fault run complete state + NUM_OF_HD_FAULT_STATES ///< Number of fault mode states +}; +typedef enum HD_Fault_States HD_FAULT_STATE_T; ///< Type for HD fault states enumeration + +/**@}*/ + +/** + * @addtogroup HDStandbyMode + * @{ + */ + +/// Sub-mode states while in standby mode +enum HD_Standby_States +{ + STANDBY_START_STATE = 0, ///< Start standby (home actuators). + STANDBY_WAIT_FOR_TREATMENT_STATE, ///< Wait for treatment. + STANDBY_WAIT_FOR_DISINFECT_STATE, ///< Wait for UI to send disinfect option. + + STANDBY_WAIT_FOR_DG_FLUSH_CMD_RESPONSE_STATE, ///< Wait for DG flush command response. + STANDBY_WAIT_FOR_DG_FLUSH_TO_START_STATE, ///< Wait for DG flush to start. + STANDBY_DG_FLUSH_IN_PROGRESS_STATE, ///< DG flush operation is in progress + + STANDBY_WAIT_FOR_DG_HEAT_DISINFECT_CMD_RESPONSE_STATE, ///< Wait for DG heat disinfect command response. + STANDBY_WAIT_FOR_DG_HEAT_DISINFECT_TO_START_STATE, ///< Wait for DG heat disinfect to start. + STANDBY_DG_HEAT_DISINFECT_IN_PROGRESS_STATE, ///< DG heat disinfect operation is in progress. + + STANDBY_WAIT_FOR_DG_CHEM_DISINFECT_CMD_RESPONSE_STATE, ///< Wait for DG chemical disinfect command response. + STANDBY_WAIT_FOR_DG_CHEM_DISINFECT_TO_START_STATE, ///< Wait for DG chemical disinfect to start. + STANDBY_DG_CHEM_DISINFECT_IN_PROGRESS_STATE, ///< DG chemical disinfect operation is in progress + NUM_OF_STANDBY_STATES ///< Number of standby states (sub-modes) +}; +typedef enum HD_Standby_States HD_STANDBY_STATE_T; ///< Type for HD standby states enumeration + +/**@}*/ + +/** + * @addtogroup HDTreatmentParamsMode + * @{ + */ + +/// Enumeration of treatment parameters mode states. +enum HD_Treatment_Parameters_Mode_States +{ HD_TREATMENT_PARAMS_MODE_STATE_START = 0, ///< Start treatment params mode state HD_TREATMENT_PARAMS_MODE_STATE_WAIT_4_UI_2_SEND, ///< Wait for UI to send treatment params mode state HD_TREATMENT_PARAMS_MODE_STATE_WAIT_4_UI_2_CONFIRM, ///< Wait for UI to confirm treatment params mode state - NUM_OF_HD_TREATMENT_PARAMS_MODE_STATES ///< Number of treatment params mode states -}; -typedef enum HD_Treatment_Parameters_Mode_States HD_TREATMENT_PARAMS_MODE_STATE_T; ///< Type for HD treatment parameters mode states enumeration - -/**@}*/ - -/** - * @addtogroup HDPreTreatmentMode - * @{ - */ - -/// Enumeration of pre-treatment mode states (sub-mode). -enum HD_Pre_Treatment_Mode_States -{ + NUM_OF_HD_TREATMENT_PARAMS_MODE_STATES ///< Number of treatment params mode states +}; +typedef enum HD_Treatment_Parameters_Mode_States HD_TREATMENT_PARAMS_MODE_STATE_T; ///< Type for HD treatment parameters mode states enumeration + +/**@}*/ + +/** + * @addtogroup HDPreTreatmentMode + * @{ + */ + +/// Enumeration of pre-treatment mode states (sub-mode). +enum HD_Pre_Treatment_Mode_States +{ HD_PRE_TREATMENT_START_STATE = 0, ///< Start pre-treatment mode state HD_PRE_TREATMENT_WATER_SAMPLE_STATE, ///< Water sample state - HD_PRE_TREATMENT_SELF_TEST_NO_CART_STATE, ///< Self tests with no cartridge state + HD_PRE_TREATMENT_SELF_TEST_CONSUMABLE_STATE, ///< Consumable self-tests state + HD_PRE_TREATMENT_SELF_TEST_NO_CART_STATE, ///< No cartridge self-tests state HD_PRE_TREATMENT_CART_INSTALL_STATE, ///< Consumable and cartridge installation state - HD_PRE_TREATMENT_SELF_TEST_DRY_STATE, ///< Self tests dry-run state - HD_PRE_TREATMENT_PRIME_STATE, ///< Prime both blood and dialysate circuits state - HD_PRE_TREATMENT_RECIRCULATE_START_STATE, ///< Re-circulate starting state, change valves and heater settings + HD_PRE_TREATMENT_SELF_TEST_DRY_STATE, ///< Self-tests when the cartridge is dry state + HD_PRE_TREATMENT_PRIME_STATE, ///< Prime blood and dialysate circuits and run wet self-tests state HD_PRE_TREATMENT_RECIRCULATE_STATE, ///< Re-circulate blood and dialysate circuits state HD_PRE_TREATMENT_PATIENT_CONNECTION_STATE, ///< Patient connection state - HD_PRE_TREATMENT_PAUSE_STATE, ///< Pre-treatment pause state - NUM_OF_HD_PRE_TREATMENT_STATES ///< Number of pre-treatment mode states -}; + NUM_OF_HD_PRE_TREATMENT_STATES ///< Number of pre-treatment mode states +}; typedef enum HD_Pre_Treatment_Mode_States HD_PRE_TREATMENT_MODE_STATE_T; ///< Type for HD pre-treatment mode states enumeration - -/**@}*/ +/**@}*/ + /** + * @addtogroup SampleWater + * @{ + */ + +/// Enumeration of sample water sub-mode states. +enum HD_Pre_Treatment_Sample_Water_States +{ + SAMPLE_WATER_SETUP_STATE = 0, ///< Sample water setup (flush filter) state + SAMPLE_WATER_STATE, ///< Sample water state, receiving sample water commands from the user + SAMPLE_WATER_COMPLETE_STATE, ///< Sample water complete state + NUM_OF_SAMPLE_WATER_STATES ///< Number of sample water sub-mode states +}; +/// Type for sample water states enumeration. +typedef enum HD_Pre_Treatment_Sample_Water_States SAMPLE_WATER_STATE_T; + +/// Enumeration of user actions that may be requested from sample water sub-mode. +enum Requested_Sample_Water_User_Actions +{ + REQUESTED_USER_ACTION_SAMPLE_WATER_STOP = 0, ///< User requests to stop sample water + REQUESTED_USER_ACTION_SAMPLE_WATER_START = 1, ///< User requests to start sample water + NUM_OF_REQUESTED_SAMPLE_WATER_USER_ACTIONS ///< Number of requested sample water user actions +}; +/// Type for requested user actions enumeration. +typedef enum Requested_Sample_Water_User_Actions REQUESTED_SAMPLE_WATER_USER_ACTIONS_T; + +/**@}*/ + +/** + * @addtogroup SelfTestConsumable + * @{ + */ + +/// Enumeration of consumable self-tests sub-mode states. +enum HD_Pre_Treatment_Consumable_Self_Test_States +{ + CONSUMABLE_SELF_TESTS_INSTALL_STATE = 0, ///< Consumable self-tests install state + CONSUMABLE_SELF_TESTS_FILL_CMD_STATE, ///< Send command to DG to fill reservoir state + CONSUMABLE_SELF_TESTS_WATER_QUALITY_CHECK_STATE, ///< Consumable self-tests water quality check state + CONSUMABLE_SELF_TESTS_BICARB_PUMP_CHECK_STATE, ///< Consumable self-tests bicarbonate concentrate pump check state + CONSUMABLE_SELF_TESTS_ACID_PUMP_CHECK_STATE, ///< Consumable self-tests acid concentrate pump check state + CONSUMABLE_SELF_TESTS_COMPLETE_STATE, ///< Consumable self-tests complete state + NUM_OF_CONSUMABLE_SELF_TESTS_STATES ///< Number of consumable install sub-mode states +}; +/// Type for consumable self-tests states enumeration. +typedef enum HD_Pre_Treatment_Consumable_Self_Test_States CONSUMABLE_SELF_TESTS_STATE_T; + +/**@}*/ + +/** + * @addtogroup SelfTests + * @{ + */ + +/// Enumeration of no cartridge self-tests sub-mode states. +enum HD_Pre_Treatment_No_Cart_Self_Tests_States +{ + NO_CART_SELF_TESTS_START_STATE = 0, ///< No cartridge self-tests starting state + NO_CART_SELF_TESTS_WAIT_FOR_DOOR_CLOSE_STATE, ///< Wait for door to be closed before running self-tests + NO_CART_SELF_TESTS_PRESSURE_CHECKS_STATE, ///< No cartridge pressure sensors self-test state + NO_CART_SELF_TESTS_HOME_VALVES_STATE, ///< No cartridge home valves state + NO_CART_SELF_TESTS_HOME_SYRINGE_PUMP_STATE, ///< No cartridge home syringe pump state + NO_CART_SELF_TESTS_PUMPS_STATE, ///< No cartridge self-test for blood pump, dialysate in pump, dialysate out pump state + NO_CART_SELF_TESTS_HOME_IDLE_STATE, ///< Wait for valves and pumps finish homing state + NO_CART_SELF_TESTS_STOPPED_STATE, ///< No cart self-test stopped state + NO_CART_SELF_TESTS_COMPLETE_STATE, ///< No cartridge self-test complete state + NUM_OF_NO_CART_SELF_TESTS_STATES ///< Number of no cartridge self-tests states +}; +/// Type for no cartridge self-tests enumeration. +typedef enum HD_Pre_Treatment_No_Cart_Self_Tests_States NO_CART_SELF_TESTS_STATE_T; + +/// Enumeration of dry self-tests sub-mode states. +enum HD_Pre_Treatment_Dry_Self_Tests_States +{ + DRY_SELF_TESTS_START_STATE = 0, ///< Dry self-tests starting state + DRY_SELF_TESTS_WAIT_FOR_DOOR_CLOSE_STATE, ///< Wait for door to close before executing self-tests + DRY_SELF_TESTS_USED_CARTRIDGE_CHECK_STATE, ///< Used cartridge check dry self-test state + DRY_SELF_TESTS_OCCLUSION_SENSORS_STATE, ///< Occlusion sensors dry self-test state + DRY_SELF_TESTS_PRESSURE_SENSORS_SETUP_STATE, ///< Pressure sensors dry self-test setup valves and pump state + DRY_SELF_TESTS_PRESSURE_SENSORS_PRESSURIZED_STATE, ///< Pressure sensors verify pressure readings state + DRY_SELF_TESTS_PRESSURE_SENSORS_DECAY_STATE, ///< Pressure sensors verify pressure loss state + DRY_SELF_TESTS_PRESSURE_SENSORS_STABILITY_STATE, ///< Pressure sensors verify pressure stability state + DRY_SELF_TESTS_PRESSURE_SENSORS_NORMAL_STATE, ///< Pressure sensors verify normal pressure readings state + DRY_SELF_TESTS_SYRINGE_PUMP_PRIME_STATE, ///< Prime syringe pump state + DRY_SELF_TESTS_SYRINGE_PUMP_OCCLUSION_DETECTION_STATE, ///< Occlusion detection state + DRY_SELF_TESTS_STOPPED_STATE, ///< Dry self-test stopped state + DRY_SELF_TESTS_COMPLETE_STATE, ///< Dry self-test complete state + NUM_OF_DRY_SELF_TESTS_STATES ///< Number of dry self-tests states +}; +/// Type for dry self-tests enumeration. +typedef enum HD_Pre_Treatment_Dry_Self_Tests_States DRY_SELF_TESTS_STATE_T; + +/// Wet self-tests state machine. +enum Wet_Self_Tests_States +{ + WET_SELF_TESTS_START_STATE = 0, ///< Wet self-tests starting state. + WET_SELF_TESTS_SETUP_STATE, ///< Setup reservoirs for wet self-tests. + WET_SELF_TESTS_BUBBLES_STATE, ///< Wet self-test air bubble detectors state. + WET_SELF_TESTS_PRIME_CHECK_STATE, ///< Prime check wet self-tests state, checks for primed patient lines. + WET_SELF_TESTS_BLOOD_LEAK_DETECTOR_STATE, ///< Blood leak detector self-test state. + WET_SELF_TESTS_FIRST_DISPLACEMENT_SETUP_STATE, ///< Setup valve and start dialysate pump for first displacement. + WET_SELF_TESTS_FIRST_DISPLACEMENT_STATE, ///< Fill reservoir 2 with 100 mL of dialysate from reservoir 1 state. + WET_SELF_TESTS_FIRST_DISPLACEMENT_VERIFY_STATE, ///< After first displacement completed verify state. + WET_SELF_TESTS_SECOND_DISPLACEMENT_SETUP_STATE, ///< Setup valve and start dialysate pump for second displacement. + WET_SELF_TESTS_SECOND_DISPLACEMENT_STATE, ///< Fill reservoir 1 with 300 mL of dialysate from reservoir 2 state. + WET_SELF_TESTS_SECOND_DISPLACEMENT_VERIFY_STATE, ///< After first displacement completed verify state. + WET_SELF_TESTS_STOPPED_STATE, ///< Wet self-test stopped state. + WET_SELF_TESTS_COMPLETE_STATE, ///< Wet self-test complete state. + NUM_OF_WET_SELF_TESTS_STATES ///< Number of wet self-tests states. +}; +/// Type for wet self-tests enumeration. +typedef enum Wet_Self_Tests_States WET_SELF_TESTS_STATE_T; + +/**@}*/ + +/** * @addtogroup Prime * @{ */ @@ -151,97 +291,119 @@ enum HD_Pre_Treatment_Prime_States { HD_PRIME_START_STATE = 0, ///< Prime start state + HD_PRIME_WAIT_FOR_USER_START_STATE, ///< Wait for user to start prime state HD_PRIME_SALINE_SETUP_STATE, ///< Saline setup state HD_PRIME_SALINE_PURGE_AIR_STATE, ///< Saline purge air state HD_PRIME_SALINE_CIRC_BLOOD_CIRCUIT_STATE, ///< Circulate blood circuit state HD_PRIME_RESERVOIR_ONE_FILL_COMPLETE_STATE, ///< Wait for reservoir 1 fill complete HD_PRIME_DIALYSATE_DIALYZER_STATE, ///< Dialysate dialyzer fluid path state + HD_PRIME_SALINE_DIALYZER_SETUP_STATE, ///< Saline dialyzer setup state + HD_PRIME_SALINE_DIALYZER_STATE, ///< Saline dialyzer fluid path state HD_PRIME_RESERVOIR_TWO_FILL_COMPLETE_STATE, ///< Wait for reservoir 2 fill complete HD_PRIME_DIALYSATE_BYPASS_STATE, ///< Dialysate bypass fluid path state HD_PRIME_WET_SELF_TESTS_STATE, ///< Perform wet self-tests after priming complete HD_PRIME_PAUSE, ///< Prime pause state, waits to be resumed + HD_PRIME_COMPLETE, ///< Prime complete state NUM_OF_HD_PRIME_STATES ///< Number of prime sub-mode states }; typedef enum HD_Pre_Treatment_Prime_States HD_PRE_TREATMENT_PRIME_STATE_T; ///< Type for HD pre-treatment prime sub-mode states enumeration /**@}*/ - -/** - * @addtogroup HDTreatmentMode - * @{ - */ - -/// Sub-mode states while in treatment mode -enum Treatment_States -{ - TREATMENT_START_STATE = 0, ///< Start treatment, prime blood side with gradual ramp for 1 min. while dialyzer is bypassed. No dialysis or UF taking place - TREATMENT_DIALYSIS_STATE, ///< Perform dialysis. Deliver Heparin as prescribed. Deliver UF as prescribed. Handle saline boluses as requested - TREATMENT_STOP_STATE, ///< Treatment stopped. All pumps off. Dializer bypassed - TREATMENT_RINSEBACK_STATE, ///< Perform rinseback with saline. Dialyzer bypassed. Dialysate recirculating - TREATMENT_RECIRC_STATE, ///< Recirculate saline and dialysate while patient disconnected. Blood lines open and shunted. Dialyzer is bypassed - TREATMENT_DIALYSIS_END_STATE, ///< Dialysis has ended. Blood pump slowed. Dialyzer is bypassed. Dialysate is recirculated. User can rinseback - TREATMENT_END_STATE, ///< Treatment has ended. All pumps off. Dialyzer is bypassed. Blood lines are closed. User to disconnect - NUM_OF_TREATMENT_STATES ///< Number of treatment states (sub-modes) -}; -typedef enum Treatment_States TREATMENT_STATE_T; ///< Type for treatment states enumeration - -/**@}*/ - -/** - * @addtogroup HDPostTreatmentMode - * @{ - */ - -/// Enumeration of post-treatment mode states. -enum HD_Post_Treatment_Mode_States -{ - HD_POST_TREATMENT_STATE_START = 0, ///< Start post-treatment mode state - NUM_OF_HD_POST_TREATMENT_STATES ///< Number of post-treatment mode states -}; -typedef enum HD_Post_Treatment_Mode_States HD_POST_TREATMENT_STATE_T; ///< Type for HD post treatment mode states enumeration - -/**@}*/ - -/** - * @addtogroup HDServiceMode - * @{ - */ - -/// Enumeration of service mode states. -enum HD_Service_States -{ - HD_SERVICE_STATE_START = 0, ///< Start service mode state - NUM_OF_HD_SERVICE_STATES ///< Number of service mode states -}; -typedef enum HD_Service_States HD_SERVICE_STATE_T; ///< Type for HD services states enumeration - -/**@}*/ - -/** - * @addtogroup Dialysis - * @{ - */ - -/// Enumeration of dialysis sub-mode states. -enum Dialysis_States -{ - DIALYSIS_START_STATE = 0, ///< Start state of the dialysis sub-mode state machine - DIALYSIS_UF_STATE, ///< Ultrafiltration state of the dialysis sub-mode state machine - DIALYSIS_SALINE_BOLUS_STATE, ///< Saline bolus state of the dialysis sub-mode state machine - NUM_OF_DIALYSIS_STATES ///< Number of dialysis sub-mode states -}; -typedef enum Dialysis_States DIALYSIS_STATE_T; ///< Type for dialysis states enumeration - -/// Enumeration of ultrafiltration states. -enum UF_States -{ - UF_START_STATE = 0, ///< Start state of the ultrafiltration state machine - UF_PAUSED_STATE, ///< Paused state of the ultrafiltration state machine - UF_RUNNING_STATE, ///< Running state of the ultrafiltration state machine - UF_OFF_STATE, ///< Completed/off state of the ultrafiltration state machine - UF_COMPLETED_STATE, ///< Completed state of ultrafiltration state machine - NUM_OF_UF_STATES ///< Number of ultrafiltration states -}; + +/** + * @addtogroup PreTreatmentRecirc + * @{ + */ + +/// Enumeration of pre-treatment recirculate states. +enum HD_Pre_Treatment_Recirc_States +{ + PRE_TREATMENT_RECIRC_STATE = 0, ///< Pre-treatment recirculate state + PRE_TREATMENT_RECIRC_STOPPED_STATE, ///< Pre-treatment recirculate stopped state + NUM_OF_PRE_TREATMENT_RECIRC_STATES ///< Number of pre-treatment recirculate states +}; +///< Type for HD pre-treatment recirculate sub-mode states enumeration +typedef enum HD_Pre_Treatment_Recirc_States HD_PRE_TREATMENT_RECIRC_STATE_T; + +/**@}*/ + +/** + * @addtogroup HDTreatmentMode + * @{ + */ + +/// Sub-mode states while in treatment mode +enum Treatment_States +{ + TREATMENT_START_STATE = 0, ///< Start treatment - initialize treatment and go to blood prime state + TREATMENT_BLOOD_PRIME_STATE, ///< Prime blood-side of dialyzer with gradual ramp for 1 min. while dialyzer is bypassed. No dialysis or UF taking place. No treatment time. + TREATMENT_DIALYSIS_STATE, ///< Perform dialysis. Deliver Heparin as prescribed. Deliver UF as prescribed. Handle saline boluses as requested + TREATMENT_STOP_STATE, ///< Treatment stopped. All pumps off. Dializer bypassed + TREATMENT_RINSEBACK_STATE, ///< Perform rinseback with saline. Dialyzer bypassed. Dialysate recirculating + TREATMENT_RECIRC_STATE, ///< Recirculate saline and dialysate while patient disconnected. Blood lines open and shunted. Dialyzer is bypassed + TREATMENT_END_STATE, ///< Dialysis has ended. Blood pump slowed. Dialyzer is bypassed. Dialysate is recirculated. User can rinseback + NUM_OF_TREATMENT_STATES ///< Number of treatment states (sub-modes) +}; +typedef enum Treatment_States TREATMENT_STATE_T; ///< Type for treatment states enumeration + +/**@}*/ + +/** + * @addtogroup HDPostTreatmentMode + * @{ + */ + +/// Enumeration of post-treatment mode states. +enum HD_Post_Treatment_Mode_States +{ + HD_POST_TREATMENT_DRAIN_RESERVOIRS_STATE = 0, ///< Drain reservoirs state + HD_POST_TREATMENT_PATIENT_DISCONNECTION_STATE, ///< Patient disconnection state + HD_POST_TREATMENT_DISPOSABLE_REMOVAL_STATE, ///< Disposable removal state + HD_POST_TREATMENT_VERIFY_STATE, ///< Verify cartridge removed, syringe removed, and reservoirs drained state + NUM_OF_HD_POST_TREATMENT_STATES ///< Number of post-treatment mode states +}; +typedef enum HD_Post_Treatment_Mode_States HD_POST_TREATMENT_STATE_T; ///< Type for HD post treatment mode states enumeration + +/**@}*/ + +/** + * @addtogroup HDServiceMode + * @{ + */ + +/// Enumeration of service mode states. +enum HD_Service_States +{ + HD_SERVICE_STATE_START = 0, ///< Start service mode state + NUM_OF_HD_SERVICE_STATES ///< Number of service mode states +}; +typedef enum HD_Service_States HD_SERVICE_STATE_T; ///< Type for HD services states enumeration + +/**@}*/ + +/** + * @addtogroup Dialysis + * @{ + */ + +/// Enumeration of dialysis sub-mode states. +enum Dialysis_States +{ + DIALYSIS_START_STATE = 0, ///< Start state of the dialysis sub-mode state machine + DIALYSIS_UF_STATE, ///< Ultrafiltration state of the dialysis sub-mode state machine + DIALYSIS_SALINE_BOLUS_STATE, ///< Saline bolus state of the dialysis sub-mode state machine + NUM_OF_DIALYSIS_STATES ///< Number of dialysis sub-mode states +}; +typedef enum Dialysis_States DIALYSIS_STATE_T; ///< Type for dialysis states enumeration + +/// Enumeration of ultrafiltration states. +enum UF_States +{ + UF_START_STATE = 0, ///< Start state of the ultrafiltration state machine + UF_PAUSED_STATE, ///< Paused state of the ultrafiltration state machine + UF_RUNNING_STATE, ///< Running state of the ultrafiltration state machine + NUM_OF_UF_STATES ///< Number of ultrafiltration states +}; typedef enum UF_States UF_STATE_T; ///< Type for ultrafiltration states enumeration /// Enumeration of saline bolus states. @@ -253,65 +415,195 @@ SALINE_BOLUS_STATE_MAX_DELIVERED, ///< Maximum saline bolus volume reached - no more saline bolus deliveries allowed NUM_OF_SALINE_BOLUS_STATES ///< Number of saline bolus states }; -typedef enum Saline_Bolus_States SALINE_BOLUS_STATE_T; ///< Type for saline bolus state enumeration - -/// Enumeration of ultrafiltration command IDs. -enum UF_Commands -{ - UF_CMD_PAUSE = 0, ///< Pause UF command - UF_CMD_RESUME, ///< Resume UF command - NUM_OF_UF_CMDS ///< Number of UF commands -}; -typedef enum UF_Commands UF_CMD_T; ///< Type for UF command IDs enumeration - -/// Enumeration of ultrafiltration adjustment option IDs. -enum UF_Adjustments -{ - UF_ADJ_TREATMENT_TIME = 0, ///< Adjust treatment time to achieve new ultrafiltration volume - UF_ADJ_UF_RATE, ///< Adjust UF rate to achieve new ultrafiltration volume - NUM_OF_UF_ADJS ///< Number of UF adjustments -}; -typedef enum UF_Adjustments UF_ADJ_T; ///< Type for UF adjustments IDs enumeration - +typedef enum Saline_Bolus_States SALINE_BOLUS_STATE_T; ///< Type for saline bolus state enumeration + +/// Enumeration of saline bolus command parameters. +enum Saline_Commands +{ + SALINE_CMD_STOP = 0, ///< Stop saline bolus command + SALINE_CMD_START, ///< Start saline bolus command + NUM_OF_SALINE_CMDS ///< Number of saline bolus command parameters +}; +typedef enum Saline_Commands SALINE_CMD_T; ///< Type for saline command enum. + +/// Enumeration of ultrafiltration command IDs. +enum UF_Commands +{ + UF_CMD_PAUSE = 0, ///< Pause UF command + UF_CMD_RESUME, ///< Resume UF command + NUM_OF_UF_CMDS ///< Number of UF commands +}; +typedef enum UF_Commands UF_CMD_T; ///< Type for UF command IDs enumeration + +/// Enumeration of ultrafiltration adjustment option IDs. +enum UF_Adjustments +{ + UF_ADJ_TREATMENT_TIME = 0, ///< Adjust treatment time to achieve new ultrafiltration volume + UF_ADJ_UF_RATE, ///< Adjust UF rate to achieve new ultrafiltration volume + NUM_OF_UF_ADJS ///< Number of UF adjustments +}; +typedef enum UF_Adjustments UF_ADJ_T; ///< Type for UF adjustments IDs enumeration + /**@}*/ /** + * @addtogroup SyringePump + * @{ + */ + +/// Enumeration of heparin states. +enum Heparin_States +{ + HEPARIN_STATE_OFF = 0, ///< No heparin delivery is in progress + HEPARIN_STATE_STOPPED, ///< Heparin delivery stopped by alarm or not yet started + HEPARIN_STATE_PAUSED, ///< Heparin delivery paused + HEPARIN_STATE_INITIAL_BOLUS, ///< Initial heparin bolus delivery in progress + HEPARIN_STATE_DISPENSING, ///< Gradual heparin dispensing in progress + HEPARIN_STATE_COMPLETED, ///< Heparin delivery stopped due to the set stop time before treatment end + HEPARIN_STATE_EMPTY, ///< Heparin Syringe empty + NUM_OF_HEPARIN_STATES ///< Number of saline bolus states +}; +typedef enum Heparin_States HEPARIN_STATE_T; ///< Type for heparin state enumeration + +/// Enumeration of heparin command IDs. +enum Heparin_Commands +{ + HEPARIN_CMD_PAUSE = 0, ///< Pause Heparin command + HEPARIN_CMD_RESUME, ///< Resume Heparin command + NUM_OF_HEPARIN_CMDS ///< Number of Heparin commands +}; +typedef enum Heparin_Commands HEPARIN_CMD_T; ///< Type for HEPARIN command IDs enumeration + +/**@}*/ + +/** + * @addtogroup TreatmentStop + * @{ + */ + +/// Enumeration of treatment stop sub-mode states. +enum Treatment_Stop_States +{ + TREATMENT_STOP_RECIRC_STATE = 0, ///< Dialysate and Blood re-circulation state of the treatment stop sub-mode state machine + TREATMENT_STOP_RECIRC_DIALYSATE_ONLY_STATE, ///< Re-circulate Dialysate only state of the treatment re-circulate sub-mode state machine + TREATMENT_STOP_RECIRC_BLOOD_ONLY_STATE, ///< Re-circulate Blood only state of the treatment re-circulate sub-mode state machine + TREATMENT_STOP_NO_RECIRC_STATE, ///< No re-circulation state of the treatment stop sub-mode state machine + NUM_OF_TREATMENT_STOP_STATES ///< Number of treatment stop sub-mode states +}; +/// Type for treatment stop states enumeration. +typedef enum Treatment_Stop_States TREATMENT_STOP_STATE_T; + +/**@}*/ + +/** + * @addtogroup BloodPrime + * @{ + */ + +/// Enumeration of blood prime sub-mode states. +enum Blood_Prime_States +{ + BLOOD_PRIME_RAMP_STATE = 0, ///< Ramp state of the blood prime sub-mode state machine + NUM_OF_BLOOD_PRIME_STATES ///< Number of blood prime sub-mode states +}; +/// Type for treatment end states enumeration. +typedef enum Blood_Prime_States BLOOD_PRIME_STATE_T; + +/**@}*/ + +/** * @addtogroup Rinseback * @{ */ /// Enumeration of rinseback sub-mode states. enum Rinseback_States { - RINSEBACK_STOP_INIT_STATE = 0, ///< Start state (stopped) of the rinseback sub-mode state machine - RINSEBACK_RUN_STATE, ///< Rinseback running state of the rinseback sub-mode state machine - RINSEBACK_PAUSED_STATE, ///< Rinseback paused state of the rinseback sub-mode state machine - RINSEBACK_STOP_STATE, ///< Rinseback stopped (done) state of the rinseback sub-mode state machine - RINSEBACK_RUN_ADDITIONAL_STATE, ///< Additional rinseback volume (10 mL) state of the rinseback sub-mode state machine - NUM_OF_RINSEBACK_STATES ///< Number of rinseback sub-mode states + RINSEBACK_STOP_INIT_STATE = 0, ///< Start state (stopped) of the rinseback sub-mode state machine + RINSEBACK_RUN_STATE, ///< Rinseback running state of the rinseback sub-mode state machine + RINSEBACK_PAUSED_STATE, ///< Rinseback paused state of the rinseback sub-mode state machine + RINSEBACK_STOP_STATE, ///< Rinseback stopped (done) state of the rinseback sub-mode state machine + RINSEBACK_RUN_ADDITIONAL_STATE, ///< Additional rinseback volume (10 mL) state of the rinseback sub-mode state machine + NUM_OF_RINSEBACK_STATES ///< Number of rinseback sub-mode states }; -typedef enum Rinseback_States RINSEBACK_STATE_T; ///< Type for rinseback states enumeration. +typedef enum Rinseback_States RINSEBACK_STATE_T; ///< Type for rinseback states enumeration. +/// Enumeration of user actions that may be requested from rinseback sub-mode. +enum Requested_Rinseback_User_Actions +{ + REQUESTED_USER_ACTION_RINSEBACK_CONFIRM_START = 0, ///< User confirms saline bag clamped, connected to end of arterial line, un-clamped, and ready to start rinseback operation + REQUESTED_USER_ACTION_RINSEBACK_INCREASE_RATE = 1, ///< User requests increase in rinseback flow rate + REQUESTED_USER_ACTION_RINSEBACK_DECREASE_RATE = 2, ///< User requests decrease in rinseback flow rate + REQUESTED_USER_ACTION_RINSEBACK_PAUSE = 3, ///< User requests to pause rinseback operation + REQUESTED_USER_ACTION_RINSEBACK_RESUME = 4, ///< User requests to resume rinseback operation + REQUESTED_USER_ACTION_RINSEBACK_END = 5, ///< User requests to end the rinseback operation + REQUESTED_USER_ACTION_RINSEBACK_ADDITIONAL = 6, ///< User requests an additional 10 mL of rinseback volume + REQUESTED_USER_ACTION_RINSEBACK_CONFIRM_DISCONNECT = 7, ///< User confirms patient disconnected, saline bag clamped, re-connected to VBA, un-clamped, and lines shunted to start re-circulation + REQUESTED_USER_ACTION_RINSEBACK_END_TREATMENT = 8, ///< User requests to end treatment + REQUESTED_USER_ACTION_RINSEBACK_BACK_TO_TREATMENT = 9, ///< User requests to return to treatment + NUM_OF_REQUESTED_RINSEBACK_USER_ACTIONS ///< Number of requested rinseback user actions +}; +/// Type for requested user actions enumeration. +typedef enum Requested_Rinseback_User_Actions REQUESTED_RINSEBACK_USER_ACTIONS_T; + /**@}*/ /** - * @addtogroup TreatmentRecirc + * @addtogroup TreatmentRecirculate * @{ */ /// Enumeration of treatment re-circulation sub-mode states. enum Treatment_Recirc_States { - TREATMENT_RECIRC_RECIRC_STATE = 0, ///< Re-circulate state of the treatment re-circulate sub-mode state machine - TREATMENT_RECIRC_UF_STATE, ///< Stopped state of the treatment re-circulate sub-mode state machine - NUM_OF_TREATMENT_RECIRC_STATES ///< Number of treatment re-circulate sub-mode states + TREATMENT_RECIRC_RECIRC_STATE = 0, ///< Re-circulate Dialysate state of the treatment re-circulate sub-mode state machine + TREATMENT_RECIRC_STOPPED_STATE, ///< Stopped state of the treatment re-circulate sub-mode state machine + NUM_OF_TREATMENT_RECIRC_STATES ///< Number of treatment re-circulate sub-mode states }; /// Type for treatment re-circulation states enumeration. typedef enum Treatment_Recirc_States TREATMENT_RECIRC_STATE_T; +/// Enumeration of user actions that may be requested from treatment re-circulate sub-mode. +enum Requested_Treatment_Recirc_User_Actions +{ + REQUESTED_USER_ACTION_TX_RECIRC_RECONNECT = 0, ///< User requests to re-connect to system (stop re-circulating, clamp arterial and venous lines) + REQUESTED_USER_ACTION_TX_RECIRC_CONFIRM_RECONNECT = 1, ///< User confirms patient connected, lines un-shunted to return to treatment + REQUESTED_USER_ACTION_TX_RECIRC_RESUME_RC = 2, ///< User requests to resume re-circulation + REQUESTED_USER_ACTION_TX_RECIRC_END_TREATMENT = 3, ///< User requests to end treatment + NUM_OF_REQUESTED_TX_RECIRC_USER_ACTIONS ///< Number of requested treatment re-circ user actions +}; +/// Type for requested user actions enumeration. +typedef enum Requested_Treatment_Recirc_User_Actions REQUESTED_TREATMENT_RECIRC_USER_ACTIONS_T; + /**@}*/ /** + * @addtogroup TreatmentEnd + * @{ + */ + +/// Enumeration of treatment end sub-mode states. +enum Treatment_End_States +{ + TREATMENT_END_WAIT_FOR_RINSEBACK_STATE = 0, ///< Wait for rinseback state of the treatment end sub-mode state machine + TREATMENT_END_PAUSED_STATE, ///< Paused state of the treatment end sub-mode state machine + NUM_OF_TREATMENT_END_STATES ///< Number of treatment end sub-mode states +}; +/// Type for treatment end states enumeration. +typedef enum Treatment_End_States TREATMENT_END_STATE_T; + +/// Enumeration of user actions that may be requested from treatment end sub-mode. +enum Requested_Treatment_End_User_Actions +{ + REQUESTED_USER_ACTION_TX_END_RINSEBACK_START = 0, ///< User requests to initiate final rinseback + NUM_OF_REQUESTED_TX_END_USER_ACTIONS ///< Number of requested treatment end user actions +}; +/// Type for requested user actions enumeration. +typedef enum Requested_Treatment_End_User_Actions REQUESTED_TREATMENT_END_USER_ACTIONS_T; + +/**@}*/ + +/** * @addtogroup HDTreatmentParamsMode * @{ */ @@ -328,6 +620,7 @@ TREATMENT_PARAM_ACID_CONCENTRATE, ///< Acid concentrate type (enum) TREATMENT_PARAM_BICARB_CONCENTRATE, ///< Bicarbonate concentrate type (enum) TREATMENT_PARAM_DIALYZER_TYPE, ///< Dialysate type (enum) + TREATMENT_PARAM_HEPARIN_TYPE, ///< Heparin type (enum) TREATMENT_PARAM_BP_MEAS_INTERVAL, ///< Blood pressure measurement interval (in minutes) TREATMENT_PARAM_RINSEBACK_FLOW_RATE, ///< Rinseback flow rate (in mL/min) TREATMENT_PARAM_LAST_UINT = TREATMENT_PARAM_RINSEBACK_FLOW_RATE, ///< Last unsigned integer treatment parameter @@ -349,10 +642,12 @@ /// Enumeration of dialyzer types. enum Dialyzer_Types { - DIALYZER_TYPE_NIPRO_ELISIO_H_17 = 0, ///< Nipro Elisio H17 dialyzer - DIALYZER_TYPE_NIPRO_ELISIO_H_19, ///< Nipro Elisio H19 dialyzer + DIALYZER_TYPE_BBRAUN_PRO_13H = 0, ///< BBraun Diacap Pro 13H + DIALYZER_TYPE_BBRAUN_PRO_16H, ///< BBraun Diacap Pro 16H + DIALYZER_TYPE_BBRAUN_PRO_19H, ///< BBraun Diacap Pro 19H DIALYZER_TYPE_FRESENIUS_OPTIFLUX_F160NRE, ///< Fresenius Optiflux F160NRe DIALYZER_TYPE_FRESENIUS_OPTIFLUX_F180NRE, ///< Fresenius Optiflux F180NRe + DIALYZER_TYPE_FRESENIUS_OPTIFLUX_F200NRE, ///< Fresenius Optiflux F200NRe NUM_OF_DIALYZER_TYPES ///< Number of dialyzer types }; typedef enum Dialyzer_Types DIALYZER_TYPE_T; ///< Type for dialyzer types enumeration @@ -375,37 +670,75 @@ }; typedef enum Bicarb_Concentrates BICARB_CONCENTRATE_TYPE_T; ///< Type for bicarbonate concentrates enumeration -/// Enumeration of heparin states. -enum Heparin_States +/**@}*/ + +/// Enumeration of HD pumps. +enum HD_Pumps { - HEPARIN_STATE_OFF = 0, ///< No heparin delivery is in progress - HEPARIN_STATE_PAUSED, ///< Heparin delivery paused - HEPARIN_STATE_INITIAL_BOLUS, ///< Initial heparin bolus delivery in progress - HEPARIN_STATE_DISPENSING, ///< Gradual heparin dispensing in progress - HEPARIN_STATE_COMPLETED, ///< Heparin delivery stopped due to the set stop time before treatment end - HEPARIN_STATE_EMPTY, ///< Heparin Syringe empty - NUM_OF_HEPARIN_STATES ///< Number of saline bolus states + HD_PUMP_BLOOD_PUMP = 0, ///< HD Blood pump + HD_PUMP_DIALYSATE_INLET_PUMP, ///< HD Dialysate inlet pump + HD_PUMP_DIALYSATE_OUTLET_PUMP, ///< HD Dialysate outlet pump + HD_PUMP_SYRINGE, ///< HD Syringe pump + NUM_OF_HD_PUMPS ///< Number of HD pumps }; -typedef enum Heparin_States HEPARIN_STATE_T; ///< Type for heparin state enumeration +typedef enum HD_Pumps HD_PUMP_T; ///< Type for HD pump enumeration -/// Enumeration of heparin command IDs. -enum Heparin_Commands +/** + * @addtogroup HDTreatmentLog + * @{ + */ + +/// Enumeration of treatment event IDs. +enum Tx_Event_List { - HEPARIN_CMD_PAUSE = 0, ///< Pause Heparin command - HEPARIN_CMD_RESUME, ///< Resume Heparin command - NUM_OF_HEPARIN_CMDS ///< Number of Heparin commands + BLOOD_FLOW_RATE_CHANGE_EVENT = 0, ///< Blood flow rate change event + DIALYSATE_FLOW_RATE_CHANGE_EVENT, ///< Dialysate flow rate change event + TREATMENT_DURATION_CHANGE_EVENT, ///< Treatment duration change event + UF_VOLUME_CHANGE_EVENT, ///< Ultrafiltration volume change event + UF_RATE_CHANGE_EVENT, ///< Ultrafiltration rate change event + UF_START_RESUME_EVENT, ///< Ultrafiltration start or resume event + UF_PAUSE_EVENT, ///< Ultrafiltration pause event + ARTERIAL_PRESSURE_LOWER_LIMIT_CHANGE_EVENT, ///< Arterial pressure lower limit change event + ARTERIAL_PRESSURE_UPPER_LIMIT_CHANGE_EVENT, ///< Arterial pressure upper limit change event + VENOUS_PRESSURE_LOWER_LIMIT_CHANGE_EVENT, ///< Venous pressure lower limit change event + VENOUS_PRESSURE_UPPER_LIMIT_CHANGE_EVENT, ///< Venous pressure upper limit change event + HEPARIN_BOLUS_START_EVENT, ///< Heparin bolus start event + HEPARIN_BOLUS_END_EVENT, ///< Heparin bolus end event + HEPARIN_START_RESUME_EVENT, ///< Heparin start or resume event + HEPARIN_STOP_PAUSE_EVENT, ///< Heparin stop or pause event + SALINE_BOLUSES_CHANGE_EVENT, ///< Saline boluses change event + MID_TREATMENT_RINSE_BACK_EVENT, ///< Mid treatment rinse-back event + ALARM_AUDIO_VOLUME_CHANGED_EVENT, ///< Alarm audio volume changed event + FRONT_DOOR_SWITCH_CHANGED_EVENT, ///< Front door switch changed event + PUMP_TRACK_SWITCH_CHANGED_EVENT, ///< Pump track switch changed event + SYRINGE_DETECTION_SWITCH_CHANGED_EVENT, ///< Syringe detection switch changed event + OFF_BUTTON_PRESSED_EVENT, ///< Off button pressed event + STOP_BUTTON_PRESSED_EVENT, ///< Stop button pressed event + NUM_OF_TX_EVENT_IDS ///< Total number of treatment events }; -typedef enum Heparin_Commands HEPARIN_CMD_T; ///< Type for HEPARIN command IDs enumeration +typedef enum Tx_Event_List TX_EVENT_ID_T; ///< Type for treatment event list enumeration -/// Enumeration of start/stop command parameters. -enum Saline_Commands +/**@}*/ + +/** + * @addtogroup CommonHeader + * @{ + */ + +/// Enumeration of HD event IDs. +enum HD_Event_List { - SALINE_CMD_STOP = 0, ///< Start command - SALINE_CMD_START, ///< Stop command - NUM_OF_SALINE_CMDS ///< Number of start/stop command parameters + HD_EVENT_STARTUP = 0, ///< HD startup event + HD_EVENT_OP_MODE_CHANGE, ///< HD Op mode change event + HD_EVENT_SUB_MODE_CHANGE, ///< HD Op sub-mode change event + HD_EVENT_DRY_SELF_TEST_CARTRIDGE_RESULT, + HD_EVENT_DRY_SELF_TEST_PRESSURE_RESULT, + HD_EVENT_WET_SELF_TEST_DISPLACEMENT_RESULT, + HD_EVENT_CPU_RAM_ERROR_STATUS, ///< HD single-bit Ram error event + NUM_OF_EVENT_IDS ///< Total number of HD events }; -typedef enum Saline_Commands SALINE_CMD_T; ///< Type for saline command enum. +typedef enum HD_Event_List HD_EVENT_ID_T; ///< Type for HD event list enumeration -/**@}*/ - -#endif +/**@}*/ + +#endif