-
Notifications
You must be signed in to change notification settings - Fork 0
Controller Interface Description
The controller offers a RESTful interface which is available over the internet and over the local network.
This interface can be used by three components:
- UE --> Controller: UE registers itself and updates its context (status) e.g. display on/off or stream on/off.
- Location Service --> Controller: The 3rd party location service can inject location information of registered UE.
- GUI <-- Controller: The GUI can use this interface to pull the current system state e.g. the context of the UEs or the status of the access points.
Endpoint | Method | Description |
---|---|---|
/api/ue |
POST | Registers user equipment in the system. Creates context of UE which can later be updated by a PUT request. Returns an URL (with ID) to access the context of this UE. |
/api/ue |
GET | Returns a list of URLs for all currently registered UE. |
/api/ue/{id} |
GET | Returns the complete context (status) of the UE specified by the ID argument. |
/api/ue/{id} |
PUT | Updates the context of a already registered UE. |
/api/ue/{id} |
DELETE | Removes a UE from the system and deletes its context. |
- Request:
{
"device_id": "device-identifier-1",
"location_service_id": "node1",
"position_x": 0,
"position_y": 0,
"display_state": 0,
"active_application": "com.android.browser",
}
TODO: Extend this: How is ongoing data transmission (e.g. video stream) on UE described? Receiving yes/no? Bytes/s?
- Response (POST):
[
"/api/ue/9d7034c5008b11e4b714c8bcc8a0a80d"
]
- Response (PUT): No data (HTTP Status: 204)
- Response:
[
"/api/ue/9d7034c5008b11e4b714c8bcc8a0a80d",
"/api/ue/5e8e61d100fd11e4bfafc8bcc8a0a80d",
"/api/ue/57ae409e00fd11e4a3dec8bcc8a0a80d"
]
- Response:
{
"uuid": "5e8e61d100fd11e4bfafc8bcc8a0a80d",
"device_id": "device-identifier-1",
"location_service_id": "node1",
"position_x": 1234,
"position_y": 678,
"display_state": 0,
"active_application": "com.android.browser",
"assigned_accesspoint": "/api/accesspoints/57ae409e00fd11e4a3dec8bcc8a0a80d",
}
TODO: Extend this...
We will use a 3rd party location service in the demo. So the location of a UE is not transmitted within context updates done by the UE. To make the integration of the location service easier an additional endpoint for location updates is provided. Each update contains an identifier, which is used to map locations to UEs.
Endpoint | Method | Description |
---|---|---|
/api/location |
POST | Delivers new location data. The location is mapped to the UE which has the same location identifier. If there is no matching UE in the system this call will not change anything. |
- Request:
{
"location_service_id": "node1",
"position_x": 0,
"position_y": 0,
}
TODO: What is the correct location format of the location service?
- Response: No data (HTTP Status: 204)
This interface also provides the current status of the access points which can be used for the demonstration GUI.
Endpoint | Method | Description |
---|---|---|
/api/accesspoints |
GET | Returns a list (URLs) of attached access points. |
/api/accesspoints/{id} |
GET | Returns the current status of an access point. |
- Response:
[
"/api/accesspoints/9d7034c5008b11e4b714c8bcc8a0a80d",
"/api/accesspoints/5e8e61d100fd11e4bfafc8bcc8a0a80d",
"/api/accesspoints/57ae409e00fd11e4a3dec8bcc8a0a80d"
]
- Response:
{
"uuid": "5e8e61d100fd11e4bfafc8bcc8a0a80d",
"accesspoint_id": "accesspoint-1",
"position_x": 1234,
"position_y": 678,
"power_state": 0,
"assigned_ue": [
"/api/ue/57ae409e00fd11e4a3dec8bcc8a0a80d",
"/api/ue/5e8e61d100fd11e4bfafc8bcc8a0a80d",
],
}
TODO: Which AP states do we have? On/Off? More?