Index: dialin/ui/hd_simulator.py =================================================================== diff -u -r7a350682f1f4e3fbd839ba73921479c243d10343 -ra9bc649fadc4a425eb8679167ac0f8d661ef6891 --- dialin/ui/hd_simulator.py (.../hd_simulator.py) (revision 7a350682f1f4e3fbd839ba73921479c243d10343) +++ dialin/ui/hd_simulator.py (.../hd_simulator.py) (revision a9bc649fadc4a425eb8679167ac0f8d661ef6891) @@ -25,7 +25,7 @@ class HDSimulator(AbstractSubSystem): - NUM_TREATMENT_PARAMETERS = 18 + NUM_TREATMENT_PARAMETERS = 19 instance_count = 0 # UI version message field positions @@ -1006,13 +1006,13 @@ |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------: | |0x0F00| 0x040 | 7 | 1 Hz | N | HD | All | Treatment States Data | - | #1:(U32) | #2:(U32) | #3:(U32) | #4:(U32) | - |:--: |:--: |:--: |:--: | - | \ref Data::mSubMode | \ref Data::mUFState | \ref Data::mSalineState | \ref Data::mHeparinState | + | #1:(U32) | #2:(U32) | #3:(U32) || + |:--: |:--: |:--: || + | \ref Data::mSubMode | \ref Data::mUFState | \ref Data::mSalineState || |||| - | #5:(U32) | #6:(U32) ||| - |:--: |:--: ||| - | \ref Data::mRinsebackState | \ref Data::mRecirculateState ||| + | #4:(U32) | #5:(U32) | #6:(U32) || + |:--: |:--: |:--: || + | \ref Data::mHeparinState | \ref Data::mRinsebackState | \ref Data::mRecirculateState || |||| | #7:(U32) | #8:(U32) | #9:(U32) | |:--: |:--: |:--: | @@ -1708,15 +1708,18 @@ average_dialysate_flow: float, dialysate_volume_used: float, average_dialysate_temp: float, + origin_uf_volume: float, target_uf_volume: float, actual_uf_volume: float, + origin_uf_rate: float, target_uf_rate: float, actual_uf_rate: float, saline_bolus_volume: int, heparin_bolus_volume: float, heparin_dispense_rate: float, heparin_pre_stop: int, heparin_delivered_volume: float, + heparin_type: int, average_arterial_pressure: float, average_venous_pressure: float, device_id: int, @@ -1744,15 +1747,18 @@ @param average_dialysate_flow: average dialysate flow @param dialysate_volume_used: dialysate volume used @param average_dialysate_temp: average dialysate temp + @param origin_uf_volume: origin uf volume @param target_uf_volume: target uf volume @param actual_uf_volume: actual uf volume + @param origin_uf_rate: origin uf rate @param target_uf_rate: target uf rate @param actual_uf_rate: actual uf rate @param saline_bolus_volume: saline bolus volume @param heparin_bolus_volume: heparin bolus volume @param heparin_dispense_rate: heparin dispense rate @param heparin_pre_stop: heparin pre stop @param heparin_delivered_volume: heparin delivered volume + @param heparin_type: heparin type @param average_arterial_pressure: average arterial pressure @param average_venous_pressure: average venous pressure @param device_id: device id @@ -1780,15 +1786,18 @@ payload += float_to_bytearray(float(average_dialysate_flow)) payload += float_to_bytearray(float(dialysate_volume_used)) payload += float_to_bytearray(float(average_dialysate_temp)) + payload += float_to_bytearray(float(origin_uf_volume)) payload += float_to_bytearray(float(target_uf_volume)) payload += float_to_bytearray(float(actual_uf_volume)) + payload += float_to_bytearray(float(origin_uf_rate)) payload += float_to_bytearray(float(target_uf_rate)) payload += float_to_bytearray(float(actual_uf_rate)) payload += unsigned_integer_to_bytearray(int(saline_bolus_volume)) payload += float_to_bytearray(float(heparin_bolus_volume)) payload += float_to_bytearray(float(heparin_dispense_rate)) payload += unsigned_integer_to_bytearray(int(heparin_pre_stop)) payload += float_to_bytearray(float(heparin_delivered_volume)) + payload += unsigned_to_bytearray(int(heparin_type)) payload += float_to_bytearray(float(average_arterial_pressure)) payload += float_to_bytearray(float(average_venous_pressure)) payload += unsigned_integer_to_bytearray(int(device_id)) @@ -2029,8 +2038,8 @@ """ payload = bytearray() - message = DenaliMessage.build_message(channel_id=DenaliChannels.hd_sync_broadcast_ch_id, - message_id=MsgIds.MSG_ID_HD_UI_VERSION_INFO_REQUEST.value, + message = DenaliMessage.build_message(channel_id=DenaliChannels.hd_to_ui_ch_id, + message_id=MsgIdsDialin.MSG_DIALIN_ID_HD_VERSION_REQUEST.value, payload=payload) self.can_interface.send(message, 0)