Ejemplo n.º 1
0
 def swapPacketSent(self, packet):
     """
     SWAP packet transmitted
     
     @param packet: SWAP packet transmitted
     """
     WxComms.send_message("packet_sent", packet)
Ejemplo n.º 2
0
 def swapPacketSent(self, packet):
     """
     SWAP packet transmitted
     
     @param packet: SWAP packet transmitted
     """
     WxComms.send_message("packet_sent", packet)
Ejemplo n.º 3
0
 def swapPacketReceived(self, packet):
     """
     New SWAP packet received
     
     @param packet: SWAP packet received
     """
     WxComms.send_message("packet_received", packet)
Ejemplo n.º 4
0
 def swapPacketReceived(self, packet):
     """
     New SWAP packet received
     
     @param packet: SWAP packet received
     """
     WxComms.send_message("packet_received", packet)
Ejemplo n.º 5
0
    def swapServerStarted(self):
        """
        SWAP server started successfully
        """
        WxComms.send_message("server_started")

        # Display event
        WxComms.send_message("add_event", "SWAP server started")
Ejemplo n.º 6
0
 def cb_server_started(self, msg):
     """
     SWAP server started and running
     
     @param msg: not used
     """ 
     if self._waitfor_startdialog is not None:
         WxComms.send_message("close_wait")
Ejemplo n.º 7
0
    def swapServerStarted(self):
        """
        SWAP server started successfully
        """
        WxComms.send_message("server_started")

        # Display event
        WxComms.send_message("add_event", "SWAP server started")
Ejemplo n.º 8
0
 def cb_server_started(self, msg):
     """
     SWAP server started and running
     
     @param msg: not used
     """
     if self._waitfor_startdialog is not None:
         WxComms.send_message("close_wait")
Ejemplo n.º 9
0
 def newEndpointDetected(self, endpoint):
     """
     New endpoint detected by SWAP server
     
     'endpoint'  Endpoint object
     """
     if self.dmtframe is not None:
         # Display event
         evntext = "New endpoint with Reg ID = " + str(endpoint.getRegId()) + " : " + endpoint.name
         WxComms.send_message("add_event", evntext)
Ejemplo n.º 10
0
 def newEndpointDetected(self, endpoint):
     """
     New endpoint detected by SWAP server
     
     'endpoint'  Endpoint object
     """
     if self.dmtframe is not None:
         # Display event
         evntext = "New endpoint with Reg ID = " + str(
             endpoint.getRegId()) + " : " + endpoint.name
         WxComms.send_message("add_event", evntext)
Ejemplo n.º 11
0
    def endpointValueChanged(self, endpoint):
        """
        Endpoint value changed
        
        'endpoint' Endpoint object
        """
        if self.dmtframe is not None:
            # Display event
            evntext = endpoint.name + " in address " + str(endpoint.getRegAddress()) + " changed to " + endpoint.getValueInAscii()
            WxComms.send_message("add_event", evntext)            

            # Update value in SWAP dmtframe
            WxComms.send_message("changed_val", endpoint)    
Ejemplo n.º 12
0
    def moteAddressChanged(self, mote):
        """
        Mote address changed
        
        'mote'  Mote object
        """
        if self.dmtframe is not None:
            # Display event
            evntext = "Mote changed address to " + str(mote.address)
            WxComms.send_message("add_event", evntext)

            # Update address in tree
            WxComms.send_message("changed_addr", mote)
Ejemplo n.º 13
0
 def parameterValueChanged(self, param):
     """
     Config parameter value changed
     
     'param' Config parameter object
     """
     if self.dmtframe is not None:
         # Display event
         evntext = param.name + " in address " + str(param.getRegAddress()) + " changed to " + param.getValueInAscii()
         WxComms.send_message("add_event", evntext)
             
         # Update value in SWAP dmtframe
         WxComms.send_message("changed_val", param)
Ejemplo n.º 14
0
 def moteAddressChanged(self, mote):
     """
     Mote address changed
     
     'mote'  Mote object
     """
     if self.dmtframe is not None:
         # Display event
         evntext = "Mote changed address to " + str(mote.address)
         WxComms.send_message("add_event", evntext)            
             
         # Update address in tree
         WxComms.send_message("changed_addr", mote)
Ejemplo n.º 15
0
 def newMoteDetected(self, mote):
     """
     New mote detected by SWAP server
     
     'mote'  Mote object
     """
     if self.dmtframe is not None:               
         # Display event
         evntext = "New mote with address " + str(mote.address) + " : " + mote.definition.product + \
         " (by " + mote.definition.manufacturer + ")"
         WxComms.send_message("add_event", evntext)
         
         # Append mote to the browsing tree
         WxComms.send_message("add_mote", mote)
Ejemplo n.º 16
0
    def newMoteDetected(self, mote):
        """
        New mote detected by SWAP server
        
        'mote'  Mote object
        """
        if self.dmtframe is not None:
            # Display event
            evntext = "New mote with address " + str(mote.address) + " : " + mote.definition.product + \
            " (by " + mote.definition.manufacturer + ")"
            WxComms.send_message("add_event", evntext)

            # Append mote to the browsing tree
            WxComms.send_message("add_mote", mote)
Ejemplo n.º 17
0
    def parameterValueChanged(self, param):
        """
        Config parameter value changed
        
        'param' Config parameter object
        """
        if self.dmtframe is not None:
            # Display event
            evntext = param.name + " in address " + str(param.getRegAddress(
            )) + " changed to " + param.getValueInAscii()
            WxComms.send_message("add_event", evntext)

            # Update value in SWAP dmtframe
            WxComms.send_message("changed_val", param)
Ejemplo n.º 18
0
    def endpointValueChanged(self, endpoint):
        """
        Endpoint value changed
        
        'endpoint' Endpoint object
        """
        if self.dmtframe is not None:
            # Display event
            evntext = endpoint.name + " in address " + str(
                endpoint.getRegAddress(
                )) + " changed to " + endpoint.getValueInAscii()
            WxComms.send_message("add_event", evntext)

            # Update value in SWAP dmtframe
            WxComms.send_message("changed_val", endpoint)
Ejemplo n.º 19
0
    def moteStateChanged(self, mote):
        """
        Mote state changed
        
        'mote' Mote object
        """
        if self.dmtframe is not None:
            # Display event
            evntext = "Mote with address " + str(mote.address) + " switched to \"" + \
                SwapState.toString(mote.state) + "\""
            WxComms.send_message("add_event", evntext)

            # SYNC mode entered?
            if mote.state == SwapState.SYNC:
                WxComms.send_message("sync_received", mote)
Ejemplo n.º 20
0
 def moteStateChanged(self, mote):
     """
     Mote state changed
     
     'mote' Mote object
     """
     if self.dmtframe is not None:
         # Display event
         evntext = "Mote with address " + str(mote.address) + " switched to \"" + \
             SwapState.toString(mote.state) + "\""
         WxComms.send_message("add_event", evntext)
         
         # SYNC mode entered?
         if mote.state == SwapState.SYNC:
             WxComms.send_message("sync_received", mote)