def _connect_ooi_digi(self): """ Establishes the connection to the OOI digi. The connection is attempted a number of times. NOTE: The connection has sporadically failed, which have been fixed by rebooting the unit through the web interface (which is http://10.180.80.178/html/reboot.htm for the 4-beam unit). """ host = self._conn_config.ooi_digi_host port = self._conn_config.ooi_digi_port sock = connect_socket(host, port, timeout=self._generic_timeout) if 'localhost' == host: outfilename = 'vadcp_ooi_digi_output.txt' else: outfilename = 'vadcp_output_%s_%s.txt' % (host, port) outfile = open(outfilename, 'a') log.info("creating OOI Digi _Receiver") rt = ReceiverBuilder.build_receiver(sock, ooi_digi=True, outfile=outfile) log.info("starting OOI Digi _Receiver") rt.start() return (sock, rt, host, port)
def _connect_ooi_digi(self): """ Establishes the connection to the OOI digi. The connection is attempted a number of times. NOTE: The connection has sporadically failed, which have been fixed by rebooting the unit through the web interface (which is http://10.180.80.178/html/reboot.htm for the 4-beam unit). """ host = self._conn_config.ooi_digi_host port = self._conn_config.ooi_digi_port sock = connect_socket(host, port, timeout=self._generic_timeout) if 'localhost' == host: outfilename = 'vadcp_ooi_digi_output.txt' else: outfilename = 'vadcp_output_%s_%s.txt' % (host, port) outfile = open(outfilename, 'a') log.info("creating OOI Digi _Receiver") rt = ReceiverBuilder.build_receiver(sock, ooi_digi=True, outfile=outfile) log.info("starting OOI Digi _Receiver") rt.start() return (sock, rt, host, port)
def connect(self): """ Establishes the connection and starts the receiving thread. @throws socket.error The socket.error that was raised during the last attempt to connect the socket. """ assert self._sock is None host = self._conn_config.host port = self._conn_config.port self._sock = connect_socket(host, port) log.info("creating _Receiver") self._rt = ReceiverBuilder.build_receiver(self._sock, ooi_digi=False, outfile=self._outfile, data_listener=self._data_listener, prefix_state=self._prefix_state) log.info("starting _Receiver") self._rt.start()
def connect(self): """ Establishes the connection and starts the receiving thread. @throws socket.error The socket.error that was raised during the last attempt to connect the socket. """ assert self._sock is None host = self._conn_config.host port = self._conn_config.port self._sock = connect_socket(host, port) log.info("creating _Receiver") self._rt = ReceiverBuilder.build_receiver( self._sock, ooi_digi=False, outfile=self._outfile, data_listener=self._data_listener, prefix_state=self._prefix_state) log.info("starting _Receiver") self._rt.start()