DeviceControl

The whole application is managed using AppManager, where individual methods correspond to endpoints.

class app.core.app_manager.AppManager

Bases: object

Defines entry points to the application.

command(config: dict) Response

Run a specific command (see details).

Parameters

config – A dictionary with pre-defined keys

Returns

Response object

end() Response

Ends the application (see details).

Returns

Response object

end_device(device_id: str) Response

Terminates an existing device.

Parameters

device_id – ID of an existing device

Returns

Response object

end_task(task_id) Response

Terminate an existing task.

Parameters

task_id – ID of an existing task

Returns

Response object

get_data(config: dict) Response

Retrieves data in supported format (see details).

Parameters

config – A dictionary with pre-defined keys

Returns

Response object

get_latest_data(config) Response

Retrieves the last data entry for specified Device ID and Data Type.

Parameters

config – A dictionary which specifies the “device_id”: string and “type”: string

Returns

Response object

init_app()

Initializes the application.

ping() Response

Get status information about the running devices and tasks (see details).

Returns

Response object

register_device(config: dict) Response

Register a new device (see details).

Parameters

config – A dictionary with pre-defined keys

Returns

Response object

register_task(config: dict) Response

Register a new task (see details).

Parameters

config – A dictionary with pre-defined keys

Returns

Response object

app.core.app_manager.validate_attributes(required, attributes, class_name)

Core

Workspace