/** Example configuration file for VILLASnode/comedi. * * 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 Daniel Krebs * @copyright 2018, 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 . *********************************************************************************/ nodes = { pcie6259 = { type = "comedi", device = "/dev/comedi0", in = { subdevice = 0, rate = 1000, signals = ( # note: order in this array defines order in villas sample { channel = 0, range = 0, aref = 0, name = "temperature_int" }, { channel = 1, range = 0, aref = 0, name = "loopback_ao0" }, { channel = 2, range = 0, aref = 0, name = "loopback_ao1" }, { channel = 3, range = 0, aref = 0, name = "bnc_ext" } ) }, out = { subdevice = 1, # Note: buffer size and rate shouldn't be changed at the moment # output sample rate rate = 40000, # comedi write buffer in kilobytes bufsize = 24, signals = ( # note: order in this array corresponds to order in villas sample { name = "ao0", channel = 0, range = 0, aref = 0 }, { name = "ao1", channel = 1, range = 0, aref = 0 }, { name = "ao2", channel = 2, range = 0, aref = 0 }, { name = "ao3", channel = 3, range = 0, aref = 0 } ) } }, remote = { type = "socket", layer = "udp" format = "protobuf", local = "*:12000" remote = "134.130.169.32:12000" }, sine1 = { type = "signal", signal = "sine", values = 1, frequency = 50, rate = 10000, }, sine2 = { type = "signal", signal = "sine", values = 1, frequency = 100, rate = 10000, } } paths = ( # 2-ch sine #{ in = ("sine1.data[0]", "sine2.data[0]"), out = "pcie6259", rate = 10000, mask = () } # Remote data via UDP { in = "remote.data[0-3]", out = "pcie6259", rate = 40000, mask = () } )