diff --git a/server/etc/example.conf b/server/etc/example.conf index b7e1a64c3..30738dfe2 100644 --- a/server/etc/example.conf +++ b/server/etc/example.conf @@ -1,40 +1,114 @@ -# Example configuration file for the s2ss server +# 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 +# Copyright: 2015, Institute for Automation of Complex Power Systems, EONERC +## -affinity = 0x02; # Mask of cores the server should run on -priority = 50; # Scheduler priority for the server -debug = 5; # The level of verbosity for debug messages -stats = 3; # The interval in seconds fo path statistics +############ 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 ############ nodes = { - acs = { - type = "udp", # server, workstation, opal, rtds or dsp - local = "127.0.0.1:12001", # Local ip:port, use '*' for random port - remote = "127.0.0.1:12000" + udp_node = { # The dictionary is indexed by the name of the node. + type = "udp", # Type can be one of: + # udp Send / recv UDP packets + # tcp Send / recv TCP packets + # ip Send / recv IP packets + # ieee802.3 Send / recv raw Ethernet frames + # opal Read / write via libOpalAsyncApi + # gtfpga Read / write to memory mapped PCIe card + + 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). }, - sintef = { - type = "udp", - local = "127.0.0.1:12002", - remote = "127.0.0.1:12003", + tcp_node = { + type = "tcp", # See above. + 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. + remote = "127.0.0.1:12003", # Currently IPv6 is not supported! - # Network emulation for single nodes - netem = { - delay = 100000, # Additional latency in uS - jitter = 30000, # Jitter in uS - distribution = "normal",# Distribution of delay (uniform, normal, pareto, paretonormal) - loss = 10 # Loss in percentage - duplicate = 10, # Duplication in percent - corrupt = 10 # Corruption in percent + 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 } + }, + opal_node = { # The server can be started as an Asynchronous process + type = "opal", # from within an OPAL-RT model. + 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", + mode = "w+", + in = "./" # These options specify the path prefix where the the files are stored + out = "" + }, + gtfpga_node = { + } }; + +############ List of paths ############ + paths = ( { - enabled = true, # Enable this path - reverse = true, # Setup a path in the reverse direction too - in = "acs", # Name of the node we listen to (see above) - out = "sintef", # Name of the node we send to - rate = 100, # Send message over this path with a fixed (equalized) rate - hook = "print" # Register custom hook funktion (see src/hooks.c) + enabled = true, # Enable this path (default: true) + reverse = true, # Setup a path in the reverse direction as well (default: false) + + in = "acs", # Name of the node we receive messages from (see node dictionary) + out = "sintef", # Name of the node we send messages to. + + rate = 100, # Send message over this path with a fixed (constant) rate (default: 0). + # Setting this value to 0 will disable this feature. + + hook = "print", # Register custom hook funktion (see src/hooks.c) + + 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! + }, + { + 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. + + hook = [ "print", "decimate" ] # Same is true for hooks. + # Multipe hook functions are executed in the order they are specified here. } ); diff --git a/server/etc/loopback.conf b/server/etc/loopback.conf index 30eece1e0..bf7e77927 100644 --- a/server/etc/loopback.conf +++ b/server/etc/loopback.conf @@ -1,6 +1,6 @@ -# This is an example for a minimal configuration +# This is an example for a minimal loopback configuration. # -# All messages will be sent back to the origin. +# 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). @@ -21,6 +21,8 @@ # # $ ./receive etc/loopback.conf node2 -r # +# Author: Steffen Vogel +# Copyright: 2015, Institute for Automation of Complex Power Systems, EONERC ## stats = 1; diff --git a/server/etc/opal-shmem.conf b/server/etc/opal-shmem.conf deleted file mode 100644 index aa816dc0b..000000000 --- a/server/etc/opal-shmem.conf +++ /dev/null @@ -1,28 +0,0 @@ -# Example configuration file for the s2ss server - -affinity = 0x01; # Mask of cores the server should run on -priority = 99; # Scheduler priority for the server -debug = 5; # The level of verbosity for debug messages -stats = 1; # The interval in seconds for path statistics - -nodes = { - opal = { - type = "opal"; - send_id = 1; - recv_id = 1; - }, - acs-s2ss = { - type = "udp"; - local = "*:12000"; - remote = "134.130.169.31:12000"; - } -}; - -paths = ( - { - in = "opal"; - out = "acs-s2ss"; - reverse = true; - hook = "print"; - } -); diff --git a/server/etc/opal-test.conf b/server/etc/opal-test.conf deleted file mode 100644 index 49972f400..000000000 --- a/server/etc/opal-test.conf +++ /dev/null @@ -1,20 +0,0 @@ -# This is an example for a minimal configuration -# -# All messages will be sent back to the origin. - -affinity = 0xc0; -priority = 50; - -nodes = { - opal = { - local = "*:12000", # Local ip:port, use '*' for random port - remote = "10.10.10.2:12001" - } -}; - -paths = ( - { - in = "opal", # Name of the node we listen to (see above) - out = "opal" # And we loop back to the origin - } -); diff --git a/server/etc/rtds-test.conf b/server/etc/rtds-test.conf deleted file mode 100644 index e599b9290..000000000 --- a/server/etc/rtds-test.conf +++ /dev/null @@ -1,20 +0,0 @@ -# This is an example for a minimal configuration -# -# All messages will be sent back to the origin. - -affinity = 0xc0; -priority = 50; - -nodes = { - rtds = { - local = "*:12000", # Local ip:port, use '*' for random port - remote = "10.10.11.2:12000" - } -}; - -paths = ( - { - in = "rtds", # Name of the node we listen to (see above) - out = "rtds", # And we loop back to the origin - } -);