Ejemplo n.º 1
0
 def startDiscovery( self, network ):
     ba = getBroadcastAddress( network )
     self.__log.debug( "startDiscovery %s, %s" % (network,ba) )
     # send attention request
     #TODO: confirm password not needed for probe message
     #sendUdpCommand( ba, "LGpassword" )
     sendUdpCommand( ba, "DA" )
Ejemplo n.º 2
0
    def getWebBricks( self ):
        receiver = WbUdpEventReceiver( self )
        receiver.start()

        # send attention request
        #TODO: confirm password not needed for probe message
        #sendUdpCommand( getBroadcastAddress( self._network ), "LGpassword" )
        sendUdpCommand( getBroadcastAddress( self._network ), "DA" )

        # wait for events to be received.
        time.sleep( self._forTime )
        receiver.stop()
        # turn result dict into list.
        self.__log.debug( "result %s" % self._webbricks )
        return self._webbricks.values()
 def doDiscover( self, action ):
     # send DA command
     ba = getBroadcastAddress( action[1] )
     self._log.debug( "discover %s, %s" % (action[1],ba) )
     #sendUdpCommand( ba, "LGpassword" )
     sendUdpCommand( ba, "DA" )