| | |
| | | 0xDF03: PartNumberCodec(3), |
| | | 0xDF04: PartNumberCodec(3), |
| | | 0x1000: PartNumberCodec(2), |
| | | 0xF010: AsciiCodec(16), |
| | | 0xF019: AsciiCodec(16), |
| | | 0x2102: AsciiCodec(64) |
| | | } |
| | | try: |
| | | config = configparser.ConfigParser() |
| | |
| | | USBCAN_DLL.VCI_Transmit(self.device, self.device_index, self.channel, |
| | | byref(raw_message), 1) |
| | | |
| | | def Receive(self, len=10, timeout=None): |
| | | def Receive(self, len=1, timeout=None): |
| | | raw_message = (VCI_CAN_OBJ * len)() |
| | | |
| | | timeout = -1 if timeout is None else c_int(timeout * 1000) |
| | |
| | | from ast import Not, Pass |
| | | from asyncio.windows_events import NULL |
| | | from concurrent.futures import thread |
| | | from curses import flash |
| | | from logging import exception |
| | |
| | | self.UI.lineEdit_2.clear() |
| | | data = self.ReadByDID(tempdid) |
| | | if data is not None and len(str(data[tempdid])): |
| | | # print(data[tempdid]) |
| | | if '\x00' in data[tempdid]: |
| | | out1, out2 = data[tempdid].split('\x00', 1) |
| | | self.UI.lineEdit_2.setText(out1) |
| | | else: |
| | | self.UI.lineEdit_2.setText(data[tempdid]) |
| | | |
| | | def WriteDataByID(self): |