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

84 lines
1.7 KiB
C++
Raw Normal View History

/** Node type: IEC 61850-9-2 (Sampled Values)
*
* @file
* @author Steffen Vogel <post@steffenvogel.de>
2022-03-15 09:28:57 -04:00
* @copyright 2014-2022, Institute for Automation of Complex Power Systems, EONERC
2022-07-04 18:20:03 +02:00
* @license Apache 2.0
*********************************************************************************/
#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.hpp>
#include <villas/list.hpp>
#include <villas/nodes/iec61850.hpp>
namespace villas {
namespace node {
2021-06-21 16:11:42 -04:00
/* Forward declarations */
class NodeCompat;
2021-06-21 16:11:42 -04:00
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 CQueueSignalled queue;
struct Pool pool;
struct List 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;
struct List signals; /**< Mappings of type struct iec61850_type_descriptor */
int total_size;
} out;
};
int iec61850_sv_type_stop();
int iec61850_sv_parse(NodeCompat *n, json_t *json);
char * iec61850_sv_print(NodeCompat *n);
int iec61850_sv_start(NodeCompat *n);
int iec61850_sv_stop(NodeCompat *n);
int iec61850_sv_destroy(NodeCompat *n);
int iec61850_sv_read(NodeCompat *n, struct Sample * const smps[], unsigned cnt);
int iec61850_sv_write(NodeCompat *n, struct Sample * const smps[], unsigned cnt);
int iec61850_sv_poll_fds(NodeCompat *n, int fds[]);
} // namespace node
} // namespace villas