July 2021
30
self.Dryout = StringVar()
l = ttk.Label(self.statusFrame, textvariable=self.Dryout, style="VAL.TLabel")
l.grid(row=3,column=11,sticky='w')
l = ttk.Label(self.statusFrame,text="H2O:",anchor='e')
l.grid(row=4,column=10,sticky='e',padx=2)
self.H2O = StringVar()
l = ttk.Label(self.statusFrame, textvariable=self.H2O, style="VAL.TLabel")
l.grid(row=4,column=11,sticky='w')
btn = ttk.Button(self.statusFrame,text="Clear",command=self.btnClear)
btn.grid(row=1,column=13,sticky='e')
self.messageFrame = ttk.Frame(self)
self.messageFrame.pack(fill="both", expand=True)
cols = [("Type", 130), ("Date", 90),("Message", 500),("Code", 18), ("Header", 300)]
self.tv = ttk.Treeview(self.messageFrame, columns=[col for col, _ in cols], show="headings")
for col, colwidth in cols:
self.tv.heading(col, text=col)
self.tv.column(col, width=colwidth)
self.tv.pack(fill="both", side='left', expand=True)
vsb = ttk.Scrollbar(self.messageFrame,orient="vertical", command=self.tv)
vsb.pack(side='right', fill='y')
self.tv.configure(yscrollcommand=vsb.set)
vsb.config(command=self.tv.yview)
self.title(BPPReader.title + BPPReader.ver)
self.protocol("WM_DELETE_WINDOW", self.handleClose)
self.tv.tag_configure('alarmRow', background='yellow')
self.tv.tag_configure('faultRow', background='red')
self.tv.tag_configure('modeRow', background='green2')
self.tv.tag_configure('resetRow', background='maroon1')
def setReader(self,aReader):
BPPReader_GUI.readerInstance = aReader
def btnClear(self):
self.mutex.acquire()
self.tv.delete(*self.tv.get_children())
self.mutex.release()
def handleClose(self):
self.readerInstance.stop()
while self.readerInstance.stopAcked() is False:
pass
self.destroy()
def displayMsg(self,rdr):
self.mutex.acquire()
self.tv.insert("",0,value=[rdr.typeStr, rdr.timedate[1] + " " + rdr.timedate[0], rdr.msg, rdr.code, rdr.str], tags=(rdr.tag))
children_ = self.tv.get_children()
if len(children_) > BPPReader_GUI.MAX_MESSAGES:
self.tv.delete(children_[len(children_) - 1])
self.mutex.release()
def updateData(self,eeData):
color_ = 'black'
if ("ERR" in eeData[0] or float(eeData[0]) <= float(eeData[3])) or (float(eeData[0]) >= float(eeData[2])):
color_ = 'red'
self.TempVal.configure(foreground=color_)
self.Temp.set(eeData[0])
self.TempSet.set(eeData[1])
self.TempMin.set(eeData[2])
self.TempMax.set(eeData[3])
color_ = 'black'
Содержание ReCO2ver
Страница 8: ...July 2021 8 Figure 2 Data Packet Figure 3 Event Packet...
Страница 32: ...July 2021 32 Glossary...