testing Module#
- class lenz_flashtool.testing.MockFlashTool(*args, **kwargs)#
Bases:
object
A mock implementation of FlashTool for testing purposes without hardware access. Simulates the behavior of the real FlashTool class.
- biss_addr_read(addr, length)#
Mock address reading
- Return type:
ndarray
- biss_addr_readb(bissbank, addr, length)#
Mock address reading with bank
- Return type:
ndarray
- biss_cmd_reboot2bl()#
Mock reboot to bootloader command
- biss_read_HSI()#
Mock HSI reading
- Return type:
Optional
[Tuple
[str
]]
- biss_read_angle_once()#
Mock single angle reading
- Return type:
None
- biss_read_calibration_temp_vcc()#
Mock calibration data reading
- Return type:
None
- biss_read_command_state()#
Mock command state reading
- Return type:
Optional
[ndarray
]
- biss_read_flags()#
Mock flags reading
- Return type:
Tuple
[List
[str
],List
[str
]]
- biss_read_flags_flashCRC()#
Mock flash CRC flag reading
- Return type:
int
- biss_read_progver()#
Mock program version reading
- Return type:
None
- biss_read_registers(bissbank)#
Mock register reading
- biss_read_snum()#
Mock serial number reading
- Return type:
Optional
[Tuple
[str
,str
,str
,str
]]
- biss_read_state_flags()#
Mock state flags reading
- Return type:
ndarray
- biss_set_bank(bank_num)#
Mock bank selection
- biss_set_dir_ccw()#
Mock set direction counter-clockwise
- Return type:
None
- biss_set_dir_cw()#
Mock set direction clockwise
- Return type:
None
- biss_set_shift(shift_angle)#
Mock set shift angle
- Return type:
None
- biss_write(addr, data)#
Mock write operation
- biss_write_command(command)#
Mock command writing
- biss_write_word(addr, word)#
Mock word writing
- Return type:
None
- biss_zeroing()#
Mock zeroing calibration
- Return type:
None
- close()#
Mock close method
- enable_signal_handling(signals=(Signals.SIGINT,))#
- Return type:
- encoder_ch1_power_cycle()#
Mock channel 1 power cycle
- Return type:
None
- encoder_ch1_power_off()#
Mock channel 1 power off
- Return type:
None
- encoder_ch1_power_on()#
Mock channel 1 power on
- Return type:
None
- encoder_power_cycle()#
Mock power cycle
- Return type:
None
- encoder_power_off()#
Mock power off
- Return type:
None
- encoder_power_on()#
Mock power on
- Return type:
None
- flashtool_rst()#
Mock reset
- Return type:
None
- hex_line_send(hex_line)#
Mock hex line sending
- Return type:
bytes
- port_read(length)#
Mock port read with simulated data
- Return type:
ndarray
- read_data(read_time)#
Mock data reading
- read_data_enc1_enc2_SPI(read_time, status=True)#
Mock dual encoder reading
- Return type:
Tuple
[List
[int
],List
[int
]]
- register_cleanup(handler)#
- Return type:
- send_data_to_device(pages, crc_values, page_numbers, start_page, end_page, pbar=None, difmode=False)#
Mock data sending to device
- Return type:
None