pycomm3/clx.py
def open(self):
        """
        Creates a new Ethernet/IP socket connection to target device and registers a CIP session.

        :return: True if successful, False otherwise
        """
        # handle the socket layer
        if self._connection_opened:
            return
        try:
            if self._sock is None:
                self._sock = Socket()
            self._sock.connect(self.attribs['ip address'], self.attribs['port'])
            self._connection_opened = True
            self.attribs['cid'] = urandom(4)
            self.attribs['vsn'] = urandom(4)
            if self._register_session() is None:
                self.__log.warning("Session not registered")
                return False
            return True
        except Exception as e:
            raise CommError(e)

        Creates a new Ethernet/IP socket connection to target device and registers a CIP session.

        :return: True if successful, False otherwise
        
Creates a new Ethernet/IP socket connection to target device and registers a CIP session.
Creates a new Ethernet / IP socket connection to target device and registers a CIP session .
def open(self):
        if self._connection_opened:
            return
        try:
            if self._sock is None:
                self._sock = Socket()
            self._sock.connect(self.attribs['ip address'], self.attribs['port'])
            self._connection_opened = True
            self.attribs['cid'] = urandom(4)
            self.attribs['vsn'] = urandom(4)
            if self._register_session() is None:
                self.__log.warning("Session not registered")
                return False
            return True
        except Exception as e:
            raise CommError(e)
def open ( self ) : if self . _connection_opened : return try : if self . _sock is None : self . _sock = Socket ( ) self . _sock . connect ( self . attribs [ 'ip address' ] , self . attribs [ 'port' ] ) self . _connection_opened = True self . attribs [ 'cid' ] = urandom ( 4 ) self . attribs [ 'vsn' ] = urandom ( 4 ) if self . _register_session ( ) is None : self . __log . warning ( "Session not registered" ) return False return True except Exception as e : raise CommError ( e )
Creates a new Ethernet/IP socket connection to target device and registers a CIP session.
Creates a new Ethernet / IP socket connection to target device and registers a CIP session .
"""
        Creates a new Ethernet/IP socket connection to target device and registers a CIP session.

        :return: True if successful, False otherwise
        """ # handle the socket layer
True if successful, False otherwise
True if successful False otherwise
self