Developing Apama Applications > Developing Apama Applications in Event Modeler > Using Standard Blocks > General analytic blocks > Spread Calculator v3.0
Spread Calculator v3.0
The Spread Calculator block calculates the difference between the latest data points of two streams. The output feed also provides the time of the event. This can either be supplied in the input feed or, if no mapping is provided for the input feed, the correlator’s current time is used. Note that the first result will not be generated until both input feeds have received an event.
Parameters
There are no parameters for this block.
Operations
Operation
Description
start
Starts the calculation of differences. Must be called before any output events are sent.
stop
Stops the calculation of further coefficients. Any subsequent input feeds are ignored.
clear
Discards all current data.
Input feeds
Feed
Fields
Description
data1
value
The first feed of values.
time
The timestamp of the data point. Leave unmapped (i.e. left as 0) to set the time as the correlator’s current time.
data2
value
The second feed of values.
time
The timestamp of the data point. Leave unmapped (i.e. left as 0) to set the time as the correlator’s current time.
Output feeds
Feed
Fields
Description
statistics
last1
The most recent value sent to the data1 feed.
time1
The time of the most recent value sent to the data1 feed.
last2
The most recent value sent to the data2 feed.
time2
The time of the most recent value sent to the data2 feed.
spread
Difference between last1 and last2. Will be negative if last2 is greater than last1.
Copyright © 2013-2015 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG.