Example #1
0
 def serialize(self) -> bytearray:
     serial_self = self.as_serial
     serial_bytes = [0 for x in range(5)]
     serial_bytes[0] = to_pacing_mode_id(self.NAME)
     serial_bytes[1] = serial_self.lower_rate_limit
     serial_bytes[2] = serial_self.upper_rate_limit
     serial_bytes[3] = serial_self.atrial_amplitude
     serial_bytes[4] = serial_self.atrial_pulse_width
     return flatten_to_26_bytearray(serial_bytes)
Example #2
0
 def serialize(self) -> bytearray:
     serial_self = self.as_serial
     serial_bytes = [0 for x in range(7)]
     serial_bytes[0] = to_pacing_mode_id(self.NAME)
     serial_bytes[1] = serial_self.lower_rate_limit
     serial_bytes[2] = serial_self.upper_rate_limit
     serial_bytes[3] = serial_self.ventricular_amplitude
     serial_bytes[4] = serial_self.ventricular_pulse_width
     serial_bytes[5] = serial_self.vrp
     serial_bytes[6] = serial_self.ventricular_sensitivity
     return flatten_to_26_bytearray(serial_bytes)
Example #3
0
 def serialize(self) -> bytearray:
     serial_self = self.as_serial
     serial_bytes = [0 for x in range(10)]
     serial_bytes[0] = to_pacing_mode_id(self.NAME)
     serial_bytes[1] = serial_self.lower_rate_limit
     serial_bytes[2] = serial_self.upper_rate_limit
     serial_bytes[3] = serial_self.ventricular_amplitude
     serial_bytes[4] = serial_self.ventricular_pulse_width
     serial_bytes[5] = serial_self.activity_threshold
     serial_bytes[6] = serial_self.reaction_time
     serial_bytes[7] = serial_self.recovery_time
     serial_bytes[8] = serial_self.max_sensor_rate
     serial_bytes[9] = serial_self.response_factor
     return flatten_to_26_bytearray(serial_bytes)
Example #4
0
 def serialize(self):
     serial_atrium = to_serial_byte(self.atrium, PM_LIMIT.ATRIAL_AMPLITUDE["max"])
     serial_ventricle = to_serial_byte(self.ventricle, PM_LIMIT.VENTRICULAR_AMPLITUDE["max"])
     serial_period = to_serial_byte(self.period)
     return flatten_to_26_bytearray([serial_period, serial_atrium, serial_ventricle])