Example #1
0
    def __init__(self):

        # variables
        self.guiLock = threading.Lock()
        self.apiDef = IpMgrDefinition.IpMgrDefinition()
        self.notifClientHandler = None

        # create window
        self.window = dustWindow.dustWindow('MgrListener',
                                            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 table frame
        self.tableFrame = dustFrameTable.dustFrameTable(
            self.window,
            self.guiLock,
            frameName="received notifications",
            row=1,
            column=0)
        self.tableFrame.show()
Example #2
0
    def __init__(self):

        # local variables
        self.guiLock = threading.Lock()
        self.apiDef = IpMgrDefinition.IpMgrDefinition()
        self.notifClientHandler = None

        # create window
        self.window = dustWindow.dustWindow('SensorDataReceiver',
                                            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 sensor data frame
        self.sensorDataFrame = dustFrameSensorData.dustFrameSensorData(
            self.window,
            self.guiLock,
            frameName="received sensor data",
            row=1,
            column=0)
        self.sensorDataFrame.show()
    def __init__(self):

        # local variables
        self.guiLock = threading.Lock()
        self.apiDef = IpMgrDefinition.IpMgrDefinition()
        self.mgrconnector = None
        self.lbrconnector = None

        # create window
        self.window = dustWindow.dustWindow('LBRConnection',
                                            self._windowCb_close)

        # add an LBR connection frame
        self.LBRConnectionFrame = dustFrameLBRConnection.dustFrameLBRConnection(
            self.window,
            self.guiLock,
            self._LBRConnectionFrameCb_connected,
            frameName="LBR connection",
            row=0,
            column=0)
        self.LBRConnectionFrame.show()

        # add a manager connection frame
        self.mgrconnectionFrame = dustFrameConnection.dustFrameConnection(
            self.window,
            self.guiLock,
            self._mgrconnectionFrameCb_connected,
            frameName="manager connection",
            row=1,
            column=0)
        self.mgrconnectionFrame.apiLoaded(self.apiDef)
        self.mgrconnectionFrame.show()
Example #4
0
 def __init__(self):
     
     # variables
     self.guiLock            = threading.Lock()
     self.apiDef             = IpMgrDefinition.IpMgrDefinition()
     self.notifClientHandler = None
     self.presenterMote      = None
     
     # create window
     self.window = dustWindow.dustWindow(
         'Voting',
         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 voting frame
     self.votingFrame         = dustFrameVoting.dustFrameVoting(
         self.window,
         self.guiLock,
         nextQuestionCb        = self._nextQuestionCb,
         presenterChangedCb    = self._presenterChangedCb,
         scanCb                = self._scanCb,
         frameName             = "voting",
         row=1,column=0,
     )
Example #5
0
 def __init__(self):
     
     # local variables
     self.guiLock            = threading.Lock()
     self.apiDef             = IpMgrDefinition.IpMgrDefinition()
     self.connector          = None
     
     # create window
     self.window = dustWindow.dustWindow(
         'Chaser',
         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 directionFrame
     self.directionFrame = dustFrameDirection.dustFrameDirection(
         self.window,
         self.guiLock,
         self._directionFrameCb,
         row=1,column=0
     )
Example #6
0
 def __init__(self):
     
     # variables
     self.guiLock            = threading.Lock()
     self.apiDef             = IpMgrDefinition.IpMgrDefinition()
     self.notifClientHandler = None
     
     # create window
     self.window = dustWindow.dustWindow(
         'HrListener',
         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 table frame
     self.tableFrame = dustFrameTable.dustFrameTable(
         self.window,
         self.guiLock,
         frameName="received health reports",
         row=1,column=0,
     )
     self.tableFrame.show()
Example #7
0
    def __init__(self):

        # local variables
        self.guiLock = threading.Lock()
        self.apiDef = IpMgrDefinition.IpMgrDefinition()
        self.dc2126aHandler = None

        # initialize data singleton
        dc2126aData().set('selectedMote', None)
        dc2126aData().set('temperature', None)
        dc2126aData().set('adcValue', None)
        dc2126aData().set('energysource', None)

        # create window
        self.window = dustWindow.dustWindow(
            'DC2126A',
            self._windowCb_close,
        )

        # add connection Frame
        self.connectionFrame = dustFrameConnection.dustFrameConnection(
            self.window,
            self.guiLock,
            self._connectionFrameCb_connected,
            frameName="Serial connection",
            row=0,
            column=0,
        )
        self.connectionFrame.apiLoaded(self.apiDef)
        self.connectionFrame.serialPortText.delete("1.0", Tkinter.END)
        self.connectionFrame.show()

        # add configuration frame
        self.configurationFrame = dustFrameDC2126AConfiguration.dustFrameDC2126AConfiguration(
            self.window,
            self.guiLock,
            selectedMoteChangedCB=self._selectedMoteChangedCB,
            refreshButtonCB=self._refreshButtonCB,
            getConfigurationCB=self._getConfigurationCB,
            setConfigurationCB=self._setConfigurationCB,
            row=1,
            column=0,
        )
        self.configurationFrame.disableButtons()
        self.configurationFrame.show()

        # add report Frame
        self.reportFrame = dustFrameDC2126AReport.dustFrameDC2126AReport(
            self.window,
            self.guiLock,
            getTemperatureCb=self._getTemperature,
            getEnergySourceCb=self._getEnergySource,
            getAdcValueCb=self._getAdcValue,
            row=0,
            column=1,
        )
        self.reportFrame.show()

        # local variables
        self.userMsg = ''  # error message printed to user
 def __init__(self):
     
     # local variables
     self.guiLock            = threading.Lock()
     self.apiDef             = IpMgrDefinition.IpMgrDefinition()
     self.mgrconnector       = None
     self.lbrconnector       = None
     
     # create window
     self.window = dustWindow.dustWindow('LBRConnection',
                              self._windowCb_close)
     
     # add an LBR connection frame
     self.LBRConnectionFrame = dustFrameLBRConnection.dustFrameLBRConnection(
                                 self.window,
                                 self.guiLock,
                                 self._LBRConnectionFrameCb_connected,
                                 frameName="LBR connection",
                                 row=0,column=0)
     self.LBRConnectionFrame.show()
     
     # add a manager connection frame
     self.mgrconnectionFrame = dustFrameConnection.dustFrameConnection(
                                 self.window,
                                 self.guiLock,
                                 self._mgrconnectionFrameCb_connected,
                                 frameName="manager connection",
                                 row=1,column=0)
     self.mgrconnectionFrame.apiLoaded(self.apiDef)
     self.mgrconnectionFrame.show()
 def __init__(self):
     
     # variables
     self.guiLock         = threading.Lock()
     self.apiDef          = IpMgrDefinition.IpMgrDefinition()
     self.notifThread     = None
     self.snapshotThread  = None
     
     # create window
     self.window = dustWindow.dustWindow(
         'Timelapse',
         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 table frame
     self.tableFrame = dustFrameTable.dustFrameTable(
         self.window,
         self.guiLock,
         frameName="network activity",
         row=1,column=0,
     )
     self.tableFrame.show()
 def __init__(self):
     
     # local variables
     self.guiLock            = threading.Lock()
     self.apiDef             = IpMgrDefinition.IpMgrDefinition()
     self.notifClientHandler = None
     
     # create window
     self.window = dustWindow.dustWindow('SensorDataReceiver',
                              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 sensor data frame
     self.sensorDataFrame = dustFrameSensorData.dustFrameSensorData(self.window,
                                      self.guiLock,
                                      frameName="received sensor data",
                                      row=1,column=0)
     self.sensorDataFrame.show()
Example #11
0
    def __init__(self):

        # variables
        self.guiLock = threading.Lock()
        self.apiDef = IpMgrDefinition.IpMgrDefinition()
        self.notifThread = None
        self.snapshotThread = None

        # create window
        self.window = dustWindow.dustWindow(
            'Timelapse',
            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 table frame
        self.tableFrame = dustFrameTable.dustFrameTable(
            self.window,
            self.guiLock,
            frameName="network activity",
            row=1,
            column=0,
        )
        self.tableFrame.show()
Example #12
0
    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()
Example #13
0
 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)
Example #14
0
 def __init__(self):
     
     # local variables
     self.guiLock              = threading.Lock()
     self.apiDef               = IpMgrDefinition.IpMgrDefinition()
     self.dc2126aHandler   = None
     
     # initialize data singleton
     dc2126aData().set('selectedMote',   None)
     dc2126aData().set('temperature',    None)
     dc2126aData().set('adcValue',       None)
     dc2126aData().set('energysource',   None)
     
     # create window
     self.window               = dustWindow.dustWindow(
         'DC2126A',
         self._windowCb_close,
     )
     
     # add connection Frame
     self.connectionFrame      = dustFrameConnection.dustFrameConnection(
         self.window,
         self.guiLock,
         self._connectionFrameCb_connected,
         frameName="Serial connection",
         row=0,column=0,
     )
     self.connectionFrame.apiLoaded(self.apiDef)
     self.connectionFrame.serialPortText.delete("1.0",Tkinter.END)
     self.connectionFrame.show()
     
     # add configuration frame
     self.configurationFrame   = dustFrameDC2126AConfiguration.dustFrameDC2126AConfiguration(
         self.window,
         self.guiLock,
         selectedMoteChangedCB = self._selectedMoteChangedCB,
         refreshButtonCB       = self._refreshButtonCB,
         getConfigurationCB    = self._getConfigurationCB,
         setConfigurationCB    = self._setConfigurationCB,
         row=1,column=0,
     )
     self.configurationFrame.disableButtons()
     self.configurationFrame.show()
     
     # add report Frame
     self.reportFrame = dustFrameDC2126AReport.dustFrameDC2126AReport(
         self.window,
         self.guiLock,
         getTemperatureCb      = self._getTemperature,
         getEnergySourceCb     = self._getEnergySource,
         getAdcValueCb         = self._getAdcValue,
         row=0,column=1,
     )
     self.reportFrame.show()
     
     # local variables
     self.userMsg         = ''      # error message printed to user
Example #15
0
    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)
Example #16
0
    def __init__(self):

        # local variables
        self.guiLock = threading.Lock()
        self.apiDef = IpMgrDefinition.IpMgrDefinition()
        self.dc2369aHandler = None
        self.connector = None

        # initialize data singleton
        dc2369aData().set('selectedMote', None)
        dc2369aData().set('numDisplayedMotes', 0)

        # create window
        self.window = dustWindow.dustWindow(
            'DC2369A',
            self._windowCb_close,
        )

        # add connection Frame
        self.connectionFrame = dustFrameConnection.dustFrameConnection(
            self.window,
            self.guiLock,
            self._connectionFrameCb_connected,
            frameName="Serial connection",
            row=0,
            column=0,
        )
        self.connectionFrame.apiLoaded(self.apiDef)
        self.connectionFrame.serialPortText.delete("1.0", Tkinter.END)
        self.connectionFrame.show()

        # add configuration frame
        self.configurationFrame = dustFrameDC2369AConfiguration.dustFrameDC2369AConfiguration(
            self.window,
            self.guiLock,
            selectedMoteChangedCB=self._selectedMoteChangedCB,
            displayMoteButtonCB=self._displayMoteButtonCB,
            refreshButtonCB=self._refreshButtonCB,
            clearMotesButtonCB=self._clearMotesButtonCB,
            row=0,
            column=1,
        )
        self.configurationFrame.disableButtons()
        self.configurationFrame.show()

        # establish a list of report Frames, so we can keep track of them as they are added
        self.reportFrames = []

        # local variables
        self.userMsg = ''  # error message printed to user
Example #17
0
 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()
Example #18
0
 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()
Example #19
0
    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()
Example #20
0
    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()
Example #21
0
 def __init__(self):
     
     # variables
     self.guiLock            = threading.Lock()
     
     # create window
     self.window = dustWindow.dustWindow(
         'HdlcTool',
         self._windowCb_close,
     )
     
     # add a connection frame
     self.conversionFrame = dustFrameConversion.dustFrameConversion(
         self.window,
         self.guiLock,
         topName          = 'raw',
         toBottomCb       = self._conversionFrameCb_toHdlc,
         bottomName       = 'HDLC',
         toTopCb          = self._conversionFrameCb_toRaw,
         frameName        = "HDLC Conversion",
         row=0,column=0
     )
     self.conversionFrame.show()
Example #22
0
    def __init__(self):

        # variables
        self.guiLock = threading.Lock()

        # create window
        self.window = dustWindow.dustWindow(
            'HdlcTool',
            self._windowCb_close,
        )

        # add a connection frame
        self.conversionFrame = dustFrameConversion.dustFrameConversion(
            self.window,
            self.guiLock,
            topName='raw',
            toBottomCb=self._conversionFrameCb_toHdlc,
            bottomName='HDLC',
            toTopCb=self._conversionFrameCb_toRaw,
            frameName="HDLC Conversion",
            row=0,
            column=0)
        self.conversionFrame.show()
Example #23
0
    def __init__(self):

        # variables
        self.guiLock = threading.Lock()
        self.apiDef = IpMgrDefinition.IpMgrDefinition()
        self.notifClientHandler = None
        self.presenterMote = None

        # create window
        self.window = dustWindow.dustWindow(
            'Voting',
            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 voting frame
        self.votingFrame = dustFrameVoting.dustFrameVoting(
            self.window,
            self.guiLock,
            nextQuestionCb=self._nextQuestionCb,
            presenterChangedCb=self._presenterChangedCb,
            scanCb=self._scanCb,
            frameName="voting",
            row=1,
            column=0,
        )
Example #24
0
    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()
Example #25
0
    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()
Example #26
0
 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()
Example #27
0
 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()
Example #28
0
    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()
Example #29
0
 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()
Example #30
0
 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()
Example #31
0
 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()
Example #32
0
    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()