Beispiel #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()
Beispiel #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()
Beispiel #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()
Beispiel #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()
Beispiel #5
0
 def __init__(self):
     self.library = load_library()
     self.pointer = False
     self.create()
Beispiel #6
0
 def __init__(self):
     self._read_callback = None
     self._callback = None
     self._pointer = None
     self._library = load_library()
     self.create()
Beispiel #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()
Beispiel #9
0
 def __init__(self):
     self.library = load_library('/usr/lib/libsnap7.so')
     self.create()
Beispiel #10
0
 def __init__(self):
     """Creates a new instance of :obj:`Logo`"""
     self.pointer = None
     self.library = load_library()
     self.create()
Beispiel #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()
Beispiel #12
0
 def __init__(self, active=False):
     self.library = load_library()
     self.pointer = None
     self.create(active)
Beispiel #13
0
 def __init__(self):
     self.library = load_library()
     self.create()
Beispiel #14
0
 def __init__(self, active=False):
     self.library = load_library()
     self.pointer = self.create(active)
Beispiel #15
0
 def __init__(self):
     self.library = load_library()
     self.pointer = False
     self.create()
Beispiel #16
0
 def __init__(self, lib_location=None):
     self.library = load_library(lib_location=lib_location)
     self.create()
Beispiel #17
0
def load_snap7():
    lib_path = snap7_path()
    load_library(lib_path)