# HG changeset patch # User Edouard Tisserant # Date 1615450431 -3600 # Node ID 1d3408e46ab1cce9537b29b0f77f1b49a90686bf # Parent 50d0fef791d5aa6b73d1bb78a7d19d876f5ddd8c# Parent ca9774c0f6a74ce325f1233a2aad214e7d4ff4b3 merge diff -r 50d0fef791d5 -r 1d3408e46ab1 runtime/PLCObject.py --- a/runtime/PLCObject.py Wed Mar 10 19:29:49 2021 +0100 +++ b/runtime/PLCObject.py Thu Mar 11 09:13:51 2021 +0100 @@ -459,6 +459,7 @@ self.PythonThreadAcknowledge(cmd) self.PythonRuntimeCall("start") self.LogMessage("Python extensions started") + self.PostStartPLC() self.PythonThreadLoop() self.PythonRuntimeCall("stop", reverse_order=True) elif cmd == "Finish": @@ -496,6 +497,16 @@ """ pass + def PostStartPLC(self): + """ + Here goes actions to be taken after PLC is started, + with all libraries and python object already created, + and python extensions "Start" methods being called. + This is called before python thread processing py_eval blocks starts. + For example : attach additional ressource to web services + """ + pass + @RunInMain def StartPLC(self):