From 8c9348cfc010f9214ab9129a6cc203c1aef1b974 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Tue, 5 Sep 2017 10:03:21 +0200 Subject: [PATCH] updated websocket example configs --- etc/websocket-demo.conf | 42 ++++++++++++++++------- etc/websocket-loopback.conf | 37 --------------------- etc/websocket-stats.conf | 40 ---------------------- etc/websocket.conf | 66 ------------------------------------- 4 files changed, 30 insertions(+), 155 deletions(-) delete mode 100644 etc/websocket-loopback.conf delete mode 100644 etc/websocket-stats.conf delete mode 100644 etc/websocket.conf diff --git a/etc/websocket-demo.conf b/etc/websocket-demo.conf index 00ce038fe..5cd902fd0 100644 --- a/etc/websocket-demo.conf +++ b/etc/websocket-demo.conf @@ -26,27 +26,49 @@ stats = 1; +logging = { + level = 15 +} + nodes = { sig_1 = { type = "signal", signal = "mixed", - values = 4, - rate = 50 + values = 6, + rate = 50, + hooks = ( + { type = "stats" } + ) }, ws_1 = { type = "websocket", description = "Demo Channel", - vectorize = 50, - source = { - simulator = "OP5600", - location = "ACS lab" - }, series = ( { label = "Random walk", unit = "V" }, { label = "Sine", unit = "A" }, { label = "Rect", unit = "Var"}, { label = "Ramp", unit = "°C" } + ), + hooks = ( + { type = "stats" } + ) + }, + stats_1 = { + type = "stats", + node = "sig_1", + rate = 20, + + series = ( + { label = "Sent [#msgs]" }, + { label = "Received [#msgs]" }, + { label = "Invalid [#msgs]" }, + { label = "Skipped [#msgs]" }, + { label = "Dropped [#msgs]" }, + { label = "Overruns [#msgs]" }, + { label = "One-way delay [sec]" }, + { label = "Send rate [samples/sec]" }, + { label = "Receive rate [samples/sec]" } ) } }; @@ -56,10 +78,6 @@ nodes = { paths = ( { in = "sig_1", - out = "ws_1", - reverse = false - hooks = ( - { type = "stats" } - ) + out = "ws_1" } ); diff --git a/etc/websocket-loopback.conf b/etc/websocket-loopback.conf deleted file mode 100644 index ee08d513d..000000000 --- a/etc/websocket-loopback.conf +++ /dev/null @@ -1,37 +0,0 @@ -# Example configuration file for VILLASnode -# -# 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: 2016, Institute for Automation of Complex Power Systems, EONERC -## - - -name = "villas-acs" # The name of this VILLASnode. Might by used by node-types - # to identify themselves (default is the hostname). - - -log = { - level = 16; - facilities = "all" -}; - -http = { - htdocs = "/villas/web/", # Root directory of internal webserver - port = 80 # Port for HTTP connections -} - -############ Dictionary of nodes ############ - -nodes = { - ws1 = { - type = "websocket", - description = "Loopback node 1", - } -}; \ No newline at end of file diff --git a/etc/websocket-stats.conf b/etc/websocket-stats.conf deleted file mode 100644 index 3afd48353..000000000 --- a/etc/websocket-stats.conf +++ /dev/null @@ -1,40 +0,0 @@ -/** This should be included to all websocket node configurations which report - * path stats by the 'stats_send' hook. - * - * Have a look at etc/websockets.conf for an example. - * - * 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 2017, Institute for Automation of Complex Power Systems, EONERC - * @license GNU General Public License (version 3) - * - * VILLASnode - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - *********************************************************************************/ - -series = ( - { label = "Sent [#msgs]" }, - { label = "Received [#msgs]" }, - { label = "Invalid [#msgs]" }, - { label = "Skipped [#msgs]" }, - { label = "Dropped [#msgs]" }, - { label = "Overruns [#msgs]" }, - { label = "One-way delay [sec]" }, - { label = "Send rate [samples/sec]" }, - { label = "Receive rate [samples/sec]" } -) \ No newline at end of file diff --git a/etc/websocket.conf b/etc/websocket.conf deleted file mode 100644 index a87510eca..000000000 --- a/etc/websocket.conf +++ /dev/null @@ -1,66 +0,0 @@ -/** Example configuration file for VILLASnode. - * - * 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 2017, Institute for Automation of Complex Power Systems, EONERC - * @license GNU General Public License (version 3) - * - * VILLASnode - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - *********************************************************************************/ - -# Some global settings are used by multiple configuration files -# and therefore defined in separate files -@include "global.conf" -@include "plugins.conf" - -############ Dictionary of nodes ############ - -nodes = { - ws = { - type = "websocket", - description = "Demo Channel", - #vectorize = 10, - source = { - simulator = "OP5600", - location = "ACS lab" - }, - series = ( - { label = "Random walk", unit = "V" }, - { label = "Sine", unit = "A" }, - { label = "Rect", unit = "Var"}, - { label = "Ramp", unit = "°C" } - ) - }, - sig = { - type = "signal", - - signal = "sine", - values = 1, - frequency = 50, - - rate = 800 - }, -}; - - -############ List of paths ############ - -paths = ( - { in = "sig", out = "ws" } -);