Index: leahi_dialin/common/dd_defs.py =================================================================== diff -u -r3d4c97a6c91e32ac6416a5174d8678c704e40474 -r7a7b289d28b91a8cf9ddbd6d5db542abaee9721f --- leahi_dialin/common/dd_defs.py (.../dd_defs.py) (revision 3d4c97a6c91e32ac6416a5174d8678c704e40474) +++ leahi_dialin/common/dd_defs.py (.../dd_defs.py) (revision 7a7b289d28b91a8cf9ddbd6d5db542abaee9721f) @@ -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,17 @@ 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_BLOOD_LEAK_SELF_TEST_RESULT = 13 # DD blood leak self test result + NUM_OF_DD_EVENT_IDS = 14 # Total number of DD events + DDEventList._str_list = { # Official Name : Accepted strings 'DD_EVENT_STARTUP': ['startup'], @@ -350,27 +351,7 @@ } -@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 +419,18 @@ @unique class DDLevelSensorNames(DialinEnum): - D6_LEVEL = 0 # floater switch low, medium and high status - D46_LEVEL = 1 # Spent dialysate air separation conductivity level sensor low or high status - D63_LEVEL = 2 # bicarb lower level conductivity level sensor low or high status - D98_LEVEL = 3 # bicarb upper level conductivity Level sensor low or high status + 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'], 'D46_LEVEL': ['d46'], 'D63_LEVEL': ['d63'], 'D98_LEVEL': ['d98'], + 'D6_LEVEL': ['d6'], 'NUM_OF_LEVELS': [], } @@ -469,7 +450,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) @@ -1004,3 +996,31 @@ 'CANCELLATION_MODE_WATER': ['water'], 'NUM_OF_CANCELLATION_MODES': [], } +@unique +class DDConductivityResistanceAttributes(DialinEnum): + RAW_RESISTANCE = 0 # Raw Conductivity resistance Attribute + RTD_RESISTANCE = 1 # raw RTD resistance Attribute + NUM_OF_RESISTANCE_ATTRIBUTES = 2 # Number of conductivity sensor Attributes + +DDConductivityResistanceAttributes._str_list = { + # Official Name : Accepted strings + 'RAW_RESISTANCE': ['cond resistance,'], + 'RTD_RESISTANCE': ['rtd resistance'], + 'NUM_OF_RESISTANCE_ATTRIBUTES': [], +} +@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': [], +}