mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
iec61850: added skeleton for Sampled Values node-type
This commit is contained in:
parent
e586e2d229
commit
2c74761ee1
2 changed files with 146 additions and 0 deletions
41
include/villas/nodes/iec61850_sv.h
Normal file
41
include/villas/nodes/iec61850_sv.h
Normal file
|
@ -0,0 +1,41 @@
|
|||
/** Node type: IEC 61850-9-2 (Sampled Values)
|
||||
*
|
||||
* @file
|
||||
* @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/>.
|
||||
*********************************************************************************/
|
||||
|
||||
/**
|
||||
* @addtogroup iec61850_sv IEC 61850-9-2 (Sampled Values) node type
|
||||
* @ingroup node
|
||||
* @{
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "node.h"
|
||||
#include "list.h"
|
||||
|
||||
struct iec61850_sv {
|
||||
|
||||
};
|
||||
|
||||
/** @} */
|
105
lib/nodes/iec61850_sv.c
Normal file
105
lib/nodes/iec61850_sv.c
Normal file
|
@ -0,0 +1,105 @@
|
|||
/** Node type: IEC 61850-9-2 (Sampled Values)
|
||||
*
|
||||
* @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/>.
|
||||
*********************************************************************************/
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "plugin.h"
|
||||
#include "nodes/iec61850_sv.h"
|
||||
#include "utils.h"
|
||||
#include "msg.h"
|
||||
|
||||
int iec61850_sv_reverse(struct node *n)
|
||||
{
|
||||
struct iec61850_sv *i __attribute__((unused)) = n->_vd;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int iec61850_sv_parse(struct node *n, config_setting_t *cfg)
|
||||
{
|
||||
struct iec61850_sv *i __attribute__((unused)) = n->_vd;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
char * iec61850_sv_print(struct node *n)
|
||||
{
|
||||
char *buf = NULL;
|
||||
struct iec61850_sv *i __attribute__((unused)) = n->_vd;
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
int iec61850_sv_start(struct node *n)
|
||||
{
|
||||
struct iec61850_sv *i __attribute__((unused)) = n->_vd;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int iec61850_sv_stop(struct node *n)
|
||||
{
|
||||
struct iec61850_sv *i __attribute__((unused)) = n->_vd;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int iec61850_sv_deinit()
|
||||
{
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int iec61850_sv_read(struct node *n, struct sample *smps[], unsigned cnt)
|
||||
{
|
||||
struct iec61850_sv *i __attribute__((unused)) = n->_vd;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int iec61850_sv_write(struct node *n, struct sample *smps[], unsigned cnt)
|
||||
{
|
||||
struct iec61850_sv *i __attribute__((unused)) = n->_vd;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct plugin p = {
|
||||
.name = "iec61850-9-2",
|
||||
.description = "IEC 61850-9-2 (Sampled Values)",
|
||||
.type = PLUGIN_TYPE_NODE,
|
||||
.node = {
|
||||
.vectorize = 0,
|
||||
.size = sizeof(struct iec61850_sv),
|
||||
.reverse = iec61850_sv_reverse,
|
||||
.parse = iec61850_sv_parse,
|
||||
.print = iec61850_sv_print,
|
||||
.start = iec61850_sv_start,
|
||||
.stop = iec61850_sv_stop,
|
||||
.deinit = iec61850_sv_deinit,
|
||||
.read = iec61850_sv_read,
|
||||
.write = iec61850_sv_write,
|
||||
.instances = LIST_INIT()
|
||||
}
|
||||
};
|
||||
|
||||
REGISTER_PLUGIN(&p)
|
Loading…
Add table
Reference in a new issue