From df35768d06509b14d5d119188900d4ff995b1b0b Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Sun, 31 Mar 2019 22:13:25 +0200 Subject: [PATCH] update hook example configs to pass test-config test --- etc/examples/hooks/average.conf | 4 ++-- etc/examples/hooks/cast.conf | 6 ++--- etc/examples/hooks/decimate.conf | 4 ++-- etc/examples/hooks/dp.conf | 4 ++-- etc/examples/hooks/dump.conf | 4 ++-- etc/examples/hooks/ebm.conf | 4 ++-- etc/examples/hooks/fix.conf | 14 ------------ etc/examples/hooks/hook-nodes.conf | 15 +++++++++++++ etc/examples/hooks/jitter_calc.conf | 4 ++-- etc/examples/hooks/limit_rate.conf | 4 ++-- etc/examples/hooks/print.conf | 4 ++-- etc/examples/hooks/restart.conf | 14 ------------ etc/examples/hooks/scale.conf | 5 +++-- etc/examples/hooks/shift_seq.conf | 4 ++-- etc/examples/hooks/shift_ts.conf | 7 +++--- etc/examples/hooks/skip_first.conf | 4 ++-- etc/examples/hooks/stats.conf | 34 ++++++++++++++++++----------- etc/examples/hooks/ts.conf | 4 ++-- 18 files changed, 68 insertions(+), 71 deletions(-) delete mode 100644 etc/examples/hooks/fix.conf create mode 100644 etc/examples/hooks/hook-nodes.conf delete mode 100644 etc/examples/hooks/restart.conf diff --git a/etc/examples/hooks/average.conf b/etc/examples/hooks/average.conf index fef760325..5b8c94bef 100644 --- a/etc/examples/hooks/average.conf +++ b/etc/examples/hooks/average.conf @@ -1,9 +1,9 @@ -@include "../nodes/signal_generator.conf" +@include "hook-nodes.conf" paths = ( { in = "signal_node" - out = "signal_node" + out = "file_node" hooks = ( { diff --git a/etc/examples/hooks/cast.conf b/etc/examples/hooks/cast.conf index 6ad55a62c..e9602d3f3 100644 --- a/etc/examples/hooks/cast.conf +++ b/etc/examples/hooks/cast.conf @@ -1,13 +1,13 @@ -@include "../nodes/signal_generator.conf" +@include "hook-nodes.conf" paths = ( { in = "signal_node" - out = "signal_node" + out = "file_node" hooks = ( { - type = "average" + type = "cast" signal = "random" diff --git a/etc/examples/hooks/decimate.conf b/etc/examples/hooks/decimate.conf index aae8c69d9..0ea5031d0 100644 --- a/etc/examples/hooks/decimate.conf +++ b/etc/examples/hooks/decimate.conf @@ -1,9 +1,9 @@ -@include "../nodes/signal_generator.conf" +@include "hook-nodes.conf" paths = ( { in = "signal_node" - out = "signal_node" + out = "file_node" hooks = ( { diff --git a/etc/examples/hooks/dp.conf b/etc/examples/hooks/dp.conf index 42df7d0bf..a98b0acad 100644 --- a/etc/examples/hooks/dp.conf +++ b/etc/examples/hooks/dp.conf @@ -1,9 +1,9 @@ -@include "../nodes/signal_generator.conf" +@include "hook-nodes.conf" paths = ( { in = "signal_node" - out = "signal_node" + out = "file_node" hooks = ( { diff --git a/etc/examples/hooks/dump.conf b/etc/examples/hooks/dump.conf index 1aa1a03a9..a88f93c85 100644 --- a/etc/examples/hooks/dump.conf +++ b/etc/examples/hooks/dump.conf @@ -1,9 +1,9 @@ -@include "../nodes/signal_generator.conf" +@include "hook-nodes.conf" paths = ( { in = "signal_node" - out = "signal_node" + out = "file_node" hooks = ( { diff --git a/etc/examples/hooks/ebm.conf b/etc/examples/hooks/ebm.conf index bf2c2efb8..6c268dfea 100644 --- a/etc/examples/hooks/ebm.conf +++ b/etc/examples/hooks/ebm.conf @@ -1,9 +1,9 @@ -@include "../nodes/signal_generator.conf" +@include "hook-nodes.conf" paths = ( { in = "signal_node" - out = "signal_node" + out = "file_node" hooks = ( { diff --git a/etc/examples/hooks/fix.conf b/etc/examples/hooks/fix.conf deleted file mode 100644 index f357b7a92..000000000 --- a/etc/examples/hooks/fix.conf +++ /dev/null @@ -1,14 +0,0 @@ -@include "../nodes/signal_generator.conf" - -paths = ( - { - in = "signal_node" - out = "signal_node" - - hooks = ( - { - type = "fix" - } - ) - } -) diff --git a/etc/examples/hooks/hook-nodes.conf b/etc/examples/hooks/hook-nodes.conf new file mode 100644 index 000000000..54b2bba70 --- /dev/null +++ b/etc/examples/hooks/hook-nodes.conf @@ -0,0 +1,15 @@ +# This files just contains some simple nodes +# which are used to demonstrate the functionalities +# of different hooks + +nodes = { + signal_node = { + type = "signal" + values = 5 + signal = "mixed" + } + file_node = { + type = "file" + uri = "hook_output.log" + } +} diff --git a/etc/examples/hooks/jitter_calc.conf b/etc/examples/hooks/jitter_calc.conf index 2ff49f622..242451fc6 100644 --- a/etc/examples/hooks/jitter_calc.conf +++ b/etc/examples/hooks/jitter_calc.conf @@ -1,9 +1,9 @@ -@include "../nodes/signal_generator.conf" +@include "hook-nodes.conf" paths = ( { in = "signal_node" - out = "signal_node" + out = "file_node" hooks = ( { diff --git a/etc/examples/hooks/limit_rate.conf b/etc/examples/hooks/limit_rate.conf index 9eb2f0759..97381ead2 100644 --- a/etc/examples/hooks/limit_rate.conf +++ b/etc/examples/hooks/limit_rate.conf @@ -1,9 +1,9 @@ -@include "../nodes/signal_generator.conf" +@include "hook-nodes.conf" paths = ( { in = "signal_node" - out = "signal_node" + out = "file_node" hooks = ( { diff --git a/etc/examples/hooks/print.conf b/etc/examples/hooks/print.conf index 220e7ad16..a056e6785 100644 --- a/etc/examples/hooks/print.conf +++ b/etc/examples/hooks/print.conf @@ -1,9 +1,9 @@ -@include "../nodes/signal_generator.conf" +@include "hook-nodes.conf" paths = ( { in = "signal_node" - out = "signal_node" + out = "file_node" hooks = ( { diff --git a/etc/examples/hooks/restart.conf b/etc/examples/hooks/restart.conf deleted file mode 100644 index 7293a0601..000000000 --- a/etc/examples/hooks/restart.conf +++ /dev/null @@ -1,14 +0,0 @@ -@include "../nodes/signal_generator.conf" - -paths = ( - { - in = "signal_node" - out = "signal_node" - - hooks = ( - { - type = "restart" - } - ) - } -) diff --git a/etc/examples/hooks/scale.conf b/etc/examples/hooks/scale.conf index 73ead75fb..68508707b 100644 --- a/etc/examples/hooks/scale.conf +++ b/etc/examples/hooks/scale.conf @@ -1,14 +1,15 @@ -@include "../nodes/signal_generator.conf" +@include "hook-nodes.conf" paths = ( { in = "signal_node" - out = "signal_node" + out = "file_node" hooks = ( { type = "scale" + signal = "sine" scale = 5.5 offset = 1.2 } diff --git a/etc/examples/hooks/shift_seq.conf b/etc/examples/hooks/shift_seq.conf index 6cec96ba2..cd9aeed26 100644 --- a/etc/examples/hooks/shift_seq.conf +++ b/etc/examples/hooks/shift_seq.conf @@ -1,9 +1,9 @@ -@include "../nodes/signal_generator.conf" +@include "hook-nodes.conf" paths = ( { in = "signal_node" - out = "signal_node" + out = "file_node" hooks = ( { diff --git a/etc/examples/hooks/shift_ts.conf b/etc/examples/hooks/shift_ts.conf index 3ad73e760..90d47dad2 100644 --- a/etc/examples/hooks/shift_ts.conf +++ b/etc/examples/hooks/shift_ts.conf @@ -1,15 +1,16 @@ -@include "../nodes/signal_generator.conf" +@include "hook-nodes.conf" paths = ( { in = "signal_node" - out = "signal_node" + out = "file_node" hooks = ( { type = "shift_ts" - rate = 5.5 + mode = "origin" + offset = 5.5 } ) } diff --git a/etc/examples/hooks/skip_first.conf b/etc/examples/hooks/skip_first.conf index 2cffb84e2..01527656b 100644 --- a/etc/examples/hooks/skip_first.conf +++ b/etc/examples/hooks/skip_first.conf @@ -1,9 +1,9 @@ -@include "../nodes/signal_generator.conf" +@include "hook-nodes.conf" paths = ( { in = "signal_node" - out = "signal_node" + out = "file_node" hooks = ( { diff --git a/etc/examples/hooks/stats.conf b/etc/examples/hooks/stats.conf index e437b3f8d..fab47328a 100644 --- a/etc/examples/hooks/stats.conf +++ b/etc/examples/hooks/stats.conf @@ -1,17 +1,25 @@ -@include "../nodes/signal_generator.conf" +nodes = { + udp_node = { + type = "socket" -paths = ( - { - in = "signal_node" - out = "signal_node" + in = { + address = "*:12000" - hooks = ( - { - type = "stats" + hooks = ( + { + type = "stats" - verbose = true - warmup = 100 - } - ) + verbose = true + warmup = 100 + buckets = 25 + + output = "stats.log" + format = "json" + } + ) + } + out = { + address = "127.0.0.1:12000" + } } -) +} diff --git a/etc/examples/hooks/ts.conf b/etc/examples/hooks/ts.conf index 540c20995..204a39cfc 100644 --- a/etc/examples/hooks/ts.conf +++ b/etc/examples/hooks/ts.conf @@ -1,9 +1,9 @@ -@include "../nodes/signal_generator.conf" +@include "hook-nodes.conf" paths = ( { in = "signal_node" - out = "signal_node" + out = "file_node" hooks = ( {