Index: dialin/hd/dg_proxy.py =================================================================== diff -u --- dialin/hd/dg_proxy.py (revision 0) +++ dialin/hd/dg_proxy.py (revision 2c9af55b37926e59b48675e39b09cb81adff50e9) @@ -0,0 +1,51 @@ +########################################################################### +# +# Copyright (c) 2020-2023 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 hd_proxy.py +# +# @author (last) Michael Garthwaite +# @date (last) 15-Aug-2023 +# @author (original) Michael Garthwaite +# @date (original) 15-Aug-2023 +# +############################################################################ +from logging import Logger + +from ..common.msg_defs import MsgIds +from ..protocols.CAN import DenaliMessage, DenaliChannels +from ..utils.base import AbstractSubSystem +from ..utils.conversions import integer_to_bytearray, float_to_bytearray +from ..dg import NO_RESET, RESET + + +class DGHDProxy(AbstractSubSystem): + """ + Hemodialysis Device (HD) Dialin API sub-class for DG proxy commands. + """ + + def __init__(self, can_interface, logger: Logger): + """ + + @param can_interface: Denali CAN Messenger object + """ + super().__init__() + self.can_interface = can_interface + self.logger = logger + + + def cmd_dg_send_command_response(self): + """ + Constructs and sends a ui disposable installation confirm message + + @return: none + """ + + message = DenaliMessage.build_message(channel_id=DenaliChannels.dialin_to_hd_ch_id, + message_id=MsgIds.MSG_ID_UI_INSTALLATION_CONFIRM.value) + + self.logger.debug("Sending user disposable installation confirm to HD.") + self.can_interface.send(message, 0) \ No newline at end of file Index: dialin/hd/hemodialysis_device.py =================================================================== diff -u -r881c190c1e90f09fa5584231a3e93a09bfb955c8 -r2c9af55b37926e59b48675e39b09cb81adff50e9 --- dialin/hd/hemodialysis_device.py (.../hemodialysis_device.py) (revision 881c190c1e90f09fa5584231a3e93a09bfb955c8) +++ dialin/hd/hemodialysis_device.py (.../hemodialysis_device.py) (revision 2c9af55b37926e59b48675e39b09cb81adff50e9) @@ -27,6 +27,7 @@ from .calibration_record import HDCalibrationNVRecord from .dialysate_inlet_flow import HDDialysateInletFlow from .dialysate_outlet_flow import HDDialysateOutletFlow +from .dg_proxy import HDDGProxy from .fluid_leak import HDFluidLeak from .pressure_occlusion import HDPressureOcclusion from .pretreatment import HDPreTreatment @@ -151,6 +152,7 @@ self.calibration_record = HDCalibrationNVRecord(self.can_interface, self.logger) self.dialysate_inlet_flow = HDDialysateInletFlow(self.can_interface, self.logger) self.dialysate_outlet_flow = HDDialysateOutletFlow(self.can_interface, self.logger) + self.dg_proxy = HDDGProxy(self.can_interface, self.logger) self.fluid_leak = HDFluidLeak(self.can_interface, self.logger) self.pressure_occlusion = HDPressureOcclusion(self.can_interface, self.logger) self.pretreatment = HDPreTreatment(self.can_interface, self.logger)