def swapPacketSent(self, packet): """ SWAP packet transmitted @param packet: SWAP packet transmitted """ WxComms.send_message("packet_sent", packet)
def swapPacketReceived(self, packet): """ New SWAP packet received @param packet: SWAP packet received """ WxComms.send_message("packet_received", packet)
def swapServerStarted(self): """ SWAP server started successfully """ WxComms.send_message("server_started") # Display event WxComms.send_message("add_event", "SWAP server started")
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")
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)
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)
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)
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)
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)
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)
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)
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)
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)