예제 #1
0
 def __init__(self):
     """
     Create a fake S7 server. set log to false if you want to disable
     event logging to python logging.
     """
     self.library = load_library()
     self.create()
     self._set_log_callback()
예제 #2
0
 def __init__(self, log=True):
     """
     Create a fake S7 server. set log to false if you want to disable
     event logging to python logging.
     """
     self.library = load_library()
     self.pointer = self.create()
     if log:
         self._set_log_callback()
예제 #3
0
 def __init__(self, log=True):
     """
     Create a fake S7 server. set log to false if you want to disable
     event logging to python logging.
     """
     self.pointer = None
     self._callback = None
     self.library = load_library()
     self.create()
     if log:
         self._set_log_callback()
예제 #4
0
    def __init__(self, log: bool = True):
        """Create a fake S7 server. set log to false if you want to disable
            event logging to python logging.

        Args:
            log: `True` for enabling the event logging. Optinoal.
        """
        self._read_callback = None
        self._callback = Optional[Callable[..., Any]]
        self.pointer = None
        self.library = load_library()
        self.create()
        if log:
            self._set_log_callback()
예제 #5
0
 def __init__(self):
     self.library = load_library()
     self.pointer = False
     self.create()
예제 #6
0
 def __init__(self):
     self._read_callback = None
     self._callback = None
     self._pointer = None
     self._library = load_library()
     self.create()
예제 #7
0
 def __init__(self, active: bool = False):
     self._library = load_library()
     self._pointer = None
     self.create(active)
 def __init__(self):
     self.library = load_library()
     self.create()
예제 #9
0
 def __init__(self):
     self.library = load_library('/usr/lib/libsnap7.so')
     self.create()
예제 #10
0
 def __init__(self):
     """Creates a new instance of :obj:`Logo`"""
     self.pointer = None
     self.library = load_library()
     self.create()
예제 #11
0
 def __init__(self, lib_location: Optional[str] = None):
     self._read_callback = None
     self._callback = None
     self._pointer = None
     self._library = load_library(lib_location)
     self.create()
예제 #12
0
 def __init__(self, active=False):
     self.library = load_library()
     self.pointer = None
     self.create(active)
예제 #13
0
 def __init__(self):
     self.library = load_library()
     self.create()
예제 #14
0
 def __init__(self, active=False):
     self.library = load_library()
     self.pointer = self.create(active)
예제 #15
0
 def __init__(self):
     self.library = load_library()
     self.pointer = False
     self.create()
예제 #16
0
 def __init__(self, lib_location=None):
     self.library = load_library(lib_location=lib_location)
     self.create()
예제 #17
0
def load_snap7():
    lib_path = snap7_path()
    load_library(lib_path)