Index: dialin/dg/dialysate_generator.py =================================================================== diff -u -r4ea93bf008914fd6e7011bc0b32feb6151fbbfab -r5d58d1eeb80237a7cafbb31bc800cb29e19615e0 --- dialin/dg/dialysate_generator.py (.../dialysate_generator.py) (revision 4ea93bf008914fd6e7011bc0b32feb6151fbbfab) +++ dialin/dg/dialysate_generator.py (.../dialysate_generator.py) (revision 5d58d1eeb80237a7cafbb31bc800cb29e19615e0) @@ -27,13 +27,13 @@ DenaliMessage, DenaliChannels) -class DG: - """ - \class DG +from ..utils.base import _AbstractSubSystem, _publish + +class DG(_AbstractSubSystem): + """ Dialysate Generator (DG) Dialin object API. It provides the basic interface to communicate with the DG firmware. - """ # DG message IDs @@ -75,19 +75,28 @@ DG_OP_MODE_DISINFECT = 9 DG_OP_MODE_CHEMICAL_DISINFECT = 10 + # DG sub_modes + DG_POST_STATE_START = 0 # Start initialize & POST mode state. + DG_POST_STATE_FPGA = 1 # FPGA POST test state. + DG_POST_STATE_WATCHDOG = 2 # Watchdog POST test state. + DG_POST_STATE_TEMPERATURE_SENSORS = 3 # Temperature Sensors POST state + DG_POST_STATE_HEATERS = 4 # Heaters POST state + DG_POST_STATE_COMPLETED = 5 # POST completed successfully state. + DG_POST_STATE_FAILED = 6 # POST failed state. + NUM_OF_DG_POST_STATES = 7 # Number of initialize & POST mode states. + def __init__(self, can_interface="can0"): """ - DG constructor using can bus + Initializes the DG object - \param can_interface: string with can bus name, e.g. "can0" - \returns DG object that allows communication with board via port - - \details For example: - + For example: dg_object = DG(can_interface='can0') or dg_object = DG('can0') + @param can_interface: string with can bus name, e.g. "can0" """ + super().__init__() + # Create listener self.can_interface = DenaliCanMessenger(can_interface=can_interface) self.can_interface.start() @@ -98,9 +107,10 @@ msg_id = self.MSG_ID_DG_OPERATION_MODE_BROADCAST self.can_interface.register_receiving_publication_function(channel_id, msg_id, self.handler_dg_op_mode_sync) + #self._handler_dg_op_mode_sync) This was in staging branch commented out self.can_interface.register_receiving_publication_function(DenaliChannels.dg_sync_broadcast_ch_id, self.MSG_ID_DG_DG_VERSION_RESPONSE, - self.handler_dg_version) + self._handler_dg_version) # initialize variables that will be populated by DG version response self.dg_version = None @@ -119,17 +129,42 @@ self.heaters = Heaters(self.can_interface) self.temperature_sensors = TemperatureSensors(self.can_interface) - def handler_dg_version(self, message): + def get_version(self): """ + Gets the DG version. Assumes DG version has already been requested. + + @return: The dg version string + """ + return self.dg_version + + def get_operation_mode(self): + """ + Gets the operation mode + + @return: The operation mode + """ + return self.dg_operation_mode + + def get_operation_sub_mode(self): + """ + Gets the operation sub mode + + @return: The operation sub mode + """ + return self.dg_operation_sub_mode + + @_publish(["dg_version"]) + def _handler_dg_version(self, message): + """ Handler for response from DG regarding its version. - \param message: response message from HD regarding valid treatment parameter ranges.\n + @param message: response message from HD regarding valid treatment parameter ranges.\n U08 Major \n U08 Minor \n U08 Micro \n U16 Build \n - \returns None if unsuccessful, the version string if unpacked successfully + @return: None if unsuccessful, the version string if unpacked successfully """ major = struct.unpack('B', bytearray( message['message'][self.START_POS_MAJOR:self.END_POS_MAJOR])) @@ -146,13 +181,14 @@ return self.dg_version - def handler_dg_op_mode_sync(self, message): + @_publish(["dg_operation_mode", "dg_operation_sub_mode"]) + def _handler_dg_op_mode_sync(self, message): """ Handles published DG operation mode messages. Current DG operation mode is captured for reference. - \param message: published DG operation mode broadcast message - \returns none + @param message: published DG operation mode broadcast message + @return: None """ mode = struct.unpack('i', bytearray( @@ -168,7 +204,7 @@ Constructs and sends a login command via CAN bus. Login required before \n other commands can be sent to the DG. - \returns 1 if logged in, 0 if log in failed + @return: 1 if logged in, 0 if log in failed """ message = DenaliMessage.build_message(channel_id=DenaliChannels.dialin_to_dg_ch_id, @@ -208,6 +244,9 @@ Constructs and sends an DG safety shutdown override command via CAN bus. \returns response message if received, False if no response received + @param msg: byte array - properly formatted DG message to insert + + @return: 1 if successful, zero otherwise """ message = DenaliMessage.build_message(channel_id=DenaliChannels.dialin_to_dg_ch_id, Index: dialin/dg/ro_pump.py =================================================================== diff -u -rca7f6eff65d988c19ccce8cde5efd1ef537e2095 -r5d58d1eeb80237a7cafbb31bc800cb29e19615e0 --- dialin/dg/ro_pump.py (.../ro_pump.py) (revision ca7f6eff65d988c19ccce8cde5efd1ef537e2095) +++ dialin/dg/ro_pump.py (.../ro_pump.py) (revision 5d58d1eeb80237a7cafbb31bc800cb29e19615e0) @@ -136,7 +136,7 @@ if reset == RESET: str_res = "reset back to normal" else: - str_res = str(prs) + str_res = str(pressure) print( "RO pump pressure set point overridden to " + str_res + " PSI: " + str(received_message['message'][DenaliMessage.PAYLOAD_START_INDEX])) Index: dialin/hd/hemodialysis_device.py =================================================================== diff -u -r7e75f0609ea6e44ba9f1d5da41106059ad2abb10 -r5d58d1eeb80237a7cafbb31bc800cb29e19615e0 --- dialin/hd/hemodialysis_device.py (.../hemodialysis_device.py) (revision 7e75f0609ea6e44ba9f1d5da41106059ad2abb10) +++ dialin/hd/hemodialysis_device.py (.../hemodialysis_device.py) (revision 5d58d1eeb80237a7cafbb31bc800cb29e19615e0) @@ -5,7 +5,7 @@ # 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 HemodialysisDevice.py +# @file hemodialysis_device.py # # @date 31-Mar-2020 # @author P. Lucia @@ -15,7 +15,6 @@ # ############################################################################ import struct -from time import sleep from .alarms import HDAlarms from .buttons import HDButtons from .ui_proxy import HDUIProxy @@ -29,14 +28,13 @@ from ..protocols.CAN import (DenaliMessage, DenaliCanMessenger, DenaliChannels) +from ..utils.base import _AbstractSubSystem, _publish -class HD: - """ - \class DG +class HD(_AbstractSubSystem): + """ Hemodialysis Device (HD) Dialin object API. It provides the basic interface to communicate with the HD firmware. - """ # HD message IDs @@ -68,13 +66,15 @@ """ HD constructor using can bus - \param bus: can bus, e.g. "can0" - \returns HD object provides test/service commands for the HD sub-system. - \details For example: + @param can_interface: (str) CANBus interface name, e.g. "can0" + @return: HD object provides test/service commands for the HD sub-system. - hd_object = HD(can_interface='can0') or - hd_object = HD('can0') + >> hd_object = HD(can_interface='can0') + >> hd_object = HD('can0') + """ + super().__init__() + # Create listener self.can_interface = DenaliCanMessenger(can_interface=can_interface, log_level=log_level) self.can_interface.start() @@ -84,7 +84,7 @@ channel_id = DenaliChannels.hd_sync_broadcast_ch_id msg_id = self.MSG_ID_HD_OPERATION_MODE_BROADCAST self.can_interface.register_receiving_publication_function(channel_id, msg_id, - self.handler_hd_op_mode_sync) + self._handler_hd_op_mode_sync) # create properties self.hd_operation_mode = self.HD_OP_MODE_INIT_POST @@ -102,13 +102,22 @@ self.treatment = HDTreatment(self.can_interface) self.pressure_occlusion = HDPressureOcclusion(self.can_interface) - def handler_hd_op_mode_sync(self, message): + def get_operation_mode(self): """ + Gets the HD operation mode + + @return: The hd operation mode + """ + return self.hd_operation_mode + + @_publish(["hd_operation_mode"]) + def _handler_hd_op_mode_sync(self, message): + """ Handles published HD operation mode messages. Current HD operation mode is captured for reference. - \param message: published HD operation mode broadcast message - \returns none + @param message: published HD operation mode broadcast message + @return: None """ mode = struct.unpack('i', bytearray( message['message'][self.START_POS_HD_OP_MODE:self.END_POS_HD_OP_MODE])) @@ -123,33 +132,38 @@ Constructs and sends a login command via CAN bus. Login required before \n other commands can be sent to the HD. - \returns 1 if logged in, 0 if log in failed + @return: 1 if logged in, 0 if log in failed """ message = DenaliMessage.build_message(channel_id=DenaliChannels.dialin_to_hd_ch_id, message_id=self.MSG_ID_LOGIN_TO_HD, payload=list(map(int, map(ord, self.HD_LOGIN_PASSWORD)))) - print("login") + print("Logging in...") # Send message received_message = self.can_interface.send(message) if received_message is not None: if received_message['message'][DenaliMessage.PAYLOAD_START_INDEX] == 1: - print("Logged In") + print("Success: Logged In") else: - print("Log In Failed.") + print("Failure: Log In Failed.") return received_message['message'][DenaliMessage.PAYLOAD_START_INDEX] else: - print("Timeout!!!!") + print("Login Timeout!!!!") return False def cmd_hd_safety_shutdown_override(self): """ Constructs and sends an HD safety shutdown override command via CAN bus. \returns response message if received, False if no response received + + @param msg: byte array - properly formatted HD message to insert + + @return: 1 if successful, zero otherwise + """ message = DenaliMessage.build_message(channel_id=DenaliChannels.dialin_to_hd_ch_id, @@ -171,13 +185,3 @@ return False -if __name__ == "__main__": - # create an HD object called hd - hd = HD() - - # wait 2 seconds and then login to HD as a tester - sleep(2) - hd.cmd_log_in_to_hd() - - # add test code below - Index: dialin/hd/ui_proxy.py =================================================================== diff -u -ra83e5728833f7b1ccdfad4b0b3eb3ea40f670d1d -r5d58d1eeb80237a7cafbb31bc800cb29e19615e0 --- dialin/hd/ui_proxy.py (.../ui_proxy.py) (revision a83e5728833f7b1ccdfad4b0b3eb3ea40f670d1d) +++ dialin/hd/ui_proxy.py (.../ui_proxy.py) (revision 5d58d1eeb80237a7cafbb31bc800cb29e19615e0) @@ -18,13 +18,13 @@ DenaliChannels) from ..utils.conversions import integer_to_bytearray, float_to_bytearray import struct +from ..utils.base import _AbstractSubSystem, _publish -class HDUIProxy: - """ - \class HDUIProxy - \brief Hemodialysis Device (HD) Dialin API sub-class for ui commands. +class HDUIProxy(_AbstractSubSystem): """ + Hemodialysis Device (HD) Dialin API sub-class for ui commands. + """ # ui message IDs MSG_ID_UI_CHECKIN_WITH_HD = 0x0007 @@ -125,31 +125,33 @@ def __init__(self, can_interface): """ - HD_UI constructor - \param can_interface: the denali can interface object + @param can_interface: the denali can interface object """ + + super().__init__() + self.can_interface = can_interface # register function to handle HD response to UF change requests if self.can_interface is not None: channel_id = DenaliChannels.hd_to_ui_ch_id self.can_interface.register_receiving_publication_function(channel_id, self.MSG_ID_UF_SETTINGS_CHANGE_RESPONSE_FROM_HD, - self.handler_uf_change_response) + self._handler_uf_change_response) self.can_interface.register_receiving_publication_function(channel_id, self.MSG_ID_UF_SETTINGS_CHANGE_CONFIRM_RESPONSE_FROM_HD, self.handler_uf_change_confirm_response) self.can_interface.register_receiving_publication_function(channel_id, self.MSG_ID_TREATMENT_DURATION_SETTING_CHANGE_RESPONSE_FROM_HD, - self.handler_treatment_duration_change_response) + self._handler_treatment_duration_change_response) self.can_interface.register_receiving_publication_function(channel_id, self.MSG_ID_BLOOD_DIALYSATE_FLOW_SETTING_CHANGE_RESPONSE_FROM_HD, - self.handler_blood_and_dialysate_change_response) + self._handler_blood_and_dialysate_change_response) self.can_interface.register_receiving_publication_function(channel_id, self.MSG_ID_HD_TREATMENT_PARAMS_RANGES, - self.handler_treatment_param_ranges) + self._handler_treatment_param_ranges) self.can_interface.register_receiving_publication_function(DenaliChannels.hd_to_ui_ch_id, self.MSG_ID_UI_HD_VERSION_RESPONSE, - self.handler_hd_version) + self._handler_hd_version) # initialize variables that will be populated by HD version response self.hd_version = None @@ -180,17 +182,194 @@ self.target_blood_flow_rate = 0 self.target_dialysate_flow_rate = 0 - def handler_hd_version(self, message): + def get_hd_version(self): """ + Gets the hd version + + @return: The hd version + """ + return self.hd_version + + def get_min_treatment_duration_min(self): + """ + Gets the min treatment duration + + @return: the min treatment duration (minutes) + """ + return self.min_treatment_duration_min + + def get_max_treatment_duration_min(self): + """ + Gets the max treatment duration + + @return: The max treatment duration (minutes) + """ + return self.max_treatment_duration_min + + def get_min_uf_volume_ml(self): + """ + Gets the min uf volume + + @return: the min uf volume (mL) + """ + return self.min_uf_volume_ml + + def get_max_uf_volume_ml(self): + """ + Gets the max uf volume + + @return: The max uf volume (mL) + """ + return self.max_uf_volume_ml + + def get_min_dialysate_flow_rate_ml_min(self): + """ + Gets the min dialysate flow rate + + @return: The min dialysate flow rate (mL/min) + """ + return self.min_dialysate_flow_rate_ml_min + + def get_max_dialysate_flow_rate_ml_min(self): + """ + Gets the max dialysate flow rate + + @return: The max dialysate flow rate (mL/min) + """ + return self.max_dialysate_flow_rate_ml_min + + def get_duration_change_succeeded(self): + """ + Gets the duration change succeeded status + + @return: (bool) The duration change succeeded status + """ + return self.duration_change_succeeded + + def get_duration_change_reject_reason(self): + """ + Gets the duration change reject reason + + @return: (int) The duration change reject reason + """ + return self.duration_change_reject_reason + + def get_duration_change_time_min(self): + """ + Gets the duration change time + + @return: the duration change time (min) + """ + return self.duration_change_time_min + + def get_duration_change_uf_vol_ml(self): + """ + Gets the duration change uf vol + + @return: the duration change uf vol (mL) + """ + return self.duration_change_uf_vol_ml + + def get_uf_change_succeeded(self): + """ + Gets the uf change succeeded status + + @return: The uf change succeeded status + """ + return self.uf_change_succeeded + + def get_uf_change_reject_reason(self): + """ + Gets the uf change reject reason + @return: (int) The uf change reject reason + """ + return self.uf_change_reject_reason + + def get_uf_change_volume_ml(self): + """ + Gets the uf change volume + @return: The uf change volume (mL) + """ + return self.uf_change_volume_ml + + def get_uf_change_time_min(self): + """ + Gets the uf change time + + @return: The uf change time (min) + """ + return self.uf_change_time_min + + def get_uf_change_rate_ml_min(self): + """ + Gets the uf change rate + + @return: The uf change rate (mL/min) + """ + return self.uf_change_rate_ml_min + + def get_uf_change_time_diff(self): + """ + Gets the uf change time diff + + @return: The uf change time diff + """ + return self.uf_change_time_diff + + def get_uf_change_rate_diff(self): + """ + Gets the uf change rate diff + + @return: The uf change rate diff + """ + return self.uf_change_rate_diff + + def get_blood_and_dialysate_flow_rate_change_succeeded(self): + """ + Gets the blood and dialysate flow rate change succeeded status + + @return: True if successful, False otherwise + """ + return self.blood_and_dialysate_flow_rate_change_succeeded + + def get_blood_and_dialysate_flow_rate_change_reject_reason(self): + """ + Gets the blood and dialysate flow rate change reject reason + + @return: (int) The reason for the rejection + """ + return self.blood_and_dialysate_flow_rate_change_reject_reason + + def get_target_blood_flow_rate(self): + """ + Gets the target blood flow rate + + @return: The target blood flow rate + """ + return self.target_blood_flow_rate + + def get_target_dialysate_flow_rate(self): + """ + Gets the target dialysate flow rate + + @return: The target dialysate flow rate + """ + return self.target_dialysate_flow_rate + + @_publish([ + "hd_version" + ]) + def _handler_hd_version(self, message): + """ Handler for response from HD regarding its version. - \param message: response message from HD regarding valid treatment parameter ranges.\n + @param message: response message from HD regarding valid treatment parameter ranges.\n U08 Major \n U08 Minor \n U08 Micro \n U16 Build \n - \returns None if not successful, the version string if unpacked successfully + @return: None if not successful, the version string if unpacked successfully """ major = struct.unpack('B', bytearray( message['message'][self.START_POS_MAJOR:self.END_POS_MAJOR])) @@ -206,19 +385,27 @@ print(self.hd_version) return self.hd_version - def handler_treatment_param_ranges(self, message): + @_publish([ + "min_treatment_duration_min", + "max_treatment_duration_min", + "min_uf_volume_ml", + "max_uf_volume_ml", + "min_dialysate_flow_rate_ml_min", + "max_dialysate_flow_rate_ml_min" + ]) + def _handler_treatment_param_ranges(self, message): """ Handler for response from HD regarding valid treatment parameter ranges. - \param message: response message from HD regarding valid treatment parameter ranges.\n + @param message: response message from HD regarding valid treatment parameter ranges.\n U32 Minimum treatment duration setting (in min.). \n U32 Maximum treatment duration setting (in min.). \n F32 Minimum ultrafiltration volume (in mL). \n F32 Maximum ultrafiltration volume (in mL). \n U32 Minimum dialysate flow rate (in mL/min). \n U32 Maximum dialysate flow rate (in mL/min). - \returns none + @return: none """ mintime = struct.unpack('i', bytearray( message['message'][self.START_POS_MIN_TREAT_TIME:self.END_POS_MIN_TREAT_TIME])) @@ -240,17 +427,23 @@ self.min_dialysate_flow_rate_ml_min = mindialrt[0] self.max_dialysate_flow_rate_ml_min = maxdialrt[0] - def handler_treatment_duration_change_response(self, message): + @_publish([ + "duration_change_succeeded", + "duration_change_reject_reason", + "duration_change_time_min", + "duration_change_uf_vol_ml" + ]) + def _handler_treatment_duration_change_response(self, message): """ Handler for response from HD regarding treatment duration change request. - \param message: response message from HD regarding treatment duration change.\n + @param message: response message from HD regarding treatment duration change.\n BOOL Accepted \n U32 Reject reason (if not accepted) \n U32 treatment duration (min) \n F32 UF volue (mL) \n - \returns none + @return: none """ rsp = struct.unpack('i', bytearray( message['message'][self.START_POS_TIME_CHG_RSP_ACCEPTED:self.END_POS_TIME_CHG_RSP_ACCEPTED])) @@ -266,17 +459,23 @@ self.duration_change_time_min = tim[0] self.duration_change_uf_vol_ml = vol[0] - def handler_blood_and_dialysate_change_response(self, message): + @_publish([ + "blood_and_dialysate_flow_rate_change_succeeded", + "blood_and_dialysate_flow_rate_change_reject_reason", + "target_blood_flow_rate", + "target_dialysate_flow_rate" + ]) + def _handler_blood_and_dialysate_change_response(self, message): """ Handler for response from HD regarding blood & dialysate flow rate change request. - \param message: response message from HD regarding requested blood & dialysate flow rate settings change.\n + @param message: response message from HD regarding requested blood & dialysate flow rate settings change.\n BOOL Accepted \n U32 Reject reason (if not accepted) \n U32 Blood flow rate (mL/min) \n U32 Dialysate flow rate (mL/min) \n - \returns none + @return: none """ rsp = struct.unpack('i', bytearray( message['message'][self.START_POS_BLD_DIAL_CHG_RSP_ACCEPTED:self.END_POS_BLD_DIAL_CHG_RSP_ACCEPTED])) @@ -296,11 +495,20 @@ self.target_blood_flow_rate = bld[0] self.target_dialysate_flow_rate = dil[0] - def handler_uf_change_response(self, message): + @_publish([ + "uf_change_succeeded", + "uf_change_reject_reason", + "uf_change_volume_ml", + "uf_change_time_min", + "uf_change_time_diff", + "uf_change_rate_ml_min", + "uf_change_rate_diff" + ]) + def _handler_uf_change_response(self, message): """ Handler for response from HD regarding UF change request. - \param message: response message from HD regarding requested ultrafiltration settings change.\n + @param message: response message from HD regarding requested ultrafiltration settings change.\n BOOL Accepted \n U32 RejectReason (if not accepted) F32 UF Volume (mL) - converted to Liters \n @@ -309,7 +517,7 @@ F32 UF Rate (mL/min) \n F32 UF Rate Change (mL/min) - \returns none + @return: none """ rsp = struct.unpack('i', bytearray( message['message'][self.START_POS_UF_CHG_RSP_RESP:self.END_POS_UF_CHG_RSP_RESP])) @@ -334,11 +542,16 @@ resp = True self.uf_change_succeeded = resp self.uf_change_reject_reason = rea[0] + self.uf_change_volume_ml = vol[0] / self.LITER_TO_ML_CONVERSION_FACTOR + + #self.uf_change_volume_ml = vol[0] In the staging branch commented out + self.uf_change_time_min = tim[0] self.uf_change_time_diff = tmd[0] self.uf_change_rate_ml_min = rat[0] self.uf_change_rate_diff = rtd[0] + self.uf_old_rate_ml_min = ort[0] def handler_uf_change_confirm_response(self, message): @@ -379,7 +592,7 @@ """ Constructs and sends the ui check-in message - \returns 0 + @return: 0 """ message = DenaliMessage.build_message(channel_id=DenaliChannels.dialin_to_hd_ch_id, @@ -408,9 +621,9 @@ """ Constructs and sends a ui UF command message - \param cmd: 0 for pause, 1 for resume + @param cmd: 0 for pause, 1 for resume - \returns none + @return: none """ payload = integer_to_bytearray(cmd) @@ -432,9 +645,9 @@ """ Constructs and sends a ui UF change settings command message - \param vol (float): new ultrafiltration volume setting (in L) + @param vol (float): new ultrafiltration volume setting (in L) - \returns none + @return: none """ # reset response to this command so we can tell when response is received @@ -455,10 +668,10 @@ """ Constructs and sends a ui UF change settings command message - \param vol (float): new ultrafiltration volume setting (in L) - \param adj (int): 0 for adjust time, 1 for adjust rate + @param vol (float): new ultrafiltration volume setting (in L) + @param adj (int): 0 for adjust time, 1 for adjust rate - \returns none + @return: none """ # reset response to this command so we can tell when response is received @@ -482,12 +695,12 @@ """ Constructs and sends a ui UF change settings confirmed by user message - \param response (int): 0 for rejected, 1 for confirmed - \param vol (float): volume (in L) that was confirmed - \param tm (int): treatment time (in min) that was confirmed - \param rate (float): ultrafiltration rate (in mL/min) that was confirmed + @param response (int): 0 for rejected, 1 for confirmed + @param vol (float): volume (in L) that was confirmed + @param tm (int): treatment time (in min) that was confirmed + @param rate (float): ultrafiltration rate (in mL/min) that was confirmed - \returns none + @return: none """ resp = integer_to_bytearray(response) @@ -509,9 +722,9 @@ """ Constructs and sends a ui UF change settings confirmed by user message - \param timeMin (int): treatment time (in min). + @param timeMin (int): treatment time (in min). - \returns none + @return: none """ payload = integer_to_bytearray(timeMin) @@ -530,10 +743,10 @@ """ Constructs and sends a ui blood & dialysate flow settings change request by user message - \param bloodFlow (int): blood flow rate set point (in mL/min). - \param dialFlow (int): dialysate flow rate set point (in mL/min). + @param bloodFlow (int): blood flow rate set point (in mL/min). + @param dialFlow (int): dialysate flow rate set point (in mL/min). - \returns none + @return: none """ bld = integer_to_bytearray(bloodFlow)