Class HeartrateClassificationActor

java.lang.Object
com.framed.core.Service
com.framed.cdss.Actor
com.framed.cdss.actors.HeartrateClassificationActor

public class HeartrateClassificationActor extends Actor
  • Constructor Details

    • HeartrateClassificationActor

      public HeartrateClassificationActor(EventBus eventBus, String id, String etCO2TrendChannel, String hrLimitChannel, String outputChannel)
      Constructs an Actor that subscribes to the given inputChannels, evaluates the provided firingRules, and optionally exposes outputChannels.

      For each input channel, this actor:

      1. Initializes its sequence counter and latest value holder;
      2. Registers a message handler on the EventBus that updates state and evaluates rules.

      During construction, rules are compiled to internal FiringRules and validated for channel existence.

      Parameters:
      eventBus - the event bus used to subscribe to input channels and receive messages; must not be null
      id - the identifier of the specified Actor. Commonly set in the config.
      etCO2TrendChannel - the channel on which the etCO2 trend warning is published
      hrLimitChannel - the channel on which the Heartrate limit warning is published
      outputChannel - the channel on which to publish the arrhythmia warning
      Throws:
      NullPointerException - if any argument is null
      IllegalArgumentException - if a rule is empty or references a channel not present in inputChannels, or contains an invalid token
  • Method Details

    • fireFunction

      public void fireFunction(Map<String,Object> latestSnapshot)
      Specified by:
      fireFunction in class Actor
      Parameters:
      latestSnapshot - Unmodifiable snapshot of the latest value of ALL input channels (channel -> latest object).