bec_lib.devicemanager.DeviceManagerBase#

class DeviceManagerBase(service: BECService, status_cb: list = None)[source]#

Bases: object

Methods

check_request_validity

Check if the config request is valid.

initialize

Initialize the DeviceManager by starting all connectors.

parse_config_message

Parse a config message and update the device config accordingly.

shutdown

Shutdown all connectors.

update_status

Update the status of the device manager :param status: New status :type status: BECStatus

Attributes

config_helper

devices

producer

check_request_validity(msg: DeviceConfigMessage) None[source]#

Check if the config request is valid.

Parameters:

msg (DeviceConfigMessage) – Config message

initialize(bootstrap_server) None[source]#

Initialize the DeviceManager by starting all connectors. :param bootstrap_server: Redis server address, e.g. ‘localhost:6379’

Returns:

parse_config_message(msg: DeviceConfigMessage) None[source]#

Parse a config message and update the device config accordingly.

Parameters:

msg (DeviceConfigMessage) – Config message

shutdown()[source]#

Shutdown all connectors.

update_status(status: BECStatus)[source]#

Update the status of the device manager :param status: New status :type status: BECStatus