def __init__(self, machine: "MachineController") -> None: """Initialise BCP module.""" super().__init__(machine) self.interface = BcpInterface(machine) self.transport = BcpTransportManager(machine) self.servers = [] # type: List[BcpServer] if self.machine.options['bcp']: self.machine.events.add_handler('init_phase_2', self._setup_bcp_connections) self.machine.events.add_handler('init_phase_4', self._setup_bcp_servers) self.machine.events.add_handler('shutdown', self._stop_servers)
def __init__(self, machine): """Initialise BCP module.""" super().__init__(machine) self.interface = BcpInterface(machine) self.transport = BcpTransportManager(machine) self.servers = [] if not self.machine.options['bcp']: return self.machine.events.add_handler('init_phase_2', self._setup_bcp_connections) self.machine.events.add_handler('init_phase_4', self._setup_bcp_servers) self.machine.events.add_handler('shutdown', self._stop_servers)