From 1c0510d28a16ad1885b5cf997bc6765d4585a66d Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Tue, 26 Mar 2019 07:47:45 +0100 Subject: [PATCH] cleanup syntax of example configs --- etc/eric-lab.conf | 39 ++++++++++++------------ etc/examples/global.conf | 16 +++++----- etc/gtnet-skt/emulate_gtnet.conf | 6 ++-- etc/gtnet-skt/test1.conf | 40 ++++++++++++------------- etc/gtnet-skt/test2.conf | 8 ++--- etc/gtnet-skt/test3.conf | 8 ++--- etc/gtnet-skt/test4.conf | 8 ++--- etc/gtnet-skt/test5.conf | 8 ++--- etc/gtnet-skt/test6_gtsync_compare.conf | 8 ++--- etc/labs/lab10_nodes.conf | 38 +++++++++++------------ etc/labs/lab12.conf | 1 - etc/loopback.conf | 40 ++++++++++++------------- etc/websocket-client.conf | 2 +- etc/websocket-demo.conf | 6 ++-- 14 files changed, 113 insertions(+), 115 deletions(-) diff --git a/etc/eric-lab.conf b/etc/eric-lab.conf index 2c43ae58d..829f73126 100644 --- a/etc/eric-lab.conf +++ b/etc/eric-lab.conf @@ -12,7 +12,7 @@ # Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC ## -stats = 3; # The interval in seconds to print path statistics. +stats = 3 # The interval in seconds to print path statistics. # A value of 0 disables the statistics. name = "villas-acs" # The name of this VILLASnode. Might by used by node-types @@ -20,16 +20,16 @@ name = "villas-acs" # The name of this VILLASnode. Might by used by node-typ log = { - level = 5; # The level of verbosity for debug messages + level = 5 # The level of verbosity for debug messages # Higher number => increased verbosity - faciltities = [ "path", "socket" ]; # The list of enabled debug faciltities. + faciltities = [ "path", "socket" ] # The list of enabled debug faciltities. # If omitted, all faciltities are enabled # For a full list of available faciltities, check lib/log.c -}; +} http = { - htdocs = "/villas/web/", # Root directory of internal webserver + htdocs = "/villas/web/" # Root directory of internal webserver port = 80 # Port for HTTP connections } @@ -37,44 +37,43 @@ http = { nodes = { ws = { - type = "websocket", - unit = "MVa", - units = [ "V", "A", "Var" ], - description = "Demo Channel", + type = "websocket" + unit = "MVa" + units = [ "V", "A", "Var" ] + description = "Demo Channel" series = ( { label = "Random walk" }, { label = "Sine" }, { label = "Rect" }, { label = "Ramp" } ) - }, + } socket1 = { - type = "socket", - layper = "udp", + type = "socket" + layper = "udp" in = { address = "*:12000" - }, + } out = { address = "127.0.0.1:12001" } - }, + } socket2 = { - type = "socket", - layer = "udp", + type = "socket" + layer = "udp" in = { address = "*:12001" - }, + } out = { address = "127.0.0.1:1200" } } -}; - +} ############ List of paths ############ paths = ( { in = "socket2", out = "ws" } -); +) diff --git a/etc/examples/global.conf b/etc/examples/global.conf index 6a1a0e8c6..d537d74b1 100644 --- a/etc/examples/global.conf +++ b/etc/examples/global.conf @@ -26,17 +26,17 @@ ############ Global Options ############ -affinity = 0x01; # Mask of cores the server should run on +affinity = 0x01 # Mask of cores the server should run on # This also maps the NIC interrupts to those cores! -#priority = 50; # Priority for the server tasks. +#priority = 50 # Priority for the server tasks. # Usually the server is using a real-time FIFO # scheduling algorithm # See: https://github.com/docker/docker/issues/22380 # on why we cant use real-time scheduling in Docker -stats = 3; # The interval in seconds to print path statistics. +stats = 3 # The interval in seconds to print path statistics. # A value of 0 disables the statistics. name = "villas-acs" # The name of this VILLASnode. Might by used by node-types @@ -44,17 +44,17 @@ name = "villas-acs" # The name of this VILLASnode. Might by used by node-typ logging = { - level = 5; # The level of verbosity for debug messages + level = 5 # The level of verbosity for debug messages # Higher number => increased verbosity - faciltities = [ "path", "socket" ]; # The list of enabled debug faciltities. + faciltities = [ "path", "socket" ] # The list of enabled debug faciltities. # If omitted, all faciltities are enabled # For a full list of available faciltities, check lib/log.c - file = "/var/log/villas-node.log"; # File for logs + file = "/var/log/villas-node.log" # File for logs - syslog = true; # Log to syslogd -}; + syslog = true # Log to syslogd +} http = { enabled = true, # Do not listen on port if true diff --git a/etc/gtnet-skt/emulate_gtnet.conf b/etc/gtnet-skt/emulate_gtnet.conf index 6a3762eac..0425f7806 100644 --- a/etc/gtnet-skt/emulate_gtnet.conf +++ b/etc/gtnet-skt/emulate_gtnet.conf @@ -24,8 +24,8 @@ * along with this program. If not, see . *********************************************************************************/ -stats = 1; -debug = 10; +stats = 1 +debug = 10 nodes = { node1 = { @@ -37,4 +37,4 @@ nodes = { endian = "big", # Can be 'little' or 'small'. If not provided (default), little endianness logic will be applied vectorize = 1, # Number of samples to fetch per iteration from the socket } -}; +} diff --git a/etc/gtnet-skt/test1.conf b/etc/gtnet-skt/test1.conf index e31da7e9c..9a4d82337 100644 --- a/etc/gtnet-skt/test1.conf +++ b/etc/gtnet-skt/test1.conf @@ -24,41 +24,41 @@ * along with this program. If not, see . *********************************************************************************/ -stats = 1; -debug = 10; +stats = 1 +debug = 10 nodes = { node1 = { - type = "socket", - layer = "udp", - local = "192.168.88.128:12002", # Local ip:port, use '*' for random port - remote = "192.168.88.129:12001", - header = "villas", # 'gtnet-skt' or 'villas'. If not provided, 'villas' header will be used - vectorize = 1, # Number of samples to fetch per iteration from the socket + type = "socket" + layer = "udp" + local = "192.168.88.128:12002" # Local ip:port, use '*' for random port + remote = "192.168.88.129:12001" + header = "villas" # 'gtnet-skt' or 'villas'. If not provided, 'villas' header will be used + vectorize = 1 # Number of samples to fetch per iteration from the socket netem = { - enabled = false, - delay = 1000000, # In micro seconds! - jitter = 300000, + enabled = false + delay = 1000000 # In micro seconds! + jitter = 300000 distribution = "normal" } }, node2 = { - type = "socket", - layer = "udp", - local = "*:12004", # Local ip:port, use '*' for random port - remote = "192.168.88.129:12005", - header = "villas", # 'gtnet-skt' or 'villas'. If not provided, 'villas' header will be used + type = "socket" + layer = "udp" + local = "*:12004" # Local ip:port, use '*' for random port + remote = "192.168.88.129:12005" + header = "villas" # 'gtnet-skt' or 'villas'. If not provided, 'villas' header will be used vectorize = 1 # Number of samples to fetch per iteration from the socket } -}; +} paths = ( { - in = "node1", # Name of the node we listen to (see above) - out = "node1", # And we loop back to the origin + in = "node1" # Name of the node we listen to (see above) + out = "node1" # And we loop back to the origin hooks = ( { type = "print", output = "stdout" } ) } -); +) diff --git a/etc/gtnet-skt/test2.conf b/etc/gtnet-skt/test2.conf index 295337476..9ea78f4fa 100644 --- a/etc/gtnet-skt/test2.conf +++ b/etc/gtnet-skt/test2.conf @@ -24,8 +24,8 @@ * along with this program. If not, see . *********************************************************************************/ -stats = 1; -debug = 10; +stats = 1 +debug = 10 nodes = { node1 = { @@ -50,7 +50,7 @@ nodes = { header = "villas", # 'gtnet-skt' or 'villas'. If not provided, 'villas' header will be used vectorize = 1 # Number of samples to fetch per iteration from the socket } -}; +} paths = ( { @@ -61,4 +61,4 @@ paths = ( { type = "print", output = "stdout" } ) } -); +) diff --git a/etc/gtnet-skt/test3.conf b/etc/gtnet-skt/test3.conf index b8ea59836..5352e23a0 100644 --- a/etc/gtnet-skt/test3.conf +++ b/etc/gtnet-skt/test3.conf @@ -24,8 +24,8 @@ * along with this program. If not, see . *********************************************************************************/ -stats = 1; -debug = 10; +stats = 1 +debug = 10 nodes = { node1 = { @@ -50,7 +50,7 @@ nodes = { header = "gtnet-skt", # 'gtnet-skt' or 'villas'. If not provided, 'villas' header will be used vectorize = 1 # Number of samples to fetch per iteration from the socket } -}; +} paths = ( { @@ -61,4 +61,4 @@ paths = ( { type = "print", output = "stdout" } ) } -); +) diff --git a/etc/gtnet-skt/test4.conf b/etc/gtnet-skt/test4.conf index 77425a624..a93c786cb 100644 --- a/etc/gtnet-skt/test4.conf +++ b/etc/gtnet-skt/test4.conf @@ -24,8 +24,8 @@ * along with this program. If not, see . *********************************************************************************/ -stats = 1; -debug = 10; +stats = 1 +debug = 10 nodes = { node1 = { @@ -50,7 +50,7 @@ nodes = { header = "gtnet-skt", # 'gtnet-skt' or 'villas'. If not provided, 'villas' header will be used vectorize = 1 # Number of samples to fetch per iteration from the socket } -}; +} paths = ( { @@ -61,4 +61,4 @@ paths = ( { type = "print", output = "stdout" } ) } -); +) diff --git a/etc/gtnet-skt/test5.conf b/etc/gtnet-skt/test5.conf index 3f4a802ca..a21a46ca2 100644 --- a/etc/gtnet-skt/test5.conf +++ b/etc/gtnet-skt/test5.conf @@ -24,8 +24,8 @@ * along with this program. If not, see . *********************************************************************************/ -stats = 1; -debug = 10; +stats = 1 +debug = 10 nodes = { node1 = { @@ -51,7 +51,7 @@ nodes = { header = "gtnet-skt", # 'gtnet-skt' or 'villas'. If not provided, 'villas' header will be used vectorize = 1 # Number of samples to fetch per iteration from the socket } -}; +} paths = ( { @@ -62,4 +62,4 @@ paths = ( { type = "print", output = "stdout" } ) } -); +) diff --git a/etc/gtnet-skt/test6_gtsync_compare.conf b/etc/gtnet-skt/test6_gtsync_compare.conf index 5887bb492..6b2c0a91d 100644 --- a/etc/gtnet-skt/test6_gtsync_compare.conf +++ b/etc/gtnet-skt/test6_gtsync_compare.conf @@ -25,8 +25,8 @@ # Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC ## -stats = 1; -debug = 10; +stats = 1 +debug = 10 nodes = { node1 = { @@ -53,7 +53,7 @@ nodes = { endian = "big", vectorize = 1 # Number of samples to fetch per iteration from the socket } -}; +} paths = ( { @@ -70,4 +70,4 @@ paths = ( { type = "print", output = "stdout" } ) } -); +) diff --git a/etc/labs/lab10_nodes.conf b/etc/labs/lab10_nodes.conf index c662f3fc0..d5eab8497 100644 --- a/etc/labs/lab10_nodes.conf +++ b/etc/labs/lab10_nodes.conf @@ -1,18 +1,18 @@ -stats = 5.0; -hugepages = 200; +stats = 5.0 +hugepages = 200 nodes = { # Node names can be any alphanumeric value rpi-1 = { - type = "socket"; - layer = "udp"; + type = "socket" + layer = "udp" format = "gtnet" # pre-built format to communicate in RTDS GTNET-SKT payload in = { address = "*:12005" # villas node machine IP and port number signals = { - count = 8, + count = 8 type = "float" } }, @@ -22,55 +22,55 @@ nodes = { hooks = ( { - type = "stats", + type = "stats" warmup = 3000 } ) }, rpi-2 = { - type = "socket"; - layer = "udp"; + type = "socket" + layer = "udp" format = "gtnet" # pre-built format to communicate in RTDS GTNET-SKT payload in = { address = "*:12006" # villas node machine IP and port number signals = { - count = 8, + count = 8 type = "float" } - }, + } out = { address = "192.168.0.6:12006" # remote machine IP and port number - }, + } hooks = ( { - type = "stats", + type = "stats" warmup = 3000 } ) }, rtds-1 = { - type = "socket"; - layer = "udp"; - format = "gtnet"; + type = "socket" + layer = "udp" + format = "gtnet" in = { address = "*:12083" # villas node machine IP and port number signals = { - count = 8, + count = 8 type = "float" } - }, + } out = { address = "192.168.0.4:12083" # remote machine IP and port number - }, + } hooks = ( { - type = "stats", + type = "stats" warmup = 3000 } ) diff --git a/etc/labs/lab12.conf b/etc/labs/lab12.conf index 5b513a052..05002211f 100644 --- a/etc/labs/lab12.conf +++ b/etc/labs/lab12.conf @@ -38,7 +38,6 @@ paths = ( { type = "decimate", ratio = 2 } ) }, - { in = [ "web_node1" ], out = [ "udp_node1" ] diff --git a/etc/loopback.conf b/etc/loopback.conf index 2d6aef20a..fd3d8762f 100644 --- a/etc/loopback.conf +++ b/etc/loopback.conf @@ -46,13 +46,13 @@ *********************************************************************************/ -stats = 1; -debug = 10; +stats = 1 +debug = 10 nodes = { node1 = { - type = "socket", - layer = "udp", + type = "socket" + layer = "udp" in = { address = "127.0.0.1:12000" # Local ip:port, use '*' for random port @@ -61,16 +61,16 @@ nodes = { address = "127.0.0.1:12001" netem = { - enabled = false, - delay = 1000000, # In micro seconds! - jitter = 300000, + enabled = false + delay = 1000000 # In micro seconds! + jitter = 300000 distribution = "normal" } } }, node2 = { - type = "socket", - layer = "udp", + type = "socket" + layer = "udp" in = { address = "127.0.0.1:12001" # Local ip:port, use '*' for random port } @@ -79,8 +79,8 @@ nodes = { } }, node3 = { - type = "socket", - layer = "udp", + type = "socket" + layer = "udp" in = { address = "127.0.0.1:12002" # Local ip:port, use '*' for random port } @@ -89,26 +89,26 @@ nodes = { } }, loopback = { - type = "socket", - layer = "udp", + type = "socket" + layer = "udp" in = { - address = "127.0.0.1:12003", # Local ip:port, use '*' for random port + address = "127.0.0.1:12003" # Local ip:port, use '*' for random port } out = { - address = "127.0.0.1:12003", + address = "127.0.0.1:12003" } } -}; +} paths = ( { - in = "node1", # Name of the node we listen to (see above) - out = "node2", # And we loop back to the origin + in = "node1" # Name of the node we listen to (see above) + out = "node2" # And we loop back to the origin hooks = ( { - type = "print"; + type = "print" } ) } -); +) diff --git a/etc/websocket-client.conf b/etc/websocket-client.conf index dcfcb38f0..b9039153e 100644 --- a/etc/websocket-client.conf +++ b/etc/websocket-client.conf @@ -36,4 +36,4 @@ nodes = { "http://localhost:8088/test_session" ] } -}; +} diff --git a/etc/websocket-demo.conf b/etc/websocket-demo.conf index 5deaa7290..f222355a2 100644 --- a/etc/websocket-demo.conf +++ b/etc/websocket-demo.conf @@ -24,7 +24,7 @@ * along with this program. If not, see . *********************************************************************************/ -stats = 1; +stats = 1 nodes = { sig = { @@ -79,7 +79,7 @@ nodes = { ) } } -}; +} ############ List of paths ############ @@ -92,4 +92,4 @@ paths = ( in = "ws_lo", out = "ws_lo" } -); +)