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

use new signal node-type to simplify demo setup

This commit is contained in:
Steffen Vogel 2017-07-08 14:57:52 +02:00
parent 4edaa958e3
commit 5252d07e9e
2 changed files with 61 additions and 16 deletions

View file

@ -61,22 +61,7 @@ services:
node:
image: villas/node:latest
privileged: true
command: node /etc/villas/node/websocket.conf
expose:
- "12000/udp"
ports:
- "8081:80/tcp"
volumes:
- "./etc/node/:/etc/villas/node/"
networks:
villas:
# Generate random data and send it via UDP to the 'node' service
signal:
image: villas/node:latest
privileged: true
entrypoint: bash
command: -c 'villas signal mixed -v4 | villas pipe -x /etc/villas/node/websocket.conf udp_1'
command: node /etc/villas/node/websocket-demo.conf
volumes:
- "./etc/node/:/etc/villas/node/"
networks:

View file

@ -0,0 +1,60 @@
/** 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 <stvogel@eonerc.rwth-aachen.de>
* @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 <http://www.gnu.org/licenses/>.
*********************************************************************************/
nodes = {
sig_1 = {
type = "signal",
signal = "mixed",
values = 4,
rate = 25
},
ws_1 = {
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" }
)
}
};
############ List of paths ############
paths = (
{
in = "sig_1",
out = "ws_1",
reverse = false
}
);