Added support for resetting log messages
authorLaurent Bessard
Mon, 06 May 2013 16:01:38 +0200
changeset 47 f860aa7e90e5
parent 46 c6b7d4c176c2
child 48 76056645f265
Added support for resetting log messages
LPCconnector/LPCAppObject.py
LPCconnector/LPCAppProto.py
--- a/LPCconnector/LPCAppObject.py	Tue Apr 30 16:25:13 2013 +0900
+++ b/LPCconnector/LPCAppObject.py	Mon May 06 16:01:38 2013 +0200
@@ -108,6 +108,9 @@
                 return self.PLCStatus, tick.value, TraceVariables
         return self.PLCStatus, None, [] 
 
+    def ResetLogCount(self):
+        self.HandleSerialTransaction(RESET_LOGCOUNTSTransaction())
+
     def GetLogMessage(self, level, msgid):
         strbuf = self.HandleSerialTransaction(GET_LOGMSGTransaction(level, msgid))
         if strbuf is not None and len(strbuf) > 12:
--- a/LPCconnector/LPCAppProto.py	Tue Apr 30 16:25:13 2013 +0900
+++ b/LPCconnector/LPCAppProto.py	Mon May 06 16:01:38 2013 +0200
@@ -110,6 +110,11 @@
         self.SendData(self.Data)
         return self.GetData()
 
+class RESET_LOGCOUNTSTransaction(LPCAppTransaction):
+    def __init__(self):
+        LPCAppTransaction.__init__(self, 0x0D)
+    ExchangeData = LPCAppTransaction.GetData
+
 if __name__ == "__main__":
     __builtins__.BMZ_DBG = True
     TestConnection = LPCAppProto(6,115200,2)