Daemon.__init__

Daemon.__init__(config_file: str = None, pid_file_name: str = None, host: str = None, port: int = None, device_config_file: str = None)[source]

Initializes the Daemon object. The device constructor is called: serial connection is established and hardware information is retrieved from the controller.

Parameters
  • config_file (str, optional) – See parent class Server.

  • pid_file_name (str, optional) – See parent class Server.

  • host (int, optional) – See parent class Server.

  • port (int, optional) – See parent class Server.

  • device_config_file (str, optional) – Configuration file for the TPG-256A device.

Raises
  • configparser.Error – Configuration file error

  • LockError – The PID file could not be locked (see parent class Server).

  • OSError – Socket errors (see parent class Server).

  • SerialException – The connection to the device has failed

  • IOError – Communication error, probably message misspelt.

  • StateErrordevice was in the wrong state, e.g. already ON.