def __init__(self): # variables self.guiLock = threading.Lock() self.apiDef = IpMoteDefinition.IpMoteDefinition() # initialize GUI window self.window = dustWindow.dustWindow('Upstream', self._windowCb_close) # create a sensor frame (don't show yet) self.sensorFrame = dustFrameSensorTx.dustFrameSensorTx( self.window, self.guiLock, frameName="sensor data to send", row=0, column=0) self.sensorFrame.show() # create a table frame self.tableFrame = dustFrameTable.dustFrameTable( self.window, self.guiLock, frameName="join state machine", row=1, column=0) # add a connection frame self.connectionFrame = dustFrameConnection.dustFrameConnection( self.window, self.guiLock, self._connectionFrameCb_connected, frameName="mote connection", row=2, column=0) self.connectionFrame.apiLoaded(self.apiDef) self.connectionFrame.show() # create a table frame self.textFrame = dustFrameText.dustFrameText(self.window, self.guiLock, frameName="tip", row=3, column=0) self.textFrame.setWrapLength(400) self.textFrame.show() output = [] output += [ 'Remember to reset your mote before starting this application.' ] output += [ 'The fields in the "sensor data to send" frame are preset with IPv6 address of the motedata.dustnetworks.com server, and the UDP port it is listening on. You can change this IPv6 address and UDP port to if you wish to send to a different server. Per the 6LoWPAN standard, a UDP port chosen between 61616 (0xF0B0) and 61631 (0xF0BF) results in the best compression, thus largest payload. See the mote API guide for further information.' ] output += [ 'Note: The "send to manager" and "send to host" button become active only once the mote has reached the READYTOSEND state.' ] self.textFrame.write('\n\n'.join(output)) # update in GUI elements self._updateGui()
def __init__(self): # local variables self.guiLock = threading.Lock() self.apiDef = IpMgrDefinition.IpMgrDefinition() self.ledOn = False self.pingOngoing = False self.oap_client = None self.ratecalculator = RateCalculator.RateCalculator() self.connector = None # create window self.window = dustWindow.dustWindow( 'LEDPing', self._windowCb_close ) # add a connection frame self.connectionFrame = dustFrameConnection.dustFrameConnection( self.window, self.guiLock, self._connectionFrameCb_connected, frameName="manager connection", row=0,column=0 ) self.connectionFrame.apiLoaded(self.apiDef) self.connectionFrame.show() # add a LEDPing frame self.LEDPingFrame = dustFrameLEDPing.dustFrameLEDPing( self.window, self.guiLock, self._LEDPingFrameCb_startPressed, self._LEDPingFrameCb_stopPressed, frameName="LED ping", row=1,column=0 ) self.LEDPingFrame.show() # add a text frame self.textFrame = dustFrameText.dustFrameText( self.window, self.guiLock, frameName="Notes", row=2,column=0 ) self.textFrame.show() # put information in text frame output = [] output += ['The mote this application drives needs to run the'] output += ['default firmware, and operate in master mode.'] output += [''] output += [''] output += ['The start button is only active when the'] output += ['application is connected to a SmartMesh IP manager.'] output = '\n'.join(output) self.textFrame.write(output)
def __init__(self): # local variables self.guiLock = threading.Lock() self.apiDef = IpMgrDefinition.IpMgrDefinition() self.ledOn = False self.pingOngoing = False self.oap_client = None self.ratecalculator = RateCalculator.RateCalculator() self.connector = None # create window self.window = dustWindow.dustWindow('LEDPing', self._windowCb_close) # add a connection frame self.connectionFrame = dustFrameConnection.dustFrameConnection( self.window, self.guiLock, self._connectionFrameCb_connected, frameName="manager connection", row=0, column=0) self.connectionFrame.apiLoaded(self.apiDef) self.connectionFrame.show() # add a LEDPing frame self.LEDPingFrame = dustFrameLEDPing.dustFrameLEDPing( self.window, self.guiLock, self._LEDPingFrameCb_startPressed, self._LEDPingFrameCb_stopPressed, frameName="LED ping", row=1, column=0) self.LEDPingFrame.show() # add a text frame self.textFrame = dustFrameText.dustFrameText(self.window, self.guiLock, frameName="Notes", row=2, column=0) self.textFrame.show() # put information in text frame output = [] output += ['The mote this application drives needs to run the'] output += ['default firmware, and operate in master mode.'] output += [''] output += [''] output += ['The start button is only active when the'] output += ['application is connected to a SmartMesh IP manager.'] output = '\n'.join(output) self.textFrame.write(output)
def __init__(self): # variables self.guiLock = threading.Lock() self.apiDef = IpMoteDefinition.IpMoteDefinition() # initialize GUI window self.window = dustWindow.dustWindow('Upstream',self._windowCb_close) # create a sensor frame (don't show yet) self.sensorFrame = dustFrameSensorTx.dustFrameSensorTx( self.window, self.guiLock, frameName="sensor data to send", row=0,column=0) self.sensorFrame.show() # create a table frame self.tableFrame = dustFrameTable.dustFrameTable( self.window, self.guiLock, frameName="join state machine", row=1,column=0) # add a connection frame self.connectionFrame = dustFrameConnection.dustFrameConnection( self.window, self.guiLock, self._connectionFrameCb_connected, frameName="mote connection", row=2,column=0) self.connectionFrame.apiLoaded(self.apiDef) self.connectionFrame.show() # create a table frame self.textFrame = dustFrameText.dustFrameText( self.window, self.guiLock, frameName="tip", row=3,column=0) self.textFrame.setWrapLength(400) self.textFrame.show() output = [] output += ['Remember to reset your mote before starting this application.'] output += ['The fields in the "sensor data to send" frame are preset with IPv6 address of the motedata.dustnetworks.com server, and the UDP port it is listening on. You can change this IPv6 address and UDP port to if you wish to send to a different server. Per the 6LoWPAN standard, a UDP port chosen between 61616 (0xF0B0) and 61631 (0xF0BF) results in the best compression, thus largest payload. See the mote API guide for further information.'] output += ['Note: The "send to manager" and "send to host" button become active only once the mote has reached the READYTOSEND state.'] self.textFrame.write('\n\n'.join(output)) # update in GUI elements self._updateGui()
def __init__(self): # create local variables self.guiLock = threading.Lock() self.lastNotifLock = threading.Lock() self.lastNotif = None self.apiDef = None self.connector = None # create window self.window = dustWindow.dustWindow( 'APIExplorer', self._windowCb_close) # fill window with frames self.apiFrame = dustFrameApi.dustFrameApi( self.window, self.guiLock, self._apiFrameCb_apiLoaded, row=0,column=0) self.connectionFrame = dustFrameConnection.dustFrameConnection( self.window, self.guiLock, self._connectionFrameCb_connected, row=1,column=0) self.commandFrame = dustFrameCommand.dustFrameCommand( self.window, self.guiLock, self._commandFrameCb_selected, self._commandFrameCb_response, self._commandFrameCb_responseError, row=2,column=0) self.responseFrame = dustFrameResponse.dustFrameResponse( self.window, self.guiLock, row=3,column=0) self.notifFrame = dustFrameNotifications.dustFrameNotifications( self._getLastNotif, self.window, self.guiLock, row=4,column=0) self.toolTipFrame = dustFrameText.dustFrameText( self.window, self.guiLock, frameName="tooltip", row=5,column=0) # choose the frames to show when app starts self.apiFrame.show()
def __init__(self): # create local variables self.guiLock = threading.Lock() self.lastNotifLock = threading.Lock() self.lastNotif = None self.apiDef = None self.connector = None # create window self.window = dustWindow.dustWindow('APIExplorer', self._windowCb_close) # fill window with frames self.apiFrame = dustFrameApi.dustFrameApi(self.window, self.guiLock, self._apiFrameCb_apiLoaded, row=0, column=0) self.connectionFrame = dustFrameConnection.dustFrameConnection( self.window, self.guiLock, self._connectionFrameCb_connected, row=1, column=0) self.commandFrame = dustFrameCommand.dustFrameCommand( self.window, self.guiLock, self._commandFrameCb_selected, self._commandFrameCb_response, self._commandFrameCb_responseError, row=2, column=0) self.responseFrame = dustFrameResponse.dustFrameResponse(self.window, self.guiLock, row=3, column=0) self.notifFrame = dustFrameNotifications.dustFrameNotifications( self._getLastNotif, self.window, self.guiLock, row=4, column=0) self.toolTipFrame = dustFrameText.dustFrameText(self.window, self.guiLock, frameName="tooltip", row=5, column=0) # choose the frames to show when app starts self.apiFrame.show()
def __init__(self): # local variables self.guiLock = threading.Lock() self.apiDef = IpMgrDefinition.IpMgrDefinition() self.notifClientHandler = None self.guiUpdaters = 0 self.oap_clients = {} # create window self.window = dustWindow.dustWindow("MeshOfMeshes", self._windowCb_close) # add a connection frame self.connectionFrame = dustFrameConnection.dustFrameConnection( self.window, self.guiLock, self._connectionFrameCb_connected, frameName="manager connection", row=1, column=0, ) self.connectionFrame.apiLoaded(self.apiDef) self.connectionFrame.show() # add a mote list frame columnnames = [ # role {"name": COL_ROLE, "type": dustFrameMoteList.dustFrameMoteList.LABEL}, # bridge {"name": COL_BRIDGE, "type": dustFrameMoteList.dustFrameMoteList.LABEL}, # temperature {"name": COL_TEMPERATURE, "type": dustFrameMoteList.dustFrameMoteList.LABEL}, # led {"name": COL_LED, "type": dustFrameMoteList.dustFrameMoteList.ACTION}, # counters {"name": COL_NOTIF_DATA, "type": dustFrameMoteList.dustFrameMoteList.LABEL}, {"name": COL_NOTIF_HEALTHREPORT, "type": dustFrameMoteList.dustFrameMoteList.LABEL}, ] self.moteListFrame = dustFrameMoteList.dustFrameMoteList( self.window, self.guiLock, columnnames, row=2, column=0 ) self.moteListFrame.show() # add a status (text) frame self.statusFrame = dustFrameText.dustFrameText(self.window, self.guiLock, frameName="status", row=3, column=0) self.statusFrame.show()
def __init__(self): # log log.debug("Creating PkGenGui") # local variables self.guiLock = threading.Lock() self.apiDef = IpMgrDefinition.IpMgrDefinition() self.notifClientHandler = None self.guiUpdaters = 0 self.oap_clients = {} # create window self.window = dustWindow.dustWindow('PkGen', self._windowCb_close) # add a API selection frame self.apiFrame = dustFrameApi.dustFrameApi( self.window, self.guiLock, self._apiFrameCb_apiLoaded, row=0, column=0, deviceType=dustFrameApi.dustFrameApi.MANAGER) self.apiFrame.show() # add a connection frame self.connectionFrame = dustFrameConnection.dustFrameConnection( self.window, self.guiLock, self._connectionFrameCb_connected, frameName="manager connection", row=1, column=0) # add a mote list frame columnnames = [ # PkGen { 'name': COL_PKGEN_NUM, 'type': dustFrameMoteList.dustFrameMoteList.LABEL, }, { 'name': COL_PKGEN_PPS, 'type': dustFrameMoteList.dustFrameMoteList.LABEL, }, { 'name': COL_PKGEN_CLR, 'type': dustFrameMoteList.dustFrameMoteList.ACTION, }, { 'name': COL_PKGEN_RATE, 'type': dustFrameMoteList.dustFrameMoteList.SETTHREEVAL, }, ] self.moteListFrame = dustFrameMoteList.dustFrameMoteList(self.window, self.guiLock, columnnames, row=2, column=0) self.moteListFrame.show() # add a status (text) frame self.statusFrame = dustFrameText.dustFrameText(self.window, self.guiLock, frameName="status", row=3, column=0) self.statusFrame.show()
def __init__(self): # create local variables self.guiLock = threading.Lock() self.lastNotifLock = threading.Lock() self.lastNotif = None self.apiDef = None self.connector = None # create window self.window = dustWindow.dustWindow( appName = 'APIExplorer', closeCb = self._windowCb_close, ) # fill window with frames self.apiFrame = dustFrameApi.dustFrameApi( parentElem = self.window, guiLock = self.guiLock, cbApiLoaded = self._apiFrameCb_apiLoaded, row = 0, column = 0, ) # create API frame object self.connectionFrame = dustFrameConnection.dustFrameConnection( parentElem = self.window, guiLock = self.guiLock, connectCb = self._connectionFrameCb_connected, row = 1, column = 0, ) # create connection frame object self.commandFrame = dustFrameCommand.dustFrameCommand( parentElem = self.window, guiLock = self.guiLock, selectedCb = self._commandFrameCb_selected, responseCb = self._commandFrameCb_response, responseErrorCb = self._commandFrameCb_responseError, row = 2, column = 0, ) # create command frame object self.responseFrame = dustFrameResponse.dustFrameResponse( parentElem = self.window, guiLock = self.guiLock, row = 3, column = 0, ) self.notifFrame = dustFrameNotifications.dustFrameNotifications( getNotifCb = self._getLastNotif, parentElem = self.window, guiLock = self.guiLock, row = 4, column = 0, ) self.toolTipFrame = dustFrameText.dustFrameText( parentElem = self.window, guiLock = self.guiLock, frameName = "tooltip", row = 5, column = 0, ) # choose the frames to show when app starts self.apiFrame.show()
def __init__(self): # local variables self.guiLock = threading.Lock() self.notifClientHandler = None self.macs = [] self.oldData = {} # create window self.window = dustWindow.dustWindow( 'Xively Publisher', self._windowCb_close, ) # add a connection frame self.connectionFrame = dustFrameConnection.dustFrameConnection( self.window, self.guiLock, self._connectionFrameCb_connected, frameName="manager connection", row=0,column=0, ) self.connectionFrame.apiLoaded(IpMgrDefinition.IpMgrDefinition()) self.connectionFrame.show() # add a form frame self.apiKeyFrame = dustFrameForm.dustFrameForm( self.window, self.guiLock, self._apiKeyButtonCb, "Xively API key", row=1,column=0 ) self.apiKeyFrame.show() self.apiKeyFrame.setVal(DFLT_API_KEY) # add a mote list frame columnnames = [ { 'name': COL_NUMDATARX, 'type': dustFrameMoteList.dustFrameMoteList.LABEL, }, { 'name': COL_NUMDATAPUB, 'type': dustFrameMoteList.dustFrameMoteList.LABEL, }, { 'name': COL_NUMDATAPUBOK, 'type': dustFrameMoteList.dustFrameMoteList.LABEL, }, { 'name': COL_CLR, 'type': dustFrameMoteList.dustFrameMoteList.ACTION, }, { 'name': COL_URL, 'type': dustFrameMoteList.dustFrameMoteList.ACTION, }, ] self.moteListFrame = dustFrameMoteList.dustFrameMoteList( self.window, self.guiLock, columnnames, row=2,column=0, ) self.moteListFrame.show() # add a tooltip frame self.toolTipFrame = dustFrameText.dustFrameText( self.window, self.guiLock, frameName="tooltip", row=5,column=0, ) self.toolTipFrame.show()
def __init__(self): # local variables self.guiLock = threading.Lock() self.apiDef = IpMgrDefinition.IpMgrDefinition() self.notifClientHandler = None self.latencyCalculator = None self.guiUpdaters = 0 self.oap_clients = {} # create window self.window = dustWindow.dustWindow('Heliostat', self._windowCb_close) # add a API selection frame self.apiFrame = dustFrameApi.dustFrameApi( self.window, self.guiLock, self._apiFrameCb_apiLoaded, row=0, column=0, deviceType=dustFrameApi.dustFrameApi.MANAGER) self.apiFrame.show() # add a connection frame self.connectionFrame = dustFrameConnection.dustFrameConnection( self.window, self.guiLock, self._connectionFrameCb_connected, frameName="manager connection", row=1, column=0) # add a mote list frame columnnames = [ # led { 'name': COL_LED, 'type': dustFrameMoteList.dustFrameMoteList.ACTION, }, # counters and latency { 'name': COL_NOTIF_DATA, 'type': dustFrameMoteList.dustFrameMoteList.LABEL, }, { 'name': COL_NOTIF_IPDATA, 'type': dustFrameMoteList.dustFrameMoteList.LABEL, }, { 'name': COL_NOTIF_HR, 'type': dustFrameMoteList.dustFrameMoteList.LABEL, }, { 'name': COL_LAT_MIN, 'type': dustFrameMoteList.dustFrameMoteList.LABEL, }, { 'name': COL_LAT_CUR, 'type': dustFrameMoteList.dustFrameMoteList.LABEL, }, { 'name': COL_LAT_MAX, 'type': dustFrameMoteList.dustFrameMoteList.LABEL, }, { 'name': COL_NOTIF_CLR, 'type': dustFrameMoteList.dustFrameMoteList.ACTION, }, # temperature { 'name': COL_TEMPERATURE, 'type': dustFrameMoteList.dustFrameMoteList.LABEL, }, { 'name': COL_TEMP_NUM, 'type': dustFrameMoteList.dustFrameMoteList.LABEL, }, { 'name': COL_TEMP_CLR, 'type': dustFrameMoteList.dustFrameMoteList.ACTION, }, { 'name': COL_TEMP_RATE, 'type': dustFrameMoteList.dustFrameMoteList.GETSETONEVAL, }, # control and latency { 'name': COL_ACTION1, 'type': dustFrameMoteList.dustFrameMoteList.ACTION, }, ] self.moteListFrame = dustFrameMoteList.dustFrameMoteList(self.window, self.guiLock, columnnames, row=2, column=0) self.moteListFrame.show() # add a status (text) frame self.statusFrame = dustFrameText.dustFrameText(self.window, self.guiLock, frameName="status", row=3, column=0) self.statusFrame.show()
def __init__(self): # local variables self.guiLock = threading.Lock() self.apiDef = IpMgrDefinition.IpMgrDefinition() self.notifClientHandler = None self.guiUpdaters = 0 self.oap_clients = {} # create window self.window = dustWindow.dustWindow( 'MeshOfMeshes', self._windowCb_close ) # add a connection frame self.connectionFrame = dustFrameConnection.dustFrameConnection( self.window, self.guiLock, self._connectionFrameCb_connected, frameName="manager connection", row=1,column=0 ) self.connectionFrame.apiLoaded(self.apiDef) self.connectionFrame.show() # add a mote list frame columnnames = [ # role { 'name': COL_ROLE, 'type': dustFrameMoteList.dustFrameMoteList.LABEL, }, # bridge { 'name': COL_BRIDGE, 'type': dustFrameMoteList.dustFrameMoteList.LABEL, }, # temperature { 'name': COL_TEMPERATURE, 'type': dustFrameMoteList.dustFrameMoteList.LABEL, }, # led { 'name': COL_LED, 'type': dustFrameMoteList.dustFrameMoteList.ACTION, }, # counters { 'name': COL_NOTIF_DATA, 'type': dustFrameMoteList.dustFrameMoteList.LABEL, }, { 'name': COL_NOTIF_HEALTHREPORT, 'type': dustFrameMoteList.dustFrameMoteList.LABEL, }, ] self.moteListFrame = dustFrameMoteList.dustFrameMoteList( self.window, self.guiLock, columnnames, row=2,column=0 ) self.moteListFrame.show() # add a status (text) frame self.statusFrame = dustFrameText.dustFrameText( self.window, self.guiLock, frameName="status", row=3,column=0 ) self.statusFrame.show()
def __init__(self): # local variables self.guiLock = threading.Lock() self.notifClientHandler = None self.macs = [] self.oldData = {} # create window self.window = dustWindow.dustWindow( 'Xively Publisher', self._windowCb_close, ) # add a connection frame self.connectionFrame = dustFrameConnection.dustFrameConnection( self.window, self.guiLock, self._connectionFrameCb_connected, frameName="manager connection", row=0, column=0, ) self.connectionFrame.apiLoaded(IpMgrDefinition.IpMgrDefinition()) self.connectionFrame.show() # add a form frame self.apiKeyFrame = dustFrameForm.dustFrameForm(self.window, self.guiLock, self._apiKeyButtonCb, "Xively API key", row=1, column=0) self.apiKeyFrame.show() self.apiKeyFrame.setVal(DFLT_API_KEY) # add a mote list frame columnnames = [ { 'name': COL_NUMDATARX, 'type': dustFrameMoteList.dustFrameMoteList.LABEL, }, { 'name': COL_NUMDATAPUB, 'type': dustFrameMoteList.dustFrameMoteList.LABEL, }, { 'name': COL_NUMDATAPUBOK, 'type': dustFrameMoteList.dustFrameMoteList.LABEL, }, { 'name': COL_CLR, 'type': dustFrameMoteList.dustFrameMoteList.ACTION, }, { 'name': COL_URL, 'type': dustFrameMoteList.dustFrameMoteList.ACTION, }, ] self.moteListFrame = dustFrameMoteList.dustFrameMoteList( self.window, self.guiLock, columnnames, row=2, column=0, ) self.moteListFrame.show() # add a tooltip frame self.toolTipFrame = dustFrameText.dustFrameText( self.window, self.guiLock, frameName="tooltip", row=5, column=0, ) self.toolTipFrame.show()
def __init__(self): # local variables self.guiLock = threading.Lock() self.apiDef = IpMgrDefinition.IpMgrDefinition() self.notifClientHandler = None self.latencyCalculator = None self.guiUpdaters = 0 self.oap_clients = {} # create window self.window = dustWindow.dustWindow('TempMonitor', self._windowCb_close) # add a API selection frame self.apiFrame = dustFrameApi.dustFrameApi( self.window, self.guiLock, self._apiFrameCb_apiLoaded, row=0,column=0, deviceType=dustFrameApi.dustFrameApi.MANAGER) self.apiFrame.show() # add a connection frame self.connectionFrame = dustFrameConnection.dustFrameConnection( self.window, self.guiLock, self._connectionFrameCb_connected, frameName="manager connection", row=1,column=0) # add a mote list frame columnnames = [ # led { 'name': COL_LED, 'type': dustFrameMoteList.dustFrameMoteList.ACTION, }, # counters and latency { 'name': COL_NOTIF_DATA, 'type': dustFrameMoteList.dustFrameMoteList.LABEL, }, { 'name': COL_NOTIF_IPDATA, 'type': dustFrameMoteList.dustFrameMoteList.LABEL, }, { 'name': COL_NOTIF_HR, 'type': dustFrameMoteList.dustFrameMoteList.LABEL, }, { 'name': COL_LAT_MIN, 'type': dustFrameMoteList.dustFrameMoteList.LABEL, }, { 'name': COL_LAT_CUR, 'type': dustFrameMoteList.dustFrameMoteList.LABEL, }, { 'name': COL_LAT_MAX, 'type': dustFrameMoteList.dustFrameMoteList.LABEL, }, { 'name': COL_NOTIF_CLR, 'type': dustFrameMoteList.dustFrameMoteList.ACTION, }, # temperature { 'name': COL_TEMPERATURE, 'type': dustFrameMoteList.dustFrameMoteList.LABEL, }, { 'name': COL_TEMP_NUM, 'type': dustFrameMoteList.dustFrameMoteList.LABEL, }, { 'name': COL_TEMP_CLR, 'type': dustFrameMoteList.dustFrameMoteList.ACTION, }, { 'name': COL_TEMP_RATE, 'type': dustFrameMoteList.dustFrameMoteList.GETSETONEVAL, }, ] self.moteListFrame = dustFrameMoteList.dustFrameMoteList(self.window, self.guiLock, columnnames, row=2,column=0) self.moteListFrame.show() # add a status (text) frame self.statusFrame = dustFrameText.dustFrameText( self.window, self.guiLock, frameName="status", row=3,column=0) self.statusFrame.show()
def __init__(self): # log log.debug("Creating PkGenGui") # local variables self.guiLock = threading.Lock() self.apiDef = IpMgrDefinition.IpMgrDefinition() self.notifClientHandler = None self.guiUpdaters = 0 self.oap_clients = {} # create window self.window = dustWindow.dustWindow('PkGen', self._windowCb_close) # add a API selection frame self.apiFrame = dustFrameApi.dustFrameApi( self.window, self.guiLock, self._apiFrameCb_apiLoaded, row=0,column=0, deviceType=dustFrameApi.dustFrameApi.MANAGER) self.apiFrame.show() # add a connection frame self.connectionFrame = dustFrameConnection.dustFrameConnection( self.window, self.guiLock, self._connectionFrameCb_connected, frameName="manager connection", row=1,column=0 ) # add a mote list frame columnnames = [ # PkGen { 'name': COL_PKGEN_NUM, 'type': dustFrameMoteList.dustFrameMoteList.LABEL, }, { 'name': COL_PKGEN_PPS, 'type': dustFrameMoteList.dustFrameMoteList.LABEL, }, { 'name': COL_PKGEN_CLR, 'type': dustFrameMoteList.dustFrameMoteList.ACTION, }, { 'name': COL_PKGEN_RATE, 'type': dustFrameMoteList.dustFrameMoteList.SETTHREEVAL, }, ] self.moteListFrame = dustFrameMoteList.dustFrameMoteList(self.window, self.guiLock, columnnames, row=2,column=0) self.moteListFrame.show() # add a status (text) frame self.statusFrame = dustFrameText.dustFrameText( self.window, self.guiLock, frameName="status", row=3,column=0) self.statusFrame.show()
def __init__(self): # local variables self.guiLock = threading.Lock() self.apiDef = IpMgrDefinition.IpMgrDefinition() self.notifClientHandler = None self.latencyCalculator = None self.guiUpdaters = 0 self.oap_clients = {} # create window self.window = dustWindow.dustWindow('TempMonitor', self._windowCb_close) # add a connection frame self.connectionFrame = dustFrameConnection.dustFrameConnection( self.window, self.guiLock, self._connectionFrameCb_connected, frameName="manager connection", row=0,column=0) self.connectionFrame.apiLoaded(self.apiDef) self.connectionFrame.show() # add a mote list frame columnnames = [ # led { 'name': COL_LED, 'type': dustFrameMoteList.dustFrameMoteList.ACTION, }, { 'name': COL_LEDOFF, 'type': dustFrameMoteList.dustFrameMoteList.ACTION, }, #DIGITAL INPUT { 'name': COL_GETD0, 'type': dustFrameMoteList.dustFrameMoteList.ACTION, }, { 'name': COL_D0, 'type': dustFrameMoteList.dustFrameMoteList.LABEL, }, { 'name': COL_GETD1, 'type': dustFrameMoteList.dustFrameMoteList.ACTION, }, { 'name': COL_D1, 'type': dustFrameMoteList.dustFrameMoteList.LABEL, }, { 'name': COL_GETD2, 'type': dustFrameMoteList.dustFrameMoteList.ACTION, }, { 'name': COL_D2, 'type': dustFrameMoteList.dustFrameMoteList.LABEL, }, { 'name': COL_GETD3, 'type': dustFrameMoteList.dustFrameMoteList.ACTION, }, { 'name': COL_D3, 'type': dustFrameMoteList.dustFrameMoteList.LABEL, }, ] self.moteListFrame = dustFrameMoteList.dustFrameMoteList(self.window, self.guiLock, columnnames, row=1,column=0) self.moteListFrame.show() # add a status (text) frame self.statusFrame = dustFrameText.dustFrameText( self.window, self.guiLock, frameName="status", row=2,column=0) self.statusFrame.show()