2015-05-07 10:38:05 +02:00
|
|
|
# Example configuration file for the S2SS server
|
|
|
|
#
|
|
|
|
# This example includes all valid configuration options for the server.
|
|
|
|
# Please note, that using all options at the same time does not really
|
|
|
|
# makes sense. The purpose of this example is to serve as a reference.
|
|
|
|
#
|
|
|
|
# The syntax of this file is similar to JSON.
|
|
|
|
# A detailed description of the format can be found here:
|
|
|
|
# http://www.hyperrealm.com/libconfig/libconfig_manual.html#Configuration-Files
|
|
|
|
#
|
|
|
|
# Author: Steffen Vogel <stvogel@eonerc.rwth-aachen.de>
|
|
|
|
# Copyright: 2015, Institute for Automation of Complex Power Systems, EONERC
|
|
|
|
##
|
2014-06-05 09:34:32 +00:00
|
|
|
|
2015-05-07 10:38:05 +02:00
|
|
|
############ Global Options ############
|
|
|
|
|
|
|
|
affinity = 0x02; # Mask of cores the server should run on
|
|
|
|
# This also maps the NIC interrupts to those cores!
|
|
|
|
|
|
|
|
priority = 50; # Priority for the server tasks.
|
|
|
|
# Usually the server is using a real-time FIFO
|
|
|
|
# scheduling algorithm
|
|
|
|
|
|
|
|
debug = 5; # The level of verbosity for debug messages
|
|
|
|
# Higher number => increased verbosity
|
|
|
|
|
|
|
|
stats = 3; # The interval in seconds to print path statistics.
|
|
|
|
# A value of 0 disables the statistics.
|
|
|
|
|
|
|
|
|
|
|
|
############ Dictionary of nodes ############
|
2014-06-05 09:34:32 +00:00
|
|
|
|
2014-06-05 09:34:59 +00:00
|
|
|
nodes = {
|
2015-05-07 10:38:05 +02:00
|
|
|
udp_node = { # The dictionary is indexed by the name of the node.
|
2015-09-22 15:58:39 +02:00
|
|
|
type = "socket", # Type can be one of: socket, opal, file, gtfpga, ngsi
|
|
|
|
# Start the server without arguments for a list of supported node types.
|
2015-08-07 01:24:19 +02:00
|
|
|
|
|
|
|
### The following settings are specific to the socket node-type!! ###
|
2015-09-22 15:58:39 +02:00
|
|
|
|
2015-08-07 01:24:19 +02:00
|
|
|
layer = "udp" # Layer can be one of:
|
2015-05-07 10:38:05 +02:00
|
|
|
# udp Send / recv UDP packets
|
|
|
|
# ip Send / recv IP packets
|
2015-08-07 01:24:19 +02:00
|
|
|
# eth Send / recv raw Ethernet frames (IEEE802.3)
|
|
|
|
|
2015-05-07 10:38:05 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
combine = 30 # Receive and sent 30 samples per message (multiplexing).
|
2014-06-05 09:34:59 +00:00
|
|
|
},
|
2015-08-07 01:24:19 +02:00
|
|
|
ethernet_node = {
|
|
|
|
type = "socket", # See above.
|
|
|
|
|
|
|
|
### The following settings are specific to the socket node-type!! ###
|
2015-09-22 15:58:39 +02:00
|
|
|
|
2015-08-07 01:24:19 +02:00
|
|
|
layer = "eth",
|
2015-05-07 10:38:05 +02:00
|
|
|
local = "*:12002", # It's possible to use an '*' for both the port and address
|
|
|
|
# in UDP / TCP and IP modes.
|
|
|
|
# This will choose a random port.
|
|
|
|
# And listen on all available interfaces.
|
2015-08-07 01:24:19 +02:00
|
|
|
remote = "12:34:56:78:90:12003", # Currently IPv6 is not supported!
|
2015-05-07 10:38:05 +02:00
|
|
|
|
|
|
|
netem = { # Network emulation settings
|
|
|
|
# Those settings can be specified for each node invidually!
|
|
|
|
delay = 100000, # Additional latency in microseconds
|
|
|
|
jitter = 30000, # Jitter in uS
|
|
|
|
distribution = "normal", # Distribution of delay: uniform, normal, pareto, paretonormal
|
|
|
|
loss = 10 # Packet loss in percent
|
|
|
|
duplicate = 10, # Duplication in percent
|
|
|
|
corrupt = 10 # Corruption in percent
|
2014-06-25 01:53:48 +00:00
|
|
|
}
|
2015-05-07 10:38:05 +02:00
|
|
|
},
|
|
|
|
opal_node = { # The server can be started as an Asynchronous process
|
|
|
|
type = "opal", # from within an OPAL-RT model.
|
2015-08-07 01:24:19 +02:00
|
|
|
|
|
|
|
### The following settings are specific to the opal node-type!! ###
|
2015-09-22 15:58:39 +02:00
|
|
|
|
2015-05-07 10:38:05 +02:00
|
|
|
send_id = 1, # It's possible to have multiple send / recv Icons per model
|
|
|
|
recv_id = 1, # Specify the ID here.
|
|
|
|
reply = true
|
|
|
|
},
|
|
|
|
file_node = {
|
|
|
|
type = "file",
|
2015-08-07 01:24:19 +02:00
|
|
|
|
|
|
|
### The following settings are specific to the file node-type!! ###
|
2015-09-22 15:58:39 +02:00
|
|
|
|
2015-05-19 16:56:08 +02:00
|
|
|
mode = "w+", # The mode in which files should be opened (see open(2))
|
|
|
|
# You might want to use "a+" to append to a file
|
|
|
|
|
|
|
|
in = "logs/file_input.log", # These options specify the path prefix where the the files are stored
|
|
|
|
out = "logs/file_output_%F_%T.log" # The output path accepts all format tokens of (see strftime(3))
|
2015-08-09 23:52:44 +02:00
|
|
|
|
2015-10-09 13:08:39 +02:00
|
|
|
epoch_mode = "direct" # One of:
|
|
|
|
# direct (default)
|
|
|
|
# wait
|
2015-08-09 23:52:44 +02:00
|
|
|
# relative
|
|
|
|
# absolute
|
|
|
|
|
|
|
|
epoch = 10 # The interpretation of this value depends on epoch_mode (default is 0):
|
|
|
|
# - epoch_mode = now: The first value is read at: _now_ + epoch seconds.
|
|
|
|
# - epoch_mode = relative: The first value is read at _start_ + `epoch` seconds.
|
|
|
|
# - epoch_mode = absolute: The first value is read at epoch seconds after 1970-01-01 00:00:00.
|
2015-05-19 16:56:08 +02:00
|
|
|
|
2015-08-09 23:52:44 +02:00
|
|
|
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.
|
2015-05-07 10:38:05 +02:00
|
|
|
},
|
|
|
|
gtfpga_node = {
|
2015-05-07 13:04:06 +02:00
|
|
|
type = "gtfpga",
|
2015-08-07 01:24:19 +02:00
|
|
|
|
|
|
|
### The following settings are specific to the gtfpga node-type!! ###
|
2015-09-22 15:58:39 +02:00
|
|
|
|
2015-05-07 13:04:06 +02:00
|
|
|
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)
|
2015-05-07 10:38:05 +02:00
|
|
|
|
2015-05-07 13:04:06 +02:00
|
|
|
rate = 1
|
2015-09-19 18:54:27 +02:00
|
|
|
},
|
|
|
|
ngsi_node = {
|
|
|
|
type = "ngsi",
|
|
|
|
|
2015-09-22 15:58:39 +02:00
|
|
|
### The following settings are specific to the ngsi node-type!! ###
|
|
|
|
|
|
|
|
endpoint = "http://46.101.131.212:1026",# The HTTP REST API endpoint of the FIRWARE context broker
|
|
|
|
timeout = 5, # Timeout of HTTP request in seconds (default is 1)
|
|
|
|
structure = "children", # Structure of published context (default is "flat")
|
|
|
|
verify_ssl = false, # Verification of SSL server certificates (default is true)
|
|
|
|
|
|
|
|
mapping = [ # Example mapping for structure = flat
|
|
|
|
"rtds_sub1(V2).v2(float)", # Format: "entityId(entityType).AttributeName(AttributeType)"
|
|
|
|
"rtds_sub2(power).p1(float)"
|
2015-09-19 18:54:27 +02:00
|
|
|
]
|
2015-09-22 15:58:39 +02:00
|
|
|
# mapping = [ # Alternative mapping for structure = children
|
|
|
|
# "fa846ed3-5871-11e5-b0cd-ecf4bb16fe0c(GridSectionDataValue).value(float)", # Index #0
|
|
|
|
# "1d2c63e4-6130-11e5-9b0d-001c42f23160(GridSectionDataValue).value(float)" # Index #1
|
|
|
|
# .... # Index #n
|
|
|
|
# (every line correspondents to one value)
|
|
|
|
#]
|
2014-06-05 09:34:32 +00:00
|
|
|
}
|
2014-06-05 09:34:59 +00:00
|
|
|
};
|
2014-06-05 09:34:32 +00:00
|
|
|
|
2015-05-07 10:38:05 +02:00
|
|
|
|
|
|
|
############ List of paths ############
|
|
|
|
|
2014-06-05 09:34:32 +00:00
|
|
|
paths = (
|
|
|
|
{
|
2015-05-19 16:56:19 +02:00
|
|
|
enabled = true, # Enable this path (default: true)
|
|
|
|
reverse = true, # Setup a path in the reverse direction as well (default: false)
|
2015-05-07 10:38:05 +02:00
|
|
|
|
2015-05-19 16:56:19 +02:00
|
|
|
in = "acs", # Name of the node we receive messages from (see node dictionary)
|
|
|
|
out = "sintef", # Name of the node we send messages to.
|
2015-05-07 10:38:05 +02:00
|
|
|
|
2015-05-19 16:56:19 +02:00
|
|
|
rate = 100, # Send message over this path with a fixed (constant) rate (default: 0).
|
|
|
|
# Setting this value to 0 will disable this feature.
|
2015-05-07 10:38:05 +02:00
|
|
|
|
2015-05-19 16:56:19 +02:00
|
|
|
hook = "print", # Register custom hook funktion (see src/hooks.c)
|
2015-05-07 10:38:05 +02:00
|
|
|
|
2015-05-19 16:56:19 +02:00
|
|
|
poolsize = 30 # The amount of samples which are kept in a circular buffer.
|
|
|
|
# This number must be larger than the 'combine' settings of all
|
|
|
|
# associated input and output nodes!
|
2015-05-07 10:38:05 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
enabled = false,
|
|
|
|
reverse = false,
|
|
|
|
|
2015-05-19 16:56:19 +02:00
|
|
|
in = "opal_node", # There's only a single source node allowed!
|
|
|
|
out = [ "udp_node", "tcp_node" ], # Multiple destination nodes are supported too.
|
2015-05-07 10:38:05 +02:00
|
|
|
|
2015-10-11 10:20:12 +02:00
|
|
|
hook = [ "print", "decimate:10" ] # Same is true for hooks.
|
2015-05-19 16:56:19 +02:00
|
|
|
# Multipe hook functions are executed in the order they are specified here.
|
2014-06-05 09:34:32 +00:00
|
|
|
}
|
|
|
|
);
|