======= Base =======
Provides basic functions like file I/O, standard output and FlowEvent handling.

------- Multiplier -------
Multiply by a factor

Inputs:
factor      Factor to multiply with
number      Number to multiply

Outputs:
product     Obvious, surely?


------- Counter -------
Counter for arbitrary inputs

Inputs:
skip        Only output every Xth count.
step        Anything to be counted
value       Number to start counting from

Outputs:
count       Value of the counter


------- Stepper -------
Driver module for modules that don't drive themselves

Inputs:
interval    Wait between steps in s
steps       How many steps

Outputs:
step        Empty signals to nudge other modules


------- Gaussian -------
A normal distributed random number generator

Inputs:
mean        Position of the Gaussian
sigma       Width of the Gaussian
step        Input from Stepper

Outputs:
data        Random Gauss-distributed numbers


------- Multiplex -------
"Funnel" several outputs to the same input

Inputs:
inputs      Inputs to create

Outputs:
out         Serialized signals


------- Vectorize -------
Produce a vector from several numbers or strings

Inputs:
inputs      Inputs to create

Outputs:
out         Vector of data


------- WriteToFile -------
Write data to a file (like Display plus redirection of STDOUT, but more selective)

Inputs:
data        To be written
filename    Default: FlowDefault.dat
prefix      e.g "Interesting number: "
suffix      e.g "n"


------- ReadFromFile -------
Read data from file

Inputs:
filename    Path to file to be read
listfile    Path to list of files

Outputs:
data        The contents of the file as string


------- TextServer -------
TCP/IP server for distributing the input string to connected clients

Inputs:
data        To be sent to clients
port        TCP/IP port to listen on
prefix      e.g. "Interesting number: "
suffix      e.g. "n"


------- SystemPipe -------
Runs a command and pipes strings from and to it

Inputs:
command     The system command to be called
string      String to be forwarded to the command

Outputs:
string      String output of the command


------- Notify -------
Send a predefined message to STDOUT and/or call shell command on incoming trigger

Inputs:
command     Shell command to be executed (if supported, prepend '+' to get
            message AND command)
message     Message to be displayed (automatically followed by line break)
options     Display options (if supported by STDOUT device, letters rgb for
            text colour, RGB for background colour, X for bold, Y for blinking;
            also accepts ANSI SGR commands)
trigger     Send message to STDOUT


------- Display -------
Plugin to display data to STDOUT (i.e. terminal)

Inputs:
data        To be displayed
prefix      e.g "Interesting number: "
suffix      e.g "n"


------- FlowEventValue -------
Extract data from Flow events

Inputs:
fevent      Flow event to take apart
property    Select property

Outputs:
output      out


------- FlowEventBuilder -------
Generate FlowEvent by formulas

Inputs:
inputs      Inputs to create

Outputs:
FlowEvent   Output of the newly created flow event.


------- SignalAnalyzer -------
Analyze a pulse, given as a vector of shorts, for several key features

Inputs:
flowEvent   FlowEvent to be histo'd
inverse     set to "1" for negative signals
max_len     Search maximum up to this x
ped_len     Average pedestal from x=0 to this x
signal      Signal to be analyzed (ushortV)

Outputs:
fevent      Enriched FlowEvent


------- FEventRecorder -------
Write data to a file (like Display plus redirection of STDOUT, but more selective)

Inputs:
Properties  FlowProperties to save (empty for all)
close       C
fevent      To be written
filename    Default: FlowDefault.fevent
maxSize     Cap filesize at (MB)


------- FEventReader -------
Write data to a file (like Display plus redirection of STDOUT, but more selective)

Inputs:
fevent      Alternative flow event, generated by FlowEventGenerator.
filename    Default: FlowDefault.fevent
interval    Wait between steps in s
steps       How many events to read

Outputs:
FlowEvent   Output of the read FlowEvents.
eof         End-of-file: number of events read.


------- FEventReader_old -------
Write data to a file (like Display plus redirection of STDOUT, but more selective)

Inputs:
fevent      Alternative flow event, generated by FlowEventGenerator.
filename    Default: FlowDefault.fevent
interval    Wait between steps in s
steps       How many events to read

Outputs:
FlowEvent   Output of the read FlowEvents.
eof         End-of-file: number of events read.


------- FEToString -------
Converts a FlowEvent to a string, using the format as given in the "format" input

Inputs:
fevent      The Flow Event
format      no description

Outputs:
string      The resulting string


------- StringToFE -------
Inputs:
fevent      no description
properties  no description
regex       no description
string      no description

Outputs:
fevent      The Flow Event, enriched by the matched properties


------- FEGate -------
Lets through FlowEvents that satisfy condition, does not break up FlowEvents

Inputs:
cut         Cut string (e.g. 'bla > 7', 'bla = 1 3 6', 'bla s< 3') spaces are
            needed.
fevent      FlowEvent to be analysed

Outputs:
fail        FlowEvent failing cut.
pass        FlowEvent satisfying cut.


------- SignalDump -------
Dump pulses, given as a vector of shorts, to separate ASCII files

Inputs:
filename    Filename prefix. Will be extended by <number>.dat
flowEvent   FlowEvent to be read
num_dumps   Number of incoming signals to dump before stopping writing
select      Select by FlowProperty, e.g. 'Channel 17'
signal      Signal to be analyzed (ushortV)


