HsfzServer

class mtf.diag_port.diag_servers.hsfz_server.HsfzServer

Hsfz server

vis_port = 6811
vis_req_data = b'\x00\x00\x00\x00\x00\x11'
__init__(ip: str, port: int = 6801)

Hsfz server constructor.

Parameters:
  • ip – Hsfz server ip address.

  • port – Hsfz port number. Defaults to 6801.

vis_sock: socket
start()

Start the Hsfz server.

stop()

Stop the Hsfz server and close the socket.

call_back(data: bytes, connection: socket, adrr: str)

The HsfzServer callback function. Orchestrate the Hsfz communication.

Parameters:
  • data – Hsfz request’s data.

  • connection – Hsfz server socket.

  • adrr – Hsfz server address.

vis_func()

Send the response on the corresponding Hsfz request.

daemon_start()

Daemon thread that will run in the background of the main program.

property positive_responding: bool

Getter of positive_responding attribute

wait_connection()

Wait for tcp connection with the diagnostic server.

diag_thread_pool: ThreadPoolExecutor