display.controllers package

Submodules

display.controllers.controller module

Base controller

class display.controllers.controller.Controller

Bases: ABC

Flask server method controller

abstractmethod add_rules(app)

Add rules to flask server

response(data, code: int = 200, mimetype: str = 'application/json')

Builds and returns Response for a request

Parameters:
  • data – the data to be sent

  • code (int, optional) – HTTPStatus code. Defaults to 200.

  • mimetype (str, optional) – Response mimetype. Defaults to “application/json”.

Returns:

A Flask Response object with the given data.

Return type:

Flask.Response

display.controllers.displayconfigurationcontroller module

Controller for display configuration

class display.controllers.displayconfigurationcontroller.DisplayConfigurationController(display: Display)

Bases: Controller

Controller for camera configuration

add_rules(app)

Add rules

Parameters:

app (Flask) – Flask application

configuration()

Handles configuration actions based on the HTTP request method.

Returns:

json response containing the configuration data for

GET or the result of the update operation for PUT. For unsupported methods, returns a 400 error with an appropriate message.

Return type:

json

get_configuration()

Get the current display configuration

Returns:

json with the current configuration, or json with an error if there is an exception.

Return type:

json

put_configuration()

Set the display configuration according to the json included in request content

Returns:

json with the configuration to set in the display pipeline, or with an error if there is an exception.

Return type:

json

display.controllers.heatmapcontroller module

Controller for display heatmap

class display.controllers.heatmapcontroller.HeatmapController(display: Display)

Bases: Controller

Controller for display heatmap

add_rules(app)

Add rules

Parameters:

app (Flask) – Flask application

configuration()

Handles configuration actions based on the HTTP request method.

Returns:

json response containing the configuration data for

GET or the result of the update operation for PUT. For unsupported methods, returns a 400 error with an appropriate message.

Return type:

json

get_heatmap()

Get the current heatmap value

Returns:

json with the current configuration, or json with an error if there is an exception.

Return type:

json

put_heatmap()

Set the display heatmap configuration according to the json included in request content

Returns:

json with the configuration, to set the heatmap on the display pipeline, or with an error if there is an exception.

Return type:

json

Module contents