1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

update example configuration with latest introduction of IO formats, new hook functions and more

This commit is contained in:
Steffen Vogel 2017-08-31 09:31:57 +02:00
parent e7666be1ef
commit 5075794a70

View file

@ -37,34 +37,24 @@
nodes = {
udp_node = { # The dictionary is indexed by the name of the node.
type = "socket", # Type can be one of: socket, opal, file, gtfpga, ngsi
# Start the server without arguments for a list of supported node types.
type = "socket", # For a list of available node-types run: 'villas-node -h'
vectorize = 30, # Receive and sent 30 samples per message (combining).
samplelen = 10 # The maximum number of samples this node can receive
### The following settings are specific to the socket node-type!! ###
layer = "udp", # Layer can be one of:
# udp Send / receive UDP packets
# ip Send / receive IP packets
# eth Send / receive raw Ethernet frames (IEEE802.3)
# - udp Send / receive L4 UDP packets
# - ip Send / receive L3 IP packets
# - eth Send / receive L2 Ethernet frames (IEEE802.3)
header = "gtnet-skt:fake", # Header can be one of:
# default | villas Use VILLASnode protocol (see struct msg) (default)
# none | gtnet-skt Use no header, send raw data as used by RTDS GTNETv2-SKT
# fake | gtnet-skt:fake Same as 'none', but use first three data values as
# sequence, seconds & nanoseconds timestamp
# In this mode values are uint32_t not floats!
endian = "network", # Endianess of header and data:
# big | network Use big endianess. Also know as network byte order (default)
# little Use little endianess.
format = "gtnet-fake", # For a list of available node-types run: 'villas-node -h'
verify_source = true, # Check if source address of incoming packets matches the remote address.
local = "127.0.0.1:12001", # This node only received messages on this IP:Port pair
remote = "127.0.0.1:12000", # This node sents outgoing messages to this IP:Port pair
vectorize = 30, # Receive and sent 30 samples per message (combining).
netem = { # Network emulation settings
enabled = true,
# Those settings can be specified for each node invidually!
@ -108,32 +98,15 @@ nodes = {
### The following settings are specific to the file node-type!! ###
in = {
uri = "logs/input.log", # These options specify the path prefix where the the files are stored
mode = "r", # The mode in which files should be opened (see open(2))
uri = "logs/input.log", # These options specify the path prefix where the the files are stored
epoch_mode = "direct" # One of: direct (default), wait, relative, absolute
epoch = 10 # The interpretation of this value depends on epoch_mode (default is 0).
epoch_mode = "direct" # One of: direct (default), wait, relative, absolute
epoch = 10 # The interpretation of this value depends on epoch_mode (default is 0).
# Consult the documentation of a full explanation
rate = 2.0 # A constant rate at which the lines of the input files should be read
rate = 2.0 # A constant rate at which the lines of the input files should be read
# A missing or zero value will use the timestamp in the first column
# of the file to determine the pause between consecutive lines.
},
out = {
uri = "logs/output_%F_%T.log" # The output path accepts all format tokens of (see strftime(3))
mode = "a+" # You might want to use "a+" to append to a file
}
},
gtfpga_node = {
type = "gtfpga",
### The following settings are specific to the gtfpga node-type!! ###
slot = "01:00.0", # The PCIe slot location (see first column in 'lspci' output)
id = "1ab8:4005", # The PCIe vendor:device ID (see third column in 'lspci -n' output)
rate = 1
},
ngsi_node = {
type = "ngsi",
@ -156,7 +129,10 @@ nodes = {
websocket_node = {
type = "websocket",
destinations = [ "http://example.com/node-name1", "https://example.com/another-node" ]
destinations = [
"http://example.com/node-name1",
"https://example.com/another-node"
]
},
nanomsg_node = {
type = "nanomsg",
@ -175,7 +151,7 @@ nodes = {
zeromq_node = {
type = "zeromq",
pattern = "pubsub", # The ZeroMQ pattern. One of: 'pubsub', 'radiodish'
pattern = "pubsub", # The ZeroMQ pattern. One of pubsub, radiodish
ipv6 = false, # Enable IPv6 support
filter = "ab184", # A filter which is prefix matched
curve = { # Z85 encoded Curve25519 keys
@ -184,27 +160,44 @@ nodes = {
secret_key = "HPY.+mFuB[jGs@(zZr6$IZ1H1dZ7Ji*j>oi@O?Pc"
}
subscribe = "tcp://*:1234" # The subscribe endpoint. See http://api.zeromq.org/2-1:zmq-bind for details.
publish = [ # The publish endpoints. See http://api.zeromq.org/2-1:zmq-connect for details.
"tcp://localhost:1235",
subscribe = "tcp://*:1234" # The subscribe endpoint.
# See http://api.zeromq.org/2-1:zmq-bind for details.
publish = [ # The publish endpoints.
"tcp://localhost:1235", # See http://api.zeromq.org/2-1:zmq-connect for details.
"tcp://localhost:12444"
],
},
signal_node = {
type = "signal",
signal = "sine", # One of "sine", "square", "ramp", "triangle", "random", "mixed"
signal = "sine", # One of: sine, square, ramp, triangle, random, mixed, constant"
values = 4, # Number of values per sample
amplitude = 2.3, # Amplitude of generated signals
frequency = 10, # Frequency of generated signals
stddev = 2, # Standard deviation of random signals (normal distributed)
rate = 10.0, # Sample rate
offset = -4.5 # DC bias / Offset
},
loopback_node = {
type = "loopback", # A loopback node will receive exactly the same data which has been sent to it.
# The internal implementation is based on queue.
queuelen = 1024 # The queue length of the internal queue which buffers the samples.
samplelen = 64 # Each buffered sample can contain up to 64 values.
},
shmem_node = {
type = "shmem",
in_name = "sn1_in", # Name of shared memory segment for receiving side
out_name = "sn1_in", # Name of shared memory segment for sending side
queuelen = 1024, # Length of the queues
polling = true, # We can busy-wait or use pthread condition variables for synchronizations
# Execute an external process when starting the node which
# then starts the other side of this shared memory channel
# Usually we also pass the shmem names as parameters.
exec = [ "villas-shmem", "sn1_in", "sn1_out" ]
}
};
@ -222,15 +215,20 @@ paths = (
rate = 100, # Send message over this path with a fixed (constant) rate (default: 0).
# Setting this value to 0 will disable this feature.
queuelen = 128,
samplelen = 64
queuelen = 128
},
{
enabled = false,
reverse = false,
in = "opal_node", # There's only a single source node allowed!
out = [ "udp_node", "tcp_node" ], # Multiple destination nodes are supported too.
in = [ # Multiple source nodes are multiplexed
"opal_node.data[0-4]",
"signal_node.data[0-4]"
],
out = [ # Multiple destination nodes are supported too.
"udp_node", # All destination nodes receive the same sample
"zeromq_node" # Which gets constructed by the 'in' mapping.
]
},
{
in = "socket_node",
@ -273,6 +271,37 @@ paths = (
mode = "origin", # Shift origin timestam of samples by +10 seconds
offset = 10 # Seconds
},
{ # Remap values within a sample.
type = "map", # The values of the new samples are constructed
# from a concatenation of the following mapping entries.
map = [
"data[0]", # The first value of the original sample
"data[2-5]", # Values 3-6 of the original sample
"hdr.sequence", # The sequence no of the original sample
"hdr.length", # The number of values of the original sample
"hdr.id", # The id of the original sample
"hdr.format", # A bitmask of the format of each value
"ts.origin", # The timestamp as sent by the origin simulator
"ts.received", # The timestamp of the arrival time of the original sample
"ts.send", # The timestamp when this sample was sent (does not work)
# Statistics of the current path. Allowed stats are:
# owd One-way-delay (OWD) of received messages
# gap_sample Inter-message timestamps (as sent by remote)
# gap_received Inter-message arrival time (as seen by this instance)
# reordered Reordered samples and the distance between them
# skipped Skipped samples by hooks and the distance between them
# For each stats the following details are available:
"stats.owd.last", # The last ovserved value
"stats.owd.highest", # The highest observed value
"stats.owd.lowest", # The lowest observed value
"stats.owd.mean", # The average observed value
"stats.owd.var", # The variance of the observed value
"stats.owd.stddev", # The standard deviation of the observed value
"stats.owd.total" # The total number ob observed values
]
}
)
}