equal
deleted
inserted
replaced
47 def GetPLCstatus(self): |
47 def GetPLCstatus(self): |
48 strcounts = self.HandleSerialTransaction(GET_LOGCOUNTSTransaction()) |
48 strcounts = self.HandleSerialTransaction(GET_LOGCOUNTSTransaction()) |
49 ccounts = ctypes.cast( |
49 ccounts = ctypes.cast( |
50 ctypes.c_char_p(strcounts), |
50 ctypes.c_char_p(strcounts), |
51 ctypes.POINTER(ctypes.c_uint32)) |
51 ctypes.POINTER(ctypes.c_uint32)) |
52 return (self.PLCStatus,)+tuple(int(ccounts[idx]) for idx in range(4)) |
52 return self.PLCStatus, tuple(int(ccounts[idx]) for idx in range(4)) |
53 |
53 |
54 def MatchMD5(self, MD5): |
54 def MatchMD5(self, MD5): |
55 data = self.HandleSerialTransaction(GET_PLCIDTransaction()) |
55 data = self.HandleSerialTransaction(GET_PLCIDTransaction()) |
56 if data is not None: |
56 if data is not None: |
57 return data[:32] == MD5[:32] |
57 return data[:32] == MD5[:32] |