# HG changeset patch # User Edouard Tisserant # Date 1434746195 -7200 # Node ID 68ba08b3a152ffe7233b69ec49c12de806df31e0 # Parent 805826ba48c5cf08018ab3ad704b361fc5ff6134# Parent de311ffe3961dbda2248f9785fd06e37ad1976ff Merged diff -r 805826ba48c5 -r 68ba08b3a152 runtime/PLCObject.py --- a/runtime/PLCObject.py Fri Jun 19 21:56:35 2015 +0200 +++ b/runtime/PLCObject.py Fri Jun 19 22:36:35 2015 +0200 @@ -142,9 +142,9 @@ self._PLClibraryHandle = dlopen(self._GetLibFileName()) self.PLClibraryHandle = ctypes.CDLL(self.CurrentPLCFilename, handle=self._PLClibraryHandle) - self.PLCID = ctypes.c_char_p.in_dll(self.PLClibraryHandle, "PLCID") + self.PLC_ID = ctypes.c_char_p.in_dll(self.PLClibraryHandle, "PLC_ID") if len(md5) == 32 : - self.PLCID.value = md5 + self.PLC_ID.value = md5 self._startPLC = self.PLClibraryHandle.startPLC self._startPLC.restype = ctypes.c_int diff -r 805826ba48c5 -r 68ba08b3a152 targets/plc_main_head.c --- a/targets/plc_main_head.c Fri Jun 19 21:56:35 2015 +0200 +++ b/targets/plc_main_head.c Fri Jun 19 22:36:35 2015 +0200 @@ -25,7 +25,7 @@ IEC_TIME __CURRENT_TIME; IEC_BOOL __DEBUG = 0; unsigned long __tick = 0; -char *PLCID = NULL; +char *PLC_ID = NULL; /* * Variable generated by C softPLC and plugins diff -r 805826ba48c5 -r 68ba08b3a152 tests/python/c_code@c_ext/cfile.xml --- a/tests/python/c_code@c_ext/cfile.xml Fri Jun 19 21:56:35 2015 +0200 +++ b/tests/python/c_code@c_ext/cfile.xml Fri Jun 19 22:36:35 2015 +0200 @@ -14,7 +14,7 @@ volatile char PtoC=1,CtoP=2; extern long AtomicCompareExchange(long*,long, long); -extern char *PLCID; +extern char *PLC_ID; int Simple_C_Call(int val){ return val+1; @@ -35,7 +35,7 @@ res=1; } printf("C code called by Python: toC %d fromC %d\n",toC,*fromC); - printf("PLCID id %s\n",PLCID); + printf("PLC_ID id %s\n",PLC_ID); return res; }