########################################################################### # # Copyright (c) 2019-2019 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 test_demo.py # # @date 15-May-2020 # @author P. Lucia # # @brief This is a demo script to exercise the HD and DG. # ############################################################################ import sys sys.path.append("..") from dialin.dg.dialysate_generator import DG from dialin.hd.hemodialysis_device import HD import time def test_logging(): """ Prints the DG version. @return: None """ if False: # dg = DG(log_level="INFO") dg = DG() if dg.cmd_log_in_to_dg(): dg.cmd_ui_request_dg_version() time.sleep(0.5) print(dg.dg_version) if True: # hd = HD(log_level="CAN_ONLY") hd = HD(log_level="CAN_ONLY") if hd.cmd_log_in_to_hd(): hd.ui.cmd_ui_request_hd_version() if __name__ == '__main__': test_logging()