def __init__(self): self.window = dustWindow("dustFrameText", self._closeCb) self.guiLock = threading.Lock() self.frame = dustFrameText(self.window, self.guiLock, row=0, column=0) self.frame.show() self.frame.write("Hello, World!") self.window.mainloop()
def __init__(self): self.window = dustWindow("dustFrameImagesTest", self._closeCb) self.guiLock = threading.Lock() self.frame = dustFrameImage(self.window,self.guiLock,self._startPressedCb,row=0,column=0) self.frame.show() self.window.mainloop()
def __init__(self): self.window = dustWindow("dustFrameSensorTx", self._closeCb) self.guiLock = threading.Lock() self.frame = dustFrameSensorTx(self.window, self.guiLock, row=0, column=0) self.frame.show() self.window.mainloop()
def __init__(self): self.window = dustWindow("dustFrameLBRConnection", self._closeCb) self.guiLock = threading.Lock() self.frame = dustFrameLBRConnection(self.window, self.guiLock, self._connectCb, row=0, column=0) self.frame.show() self.window.mainloop()
def __init__(self): self.window = dustWindow("dustFrameApi", self._closeCb) self.guiLock = threading.Lock() self.frame = dustFrameApi(self.window, self.guiLock, self._apiFrameCb_apiLoaded, row=0, column=0) self.frame.show() self.window.mainloop()
def __init__(self): self.window = dustWindow("dustFrameSensorData", self._closeCb) self.guiLock = threading.Lock() self.frame = dustFrameSensorData( self.window, self.guiLock, row=0,column=0) self.frame.show() self.window.mainloop()
def __init__(self): self.window = dustWindow("dustFrameImagesTest", self._closeCb) self.guiLock = threading.Lock() self.frame = dustFrameImage(self.window, self.guiLock, self._startPressedCb, row=0, column=0) self.frame.show() self.window.mainloop()
def __init__(self): self.window = dustWindow("dustFrameConversion", self._closeCb) self.guiLock = threading.Lock() self.frame = dustFrameConversion(self.window, self.guiLock, toBottomCb=self._topEnteredCb, toTopCb=self._bottomEnteredCb, row=0, column=0) self.frame.show() self.window.mainloop()
def __init__(self): self.window = dustWindow("dustFrameText", self._closeCb) self.guiLock = threading.Lock() self.frame = dustFrameText( self.window, self.guiLock, row=0,column=0) self.frame.show() self.frame.write("Hello, World!") self.window.mainloop()
def __init__(self): self.window = dustWindow("dustFrameLBRConnection", self._closeCb) self.guiLock = threading.Lock() self.frame = dustFrameLBRConnection( self.window, self.guiLock, self._connectCb, row=0,column=0) self.frame.show() self.window.mainloop()
def __init__(self): self.window = dustWindow("dustFrameNotifications", self._closeCb) self.guiLock = threading.Lock() self.frame = dustFrameNotifications( self._getNotifCb, self.window, self.guiLock, row=0,column=0) self.frame.show() self.window.mainloop()
def __init__(self): self.window = dustWindow("dustFrameApi", self._closeCb) self.guiLock = threading.Lock() self.frame = dustFrameApi( self.window, self.guiLock, self._apiFrameCb_apiLoaded, row=0,column=0) self.frame.show() self.window.mainloop()
def __init__(self): self.window = dustWindow("dustFrameTable", self._closeCb) self.guiLock = threading.Lock() self.frame = dustFrameTable(self.window, self.guiLock, row=0, column=0) self.frame.show() self.frame.update([ ['a', 'b', 'c'], ['d', 'e', 'f'], ]) self.window.mainloop()
def __init__(self): self.window = dustWindow("dustFrameConnection", self._closeCb) self.guiLock = threading.Lock() self.frame = dustFrameConnection(self.window, self.guiLock, self._connectCb, row=0, column=0) self.apidef = IpMoteDefinition.IpMoteDefinition() self.frame.apiLoaded(self.apidef) self.frame.show() self.window.mainloop()
def __init__(self): self.window = dustWindow("dustFrameLEDPing", self._closeCb) self.guiLock = threading.Lock() self.frame = dustFrameLEDPing(self.window, self.guiLock, self._startPressedCb, self._stopPressedCb, row=0, column=0) self.frame.show() self.frame.enableButton() self.window.mainloop()
def __init__(self): self.window = dustWindow("Direction",self._closeCb) self.guiLock = threading.Lock() self.frameDirection = dustFrameDirection( self.window, self.guiLock, directionCb = self._directionCb, row = 0, column = 0, ) self.frameDirection.show() self.window.mainloop()
def __init__(self): self.window = dustWindow("dustFrameConnection", self._closeCb) self.guiLock = threading.Lock() self.frame = dustFrameConnection( self.window, self.guiLock, self._connectCb, row=0,column=0) self.apidef = IpMoteDefinition.IpMoteDefinition() self.frame.apiLoaded(self.apidef) self.frame.show() self.window.mainloop()
def __init__(self): self.window = dustWindow( "dustFrameResponse", self._closeCb, ) self.guiLock = threading.Lock() self.frame = dustFrameResponse( self.window, self.guiLock, row = 0, column = 0, ) self.frame.show() self.window.mainloop()
def __init__(self): self.window = dustWindow( "dustFrameResponse", self._closeCb, ) self.guiLock = threading.Lock() self.frame = dustFrameResponse( self.window, self.guiLock, row=0, column=0, ) self.frame.show() self.window.mainloop()
def __init__(self): self.window = dustWindow("dustFrameCommand", self._closeCb) self.guiLock = threading.Lock() self.frame = dustFrameCommand(self.window, self.guiLock, self._selectedCb, self._responseCb, self._responseErrorCb, row=0, column=0) self.apidef = IpMoteDefinition.IpMoteDefinition() self.frame.apiLoaded(self.apidef) self.frame.show() self.window.mainloop()
def __init__(self): now = time.time() self.lastUpdateCurrent = now self.lastUpdateCharge = now self.window = dustWindow('dustFrameDC2369AReport', self._closeCb) self.guiLock = threading.Lock() self.frame = dustFrameDC2369AReport(self.window, self.guiLock, getCurrentCb=self._getCurrentCb, getChargeCb=self._getChargeCb #row=0,column=1 ) self.frame.show() self.window.mainloop()
def __init__(self): self.window = dustWindow("dustFrameProgress", self._closeCb) self.guiLock = threading.Lock() self.frameProgress = dustFrameProgress( self.window, self.guiLock, row=0, column=0, ) self.frameProgress.show() publisher = self.PublisherThread(self._getGoOn, self.frameProgress) publisher.start() self.window.mainloop()
def __init__(self): self.window = dustWindow( "dustFrameConversion", self._closeCb ) self.guiLock = threading.Lock() self.frame = dustFrameConversion( self.window, self.guiLock, toBottomCb = self._topEnteredCb, toTopCb = self._bottomEnteredCb, row=0,column=0 ) self.frame.show() self.window.mainloop()
def __init__(self): self.window = dustWindow("dustFrameCommand", self._closeCb) self.guiLock = threading.Lock() self.frame = dustFrameCommand( self.window, self.guiLock, self._selectedCb, self._responseCb, self._responseErrorCb, row=0,column=0) self.apidef = IpMoteDefinition.IpMoteDefinition() self.frame.apiLoaded(self.apidef) self.frame.show() self.window.mainloop()
def __init__(self): self.window = dustWindow( "dustFrameLEDPing", self._closeCb ) self.guiLock = threading.Lock() self.frame = dustFrameLEDPing( self.window, self.guiLock, self._startPressedCb, self._stopPressedCb, row=0,column=0 ) self.frame.show() self.frame.enableButton() self.window.mainloop()
def __init__(self): self.window = dustWindow("dustFrameProgress", self._closeCb) self.guiLock = threading.Lock() self.frameProgress = dustFrameProgress( self.window, self.guiLock, row=0, column=0, ) self.frameProgress.show() publisher = self.PublisherThread(self._getGoOn,self.frameProgress) publisher.start() self.window.mainloop()
def __init__(self): self.window = dustWindow("dustFrameTable", self._closeCb) self.guiLock = threading.Lock() self.frame = dustFrameTable( self.window, self.guiLock, row=0,column=0) self.frame.show() self.frame.update( [ ['a','b','c'], ['d','e','f'], ] ) self.window.mainloop()
def __init__(self): # local variables self.guiLock = threading.Lock() self.apiDef = IpMgrDefinition.IpMgrDefinition() self.notifClientHandler = None # create window self.window = dustWindow('PictureReceiver', self._windowCb_close) # add a sensor data frame row=0 col=0 self.connectionFrame = dustFrameConnection( self.window, self.guiLock, self._connectionFrameCb_connected, frameName="Serial connection", row=0, column=0) self.connectionFrame.apiLoaded(self.apiDef) self.connectionFrame.show() # add a sensor data frame row=0 col=1 self.sensorDataFrame = dustFrameImage(self.window, self.guiLock, self._captureButton, self._automaticCaptureButton, self._saveButton, frameName="Picture from camera", row=0, column=1) self.isAutomatic = False self.sensorDataFrame.show() # add text info frame row=1 col=0 self.textFrame = dustFrameText(self.window, self.guiLock, frameName="Stadistics", row=1, column=0) self.textFrame.show() self.textFrame.write(STADISTICS_MSG.format(0, 0, 0, 0)) self.sensorDataFrame.captureButton.configure(state=Tkinter.DISABLED) self.sensorDataFrame.startStopAutoButton.configure( state=Tkinter.DISABLED)
def __init__(self): self.loadCycle = 0 self.window = dustWindow("voting",self._closeCb) self.guiLock = threading.Lock() self.frameVoting = dustFrameVoting( self.window, self.guiLock, nextQuestionCb = self._nextQuestionCb, presenterChangedCb = self._presenterChangedCb, scanCb = self._scanCb, row = 0, column = 0, ) self.frameVoting.show() self.frameVoting.after(self.GUIUPDATEPERIOD,self._updateData) self.window.mainloop()
def __init__(self): self.loadCycle = 0 self.window = dustWindow("voting", self._closeCb) self.guiLock = threading.Lock() self.frameVoting = dustFrameVoting( self.window, self.guiLock, nextQuestionCb=self._nextQuestionCb, presenterChangedCb=self._presenterChangedCb, scanCb=self._scanCb, row=0, column=0, ) self.frameVoting.show() self.frameVoting.after(self.GUIUPDATEPERIOD, self._updateData) self.window.mainloop()
def __init__(self): # local variables self.guiLock = threading.Lock() self.apiDef = IpMgrDefinition.IpMgrDefinition() self.notifClientHandler = None # create window self.window = dustWindow('PictureReceiver', self._windowCb_close) # add a sensor data frame row=0 col=0 self.connectionFrame = dustFrameConnection( self.window, self.guiLock, self._connectionFrameCb_connected, frameName="Serial connection", row=0,column=0) self.connectionFrame.apiLoaded(self.apiDef) self.connectionFrame.show() # add a sensor data frame row=0 col=1 self.sensorDataFrame = dustFrameImage( self.window, self.guiLock, self._captureButton, self._automaticCaptureButton, self._saveButton, frameName="Picture from camera", row=0,column=1) self.isAutomatic = False self.sensorDataFrame.show() # add text info frame row=1 col=0 self.textFrame = dustFrameText( self.window, self.guiLock, frameName="Stadistics", row=1,column=0) self.textFrame.show() self.textFrame.write(STADISTICS_MSG.format(0,0,0,0)) self.sensorDataFrame.captureButton.configure(state=Tkinter.DISABLED) self.sensorDataFrame.startStopAutoButton.configure(state=Tkinter.DISABLED)
def __init__(self): self.window = dustWindow( "dustFrameForm", self._closeCb, ) self.guiLock = threading.Lock() self.frame = dustFrameForm(self.window, self.guiLock, self._buttonCb, "example Frame", row=0, column=0) self.frame.show() self.frame.setVal("testVal") self.frame.setColor(dustStyle.COLOR_NOERROR) self.window.mainloop()
def __init__(self): now = time.time() self.lastUpdateTemperature = now self.lastUpdateEnergySource = now self.lastUpdateAdcValue = now self.window = dustWindow('dustFrameDC2126AReport', self._closeCb) self.guiLock = threading.Lock() self.frame = dustFrameDC2126AReport( self.window, self.guiLock, getTemperatureCb=self._getTemperatureCb, getEnergySourceCb=self._getEnergySourceCb, getAdcValueCb=self._getAdcValueCb, row=0, column=0) self.frame.show() self.window.mainloop()
def __init__(self): self.window = dustWindow( "dustFrameForm", self._closeCb, ) self.guiLock = threading.Lock() self.frame = dustFrameForm( self.window, self.guiLock, self._buttonCb, "example Frame", row=0,column=0 ) self.frame.show() self.frame.setVal("testVal") self.frame.setColor(dustStyle.COLOR_NOERROR) self.window.mainloop()
def __init__(self): now = time.time() self.lastUpdateTemperature = now self.lastUpdateEnergySource = now self.lastUpdateAdcValue = now self.window = dustWindow('dustFrameDC2126AReport', self._closeCb) self.guiLock = threading.Lock() self.frame = dustFrameDC2126AReport( self.window, self.guiLock, getTemperatureCb = self._getTemperatureCb, getEnergySourceCb = self._getEnergySourceCb, getAdcValueCb = self._getAdcValueCb, row=0,column=0 ) self.frame.show() self.window.mainloop()
def __init__(self): columnnames = [ { 'name' : 'state', 'type' : dustFrameMoteList.LABEL, }, { 'name' : 'numDataRx', 'type' : dustFrameMoteList.LABEL, }, { 'name' : 'numIpRx', 'type' : dustFrameMoteList.LABEL, }, { 'name' : 'toggle led', 'type' : dustFrameMoteList.ACTION, }, { 'name' : 'rate', 'type' : dustFrameMoteList.GETSETONEVAL, }, { 'name' : 'pkgen (num/rate/size)', 'type' : dustFrameMoteList.SETTHREEVAL, }, { 'name' : 'key', 'type' : dustFrameMoteList.SETONEVAL, }, ] macMote1 = (0x00,0x17,0x0d,0x00,0x00,0x38,0x11,0x11) macMote2 = (0x00,0x17,0x0d,0x00,0x00,0x38,0x22,0x22) self.window = dustWindow( "dustFrameMoteList", self._closeCb, ) self.guiLock = threading.Lock() self.frame = dustFrameMoteList( self.window, self.guiLock, columnnames, row=0,column=0, ) self.frame.show() self.frame.addMote( macMote1, { 'state': 'operational', 'numDataRx': 100, 'numIpRx': 70, 'toggle led': { 'text': 'ON', 'callback': self._toggleLedCb, }, 'rate': { 'min': 1000, 'max': 60000, 'cb_get': self._rateCbGet, 'cb_set': self._rateCbSet, }, 'pkgen (num/rate/size)': { 'min2': 1000, 'max2': 60000, 'min3': 0, 'max3': 90, 'cb_set': self._pkgenCbSet, }, 'key': { 'cb_set': self._keyCbSet, } } ) self.frame.addMote( macMote2, { 'state': 'searching', 'numDataRx': 0, 'numIpRx': 0, 'toggle led': { 'text': 'ON', 'callback': self._toggleLedCb, }, 'rate': { 'min': 1000, 'max': 60000, 'cb_get': self._rateCbGet, 'cb_set': self._rateCbSet, }, 'pkgen (num/rate/size)': { 'min2': 16, 'max2': 60000, 'min3': 0, 'max3': 90, 'cb_set': self._pkgenCbSet, }, 'key': { 'cb_set': self._keyCbSet, } } ) for i in range(3,40): self.frame.addMote( tuple([random.randint(0,255) for i in range(8)]), { 'state': 'searching', 'numDataRx': 0, 'numIpRx': 0, 'toggle led': { 'text': 'ON', 'callback': self._toggleLedCb, }, 'rate': { 'min': 1000, 'max': 60000, 'cb_get': self._rateCbGet, 'cb_set': self._rateCbSet, }, 'pkgen (num/rate/size)': { 'min2': 16, 'max2': 60000, 'min3': 0, 'max3': 90, 'cb_set': self._pkgenCbSet, }, 'key': { 'cb_set': self._keyCbSet, } } ) self.frame.update(macMote1,'numDataRx', 200) self.frame.update(macMote1,'numIpRx', 600) self.frame.update(macMote1,'rate', 3000) self.frame.disableMote(macMote1) self.frame.disableMote(macMote2) self.frame.enableMote(macMote1) self.window.mainloop()
def __init__(self): columnnames = [ { 'name': 'state', 'type': dustFrameMoteList.LABEL, }, { 'name': 'numDataRx', 'type': dustFrameMoteList.LABEL, }, { 'name': 'numIpRx', 'type': dustFrameMoteList.LABEL, }, { 'name': 'toggle led', 'type': dustFrameMoteList.ACTION, }, { 'name': 'rate', 'type': dustFrameMoteList.GETSETONEVAL, }, { 'name': 'pkgen (num/rate/size)', 'type': dustFrameMoteList.SETTHREEVAL, }, { 'name': 'key', 'type': dustFrameMoteList.SETONEVAL, }, ] macMote1 = (0x00, 0x17, 0x0d, 0x00, 0x00, 0x38, 0x11, 0x11) macMote2 = (0x00, 0x17, 0x0d, 0x00, 0x00, 0x38, 0x22, 0x22) self.window = dustWindow( "dustFrameMoteList", self._closeCb, ) self.guiLock = threading.Lock() self.frame = dustFrameMoteList( self.window, self.guiLock, columnnames, row=0, column=0, ) self.frame.show() self.frame.addMote( macMote1, { 'state': 'operational', 'numDataRx': 100, 'numIpRx': 70, 'toggle led': { 'text': 'ON', 'callback': self._toggleLedCb, }, 'rate': { 'min': 1000, 'max': 60000, 'cb_get': self._rateCbGet, 'cb_set': self._rateCbSet, }, 'pkgen (num/rate/size)': { 'min2': 1000, 'max2': 60000, 'min3': 0, 'max3': 90, 'cb_set': self._pkgenCbSet, }, 'key': { 'cb_set': self._keyCbSet, } }) self.frame.addMote( macMote2, { 'state': 'searching', 'numDataRx': 0, 'numIpRx': 0, 'toggle led': { 'text': 'ON', 'callback': self._toggleLedCb, }, 'rate': { 'min': 1000, 'max': 60000, 'cb_get': self._rateCbGet, 'cb_set': self._rateCbSet, }, 'pkgen (num/rate/size)': { 'min2': 16, 'max2': 60000, 'min3': 0, 'max3': 90, 'cb_set': self._pkgenCbSet, }, 'key': { 'cb_set': self._keyCbSet, } }) for i in range(3, 40): self.frame.addMote( tuple([random.randint(0, 255) for i in range(8)]), { 'state': 'searching', 'numDataRx': 0, 'numIpRx': 0, 'toggle led': { 'text': 'ON', 'callback': self._toggleLedCb, }, 'rate': { 'min': 1000, 'max': 60000, 'cb_get': self._rateCbGet, 'cb_set': self._rateCbSet, }, 'pkgen (num/rate/size)': { 'min2': 16, 'max2': 60000, 'min3': 0, 'max3': 90, 'cb_set': self._pkgenCbSet, }, 'key': { 'cb_set': self._keyCbSet, } }) self.frame.update(macMote1, 'numDataRx', 200) self.frame.update(macMote1, 'numIpRx', 600) self.frame.update(macMote1, 'rate', 3000) self.frame.disableMote(macMote1) self.frame.disableMote(macMote2) self.frame.enableMote(macMote1) self.window.mainloop()