summaryrefslogtreecommitdiffstats
path: root/src/dabOutput
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2016-02-05 12:12:02 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2016-02-05 12:12:02 +0100
commit90cb5392cd7f6f623529d62988bc4afdde011820 (patch)
tree6f2d4b57c64d6f2023e92913aaa179d0eadc3e92 /src/dabOutput
parentc21be14dd5cb7b8aa338c3eecd87fc996e1f5430 (diff)
downloaddabmux-90cb5392cd7f6f623529d62988bc4afdde011820.tar.gz
dabmux-90cb5392cd7f6f623529d62988bc4afdde011820.tar.bz2
dabmux-90cb5392cd7f6f623529d62988bc4afdde011820.zip
Change EDI configuration for multi-output
Diffstat (limited to 'src/dabOutput')
-rw-r--r--src/dabOutput/dabOutput.h30
1 files changed, 20 insertions, 10 deletions
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 <stdexcept>
#include <signal.h>
+#include <vector>
+#include <memory>
#ifdef _WIN32
# include <io.h>
# 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<UdpSocket> 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<edi_destination_t> destinations;
+ unsigned int dest_port; // common destination port, because it's encoded in the transport layer
+
+ bool enabled() { return destinations.size() > 0; }
};