Package com.framed.cdss.actors
Class HeartrateClassificationActor
java.lang.Object
com.framed.core.Service
com.framed.cdss.Actor
com.framed.cdss.actors.HeartrateClassificationActor
-
Field Summary
Fields inherited from class com.framed.cdss.Actor
id, inputChannels, outputChannels -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.framed.cdss.Actor
getInputChannels, getOutputChannels, valueMatchesExpected
-
Constructor Details
-
HeartrateClassificationActor
public HeartrateClassificationActor(EventBus eventBus, String id, String etCO2TrendChannel, String hrLimitChannel, String outputChannel) Constructs anActorthat subscribes to the giveninputChannels, evaluates the providedfiringRules, and optionally exposesoutputChannels.For each input channel, this actor:
- Initializes its sequence counter and latest value holder;
- Registers a message handler on the
EventBusthat 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 benullid- the identifier of the specified Actor. Commonly set in the config.etCO2TrendChannel- the channel on which the etCO2 trend warning is publishedhrLimitChannel- the channel on which the Heartrate limit warning is publishedoutputChannel- the channel on which to publish the arrhythmia warning- Throws:
NullPointerException- if any argument isnullIllegalArgumentException- if a rule is empty or references a channel not present ininputChannels, or contains an invalid token
-
-
Method Details
-
fireFunction
- Specified by:
fireFunctionin classActor- Parameters:
latestSnapshot- Unmodifiable snapshot of the latest value of ALL input channels (channel -> latest object).
-