Querying for platforms

To query Edgware for the list of platforms connected to the bus, a JSON message of the following form is sent to the local Edgware node:

Field Value Description
op query:platform Identifies a platform query message.
correl <correlation-id> Client-defined correlation ID to identify the response.

The query:platform message may also include the following optional fields:

Field Value Description
type <platform-type> Query for a specific platform type.
id <platform-id> Query for a specific platform ID.
attr <system-attributes> Query for specific platform attributes; will match any platform containing these attributes exactly as specified.
loc <system-location> Query for platforms within the geographic area specified in a bounding box of the form {"left" : a, "bottom" : b, "top" : c, "right" : d}.

Matching platforms are returned in a JSON message of the form:

Field Nested Field Value Description
op query-result:platforms Identifies a platform query result.
correl <correlation-id> Client-defined correlation ID to identify the response.
For each matching platform the following information will be returned:
platforms Identifies the list of platforms.
id <platform-id> The platform ID.
type <platform-type> The type of the platform.
loc <platform-location> The current geographic location of the platform.
desc <platform-description> The free text description of the platform.
attr <platform-attributes> The set of attributes associated with the platform.

Example

A query of the form:

{
	"op" : "query:platforms",
	"correl" : "<correlation-id>",
	"type" : "<platform-type>",
	"loc" : {"left" : a,  "bottom" : b, "top" : c,  "right" : d}"
}

Will generate a response in the form:

{
	"op" : "query-result:platforms",
	"correl" : "<correlation-id>",
	"platforms" : [
		{
			"id" : "<platform-id>",
			"type" "<platform-type>",
			"loc" "<platform-location>",
			"desc" : "<platform-description>",
			"attr" : "<platform-attributes>"
		}
	]
}