########################################################################### # # 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 HD_TestScript.py # # @date 19-Nov-2019 # @author S. Nash # # @brief This is an example test script for the HD. # ############################################################################ import sys sys.path.append("..") from dialin.hd.hemodialysis_device import HD from time import sleep if __name__ == "__main__": # create an HD object called hd hd = HD() # log into HD if not hd.cmd_log_in_to_hd(): sys.exit() # reset sequence counter x = 0 # send large CAN test messages (6 frames each) every 100ms while True: sleep(0.1) hd.pressure_occlusion.test_can_message(x) x += 6