From b0cc2ed0adbe3b54f3bd4ec004fb89bd21cc8602 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Sun, 14 May 2017 10:40:47 +0200 Subject: [PATCH] updated loopback configuration example --- etc/loopback.conf | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/etc/loopback.conf b/etc/loopback.conf index 5cf8db653..c99ffdc7f 100644 --- a/etc/loopback.conf +++ b/etc/loopback.conf @@ -7,19 +7,19 @@ * * 0. Overview: * - * ./signal --PIPE--> ./pipe --UDP--> ./node --UDP--> ./pipe + * villas signal --PIPE--> ./pipe --UDP--> ./node --UDP--> ./pipe * * 1. Start server: * - * $ ./node etc/loopback.conf + * $ villas node etc/loopback.conf * * 2. Send random data to server: * - * $ ./signal random -r 10 -v 4 | ./pipe etc/loopback.conf node1 + * $ villas signal random -r 10 -v 4 | villas pipe etc/loopback.conf node1 * * 3. Receive data from server: * - * $ ./pipe etc/loopback.conf node2 + * $ villas pipe etc/loopback.conf node2 * * The syntax of this file is similar to JSON. * A detailed description of the format can be found here: @@ -45,6 +45,7 @@ * along with this program. If not, see . *********************************************************************************/ + stats = 1; debug = 10; @@ -54,22 +55,30 @@ nodes = { layer = "udp", local = "*:12000", # Local ip:port, use '*' for random port remote = "127.0.0.1:12001", - header = "villas", # 'gtnet-skt' or 'villas'. If not provided, 'villas' header will be used netem = { enabled = false, delay = 1000000, # In micro seconds! jitter = 300000, distribution = "normal" } - vectorize = 1 # Number of samples to fetch per iteration from the socket }, node2 = { type = "socket", layer = "udp", local = "*:12001", # Local ip:port, use '*' for random port remote = "127.0.0.1:12002", - 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 + }, + node3 = { + type = "socket", + layer = "udp", + local = "*:12002", # Local ip:port, use '*' for random port + remote = "127.0.0.1:12000", + }, + loopback = { + type = "socket", + layer = "udp", + local = "*:12003", # Local ip:port, use '*' for random port + remote = "127.0.0.1:12003", } }; @@ -77,5 +86,11 @@ paths = ( { in = "node1", # Name of the node we listen to (see above) out = "node2", # And we loop back to the origin + + hooks = ( + { + type = "print"; + } + ) } );