Class ProximityBeacon

java.lang.Object
com.arubanetworks.meridian.triggers.ProximityBeacon
All Implemented Interfaces:
Serializable

public class ProximityBeacon extends Object implements Serializable
Container for a Meridian proximity beacon and its related fields.

This is used for triggers.

See Also:
  • Constructor Details

    • ProximityBeacon

      public ProximityBeacon()
      An empty ProximityBeacon constructor.
    • ProximityBeacon

      public ProximityBeacon(String address, String APaddress, String uuid, int major, int minor, EditorKey mapKey, float x, float y)
    • ProximityBeacon

      public ProximityBeacon(int major, int minor)
      Initialize a MR beacon by its major/minor
      Parameters:
      major -
      • major value (0-65535)
      minor -
      • minor value (0-65535)
    • ProximityBeacon

      public ProximityBeacon(String address)
      Initialize a MR beacon by its MAC address
      Parameters:
      address -
      • MAC addresses (without the :’s)
  • Method Details

    • getUUID

      public String getUUID()
      Gets the UUID for this beacon.
    • getAddress

      public String getAddress()
      The unique Bluetooth MAC address of this beacon.
    • getName

      public String getName()
      The human readable name of this Beacon (e.g.

      ‘Joe’s Office’, ‘Fountain’)

    • setName

      public void setName(String name)
      Sets the human readable name of this Beacon (e.g.

      ‘Joe’s Office’, ‘Fountain’)

    • getX

      public float getX()
      This beacon’s x coordinate on its parent Meridian Map.
    • getY

      public float getY()
      This beacon’s y coordinate on its parent Meridian Map.
    • getMajor

      public int getMajor()
      The Beacon’s major identifier.
    • setMajor

      public void setMajor(int major)
      Set the Beacon’s major identifier.
    • getMinor

      public int getMinor()
      The Beacon’s minor identifier.
    • isAP

      public boolean isAP()
      Checks if the Beacon’s an AP.
    • getApMac

      public String getApMac()
      The unique AP MAC address of this beacon if it is an AP.
    • setMinor

      public void setMinor(int minor)
      Set the Beacon’s minor identifier.
    • getMapKey

      public EditorKey getMapKey()
      The Beacon’s map key.
    • fromJSONObject

      public static ProximityBeacon fromJSONObject(JSONObject json, String locationId) throws JSONException
      Static initializer for creating a ProximityBeacon from its json representation.
      Parameters:
      json - A known json representation of the ProximityBeacon to be initialized.
      locationId - A known Meridian location id for the initialized ProximityBeacon.
      Returns:
      The initialized ProximityBeacon.
      Throws:
      JSONException - on JSON parsing error
    • toJson

      public JSONObject toJson()
    • fromJSONArray

      public static List<ProximityBeacon> fromJSONArray(JSONArray json, String locationId) throws JSONException
      Static initializer for creating a list of ProximityBeacons from its json representation.
      Parameters:
      json - A json representation of the ProximityBeacon list.
      locationId - A known Meridian location id for the ProximityBeacon in the list.
      Returns:
      An initialized list of ProximityBeacon.
      Throws:
      JSONException - on JSON parsing error
    • majorMinorString

      public String majorMinorString()
      Gets the major/minor string of this Beacon.
    • isInvalid

      public boolean isInvalid()
      Returns true if the ProximityBeacon does not represent a point on a map.
    • toString

      @NonNull public String toString()
      Overrides:
      toString in class Object