mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
add example configurations for hooks
This commit is contained in:
parent
0928b24ead
commit
0d7b7123b6
18 changed files with 278 additions and 33 deletions
17
etc/examples/hooks/average.conf
Normal file
17
etc/examples/hooks/average.conf
Normal file
|
@ -0,0 +1,17 @@
|
|||
@include "../nodes/signal_generator.conf"
|
||||
|
||||
paths = (
|
||||
{
|
||||
in = "signal_node"
|
||||
out = "signal_node"
|
||||
|
||||
hooks = (
|
||||
{
|
||||
type = "average"
|
||||
|
||||
signals = [ "sine", "square" ]
|
||||
offset = 0
|
||||
}
|
||||
)
|
||||
}
|
||||
)
|
20
etc/examples/hooks/cast.conf
Normal file
20
etc/examples/hooks/cast.conf
Normal file
|
@ -0,0 +1,20 @@
|
|||
@include "../nodes/signal_generator.conf"
|
||||
|
||||
paths = (
|
||||
{
|
||||
in = "signal_node"
|
||||
out = "signal_node"
|
||||
|
||||
hooks = (
|
||||
{
|
||||
type = "average"
|
||||
|
||||
signal = "random"
|
||||
|
||||
new_name = "int_random"
|
||||
new_unit = "pts"
|
||||
new_type = "integer"
|
||||
}
|
||||
)
|
||||
}
|
||||
)
|
16
etc/examples/hooks/decimate.conf
Normal file
16
etc/examples/hooks/decimate.conf
Normal file
|
@ -0,0 +1,16 @@
|
|||
@include "../nodes/signal_generator.conf"
|
||||
|
||||
paths = (
|
||||
{
|
||||
in = "signal_node"
|
||||
out = "signal_node"
|
||||
|
||||
hooks = (
|
||||
{
|
||||
type = "decimate"
|
||||
|
||||
ratio = 10
|
||||
}
|
||||
)
|
||||
}
|
||||
)
|
24
etc/examples/hooks/dp.conf
Normal file
24
etc/examples/hooks/dp.conf
Normal file
|
@ -0,0 +1,24 @@
|
|||
@include "../nodes/signal_generator.conf"
|
||||
|
||||
paths = (
|
||||
{
|
||||
in = "signal_node"
|
||||
out = "signal_node"
|
||||
|
||||
hooks = (
|
||||
{
|
||||
type = "dp"
|
||||
|
||||
signal = "sine"
|
||||
f0 = 50 # Hz
|
||||
dt = 0.1 # seconds
|
||||
|
||||
# Alternative to dt
|
||||
# rate = 10 Hz
|
||||
|
||||
harmonics = [ 0, 1, 3, 5, 7 ]
|
||||
inverse = false
|
||||
}
|
||||
)
|
||||
}
|
||||
)
|
14
etc/examples/hooks/dump.conf
Normal file
14
etc/examples/hooks/dump.conf
Normal file
|
@ -0,0 +1,14 @@
|
|||
@include "../nodes/signal_generator.conf"
|
||||
|
||||
paths = (
|
||||
{
|
||||
in = "signal_node"
|
||||
out = "signal_node"
|
||||
|
||||
hooks = (
|
||||
{
|
||||
type = "dump"
|
||||
}
|
||||
)
|
||||
}
|
||||
)
|
14
etc/examples/hooks/ebm.conf
Normal file
14
etc/examples/hooks/ebm.conf
Normal file
|
@ -0,0 +1,14 @@
|
|||
@include "../nodes/signal_generator.conf"
|
||||
|
||||
paths = (
|
||||
{
|
||||
in = "signal_node"
|
||||
out = "signal_node"
|
||||
|
||||
hooks = (
|
||||
{
|
||||
type = "ebm"
|
||||
}
|
||||
)
|
||||
}
|
||||
)
|
14
etc/examples/hooks/fix.conf
Normal file
14
etc/examples/hooks/fix.conf
Normal file
|
@ -0,0 +1,14 @@
|
|||
@include "../nodes/signal_generator.conf"
|
||||
|
||||
paths = (
|
||||
{
|
||||
in = "signal_node"
|
||||
out = "signal_node"
|
||||
|
||||
hooks = (
|
||||
{
|
||||
type = "fix"
|
||||
}
|
||||
)
|
||||
}
|
||||
)
|
14
etc/examples/hooks/jitter_calc.conf
Normal file
14
etc/examples/hooks/jitter_calc.conf
Normal file
|
@ -0,0 +1,14 @@
|
|||
@include "../nodes/signal_generator.conf"
|
||||
|
||||
paths = (
|
||||
{
|
||||
in = "signal_node"
|
||||
out = "signal_node"
|
||||
|
||||
hooks = (
|
||||
{
|
||||
type = "jitter_calc"
|
||||
}
|
||||
)
|
||||
}
|
||||
)
|
16
etc/examples/hooks/limit_rate.conf
Normal file
16
etc/examples/hooks/limit_rate.conf
Normal file
|
@ -0,0 +1,16 @@
|
|||
@include "../nodes/signal_generator.conf"
|
||||
|
||||
paths = (
|
||||
{
|
||||
in = "signal_node"
|
||||
out = "signal_node"
|
||||
|
||||
hooks = (
|
||||
{
|
||||
type = "limit_rate"
|
||||
|
||||
rate = 5.5
|
||||
}
|
||||
)
|
||||
}
|
||||
)
|
18
etc/examples/hooks/print.conf
Normal file
18
etc/examples/hooks/print.conf
Normal file
|
@ -0,0 +1,18 @@
|
|||
@include "../nodes/signal_generator.conf"
|
||||
|
||||
paths = (
|
||||
{
|
||||
in = "signal_node"
|
||||
out = "signal_node"
|
||||
|
||||
hooks = (
|
||||
{
|
||||
type = "print",
|
||||
|
||||
output = "print_output_file.log"
|
||||
format = "villas.human"
|
||||
prefix = "[file_node] "
|
||||
}
|
||||
)
|
||||
}
|
||||
)
|
14
etc/examples/hooks/restart.conf
Normal file
14
etc/examples/hooks/restart.conf
Normal file
|
@ -0,0 +1,14 @@
|
|||
@include "../nodes/signal_generator.conf"
|
||||
|
||||
paths = (
|
||||
{
|
||||
in = "signal_node"
|
||||
out = "signal_node"
|
||||
|
||||
hooks = (
|
||||
{
|
||||
type = "restart"
|
||||
}
|
||||
)
|
||||
}
|
||||
)
|
17
etc/examples/hooks/scale.conf
Normal file
17
etc/examples/hooks/scale.conf
Normal file
|
@ -0,0 +1,17 @@
|
|||
@include "../nodes/signal_generator.conf"
|
||||
|
||||
paths = (
|
||||
{
|
||||
in = "signal_node"
|
||||
out = "signal_node"
|
||||
|
||||
hooks = (
|
||||
{
|
||||
type = "scale"
|
||||
|
||||
scale = 5.5
|
||||
offset = 1.2
|
||||
}
|
||||
)
|
||||
}
|
||||
)
|
16
etc/examples/hooks/shift_seq.conf
Normal file
16
etc/examples/hooks/shift_seq.conf
Normal file
|
@ -0,0 +1,16 @@
|
|||
@include "../nodes/signal_generator.conf"
|
||||
|
||||
paths = (
|
||||
{
|
||||
in = "signal_node"
|
||||
out = "signal_node"
|
||||
|
||||
hooks = (
|
||||
{
|
||||
type = "shift_seq"
|
||||
|
||||
offset = 10
|
||||
}
|
||||
)
|
||||
}
|
||||
)
|
16
etc/examples/hooks/shift_ts.conf
Normal file
16
etc/examples/hooks/shift_ts.conf
Normal file
|
@ -0,0 +1,16 @@
|
|||
@include "../nodes/signal_generator.conf"
|
||||
|
||||
paths = (
|
||||
{
|
||||
in = "signal_node"
|
||||
out = "signal_node"
|
||||
|
||||
hooks = (
|
||||
{
|
||||
type = "shift_ts"
|
||||
|
||||
rate = 5.5
|
||||
}
|
||||
)
|
||||
}
|
||||
)
|
17
etc/examples/hooks/skip_first.conf
Normal file
17
etc/examples/hooks/skip_first.conf
Normal file
|
@ -0,0 +1,17 @@
|
|||
@include "../nodes/signal_generator.conf"
|
||||
|
||||
paths = (
|
||||
{
|
||||
in = "signal_node"
|
||||
out = "signal_node"
|
||||
|
||||
hooks = (
|
||||
{
|
||||
type = "skip_first"
|
||||
|
||||
seconds = 10
|
||||
# sequence = 10
|
||||
}
|
||||
)
|
||||
}
|
||||
)
|
17
etc/examples/hooks/stats.conf
Normal file
17
etc/examples/hooks/stats.conf
Normal file
|
@ -0,0 +1,17 @@
|
|||
@include "../nodes/signal_generator.conf"
|
||||
|
||||
paths = (
|
||||
{
|
||||
in = "signal_node"
|
||||
out = "signal_node"
|
||||
|
||||
hooks = (
|
||||
{
|
||||
type = "stats"
|
||||
|
||||
verbose = true
|
||||
warmup = 100
|
||||
}
|
||||
)
|
||||
}
|
||||
)
|
14
etc/examples/hooks/ts.conf
Normal file
14
etc/examples/hooks/ts.conf
Normal file
|
@ -0,0 +1,14 @@
|
|||
@include "../nodes/signal_generator.conf"
|
||||
|
||||
paths = (
|
||||
{
|
||||
in = "signal_node"
|
||||
out = "signal_node"
|
||||
|
||||
hooks = (
|
||||
{
|
||||
type = "ts"
|
||||
}
|
||||
)
|
||||
}
|
||||
)
|
|
@ -34,38 +34,5 @@ paths = (
|
|||
|
||||
builtin = false, # By default, all paths will have a few builtin hooks attached to them.
|
||||
# When collecting statistics or measurements these are undesired.
|
||||
|
||||
# A complete list of supported hooks
|
||||
|
||||
hooks = (
|
||||
{
|
||||
type = "print"
|
||||
|
||||
output = "stdout"
|
||||
priority = 0
|
||||
},
|
||||
{
|
||||
type = "ts"
|
||||
|
||||
priority = 1
|
||||
},
|
||||
{
|
||||
type = "decimate"
|
||||
|
||||
ratio = 2 # Only forward every 2nd message
|
||||
},
|
||||
{
|
||||
type = "skip_first"
|
||||
|
||||
seconds = 10 # Skip the first 10 seconds of this path
|
||||
# samples = 1000 # Skip the first 1000 samples
|
||||
},
|
||||
{
|
||||
type = "shift"
|
||||
|
||||
mode = "origin", # Shift origin timestam of samples by +10 seconds
|
||||
offset = 10 # Seconds
|
||||
}
|
||||
)
|
||||
}
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue