--- a/NativeLib.xml Wed Mar 06 19:23:58 2013 +0100
+++ b/NativeLib.xml Fri Mar 08 00:15:28 2013 +0100
@@ -74,6 +74,7 @@
<ST>
<![CDATA[IF TRIG AND NOT TRIG0 THEN
{{
+ extern int LogMessage(uint8_t, uint8_t*, uint32_t);
LogMessage(GetFbVar(LEVEL),GetFbVar(MSG, .body),GetFbVar(MSG, .len));
}}
END_IF;
--- a/connectors/PYRO/__init__.py Wed Mar 06 19:23:58 2013 +0100
+++ b/connectors/PYRO/__init__.py Fri Mar 08 00:15:28 2013 +0100
@@ -116,7 +116,7 @@
object is recreated meanwhile,
so we must not keep ref to it here
"""
- current_status = confnodesroot._connector.GetPyroProxy().GetPLCstatus()
+ current_status, log_count = confnodesroot._connector.GetPyroProxy().GetPLCstatus()
if current_status == "Dirty":
"""
Some bad libs with static symbols may polute PLC
--- a/runtime/PLCObject.py Wed Mar 06 19:23:58 2013 +0100
+++ b/runtime/PLCObject.py Fri Mar 08 00:15:28 2013 +0100
@@ -188,7 +188,7 @@
self._LogMessage = self.PLClibraryHandle.LogMessage
self._LogMessage.restype = ctypes.c_int
- self._LogMessage.argtypes = [ctypes.c_uint8, ctypes.c_char_p, ctypes.c_uint32]
+ self._LogMessage.argtypes = [ctypes.c_uint8, ctypes.POINTER(ctypes.c_uint8), ctypes.c_uint32]
self._log_read_buffer = ctypes.create_string_buffer(1<<14) #16K
self._GetLogMessage = self.PLClibraryHandle.GetLogMessage
--- a/targets/plc_debug.c Wed Mar 06 19:23:58 2013 +0100
+++ b/targets/plc_debug.c Fri Mar 08 00:15:28 2013 +0100
@@ -182,6 +182,7 @@
BufferIterator(varp, vartype, 0);
}
+extern void PLC_GetTime(IEC_TIME*);
extern int TryEnterDebugSection(void);
extern long AtomicCompareExchange(long*, long, long);
extern long long AtomicCompareExchange64(long long* , long long , long long);
@@ -357,7 +358,7 @@
static uint64_t LogCursor[LOG_LEVELS] = {0x0,0x0,0x0,0x0};
/* Store one log message of give size */
-int LogMessage(uint8_t level, char* buf, uint32_t size){
+int LogMessage(uint8_t level, uint8_t* buf, uint32_t size){
if(size < LOG_BUFFER_SIZE - sizeof(mTail)){
uint32_t buffpos;
uint64_t new_cursor, old_cursor;
@@ -387,7 +388,7 @@
return 1; /* Success */
}else{
- char mstr[] = "Logging error : message too big";
+ uint8_t mstr[] = "Logging error : message too big";
LogMessage(LOG_CRITICAL, mstr, sizeof(mstr));
}
return 0;