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/include/villas/nodes/iec61850_sv.hpp

110 lines
2.6 KiB
C++
Raw Normal View History

/** Node type: IEC 61850-9-2 (Sampled Values)
*
* @file
* @author Steffen Vogel <stvogel@eonerc.rwth-aachen.de>
2020-01-20 17:17:00 +01:00
* @copyright 2014-2020, 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 <cstdint>
2017-06-13 03:18:16 +02:00
#include <libiec61850/sv_publisher.h>
#include <libiec61850/sv_subscriber.h>
2017-06-13 03:18:16 +02:00
2018-03-28 14:15:08 +02:00
#include <villas/queue_signalled.h>
#include <villas/pool.h>
#include <villas/list.h>
#include <villas/nodes/iec61850.hpp>
2021-06-21 16:11:42 -04:00
/* Forward declarations */
struct vnode;
struct iec61850_sv {
2017-06-13 03:18:16 +02:00
char *interface;
int app_id;
struct ether_addr dst_address;
2017-06-13 03:18:16 +02:00
struct {
bool enabled;
2017-06-13 03:18:16 +02:00
SVSubscriber subscriber;
SVReceiver receiver;
struct queue_signalled queue;
struct pool pool;
2019-01-07 10:28:55 +01:00
struct vlist signals; /**< Mappings of type struct iec61850_type_descriptor */
int total_size;
} in;
2017-06-13 03:18:16 +02:00
struct {
bool enabled;
SVPublisher publisher;
SVPublisher_ASDU asdu;
char *svid;
int vlan_priority;
int vlan_id;
int smpmod;
int smprate;
int confrev;
2019-01-07 10:28:55 +01:00
struct vlist signals; /**< Mappings of type struct iec61850_type_descriptor */
int total_size;
} out;
};
/** @see node_type::type_stop */
int iec61850_sv_type_stop();
/** @see node_type::parse */
2020-08-25 21:00:52 +02:00
int iec61850_sv_parse(struct vnode *n, json_t *json);
/** @see node_type::print */
2020-08-25 21:00:52 +02:00
char * iec61850_sv_print(struct vnode *n);
/** @see node_type::start */
2020-08-25 21:00:52 +02:00
int iec61850_sv_start(struct vnode *n);
/** @see node_type::stop */
2020-08-25 21:00:52 +02:00
int iec61850_sv_stop(struct vnode *n);
/** @see node_type::destroy */
2020-08-25 21:00:52 +02:00
int iec61850_sv_destroy(struct vnode *n);
/** @see node_type::read */
2021-05-10 00:12:30 +02:00
int iec61850_sv_read(struct vnode *n, struct sample * const smps[], unsigned cnt);
/** @see node_type::write */
2021-05-10 00:12:30 +02:00
int iec61850_sv_write(struct vnode *n, struct sample * const smps[], unsigned cnt);
/** @see node_type::fd */
2020-08-25 21:00:52 +02:00
int iec61850_sv_fd(struct vnode *n);
/** @} */