pyscenario.client
IFSEI Telnet Client Module.
This module contains the IFSEITelnetClient class, a custom TelnetClient for handling communication with IFSEI devices over Telnet. It manages the connection, sending, and receiving of data, and handles connection loss gracefully.
Classes
|
Custom TelnetClient for handling IFSEI device communication. |
Documentation
- class pyscenario.client.IFSEITelnetClient(queue_manager: QueueManager, on_connection_lost_callback: Callable[[], None] | None, *args: tuple, **kwds: Any)[source]
Bases:
TelnetClientCustom TelnetClient for handling IFSEI device communication.
This client handles the connection, sending, and receiving of data to and from an IFSEI device over a Telnet connection. It manages tasks for sending and receiving data, and can handle connection loss gracefully.
- task_manager
Manager for send and receive tasks.
- Type:
- queue_manager
Manager for send and receive queues.
- Type:
- send_delay
Delay between sending commands.
- Type:
float
- shell
Shell function to run asynchronously.
- Type:
Callable
- on_connection_lost_callback
Callback when connection is lost.
- Type:
Callable | None
Initialize the IFSEITelnetClient.
- Parameters:
queue_manager (QueueManager) – Manager for send and receive queues.
on_connection_lost_callback (Callable | None) – Callback when connection is lost.
*args (tuple) – Additional arguments for the TelnetClient.
**kwds (Any) – Additional keyword arguments for the TelnetClient.
- __init__(queue_manager: QueueManager, on_connection_lost_callback: Callable[[], None] | None, *args: tuple, **kwds: Any) None[source]
Initialize the IFSEITelnetClient.
- Parameters:
queue_manager (QueueManager) – Manager for send and receive queues.
on_connection_lost_callback (Callable | None) – Callback when connection is lost.
*args (tuple) – Additional arguments for the TelnetClient.
**kwds (Any) – Additional keyword arguments for the TelnetClient.
- connection_lost(exc: None | Exception, /) None[source]
Handle connection loss.
- Parameters:
exc (None | Exception) – Exception that caused the connection loss.
- __annotations__ = {}