Analytics Builder 10.9.0 | Using Analytics Builder for Cumulocity IoT | Block Reference | Calculation | Crossing Counter
 
Crossing Counter
apama.analyticskit.blocks.core.CrossingCounter
Detects and counts the number of threshold crossings in the specified direction.
Crossing is defined as a change in the input value from one side of the threshold to the other side of the threshold (that is, from less than to greater than or vice versa).
The block can operate over a time-bounded window that is specified with the Window Duration parameter. If this parameter is not specified, it uses an unbounded window. The Reset input clears the window contents.
If a window is configured, the block will use a set of 20 buckets, so the time of expired values is an approximation to the nearest bucket interval.
Parameters
Name
Description
Type
Notes
Threshold Value
This value is compared against the input value.
float
Default: 0.5
Direction
The direction in which to check for a threshold crossing: whether to detect a crossing in the upwards direction, in the downwards direction, or in both directions.
Option - one of:
*Upwards
*Downwards
*Both
Window Duration (secs)
If present, the amount of time (in seconds) for which values are to be kept in the window.
This must be a finite and positive number.
float
Optional
Input Port Details
Name
Description
Type
Value
The input value for which to detect a crossing.
float
Reset
Resets the count of crossings.
pulse
Sample
Forces re-evaluation of the current value and sends the output.
boolean
Output Port Details
Name
Description
Type
Crossing Count
The number of crossings.
float
Crossing
Sends a pulse when a crossing is detected.
pulse