Class ProximityBeacon
java.lang.Object
com.arubanetworks.meridian.triggers.ProximityBeacon
- All Implemented Interfaces:
Serializable
Container for a Meridian proximity beacon and its related fields.
This is used for triggers.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAn empty ProximityBeacon constructor.ProximityBeacon
(int major, int minor) Initialize a MR beacon by its major/minorProximityBeacon
(String address) Initialize a MR beacon by its MAC addressProximityBeacon
(String address, String APaddress, String uuid, int major, int minor, EditorKey mapKey, float x, float y) -
Method Summary
Modifier and TypeMethodDescriptionstatic List<ProximityBeacon>
fromJSONArray
(JSONArray json, String locationId) Static initializer for creating a list of ProximityBeacons from its json representation.static ProximityBeacon
fromJSONObject
(JSONObject json, String locationId) Static initializer for creating a ProximityBeacon from its json representation.The unique Bluetooth MAC address of this beacon.getApMac()
The unique AP MAC address of this beacon if it is an AP.int
getMajor()
The Beacon’s major identifier.The Beacon’s map key.int
getMinor()
The Beacon’s minor identifier.getName()
The human readable name of this Beacon (e.g.getUUID()
Gets the UUID for this beacon.float
getX()
This beacon’s x coordinate on its parent Meridian Map.float
getY()
This beacon’s y coordinate on its parent Meridian Map.boolean
isAP()
Checks if the Beacon’s an AP.boolean
Returns true if the ProximityBeacon does not represent a point on a map.Gets the major/minor string of this Beacon.void
setMajor
(int major) Set the Beacon’s major identifier.void
setMinor
(int minor) Set the Beacon’s minor identifier.void
Sets the human readable name of this Beacon (e.g.toJson()
toString()
-
Constructor Details
-
ProximityBeacon
public ProximityBeacon()An empty ProximityBeacon constructor. -
ProximityBeacon
-
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
Initialize a MR beacon by its MAC address- Parameters:
address
-- MAC addresses (without the :’s)
-
-
Method Details
-
getUUID
Gets the UUID for this beacon. -
getAddress
The unique Bluetooth MAC address of this beacon. -
getName
The human readable name of this Beacon (e.g.‘Joe’s Office’, ‘Fountain’)
-
setName
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
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
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
-
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
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
-