1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-23 00:00:01 +01:00
VILLASnode/go/pkg/nodes/registry.go
Steffen Vogel 7eec1bb753 update Steffens mail address
Signed-off-by: Steffen Vogel <post@steffenvogel.de>
2022-12-16 23:44:07 +01:00

28 lines
659 B
Go

/** Node-type registry.
*
* @author Steffen Vogel <post@steffenvogel.de>
* @copyright 2014-2022, Institute for Automation of Complex Power Systems, EONERC
* @license Apache 2.0
*********************************************************************************/
package nodes
var goNodeTypes = map[string]NodeType{}
type NodeType struct {
Constructor NodeConstructor
Flags int
Description string
}
func RegisterNodeType(name string, desc string, ctor NodeConstructor, flags int) {
goNodeTypes[name] = NodeType{
Constructor: ctor,
Flags: flags,
Description: desc,
}
}
func NodeTypes() map[string]NodeType {
return goNodeTypes
}