runtime/PLCObject.py
20 months ago Edouard Tisserant Use msgpack and remove serpent's bytes workaround
2022-10-30 GP Orcullo switched to Pyro5 python3
2022-11-01 GP Orcullo str encoding fixes python3
2022-10-28 GP Orcullo removed Python2 modules python3
2022-10-28 GP Orcullo automated conversion using 2to3-3.9 tool python3
2022-10-21 Edouard Tisserant Runtime: fix PLC not terminating when being Repaired (i.e purged). wxPython4
2022-08-02 Edouard Tisserant Runtime: Fix PLC python thread crash in case of exception in PostStart customization hook.
2022-08-02 Edouard Tisserant IDE+Runtime: fix exception when reconnecting with non-empty trace/force list.
2021-12-09 Edouard Tisserant RUNTIME: Variable forcing now uses limited list and buffer instead of systematical instance tree traversal and in-tree "fvalue" to keep track of forced value for pointed variables (external, located). Pointer swapping is performed when forcing externals and located, with backup being restored when forcing is reset. Retain still uses tree traversal. RuntimeLists
2021-07-15 Edouard Tisserant Runtime: Handle errors in user's python code more gracefully : make exceptions and allow repair. svghmi
2021-03-10 Edouard Tisserant Runtime: Added PostStart methot to PLCObject, called after PLC is started, with all libraries and python object already created, and python extensions "Start" methods being called.
2021-02-23 Edouard Tisserant PLCObject : Ensure that PreStart is executed before starting PLC. Also, make sure that python thread doesn't enter in a start/stop loop when ordered to stop.
2020-12-22 Edouard Tisserant Runtime: change PLCObject 'BlobAsFile' method to allow customization by overriding
2020-12-10 Edouard Tisserant Fixed "Onchange" object added in previous commit
2020-12-10 Edouard Tisserant Python Safe Globals now have more reliable triggering of OnChange call. Added "Onchange" object to accessible runtime variables that let user python code see count of changes and first and last values.
2020-09-10 Edouard Tisserant Runtime/PLCObject : move call to PreStartPLC right after call to the "start" method of all python extensions, and then just before the start of the python loop executing python_* blocks.
2020-06-19 Edouard Tisserant Runtime: Fix typo in PLCObject leading to exception when reporting failure.
2020-06-16 Tomaz Orac Merge
2020-06-12 Edouard Tisserant BACnet and Modbus: Remove additional loading and unloading, use the one already in place for extensions.
2020-06-02 Edouard Tisserant Runtime: create .md5 file at the end of all transfered files being written to disk, so that it presence indicates completeness of transfer.
2020-05-28 Mario de Sousa BACnet plugin: Add web interface for online parameter configuration
2020-06-01 Edouard Tisserant Runtime: fsync() files when transfering them, to prebent data loss when poweroff soon after programming. Fixed variable naming as a side effect.
2020-05-28 Edouard Tisserant PLCObject : reorganize code in StartPLC(), add a PreStartPLC() empty method, to be overloaded by runtime extensions.
2019-09-18 Edouard Tisserant PLCobject: Call "stop" and "cleanup" methods from python runtime files in reverse order compared to "init" and "start".
2019-07-14 Edouard Tisserant Fixed code quality according to pep8 and pylint.
2019-07-12 Edouard Tisserant PurgeBlobs was faulty, but it was never having anything to purge. Fixed.
2019-06-06 Edouard Tisserant Fix PLCObject's purge failing silently with extra_files.
2019-05-30 Edouard Tisserant LogMessage shouldn't be serialized (can lead to blocking in case of exception in main thread), and do not require it.
2019-04-19 Edouard Tisserant Avoid loading PLC at startup when autostart is not set in command line. As a side effect PLC status is artificially set to Stopped, and StartPLC eventually loads PLC if it is not already loaded.
2019-04-18 Edouard Tisserant If call to GetPLCstatus can't be executed in PLC, then obtained status is disconnected. Status on "None" is not relevant anymore, and is replaced by Disconnected. fix_PLC_runtime_shutdown
2019-04-17 Edouard Tisserant Named runtime's threads to ease debugging
2019-04-16 Edouard Tisserant Added RepairPLC() to PLCObject. For now just calling PurgePLC and quit PLC runtime.
2019-04-15 Edouard Tisserant Added PurgePLC() method to PLCObject, to be invoked when PLC Status is broken. It clears PLC shared object an extra files and force status to Empty. Added correponding Repair button to toolbar, visible only when PLC status is broken.
2019-04-09 Edouard Tisserant pep8 white spaces
2019-04-09 Edouard Tisserant Continue fixing deadlock of previous commit, this time occuring when waiting for 'cleanup' python runtime call to finish. Now 'init' and 'cleanup' python runtime calls are called directly from main thread, and aren't anymore invoked in the context of wxMainloop and/or twisted reactor.
2019-04-09 Edouard Tisserant Fix deadlock when indirectly calling PLCObject's evaluator() from twisted of wx event loops. Was freezing while transfer/start/stop through Wamp. Serialize all PLCObject's call to self.PythonRuntimeCall into the same PythonThread thread.
2019-03-18 Andrey Skvortsov Fix pylint warning [C0325(superfluous-parens), ] Unnecessary parens after u'if' keyword
2019-03-13 Andrey Skvortsov Replace md5 module with hashlib
2019-03-13 Andrey Skvortsov Fix various pylint and pep8 errors
2019-03-11 Edouard Tisserant check_sources.sh makes me become even less productive
2019-02-13 Edouard Tisserant Reworked chunk based transfer to support duplicated files (i.e. files with same content, but different names)
2019-02-01 Edouard Tisserant Fixed deadlock in runtime's Worker. Was discovered while using WAMP and PYRO simultaneously.
2019-01-31 Edouard Tisserant Add a debugger token to SetTraceVariables and GetTraceVariables to prevent crash an inconsistant data in case of multiple connections. Last connection now takes over existing connections's debug, and first connected IDE gets a wrning.
2018-12-04 Edouard Tisserant Chunk based transfer for PLC binary and extra files, and some collateral code refactoring.
2018-11-23 Edouard Tisserant Merged. Some changes that should already have been incuded during previous merge (mostly about PlcStatus) have been included this time.
2018-10-10 Andrey Skvortsov python3 support: pylint, W1606 # (execfile-builtin) execfile built-in referenced
2018-10-09 Andrey Skvortsov python3 support: pylint, W1607 # (file-builtin) file built-in referenced
2018-10-04 Andrey Skvortsov python3 support: pylint, W1613 # (xrange-builtin) xrange built-in referenced
2018-10-04 Andrey Skvortsov python3 support: pylint, W1648 # (bad-python3-import) Module moved in Python 3
2018-11-22 Edouard Tisserant Merge, with surprizingly little conflicts
2018-10-03 Andrey Skvortsov Fix old style exception raise and exec syntax
2018-10-02 Andrey Skvortsov Use python 3 compatible exception syntax everywhere
2018-10-02 Andrey Skvortsov Use predefined constants for PlcStatus instead of string literals
2018-10-29 Edouard Tisserant Automatically get PSK and ID when connecting to PYRO[S], so that future connection through PYROS can use that same key. Also fixed case to UPPER for *PSK.
2018-10-02 Edouard Tisserant Please pylint and pep8
2018-08-21 Edouard Tisserant Refactoring. Separated PLC Object, PYRO Server and MainWorker :
2018-04-19 Edouard Tisserant PEP-8 and PyLint
2018-04-19 Edouard Tisserant Rework of runtime non-real-time threading, and shared object dynamic loading :
2018-04-17 Edouard Tisserant Stripped forgotten debug code
2018-04-16 Edouard Tisserant Fixed Xenomai 3 PLC stop freeze. Now use explicit finish command with pipes. Closing both ends of pipes doesn't abort blocking read anymore.