BCN — Beacon-related messages

Beacons are subtypes of objects and thus exist in the same namespace as all other objects in the server. The messages listed in this section are specific to beacons and do not apply to other object types.

BCN-INF - Basic status information of one or more beacons

A client sends this request to the server to obtain basic status information about one or more beacons currently known to the server.

Request fields

Name Required? Type Description

ids

yes

list of strings

The list of beacon IDs that the client is interested in

Response fields

Name Required? Type Description

status

no

object of BeaconStatusInfo

Object mapping beacon IDs to the corresponding status information.

error

no

object

Object mapping beacon IDs to reasons why the corresponding status information could not have been retrieved.

All the beacon IDs that were specified in the request MUST appear either in the status list or in the error map.

Example request

{
  "type": "BCN-INF",
  "ids": ["base", "spam"]
}

Example response

{
  "type": "BCN-INF",
  "status": {
    "base": {
      "id": "base",
      "position": [519976597, -7406863, 93765],
      "heading": 290,
      "active": true,
      "timestamp": 1449562661000
    }
  },
  "error": {
    "spam": "No such beacon."
  }
}

BCN-PROPS - Basic properties of one or more beacons

Request fields

Name Required? Type Description

ids

yes

list of strings

The list of beacon IDs that the client is interested in

Response fields

The response is a multi-object async response; each beacon ID is mapped to the basic properties of the beacon as a BeaconBasicProperties object.

Example request

{
  "type": "BCN-PROPS",
  "ids": ["base", "spam"]
}

Example response

{
  "type": "BCN-PROPS",
  "result": {
    "base": {
      "id": "base",
      "name": "Main base"
    }
  },
  "error": {
    "spam": "No such beacon."
  }
}