Index: HemodialysisDevice.py =================================================================== diff -u -raef4802f8270da7b77751fd8e5b774f3ece46799 -r0eeccd940ecf398d84223dace0ca8bb8ccabf7c9 --- HemodialysisDevice.py (.../HemodialysisDevice.py) (revision aef4802f8270da7b77751fd8e5b774f3ece46799) +++ HemodialysisDevice.py (.../HemodialysisDevice.py) (revision 0eeccd940ecf398d84223dace0ca8bb8ccabf7c9) @@ -57,6 +57,7 @@ self.Pressure_Occlusion = HD.HD_Pressure_Occlusion(self, self.can_interface) self.RTC = HD.HD_RTC(self, self.can_interface) self.Treatment = HD.HD_Treatment(self, self.can_interface) + self.UI = HD.HD_UI(self) self.Watchdog = HD.HD_Watchdog(self) ## DialOut is an HD_DialOutFlow object # self.DialOut = HD_DialOut(self.can_interface) @@ -241,6 +242,46 @@ print("Timeout!!!!") return False + class HD_UI: + """ + \class HD_UI + + \brief Hemodialysis Device (HD) Dialin API sub-class for UI commands. + """ + + # UI message IDs + MSG_ID_UI_CHECKIN_WITH_HD = 0x0007 + + def __init__(self, outer_instance): + self.outer_instance = outer_instance + + """ + HD_UI constructor + + \param outer_instance: reference to the HD (outer) class. + + \returns HD_UI object. + """ + + def CmdUICheckinWithHD(self): + """ + Constructs and sends the UI checkin message + + \returns 1 if successful, zero otherwise + """ + + payload = None + + message = DenaliMessage.buildMessage(channel_id=DenaliChannels.dialin_to_hd_ch_id, + message_id=self.MSG_ID_UI_CHECKIN_WITH_HD) + + print("Sending UI checkin w/ HD") + + # Send message + received_message = self.outer_instance.can_interface.send(message, 0) + + return 0 + class HD_Watchdog: """ \class HD_Watchdog