VILLASframework
Modular co-simulation framework
Nodes

The node section is a directory of nodes (clients) which are connected to the VILLASnode instance. The directory is indexed by the name of the node

Example

nodes = {
"sintef_node" = {
type = "socket",
vectorize = 10,
hooks = (
{
type = "decimate",
ratio = 10
}
),
builtin = true,
samplelen = 64,
signals = (
{ name = "Va", unit = "Volts", type = "float", enabled = true },
{ name = "Vb", unit = "Volts", type = "float", enabled = true },
{ name = "Vc", unit = "Volts", type = "float", enabled = true },
)
# type specific settings follow here.
}
}

Configuration

There are different type of nodes available. But all types have the following settings in common:

type (string: "socket" | "fpga" | ...)

type specifies which interface should be used for this node.

For a complete list of supported node-types run villas node --help.

In addition to the node settings described in this section, every node type has its own specific settings. Take a look at the Node-types page for details.

out.netem (directory)

Some socket based node-types support network emulation.

For more details see Network Emulation . Please note that not all node-types support network emulation.

in.vectorize (integer) = 1

This setting allows to send multiple samples in a single message to the destination nodes.

The value of this setting determines how many samples will be combined into one packet.

in.hooks (list of objects: hooks)

A list of hook functions which will be executed for each sample which is processed by this path.

See Hook-types chapter of this documentation for details.

builtin (boolean) = true

By default, each node and paths has a couple of default hooks attached to them. With this setting the attachment of built-in hooks can be disabled.

in.signals (list of objects: signals) = "64f"

Each node should define a list of signals which it receives.

There are three ways to specify the input signals of a node:

List (recommended)

The list mode allows you to specify properties of each signal individually by providing a list of signal definitions:

nodes = {
test_node = {
in = {
signals = (
{ name = "signal1", type = "float" },
{ name = "signal2", type = "integer" }
)
}
}
}

Each signal is described by the following settings:

in.signals[].name (string) = "signal_#"

A name which describes the signal.

in.signals[].unit (string) = undefined

The unit of the signal. E.g. V, A, Rad.

in.signals[].type (string: "float" | "integer" | "boolean" | "complex" | "auto") = auto

The data-type of the signal.

in.signals[].init (float | integer | boolean | complex)

The initial value of the signal.

in.signals[].enabled (boolean) = true

Signals can be disabled which causes them to be ignored.

Format string

The easiest way to specify the signals, is by using a format string. The format string consists of one ore more characters which define the type for the signal corresponding to the position of the character in the string.

Character Type Setting for full and list mode
f Floating point "float"
b Boolean "boolean"
i Integer "integer"
c Complex Floating point "complex"

Optionally, the characters can be prefixed by an integer for easier repitition.

The following signal definition defines 15 signals, of which the first 12 are floating point and the last 3 are integer values.

nodes = {
test_node = {
in = {
signals = "12f3i"
}
}
}

Simple

The simple way just specifies the number of signals and their type:

nodes = {
test_node = {
in = {
signals = {
count = 12
type = "float"
}
}
}
}