public class EmulateLogic extends Object implements stream.Processor
Modifier and Type | Field and Description |
---|---|
int |
nOutOf4 |
int |
nOutOf40 |
String |
outKey |
String |
primitivesKey |
int |
timeWindowSize |
String |
triggerSliceKey |
Constructor and Description |
---|
EmulateLogic() |
Modifier and Type | Method and Description |
---|---|
static ArrayList<Integer> |
getPatchesOfFTU(int ftu_id) |
static boolean |
hasCoincidentTriggers(ArrayList<Integer> triggerSlicesSorted,
int nOutOf40,
int timeWindowSize)
Test for nOutOf40 coincident triggerPrimitives in the given time window
|
static boolean |
hasTriggered(boolean[] triggerPrimitives,
int[] patchTriggerSlice,
int nOutOf4,
int nOutOf40,
int timeWindowSize)
Iterate over patches and decide weather the event has triggered for the given trigger properties
|
static void |
insertToArrayListSorted(int triggerSlicesToAdd,
ArrayList<Integer> triggerSlicesArrayList)
sorted insert of int value into an int array
|
stream.Data |
process(stream.Data item) |
@Parameter(required=false, description="decision of the logic [bool]") public String outKey
@Parameter(required=false, description="boolean array [number of patches] flagging if patch triggered ") public String primitivesKey
@Parameter(required=false, description="int array [number of patches] containing each the first slice above threshold ") public String triggerSliceKey
@Parameter(required=false, description="minimum number of trigger patches per trigger unit to have a signal above threshold") public int nOutOf4
@Parameter(required=false, description="minimum number of trigger units to have a signal above threshold") public int nOutOf40
@Parameter(required=false, description="size of the time window within which the rising edges of the triggerprimitives should be") public int timeWindowSize
public stream.Data process(stream.Data item)
process
in interface stream.Processor
public static boolean hasTriggered(boolean[] triggerPrimitives, int[] patchTriggerSlice, int nOutOf4, int nOutOf40, int timeWindowSize)
triggerPrimitives
- Array with discriminator trigger decisionspatchTriggerSlice
- Array with discriminator trigger timesnOutOf4
- numper of necessary trigger patches to have a signalnOutOf40
- numper of necessary trigger units to have a signaltimeWindowSize
- duration of coincidence of the triggered patchespublic static void insertToArrayListSorted(int triggerSlicesToAdd, ArrayList<Integer> triggerSlicesArrayList)
triggerSlicesToAdd
- triggerSlicesArrayList
- int ArrayList holding trigger times added so farCopyright © 2019. All rights reserved.