From 90cb5392cd7f6f623529d62988bc4afdde011820 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Fri, 5 Feb 2016 12:12:02 +0100 Subject: Change EDI configuration for multi-output --- src/dabOutput/dabOutput.h | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) (limited to 'src/dabOutput') diff --git a/src/dabOutput/dabOutput.h b/src/dabOutput/dabOutput.h index b2100ab..2c4d1ef 100644 --- a/src/dabOutput/dabOutput.h +++ b/src/dabOutput/dabOutput.h @@ -35,6 +35,8 @@ #include "string.h" #include #include +#include +#include #ifdef _WIN32 # include # ifdef __MINGW32__ @@ -53,23 +55,31 @@ # include "zmq.hpp" #endif -// Configuration for EDI output +/** Configuration for EDI output */ + +// Can represent both unicast and multicast destinations +struct edi_destination_t { + std::string dest_addr; + std::string source_addr; + unsigned int source_port; + unsigned int ttl; + + std::shared_ptr socket; +}; + struct edi_configuration_t { edi_configuration_t() : - enabled(false), verbose(false) {} unsigned chunk_len; // RSk, data length of each chunk unsigned fec; // number of fragments that can be recovered - bool enabled; - bool dump; + bool dump; // dump a file with the EDI packets bool verbose; - bool enable_pft; - std::string dest_addr; - std::string source_addr; - unsigned int source_port; - unsigned int dest_port; - unsigned int ttl; + bool enable_pft; // Enable protection and fragmentation unsigned int tagpacket_alignment; + std::vector destinations; + unsigned int dest_port; // common destination port, because it's encoded in the transport layer + + bool enabled() { return destinations.size() > 0; } }; -- cgit v1.2.3