#! /usr/env/python #-------------------------------------------------------------------------------- """ Application: Dialog_Ctl for DAQ_96_Gui Command File Dialog for the Graphical User Interface to the DAQ_96 Control Program """ #-------------------------------------------------------------------------------- #-------------------------------------------------------------------------------- import os import string import time from Tkinter import * import Pmw from Itc_Gui_Client import SetXmlTracingOn from Itc_Gui_Client import SetXmlTracingOff from Print_Utils import printLine #-------------------------------------------------------------------------------- #-------------------------------------------------------------------------------- class Dialog_Ctl : def __init__ ( self, MShell, FrameNum ) : self.MShell = MShell self.CtlFrame = FrameNum # printLine ( "Dialog", 'Frame #%d is "%s"' % ( FrameNum, MShell.frameName[FrameNum] ) ) #-------------------------------------------------------------------------------- def createInterface(self): MShell = self.MShell MShell.addFieldLabel ( nFrame = self.CtlFrame, labelName = 'Local: Control - Status', column = 1, columnspan = 3, height = 3, width = 35, row = MShell.nextFieldRow() ) MShell.addFieldLabel ( nFrame = self.CtlFrame, labelName = 'Trace Commands', column = 1, row = MShell.nextFieldRow() ) MShell.addFieldButton ( nFrame = self.CtlFrame, labelName = 'On', helpMessage = 'XML Tracing ON', statusMessage= 'XML Tracing ON', width = 15, column = 2, row = MShell.currentFieldRow(), command = SetXmlTracingOn ) MShell.addFieldButton ( nFrame = self.CtlFrame, labelName = 'Off', helpMessage = 'XML Tracing OFF', statusMessage= 'XML Tracing OFF', width = 15, column = 3, row = MShell.currentFieldRow(), command = SetXmlTracingOff ) MShell.addFieldLabel ( nFrame = self.CtlFrame, labelName = 'Remote: Control - Status', column = 1, columnspan = 3, height = 3, width = 35, row = MShell.nextFieldRow() ) MShell.addFieldLabel ( nFrame = self.CtlFrame, labelName = 'Full System', column = 1, row = MShell.nextFieldRow() ) MShell.addFieldButton ( nFrame = self.CtlFrame, labelName = 'Configure', helpMessage = 'Configure all FPGAs in DAQ96', statusMessage= 'Configure all FPGAs in DAQ96', width = 15, column = 2, row = MShell.currentFieldRow(), command = lambda : MShell.Dialog_Msg.Msg_Send_COOR_Msg ( "Configure_FPGAs" ) ) MShell.addFieldButton ( nFrame = self.CtlFrame, labelName = 'Initialize', helpMessage = 'Initialize DAQ96', statusMessage= 'Initialize DAQ96', width = 15, column = 3, row = MShell.currentFieldRow(), command = lambda : MShell.Dialog_Msg.Msg_Send_COOR_Msg ( "Initialize" ) ) MShell.addFieldLabel ( nFrame = self.CtlFrame, labelName = 'Override Status', column = 1, rowspan = 2, row = MShell.nextFieldRow() ) MShell.addFieldButton ( nFrame = self.CtlFrame, labelName = 'DAQ96 Operational', helpMessage = 'Declare DAQ96 Operational', statusMessage= 'Declare DAQ96 Operational', width = 15, column = 2, row = MShell.currentFieldRow(), command = lambda : MShell.Dialog_Msg.Msg_Send_COOR_Msg ( "TrgMgr_L1Cal_Operational" ) ) MShell.addFieldButton ( nFrame = self.CtlFrame, labelName = 'DAQ96 Non-Oper.', helpMessage = 'Declare DAQ96 Non-Operational', statusMessage= 'Declare DAQ96 Non-Operational', width = 15, column = 3, row = MShell.currentFieldRow(), command = lambda : MShell.Dialog_Msg.Msg_Send_COOR_Msg ( "TrgMgr_L1Cal_Not_Operational" ) ) # MShell.addFieldButton ( nFrame = self.CtlFrame, # labelName = 'Redo Excluded TT', # helpMessage = '(Re-)exec Excluded_Trigger_Towers.msg', # statusMessage= '(Re-)exec Excluded_Trigger_Towers.msg', # width = 15, # column = 2, # row = MShell.nextFieldRow(), # command = lambda : MShell.Dialog_Com.Com_Exec_MsgFile ( "%CONFIG%Excluded_Trigger_Towers.msg" ) ) # MShell.addFieldLabel ( nFrame = self.CtlFrame, # labelName = 'Monitoring', # column = 1, # row = MShell.nextFieldRow() ) # MShell.addFieldButton ( nFrame = self.CtlFrame, # labelName = 'Stop Collect', # helpMessage = 'Set Monitoring Server Silenced', # statusMessage= 'Set Monitoring Server Silenced', # width = 15, # column = 2, # row = MShell.currentFieldRow(), # command = lambda : MShell.Dialog_Msg.Msg_Send_COOR_Msg ( "TrgMgr_Monit_Control_Time_ms 0" ) ) # MShell.addFieldButton ( nFrame = self.CtlFrame, # labelName = 'Resume Collect', # helpMessage = 'Resume Collecting Monitoring Data', # statusMessage= 'Resume Collecting Monitoring Data', # width = 15, # column = 3, # row = MShell.currentFieldRow(), # command = lambda : MShell.Dialog_Msg.Msg_Send_COOR_Msg ( "TrgMgr_Monit_Control_Time_ms 6000" ) ) #--------------------------------------------------------------------------------