Index: leahi_dialin/common/dd_defs.py =================================================================== diff -u -r57ca71b2ff74ef3b96b29586f5aefd5abea222df -ra7faef2bbda805946bbb55873e2b0b3146083555 --- leahi_dialin/common/dd_defs.py (.../dd_defs.py) (revision 57ca71b2ff74ef3b96b29586f5aefd5abea222df) +++ leahi_dialin/common/dd_defs.py (.../dd_defs.py) (revision a7faef2bbda805946bbb55873e2b0b3146083555) @@ -16,7 +16,7 @@ from enum import unique -from ..utils.base import DialinEnum +from ..utils.enums import DialinEnum # ================================================== Enum Creators: Operations Lvl 1 ================================================== @@ -321,16 +321,22 @@ DD_EVENT_SUB_MODE_CHANGE = 2 # DD Op sub-mode change event DD_EVENT_OPERATION_STATUS = 3 # DD operation status event DD_EVENT_D6_LEVL_CHANGE = 4 # DD floater level change event - DD_EVENT_D63_LEVL_CHANGE = 5 # DD bicarb level change event - DD_EVENT_D46_LEVL_CHANGE = 6 # DD spent dialysate air seperation level change event - DD_EVENT_TD_COMMUNICATION_LOSS = 7 # DD TD communication loss - DD_EVENT_TEMPERATURE_DRIFT = 8 # DD dialysate temperature drift - DD_EVENT_BLOOD_LEAK_ZEROING_REQUEST = 9 # DD blood leak zeroing request - DD_EVENT_BLOOD_LEAK_ZEROING_REQUIRED = 10 # DD blood leak zeroing required - DD_EVENT_BLOOD_LEAK_NUM_OF_SET_POINT_CHECK_FAILURES = 11 # DD blood leak number of setpoint check failures - DD_EVENT_BLOOD_LEAK_SELF_TEST_RESULT = 12 # DD blood leak self test result - NUM_OF_DD_EVENT_IDS = 13 # Total number of DD events - + DD_EVENT_D63_LEVL_CHANGE = 5 # DD bicarb upper level change event + DD_EVENT_D98_LEVL_CHANGE = 6 # DD bicarb lower level change event + DD_EVENT_D46_LEVL_CHANGE = 7 # DD spent dialysate air seperation level change event + DD_EVENT_TD_COMMUNICATION_LOSS = 8 # DD TD communication loss + DD_EVENT_TEMPERATURE_DRIFT = 9 # DD dialysate temperature drift + DD_EVENT_BLOOD_LEAK_ZEROING_REQUEST = 10 # DD blood leak zeroing request + DD_EVENT_BLOOD_LEAK_ZEROING_REQUIRED = 11 # DD blood leak zeroing required + DD_EVENT_BLOOD_LEAK_NUM_OF_SET_POINT_CHECK_FAILURES = 12 # DD blood leak number of setpoint check failures + DD_EVENT_CPU_RAM_ERROR_STATUS = 13 # DD CPU RAM error + DD_EVENT_BLOOD_LEAK_SELF_TEST_RESULT = 14 # DD blood leak self test result + DD_EVENT_BC_SWITCH_ONLY_MODE_CHANGE = 15 # DD Balancing Chamber Switching Only status event + DD_EVENT_BC_FILL_STATE_CHANGE = 16 # Balancing chamber state switch event + DD_EVENT_HEATER_STATE_CHANGE = 17 # DD heater state change event + DD_EVENT_DRY_BICART_STATE_CHANGE = 18 # DD Dry Bicart State change event + NUM_OF_DD_EVENT_IDS = 19 # Total number of DD events + DDEventList._str_list = { # Official Name : Accepted strings 'DD_EVENT_STARTUP': ['startup'], @@ -346,31 +352,16 @@ 'DD_EVENT_BLOOD_LEAK_ZEROING_REQUIRED': ['blood leak zeroing required'], 'DD_EVENT_BLOOD_LEAK_NUM_OF_SET_POINT_CHECK_FAILURES': ['blood leak check failed'], 'DD_EVENT_BLOOD_LEAK_SELF_TEST_RESULT': ['blood leak self test'], + 'DD_EVENT_CPU_RAM_ERROR_STATUS': ['cpu ram error status', 'cpu error status', 'ram error status', 'memory error status'], + 'DD_EVENT_BC_SWITCH_ONLY_MODE_CHANGE': ['bc switch only change'], + 'DD_EVENT_BC_FILL_STATE_CHANGE': ['bc state change'], + 'DD_EVENT_HEATER_STATE_CHANGE': ['heater state change'], + 'DD_EVENT_DRY_BICART_STATE_CHANGE': ['dry bicart state change'], 'NUM_OF_DD_EVENT_IDS': [], } -@unique -class DDEventDataTypes(DialinEnum): - EVENT_DATA_TYPE_NONE = 0 # No Event Data Type - EVENT_DATA_TYPE_U32 = 1 # Unsigned 32bit Event Data Type - EVENT_DATA_TYPE_S32 = 2 # Signed 32bit Event Data Type - EVENT_DATA_TYPE_F32 = 3 # Float 32bit Event Data Type - EVENT_DATA_TYPE_BOOL = 4 # Boolean Event Data Type - NUM_OF_EVENT_DATA_TYPES = 5 # Number of Event Data Types -DDEventDataTypes._str_list = { - # Official Name : Accepted strings - 'EVENT_DATA_TYPE_NONE': ['none'], - 'EVENT_DATA_TYPE_U32': ['u32'], - 'EVENT_DATA_TYPE_S32': ['s32'], - 'EVENT_DATA_TYPE_F32': ['f32'], - 'EVENT_DATA_TYPE_BOOL': ['bool', 'boolean'], - 'NUM_OF_EVENT_DATA_TYPES': [], -} - - - # ================================================== Enum Creators: Names ================================================== @unique class DDConcentratePumpNames(DialinEnum): @@ -438,18 +429,18 @@ @unique class DDLevelSensorNames(DialinEnum): - D6_LEVEL = 0 # floater switch low, medium and high status - D63_LEVEL = 1 # bicarb level low or high status - D46_LEVEL = 2 # Spent dialysate air separation chamber level low or high status - D98_LEVEL = 3 # D98 Conductivity Level Sensor + D46_LEVEL = 0 # Spent dialysate air separation chamber level low or high status + D63_LEVEL = 1 # bicarb lower conductivity level sensor low or high status + D98_LEVEL = 2 # bicarb upper conductivity level sensor low or high status + D6_LEVEL = 3 # floater switch low, medium and high status NUM_OF_LEVELS = 4 # Number of Level Sensors DDLevelSensorNames._str_list = { # Official Name : Accepted strings - 'D6_LEVEL': ['d6'], - 'D63_LEVEL': ['d63'], 'D46_LEVEL': ['d46'], + 'D63_LEVEL': ['d63'], 'D98_LEVEL': ['d98'], + 'D6_LEVEL': ['d6'], 'NUM_OF_LEVELS': [], } @@ -469,7 +460,18 @@ 'NUM_OF_PISTON_PUMPS': [], } +@unique +class DDSubstitutionPumpNames(DialinEnum): + D92_PUMP = 0 # HDF Substitution pump + NUM_OF_SUB_PUMPS = 1 # Number of substituion pumps +DDSubstitutionPumpNames._str_list = { + # Official Name : Accepted strings + 'D92_PUMP': ['d92', 'sub pump'], + 'NUM_OF_SUB_PUMPS': [], +} + + @unique class DDPressureSensorNames(DialinEnum): D9_PRES = 0 # Hydraulics outlet pressure (PHo/Pn) @@ -510,13 +512,14 @@ D28_AVG_TEMP = 14 # D28 Filtered value D30_AVG_TEMP = 15 # D30 Filtered value D78_AVG_TEMP = 16 # D78 Filtered value - D9_TEMP = 17 # D9 Pressure sensor temperature value - D66_TEMP = 18 # D66 Pressure sensor temperature value - D51_TEMP = 19 # D51 Pressure sensor temperature value - D18_TEMP = 20 # D18 Pressure sensor temperature value - D41_TEMP = 21 # D41 Pressure sensor temperature value - D87_TEMP = 22 # D87 Pressure sensor temperature value - NUM_OF_TEMP_SENSORS = 23 # Number of Temperature Sensors + D1_AVG_TEMP = 17 # D1 Filtered value + D9_TEMP = 18 # D9 Pressure sensor temperature value + D66_TEMP = 19 # D66 Pressure sensor temperature value + D51_TEMP = 20 # D51 Pressure sensor temperature value + D18_TEMP = 21 # D18 Pressure sensor temperature value + D41_TEMP = 22 # D41 Pressure sensor temperature value + D87_TEMP = 23 # D87 Pressure sensor temperature value + NUM_OF_TEMP_SENSORS = 24 # Number of Temperature Sensors # Aliases FIRST_PRESSURE_SENSOR = D9_TEMP @@ -638,7 +641,11 @@ MONITORED_LINE_FPGA_VCC_V = 5 # FPGA Vcc (3V) MONITORED_LINE_FPGA_AUX_V = 6 # FPGA Vaux (3V) MONITORED_LINE_FPGA_PVN_V = 7 # FPGA Vpvn (1V) - NUM_OF_MONITORED_VOLTAGE_LINES = 8 # Number of TD operation modes + FPGA_AC_DC_POWER_SUPPY_VOLTAGE = 8 # FPGA power supply voltage, not-monitored + FPGA_AC_DC_POWER_SUPPY_CURRENT = 9 # FPGA power supply current, not-monitored + FPGA_AC_HEATER_VOLTAGE = 10 # FPGA heater voltage, not-monitored + FPGA_AC_HEATER_CURRENT = 11 # FPGA heater current, not-monitored + NUM_OF_MONITORED_VOLTAGE_LINES = 12 # Number of TD operation modes DDMonitoredVoltages._str_list = { # Official Name : Accepted strings @@ -650,6 +657,10 @@ 'MONITORED_LINE_FPGA_VCC_V': ['fpga vcc'], 'MONITORED_LINE_FPGA_AUX_V': ['fpga aux'], 'MONITORED_LINE_FPGA_PVN_V': ['fpga pvn'], + 'FPGA_AC_DC_POWER_SUPPY_VOLTAGE': ['power supply voltage'], + 'FPGA_AC_DC_POWER_SUPPY_CURRENT': ['power supply current'], + 'FPGA_AC_HEATER_VOLTAGE':['ac heater voltage'], + 'FPGA_AC_HEATER_CURRENT':['ac heater current'], 'NUM_OF_MONITORED_VOLTAGE_LINES': [], } @@ -895,7 +906,7 @@ HEAT_DUTY_CYCLE = 0 # Heat Duty Cycle Attribute for Heaters HEAT_TARGET_TEMP = 1 # Target Temperature Attribute for Heaters HEAT_STATE = 2 # State to command Attribute for Heaters - DUTY_CYCLE_COUNT = 3 # Duty Cycle Count Attribute for Heaters + FEED_FORWARD = 3 # Feed Forward Attribute for Heaters PWM_PERIOD = 4 # Pulse Width Modulation Attribute for Heaters ADJUSTED_TARGET_TEMP = 5 # Adjusted Target Temperature Attribute for Heaters TARGET_TEMP_TD = 6 # Target Temperature Attribute for Heaters @@ -906,7 +917,7 @@ 'HEAT_DUTY_CYCLE': ['duty cycle'], 'HEAT_TARGET_TEMP': ['target temperature', 'target temp'], 'HEAT_STATE': ['state', 'heat state'], - 'DUTY_CYCLE_COUNT': ['duty cycle count'], + 'FEED_FORWARD': [], 'PWM_PERIOD': ['pwm', 'pwm period'], 'ADJUSTED_TARGET_TEMP': ['adjusted target temperature', 'adj target temp'], 'TARGET_TEMP_TD': ['target temperature td', 'target temp td'], @@ -1004,3 +1015,39 @@ 'CANCELLATION_MODE_WATER': ['water'], 'NUM_OF_CANCELLATION_MODES': [], } + + +@unique +class DDSubstitutionPumpAttributes(DialinEnum): + TARGET_SPEED = 0 # Target RPM Substitution Pump Attribute + CURRENT_SPEED = 1 # Current Speed Substitution Pump Attribute + STATE = 2 # State to command Substitution Pump Attribute + MEASURED_SPEED = 3 # Measured Speed Substitution Pump Attribute + NUM_OF_DIALYSATE_PUMP_ATTRIBUTES = 4 # Number of Substitution Pump Attributes + +DDSubstitutionPumpAttributes._str_list = { + # Official Name : Accepted strings + 'TARGET_SPEED': ['target rp,'], + 'CURRENT_SPEED': ['current speed'], + 'STATE': ['state'], + 'MEASURED_SPEED': ['measured speed'], + 'NUM_OF_DIALYSATE_PUMP_ATTRIBUTES': [], +} + + +@unique +class DDConductivityResistanceAttributes(DialinEnum): + CONDUCTIVITY = 0 # Conductivity + CONDUCTIVITY_RESISTANCE = 1 # raw conductivity resistance Attribute + RTD_RESISTANCE = 2 # raw RTD resistance Attribute + UNCOMPENSATED_COND = 3 # Uncompensated Conductivity + NUM_OF_RESISTANCE_ATTRIBUTES = 4 # Number of conductivity sensor Attributes + +DDConductivityResistanceAttributes._str_list = { + # Official Name : Accepted strings + 'CONDUCTIVITY': ['conductivity,'], + 'CONDUCTIVITY_RESISTANCE': ['conductivity resistance'], + 'RTD_RESISTANCE' : ['rtd resistance'], + 'UNCOMPENSATED_COND' : ['uncompensated conductivity'], + 'NUM_OF_RESISTANCE_ATTRIBUTES': [], +} \ No newline at end of file