eta_nexus.subscription_handlers.multi_subscription_handler module

class eta_nexus.subscription_handlers.multi_subscription_handler.MultiSubscriptionHandler[source]

Bases: SubscriptionHandler

The MultiSubscriptionHandler can be used to distribute subscribed values to multiple different subscription handlers. The handlers can be registered using the register method.

register(sub_handler: SubscriptionHandler) None[source]

Register a subscription handler.

Parameters:

sub_handler (SubscriptionHandler) – SubscriptionHandler object to use for handling subscriptions.

push(node: Node, value: Any, timestamp: datetime | None = None) None[source]

Receive data from a subscription. This should contain the node that was requested, a value and a timestamp when data was received. Push data to all registered sub-handlers.

Parameters:
  • node – Node object the data belongs to.

  • value – Value of the data.

  • timestamp – Timestamp of receiving the data.

close() None[source]

Finalize and close all subscription handlers.