CONN — Connection-related messages
CONN-DEL - Connection removal notification
A server sends a notification of this type to a client when an existing connection was removed from the server.
Notification fields
| Name | Required? | Type | Description |
|---|---|---|---|
|
yes |
list of strings |
The list of connection IDs that were removed |
Example notification
{
"type": "CONN-DEL",
"ids": ["dgps"]
}
CONN-INF — Basic status information of one or more connections
A client sends this request to the server to obtain basic status information about one or more connections (e.g., radio links, RTK correction data streams) currently managed by the server.
This message may also be broadcast as a notification by the server on its own volition to all connected Flockwave clients to notify them about a status change of one of the managed connections.
Request fields
| Name | Required? | Type | Description |
|---|---|---|---|
|
yes |
list of strings |
The list of connection IDs that the client is interested in |
Response and notification fields
| Name | Required? | Type | Description |
|---|---|---|---|
|
no |
object of |
Object mapping connection IDs to the corresponding status information. |
|
no |
object |
Object mapping connection IDs to reasons why the corresponding status information could not have been retrieved. |
All the connection IDs that were specified in the request MUST appear
either in the status list or in the error map. When this
message is sent as a notification, only the status field SHOULD be
present.
Example request
{
"type": "CONN-INF",
"ids": ["xbee", "dgps", "beer_can"]
}
Example response
{
"type": "CONN-INF",
"status": {
"xbee": {
"id": "xbee",
"purpose": "uavRadioLink",
"description": "Upstream XBee radio link",
"status": "connected",
"timestamp": 1450114278000
},
"dgps": {
"id": "dgps",
"purpose": "dgps",
"description": "DGPS data from BUTE0",
"status": "connecting"
}
},
"error": {
"beer_can": "Sorry, no alcoholic beverages are allowed on the premises."
}
}
CONN-LIST — List of all the connections managed by the server
A client sends this request to the server to obtain the list of all the connections (e.g., radio links, RTK correction data streams) currently managed by the server. The list of connections will not include connections to Flockwave clients.
Request fields
This request has no fields.
Response fields
| Name | Required? | Type | Description |
|---|---|---|---|
|
yes |
list of strings |
The list of connection IDs for all the connections that the server manages |
Example request
{
"type": "CONN-LIST"
}
Example response
{
"type": "CONN-LIST",
"ids": ["dgps", "xbee"]
}