bobocep.setup.simple.BoboSetupSimpleDistributed

class bobocep.setup.simple.BoboSetupSimpleDistributed(phenomena: List[BoboPhenomenon], handler: BoboActionHandler, urn: str, devices: List[BoboDevice], aes_key: str, validator: BoboValidatorJSONable | None = None, gen_event: BoboGenEvent | None = None)[source]

Bases: BoboSetup

A simple setup to make distributed configuration easier.

__init__(phenomena: List[BoboPhenomenon], handler: BoboActionHandler, urn: str, devices: List[BoboDevice], aes_key: str, validator: BoboValidatorJSONable | None = None, gen_event: BoboGenEvent | None = None)[source]
Parameters:
  • phenomena – A list of phenomena.

  • handler – An action handler.

  • urn – A URN that is unique across devices in the network.

  • devices – Devices in the network (including this device).

  • aes_key – The AES key to use for encryption.

  • validator – A data validator for the engine’s Receiver task. Default: BoboValidatorAll.

  • gen_event – An event generator. Default: None.

generate() Tuple[BoboEngine, BoboDistributedTCP][source]
Returns:

The CEP engine and distributed TCP instance with AES encryption.