Adding support for forcing PLC variable (still command to PLC to implement)
authorlaurent
Sun, 06 Dec 2009 21:20:21 +0100
changeset 463 961bddcfc913
parent 462 274e83a5534e
child 464 46dd4358e8a8
Adding support for forcing PLC variable (still command to PLC to implement)
plugger.py
--- a/plugger.py	Sun Dec 06 21:03:10 2009 +0100
+++ b/plugger.py	Sun Dec 06 21:20:21 2009 +0100
@@ -1324,8 +1324,8 @@
            "programs_declarations":
                "\n".join(["extern %(type)s %(C_path)s;"%p for p in self._ProgramList]),
            "extern_variables_declarations":"\n".join([
-              {"PT":"extern %(type)s *%(C_path)s;",
-               "VAR":"extern %(type)s %(C_path)s;"}[v["vartype"]]%v 
+              {"PT":"extern __IEC_%(type)s_p %(C_path)s;",
+               "VAR":"extern __IEC_%(type)s_t %(C_path)s;"}[v["vartype"]]%v 
                for v in self._VariablesList if v["vartype"] != "FB" and v["C_path"].find('.')<0]),
            "subscription_table_count":
                len(self._VariablesList),
@@ -1618,6 +1618,9 @@
             # Rearm anti-rapid-fire timer
             self.DebugTimer.start()
 
+    def GetDebugIECVariableType(self, IECPath):
+        Idx, IEC_Type = self._IECPathToIdx.get(IECPath,(None,None))
+        return IEC_Type
         
     def SubscribeDebugIECVariable(self, IECPath, callableobj, *args, **kwargs):
         """
@@ -1663,6 +1666,12 @@
 
         self.ReArmDebugRegisterTimer()
 
+    def ForceDebugIECVariable(self, IECPath, value):
+        pass
+    
+    def ReleaseDebugIECVariable(self, IECPath):
+        pass
+
     def CallWeakcallables(self, IECPath, function_name, *cargs):
         data_tuple = self.IECdebug_datas.get(IECPath, None)
         if data_tuple is not None: