Index: leahi_dialin/common/__init__.py =================================================================== diff -u -re45b20cdc5d4c5dcff8cef530b173ca94cb2e422 -rcdc6acfe393fcc90595116cf478725e16eba7f28 --- leahi_dialin/common/__init__.py (.../__init__.py) (revision e45b20cdc5d4c5dcff8cef530b173ca94cb2e422) +++ leahi_dialin/common/__init__.py (.../__init__.py) (revision cdc6acfe393fcc90595116cf478725e16eba7f28) @@ -22,7 +22,8 @@ else: from .alarm_defs import * from .alarm_priorities import * - from .td_defs_proxy import td_enum_repository from .dd_defs_proxy import dd_enum_repository + from .disp_defs_proxy import disp_enum_repository from .fp_defs_proxy import fp_enum_repository + from .td_defs_proxy import td_enum_repository from .ui_defs import * Index: leahi_dialin/common/dd_defs.py =================================================================== diff -u -r5994adea1a1022175f9cc4e6dacfa02de3fc45a0 -rcdc6acfe393fcc90595116cf478725e16eba7f28 --- leahi_dialin/common/dd_defs.py (.../dd_defs.py) (revision 5994adea1a1022175f9cc4e6dacfa02de3fc45a0) +++ leahi_dialin/common/dd_defs.py (.../dd_defs.py) (revision cdc6acfe393fcc90595116cf478725e16eba7f28) @@ -642,7 +642,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 @@ -654,6 +658,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': [], } @@ -1030,13 +1038,17 @@ @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 + 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 - 'RAW_RESISTANCE': ['cond resistance,'], - 'RTD_RESISTANCE': ['rtd resistance'], + 'CONDUCTIVITY': ['conductivity,'], + 'CONDUCTIVITY_RESISTANCE': ['conductivity resistance'], + 'RTD_RESISTANCE' : ['rtd resistance'], + 'UNCOMPENSATED_COND' : ['uncompensated conductivity'], 'NUM_OF_RESISTANCE_ATTRIBUTES': [], } \ No newline at end of file Index: leahi_dialin/common/generic_defs.py =================================================================== diff -u -r8257dbd42d1aec14186797dffbfae3b4499a7fcc -rcdc6acfe393fcc90595116cf478725e16eba7f28 --- leahi_dialin/common/generic_defs.py (.../generic_defs.py) (revision 8257dbd42d1aec14186797dffbfae3b4499a7fcc) +++ leahi_dialin/common/generic_defs.py (.../generic_defs.py) (revision cdc6acfe393fcc90595116cf478725e16eba7f28) @@ -65,7 +65,52 @@ } +@unique +class AlarmProperties(DialinEnum): + PRIORITY = 0 # + RANK = 1 # + SOURCE = 2 # + SYSTEM_FAULT = 3 # + DD_FAULT = 4 # + STOPS = 5 # + CLEAR_IMMEDIATELY = 6 # + NO_CLEAR = 7 # + NO_RESUME = 8 # + NO_RINSEBACK = 9 # + NO_END_TREATMENT = 10 # + NOT_IN_RINSEBACK = 11 # + NOT_IN_POST_TREATMENT = 12 # + NO_BLOOD_RECIRC = 13 # + NO_DIAL_RECIRC = 14 # + AUTO_RESUME = 15 # + CLEAR_ALARM_ONLY = 16 # + TREATMENT_LOG = 17 # + NUM_OF_ALARM_PROPERTIES = 18 # +AlarmProperties.STR_LIST = { + 'PRIORITY': [], + 'RANK': [], + 'SOURCE': [], + 'SYSTEM_FAULT': [], + 'DD_FAULT': [], + 'STOPS': [], + 'CLEAR_IMMEDIATELY': [], + 'NO_CLEAR': [], + 'NO_RESUME': [], + 'NO_RINSEBACK': [], + 'NO_END_TREATMENT': [], + 'NOT_IN_RINSEBACK': [], + 'NOT_IN_POST_TREATMENT': [], + 'NO_BLOOD_RECIRC': [], + 'NO_DIAL_RECIRC': [], + 'AUTO_RESUME': [], + 'CLEAR_ALARM_ONLY': [], + 'TREATMENT_LOG': [], + 'NUM_OF_ALARM_PROPERTIES ': [] +} + + + # ================================================== Enum Creators: Record Base ================================================== @unique class RecordsBaseEnum(DialinEnum): Index: leahi_dialin/common/msg_ids.py =================================================================== diff -u -r5ee0dd4d1d95856defa2a8f20936d5080da62bd5 -rcdc6acfe393fcc90595116cf478725e16eba7f28 --- leahi_dialin/common/msg_ids.py (.../msg_ids.py) (revision 5ee0dd4d1d95856defa2a8f20936d5080da62bd5) +++ leahi_dialin/common/msg_ids.py (.../msg_ids.py) (revision cdc6acfe393fcc90595116cf478725e16eba7f28) @@ -119,8 +119,8 @@ MSG_ID_TD_SOLUTION_INFUSION_RESPONSE = 0x60 MSG_ID_DD_BLOOD_LEAK_DATA = 0x61 MSG_ID_DD_FP_INLET_PRESSURE_CHECK_DATA = 0x62 - MSG_ID_UI_BLOOD_PRESSURE_REQUEST = 0x63 - MSG_ID_TD_BLOOD_PRESSURE_RESPONSE = 0x64 + MSG_ID_UI_BLOOD_PRESSURE_REQUEST = 0x63 + MSG_ID_TD_BLOOD_PRESSURE_RESPONSE = 0x64 MSG_ID_TD_BLOOD_PRESSURE_DATA = 0x65 MSG_ID_USER_CONFIRM_UF_SETTINGS_CHANGE_REQUEST = 0x66 MSG_ID_USER_UF_SETTINGS_CHANGE_CONFIRMATION_RESPONSE = 0x67 @@ -203,7 +203,7 @@ MSG_ID_FFU_SIGNAL_DD_UPDATE_AVAILABLE = 0xB4 MSG_ID_TD_UI_CONFIRMATION_REQUEST = 0xB5 MSG_ID_UI_CONFIRMATION_RESULT_RESPONSE = 0xB6 - MSG_ID_TD_POWER_OFF_REQUEST = 0xB7 + AVAILABLE_MSG_ID_B7 = 0xB7 MSG_ID_UI_VITALS_ADJUSTMENT_REQUEST = 0xB8 MSG_ID_TD_VITALS_ADJUSTMENT_RESPONSE = 0xB9 MSG_ID_UI_DD_NVM_GET_RECORD_REQUEST = 0xBA @@ -373,7 +373,7 @@ MSG_ID_DD_VALVE_SENSED_STATE_OVERRIDE_REQUEST = 0xA005 MSG_ID_DD_PRESSURE_SENSOR_READINGS_OVERRIDE_REQUEST = 0xA006 MSG_ID_DD_PRESSURE_SENSOR_TEMPERATURE_OVERRIDE_REQUEST = 0xA007 - MSG_ID_DD_PRESSURE_SENSOR_READ_COUNTER_OVERRIDE_REQUEST = 0xA008 + MSG_ID_DD_TREATMENT_PARAMS_OVERRIDE_REQUEST = 0xA008 MSG_ID_DD_PRESSURE_SENSOR_ERROR_COUNTER_OVERRIDE_REQUEST = 0xA009 MSG_ID_DD_PRESSURE_SENSOR_PUBLISH_INTERVAL_OVERRIDE_REQUEST = 0xA00A MSG_ID_DD_PRESSURE_SENSOR_FILTER_READINGS_OVERRIDE_REQUEST = 0xA00B @@ -474,7 +474,7 @@ MSG_ID_DD_BICART_LOWER_PRESSURE_OVERRIDE_REQUEST = 0xA06B MSG_ID_DD_FLOATER_LEVEL_OVERRIDE_REQUEST = 0xA06C MSG_ID_DD_SUBSTITUTION_PUMP_START_STOP_OVERRIDE_REQUEST = 0xA06D - MSG_ID_DD_SUBSTITUTION_PUMP_BROADCAST_OVERRIDE_REQUEST = 0xA06E + MSG_ID_DD_SUBSTITUTION_PUMP_PUBLISH_INTERVAL_OVERRIDE_REQUEST = 0xA06E MSG_ID_DD_SUBSTITUTION_PUMP_TARGET_SPEED_OVERRIDE_REQUEST = 0xA06F MSG_ID_DD_CONDUCTIVITY_SENSOR_CAL_REQUEST = 0xA070 MSG_ID_DD_CONDUCTIVITY_SENSOR_CAL_RESPONSE = 0xA071 Index: leahi_dialin/common/td_defs_proxy.py =================================================================== diff -u -ra9a280f1f678c984654c15a827da1bcd4ce0663c -rcdc6acfe393fcc90595116cf478725e16eba7f28 --- leahi_dialin/common/td_defs_proxy.py (.../td_defs_proxy.py) (revision a9a280f1f678c984654c15a827da1bcd4ce0663c) +++ leahi_dialin/common/td_defs_proxy.py (.../td_defs_proxy.py) (revision cdc6acfe393fcc90595116cf478725e16eba7f28) @@ -79,6 +79,7 @@ # Sensor Attributes TDAirPumpAttributes = td_defs.TDAirPumpAttributes + TDAirPumpStates = td_defs.TDAirPumpStates TDAirTrapLevelSensorAttributes = td_defs.TDAirTrapLevelSensorAttributes TDAirTrapState = td_defs.TDAirTrapState TDBloodFlowMotorAttributes = td_defs.TDBloodFlowMotorAttributes @@ -95,6 +96,9 @@ TDTreatmentModalityTypes = td_defs.TDTreatmentModalityTypes TDTreatmentHDFDilution = td_defs.TDTreatmentHDFDilution + # Alarms + AlarmProperties = generic_defs.AlarmProperties + # Records RecordTypes = generic_defs.RecordTypes SystemRecordFields = generic_defs.SystemRecordFields @@ -109,5 +113,4 @@ CalibRecordConcentrateFields = generic_defs.CalibRecordConcentrateFields CalibRecordSensorFields = generic_defs.CalibRecordSensorFields - td_enum_repository = TD_Defs() Index: leahi_dialin/dd/dialysate_delivery.py =================================================================== diff -u -re7c76d620568e574df68be3bd0efb52a9b5d2845 -rcdc6acfe393fcc90595116cf478725e16eba7f28 --- leahi_dialin/dd/dialysate_delivery.py (.../dialysate_delivery.py) (revision e7c76d620568e574df68be3bd0efb52a9b5d2845) +++ leahi_dialin/dd/dialysate_delivery.py (.../dialysate_delivery.py) (revision cdc6acfe393fcc90595116cf478725e16eba7f28) @@ -21,18 +21,19 @@ from .modules.concentrate_pump import DDConcentratePumps from .modules.conductivity_sensors import DDConductivitySensors from .modules.dialysate_pump import DDDialysatePumps +from .modules.drybicart import DDDryBicart from .modules.events import DDEvents from .modules.gen_dialysate import DDGenDialysate from .modules.heaters import DDHeaters from .modules.levels import DDLevels +from .modules.mixing_cntrl import DDDialysateMixing from .modules.post_gen_dialysate import DDPostGenDialysate from .modules.pressure_sensors import DDPressureSensors from .modules.pre_gen_dialysate import DDPreGenDialysate from .modules.rinse_pump import DDRinsePump +from .modules.records import DDRecords from .modules.spent_chamber_fill import DDSpentChamberFill from .modules.substitution_pump import DDSubstitutionPump -from .modules.drybicart import DDDryBicart -from .modules.mixing_cntrl import DDDialysateMixing from .modules.temperature_sensors import DDTemperatureSensors from .modules.dd_test_configs import DDTestConfig from .modules.ultrafiltration import DDUltrafiltration @@ -137,6 +138,7 @@ self.pressure_sensors = DDPressureSensors(self.can_interface, self.logger) #: The Pressure Sensors module self.pre_gen_dialysate = DDPreGenDialysate(self.can_interface, self.logger) #: The Pre Generate Dialysate module self.rinse_pump = DDRinsePump(self.can_interface, self.logger) #: The Rinse Pump module + self.records = DDRecords(self.can_interface, self.logger) #: The Records (System, Service, Calibration, Institutional, Usage Information) module self.spent_chamber_fill = DDSpentChamberFill(self.can_interface, self.logger) #: The Spent Chamber module self.substitution_pump = DDSubstitutionPump(self.can_interface, self.logger) #: The Substitution Pump module self.temperature_sensors = DDTemperatureSensors(self.can_interface, self.logger) #: The Temperature Sensors module Index: leahi_dialin/fp/modules/events.py =================================================================== diff -u -r1f7b5ac840adf6740b023706fcb73691c33a9be7 -rcdc6acfe393fcc90595116cf478725e16eba7f28 --- leahi_dialin/fp/modules/events.py (.../events.py) (revision 1f7b5ac840adf6740b023706fcb73691c33a9be7) +++ leahi_dialin/fp/modules/events.py (.../events.py) (revision cdc6acfe393fcc90595116cf478725e16eba7f28) @@ -21,7 +21,8 @@ from leahi_dialin.common import dd_enum_repository, fp_enum_repository from leahi_dialin.common.generic_defs import DataTypes -from leahi_dialin.common.msg_defs import MsgIds, MsgFieldPositions +from leahi_dialin.common.msg_defs import MsgFieldPositions +from leahi_dialin.common.msg_ids import MsgIds from leahi_dialin.protocols.CAN import CanMessenger, CanChannels, CanMessenger from leahi_dialin.utils.abstract_classes import AbstractSubSystem from leahi_dialin.utils.base import publish @@ -73,7 +74,9 @@ for event in fp_enum_repository.FPEventList: self._event_dictionary[fp_enum_repository.FPEventList(event).name] = [] + self.handler_execution_times = [] + def get_fp_nth_event(self, event_id, event_number=0): """ Returns the nth requested FP event @@ -141,6 +144,7 @@ @param message: published FP events data message @returns none """ + start = time.perf_counter() event_data_1 = 0 event_data_2 = 0 op_mode = 0 @@ -288,8 +292,8 @@ # Update event dictionary self._event_dictionary[event_enum.name].append(event_tuple) self.events_timestamp = timestamp + self.handler_execution_times.append((timestamp, message, time.perf_counter() - start)) - @publish(["msg_id_fp_op_mode_data", "event_op_mode_timestamp", "op_mode", "sub_mode"]) def _handler_fp_op_mode_sync(self, message, timestamp=0.0): """ Index: leahi_dialin/td/treatment_delivery.py =================================================================== diff -u -r5994adea1a1022175f9cc4e6dacfa02de3fc45a0 -rcdc6acfe393fcc90595116cf478725e16eba7f28 --- leahi_dialin/td/treatment_delivery.py (.../treatment_delivery.py) (revision 5994adea1a1022175f9cc4e6dacfa02de3fc45a0) +++ leahi_dialin/td/treatment_delivery.py (.../treatment_delivery.py) (revision cdc6acfe393fcc90595116cf478725e16eba7f28) @@ -23,6 +23,7 @@ from .modules.air_trap import TDAirTrap from .modules.alarms import TDAlarms from .modules.blood_flow import TDBloodFlow +from .modules.blood_pressure import TDBloodPressure from .modules.bubble_detector import TDBubbleDetector from .modules.buttons import TDButtons from .modules.ejector import TDEjector @@ -41,7 +42,8 @@ from .proxies.ui_proxy import UIProxy from ..common.constants import NO_RESET -from ..common.msg_defs import MsgIds, MsgFieldPositions +from ..common.msg_defs import MsgFieldPositions +from ..common.msg_ids import MsgIds from ..common import td_enum_repository from ..common.generic_defs import DataTypes from ..common.override_templates import cmd_generic_broadcast_interval_override, cmd_generic_override @@ -130,6 +132,7 @@ self.air_trap = TDAirTrap(self.can_interface, self.logger) #: The Air Trap module self.alarms = TDAlarms(self.can_interface, self.logger) #: The Alarms module self.blood_flow = TDBloodFlow(self.can_interface, self.logger) #: The Blood Flow module + self.blood_pressure = TDBloodPressure(self.can_interface, self.logger) #: The Blood Pressure module self.bubbles = TDBubbleDetector(self.can_interface, self.logger) #: The Bubble Detector module self.buttons = TDButtons(self.can_interface, self.logger) #: The Buttons module self.ejector = TDEjector(self.can_interface, self.logger) #: The Ejector module