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