runtime/PLCObject.py
changeset 2669 be233279d179
parent 2649 db68cb0e6bdc
child 2678 45f1ff6a7f87
--- a/runtime/PLCObject.py	Sun Jun 07 23:47:32 2020 +0100
+++ b/runtime/PLCObject.py	Fri Jun 12 10:30:23 2020 +0200
@@ -99,9 +99,6 @@
         self.TraceLock = Lock()
         self.Traces = []
         self.DebugToken = 0
-        # Callbacks used by web settings extensions (e.g.: BACnet_config.py, Modbus_config.py)
-        self.LoadCallbacks   = {} # list of functions to call when PLC is   loaded
-        self.UnLoadCallbacks = {} # list of functions to call when PLC is unloaded
 
         self._init_blobs()
 
@@ -170,22 +167,6 @@
             return self._loading_error, 0, 0, 0
         return None
 
-    def RegisterCallbackLoad(self, ExtensionName, ExtensionCallback):
-        """
-        Register function to be called when PLC is loaded
-        ExtensionName: a string with the name of the extension asking to register the callback 
-        ExtensionCallback: the function to be called...
-        """
-        self.LoadCallbacks[ExtensionName] = ExtensionCallback
-
-    def RegisterCallbackUnLoad(self, ExtensionName, ExtensionCallback):
-        """
-        Register function to be called when PLC is unloaded
-        ExtensionName: a string with the name of the extension asking to register the callback 
-        ExtensionCallback: the function to be called...
-        """
-        self.UnLoadCallbacks[ExtensionName] = ExtensionCallback
-
     def _GetMD5FileName(self):
         return os.path.join(self.workingdir, "lasttransferedPLC.md5")
 
@@ -289,8 +270,6 @@
         res = self._LoadPLC()
         if res:
             self.PythonRuntimeInit()
-            for name, callbackFunc in self.LoadCallbacks.items():
-                callbackFunc()
         else:
             self._FreePLC()
 
@@ -299,8 +278,6 @@
     @RunInMain
     def UnLoadPLC(self):
         self.PythonRuntimeCleanup()
-        for name, callbackFunc in self.UnLoadCallbacks.items():
-            callbackFunc()        
         self._FreePLC()
 
     def _InitPLCStubCalls(self):