using Akka.Actor; namespace ZB.MOM.WW.ScadaBridge.Communication.Grpc; /// /// Abstraction over the site-side stream subscription mechanism. /// SiteStreamManager in the SiteRuntime project implements this interface; /// the gRPC server depends on it without referencing SiteRuntime directly. /// public interface ISiteStreamSubscriber { /// /// Subscribes an actor to receive filtered stream events for a specific instance. /// /// The unique name of the instance whose events to subscribe to. /// The actor reference that will receive stream event messages. /// A subscription ID that can be used for unsubscription. string Subscribe(string instanceName, IActorRef subscriber); /// /// Subscribes an actor to receive ALARM events for ALL instances on the site /// (no per-instance filter). Only AlarmStateChanged events are /// forwarded; attribute-value events are dropped. Backs the site-wide /// SubscribeSite gRPC stream used by the aggregated Alarm Summary. /// /// The actor reference that will receive alarm stream event messages. /// A subscription ID that can be used for unsubscription. string SubscribeSiteAlarms(IActorRef subscriber); /// /// Removes all subscriptions for the given actor. /// /// The actor reference whose subscriptions should be removed. void RemoveSubscriber(IActorRef subscriber); }