VILLASframework
Modular co-simulation framework
Cast signal values

The cast hook casts the data-type of signals and can set a new name and unit to the casted signal.

Implementation

The source code of the hook is available here: https://git.rwth-aachen.de/acs/public/villas/node/blob/master/lib/hooks/cast.cpp

Configuration

signal (integer or string: signal name or index)

new_type (string: "integer" | "float" | "boolean" | "complex" )

The the type of the casted signal.

new_name (string)

new_type (string: "integer" | "float" | "boolean" | "complex" )

Implementation

@include "hook-nodes.conf"
paths = (
{
in = "signal_node"
out = "file_node"
hooks = (
{
type = "cast"
signal = "random"
new_name = "int_random"
new_unit = "pts"
new_type = "integer"
}
)
}
)