mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-23 00:00:01 +01:00
60 lines
1.3 KiB
Text
60 lines
1.3 KiB
Text
# This is an example for a minimal loopback configuration.
|
|
#
|
|
# All messages will be sent back to the origin using UDP packets.
|
|
#
|
|
# You can use this configuration in conjunction with the 'send', 'receive' and 'random'
|
|
# utilities as shown below (run all three steps in parallel).
|
|
#
|
|
# 0. Overview:
|
|
#
|
|
# ./random --PIPE--> ./send --UDP--> ./server --UDP--> ./receive
|
|
#
|
|
# 1. Start server:
|
|
#
|
|
# $ ./server etc/loopback.conf
|
|
#
|
|
# 2. Send random data to server:
|
|
#
|
|
# $ ./random 4 10 | ./send etc/loopback.conf node1 -r
|
|
#
|
|
# 3. Receive data from server:
|
|
#
|
|
# $ ./receive etc/loopback.conf node2 -r
|
|
#
|
|
# Author: Steffen Vogel <stvogel@eonerc.rwth-aachen.de>
|
|
# Copyright: 2015, Institute for Automation of Complex Power Systems, EONERC
|
|
##
|
|
|
|
stats = 1;
|
|
debug = 10;
|
|
|
|
nodes = {
|
|
node1 = {
|
|
type = "socket",
|
|
layer = "udp",
|
|
local = "*:12000", # Local ip:port, use '*' for random port
|
|
remote = "127.0.0.1:12001",
|
|
combine = 5,
|
|
netem = {
|
|
enabled = false,
|
|
delay = 1000000,
|
|
jitter = 300000,
|
|
distribution = "normal"
|
|
}
|
|
},
|
|
node2 = {
|
|
type = "socket",
|
|
layer = "udp",
|
|
local = "*:12002", # Local ip:port, use '*' for random port
|
|
remote = "127.0.0.1:12003"
|
|
combine = 30
|
|
}
|
|
};
|
|
|
|
paths = (
|
|
{
|
|
in = "node1", # Name of the node we listen to (see above)
|
|
out = "node2", # And we loop back to the origin
|
|
hook = ["decimate", "print"]
|
|
}
|
|
);
|