Package com.framed.cdss.reactors
Class HemodynamicRhythmClassificationReactor
java.lang.Object
com.framed.core.Service
com.framed.arn.Reactor
com.framed.cdss.reactors.HemodynamicRhythmClassificationReactor
-
Nested Class Summary
Nested classes/interfaces inherited from class com.framed.arn.Reactor
Reactor.Snapshot -
Field Summary
Fields inherited from class com.framed.arn.Reactor
addressGroup, id, inputChannels, lastLogicalFireTs, outputChannelsFields inherited from class com.framed.core.Service
ADDRESS_REGISTRY_SUFFIX, eventBus, formatter, logger -
Constructor Summary
ConstructorsConstructorDescriptionHemodynamicRhythmClassificationReactor(EventBus eventBus, String id, String etCO2TrendChannel, String hrLimitChannel, String outputChannel, boolean atomic) Constructs anReactorthat subscribes to the giveninputChannels, evaluates the providedfiringRules, and optionally exposesoutputChannels. -
Method Summary
Modifier and TypeMethodDescriptionvoidreactionFunction(Map<String, Object> latestSnapshot) Called once per evaluation cycle when any rule is satisfied.Methods inherited from class com.framed.arn.Reactor
getInputChannels, getOutputChannels, valueMatchesExpectedMethods inherited from class com.framed.core.Service
addressRegistry, announceAddress, stop
-
Constructor Details
-
HemodynamicRhythmClassificationReactor
public HemodynamicRhythmClassificationReactor(EventBus eventBus, String id, String etCO2TrendChannel, String hrLimitChannel, String outputChannel, boolean atomic) Constructs anReactorthat 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 Reactor. 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
-
reactionFunction
Description copied from class:ReactorCalled once per evaluation cycle when any rule is satisfied.- Specified by:
reactionFunctionin classReactor- Parameters:
latestSnapshot- immutable snapshot of latest channel values and timestamps
-
