Modbus/BACnet : add some comments so that we don't forget some pending optimization.
authorEdouard Tisserant
Tue, 16 Jun 2020 10:16:25 +0200
changeset 2676 b276d05bdb09
parent 2675 3ca5611d6308
child 2677 556935640ec0
Modbus/BACnet : add some comments so that we don't forget some pending optimization.
bacnet/web_settings.py
modbus/web_settings.py
--- a/bacnet/web_settings.py	Tue Jun 16 10:12:21 2020 +0200
+++ b/bacnet/web_settings.py	Tue Jun 16 10:16:25 2020 +0200
@@ -315,6 +315,8 @@
         GetParamFuncName = "__bacnet_%(location_str)s_get_ConfigParam_" + name
         SetParamFuncName = "__bacnet_%(location_str)s_set_ConfigParam_" + name
         
+        # XXX TODO : stop reading from PLC .so file. This code is template code
+        #            that can use modbus extension build data
         GetParamFuncs[name]          = getattr(PLCObject.PLClibraryHandle, GetParamFuncName)
         GetParamFuncs[name].restype  = c_dtype
         GetParamFuncs[name].argtypes = None
--- a/modbus/web_settings.py	Tue Jun 16 10:12:21 2020 +0200
+++ b/modbus/web_settings.py	Tue Jun 16 10:16:25 2020 +0200
@@ -547,6 +547,8 @@
     # are not present in the .so file we conclude that the currently loaded 
     # PLC does not have the Modbus plugin included (situation (2b) described above init())
     try:
+        # XXX TODO : stop reading from PLC .so file. This code is template code
+        #            that can use modbus extension build data, such as client node count.
         client_count = ctypes.c_int.in_dll(PLCObject.PLClibraryHandle, "__modbus_plugin_client_node_count").value
         server_count = ctypes.c_int.in_dll(PLCObject.PLClibraryHandle, "__modbus_plugin_server_node_count").value
     except Exception:
@@ -569,6 +571,8 @@
     GetServerParamFuncs = {}
     SetServerParamFuncs = {}
 
+    # XXX TODO : stop reading from PLC .so file. This code is template code
+    #            that can use modbus extension build data
     for name, web_label, c_dtype, web_dtype in TCPclient_parameters + RTUclient_parameters + General_parameters:
         ParamFuncName                      = "__modbus_get_ClientNode_" + name        
         GetClientParamFuncs[name]          = getattr(PLCObject.PLClibraryHandle, ParamFuncName)
@@ -581,6 +585,8 @@
         SetClientParamFuncs[name].restype  = None
         SetClientParamFuncs[name].argtypes = [ctypes.c_int, c_dtype]
 
+    # XXX TODO : stop reading from PLC .so file. This code is template code
+    #            that can use modbus extension build data
     for name, web_label, c_dtype, web_dtype in TCPserver_parameters + RTUslave_parameters + General_parameters:
         ParamFuncName                      = "__modbus_get_ServerNode_" + name        
         GetServerParamFuncs[name]          = getattr(PLCObject.PLClibraryHandle, ParamFuncName)