Class AmxBeaconListener

java.lang.Object
org.harctoolbox.harchardware.beacon.AmxBeaconListener

public class AmxBeaconListener extends Object
This class listens for an AMX beacon and reports its findings.
  • Constructor Details

  • Method Details

    • listenFor

      public static AmxBeaconListener.Node listenFor(String key, String value, int timeout)
      Searches for a node with the prescribed value of the key.
      Parameters:
      key - Key to search for, e.g. "-Make".
      value - Value of the key to search for.
      timeout - Timeout in microseconds.
      Returns:
    • listen

      public static Collection<AmxBeaconListener.Node> listen(int time)
      Listen for the amount of time given in the argument, then return then nodes found.
      Parameters:
      time - Time to listen, in microseconds.
      Returns:
    • main

      public static void main(String[] args)
      mainly for testing.
      Parameters:
      args -
    • start

      public void start()
    • stop

      public void stop()
    • getNodes

      public Collection<AmxBeaconListener.Node> getNodes()
      Returns the found nodes.
      Returns:
      Collection of nodes.
    • reset

      public void reset()
      Discard present nodes.
    • getAge

      public long getAge()
      Returns the number of microseconds elapsed since the object was created.
      Returns:
      microseconds