1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00
VILLASnode/include/villas/nodes/nanomsg.hpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

57 lines
1.1 KiB
C++
Raw Permalink Normal View History

/* Node type: nanomsg.
2017-05-23 14:54:25 +02:00
*
2022-03-15 09:18:01 -04:00
* Author: Steffen Vogel <post@steffenvogel.de>
2022-03-15 09:28:57 -04:00
* SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University
2022-07-04 18:20:03 +02:00
* SPDX-License-Identifier: Apache-2.0
2017-05-23 14:54:25 +02:00
*/
#pragma once
2021-05-10 00:12:30 +02:00
#include <villas/format.hpp>
#include <villas/list.hpp>
2017-05-23 14:54:25 +02:00
namespace villas {
namespace node {
2021-06-21 16:11:42 -04:00
// Forward declarations
class NodeCompat;
2021-06-21 16:11:42 -04:00
// The maximum length of a packet which contains stuct msg.
#define NANOMSG_MAX_PACKET_LEN 1500
2017-05-23 14:54:25 +02:00
struct nanomsg {
struct {
int socket;
struct List endpoints;
} in, out;
Format *formatter;
2017-05-23 14:54:25 +02:00
};
char *nanomsg_print(NodeCompat *n);
int nanomsg_init(NodeCompat *n);
int nanomsg_destroy(NodeCompat *n);
int nanomsg_parse(NodeCompat *n, json_t *json);
int nanomsg_start(NodeCompat *n);
int nanomsg_stop(NodeCompat *n);
int nanomsg_type_stop();
2017-05-23 14:54:25 +02:00
int nanomsg_reverse(NodeCompat *n);
2017-05-23 14:54:25 +02:00
int nanomsg_poll_fds(NodeCompat *n, int fds[]);
2017-05-23 14:54:25 +02:00
int nanomsg_netem_fds(NodeCompat *n, int fds[]);
2017-05-23 14:54:25 +02:00
int nanomsg_read(NodeCompat *n, struct Sample *const smps[], unsigned cnt);
2017-05-23 14:54:25 +02:00
int nanomsg_write(NodeCompat *n, struct Sample *const smps[], unsigned cnt);
2017-05-23 14:54:25 +02:00
} // namespace node
} // namespace villas