line=info[0]
else:
try:
- h=int(info[0].split(' ')[1])
+ h=int(info[0][-2:])
m=int(info[1])
- s=info[2].split('.')
- ts=datetime.combine(date.today(),time(h,m,int(s[0]),int(s[1])*1000))
- line=info[3][1:]
+ s=int(info[2][:2])
+ u=int(info[2][3:6])*1000
+ ts=datetime.combine(date.today(),time(h,m,s,u))
+ line=''.join(line.split(":")[2:])[7:]
except:
pass
-
-# if timestamp>1e9: # 2001-09-09
-# pass
-# else:
-# try:
-# h=int(info[0].split(' ')[1])
-# m=int(info[1])
-# s=info[2].split('.')
-# u=s[1].split(' ')
-# ts=datetime.combine(date.today(),time(h,m,int(s[0]),int(u[0])*1000))
-# line=s[1][4:]
-# except:
-# pass
-#
print(ts)
return ts,line
######################################################
def readbyte(line):
byte=-1
+ line=line.strip()
while byte==-1 and len(line)>0:
try:
byte=int(line[0:2],16)
le,line=readbyte(line)
os=(le&0xC0)>>6
le=le&0x3F
- print("Class:",cl,"Operation:",os,"Length:",le)
+ print(gf.operation[os],"Class:",cl,"Length:",le)
return cl,os,le,line
# section: process_data {{{1
tmp,line=readbyte(line)
val[i]=(val[i]<<8)+tmp
if size1>0 and size2>0:
- if gf.params[cl][ids[i]] != "":
- print(gf.params[cl][ids[i]],"=",val[i])
- else:
- print("Id:",ids[i],"=",val[i])
+ print("Id:",ids[i],repr(gf.params[cl][ids[i]]),"=",val[i])
elif size1>0:
- if gf.params[cl][ids[i]] != "":
- print(gf.params[cl][ids[i]])
- else:
- print("Id:",ids[i])
+ print("Id:",ids[i],repr(gf.params[cl][ids[i]]))
elif size2>0:
print("=",val[i])
return ids,val,line