From efce52fcdb34e77e30769dd998daff1f608688ef Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Sat, 17 May 2014 18:13:46 +0200 Subject: Add EDI TCP Server --- src/DabMux.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src') diff --git a/src/DabMux.cpp b/src/DabMux.cpp index 1b889f3..0b3f2e8 100644 --- a/src/DabMux.cpp +++ b/src/DabMux.cpp @@ -657,6 +657,9 @@ int main(int argc, char *argv[]) /* Each iteration of the main loop creates one ETI frame */ #if EDI_DEBUG std::ofstream edi_debug_file("./edi.debug"); + + DabOutputTcp edi_output; + edi_output.Open("0.0.0.0:12000"); #endif for (currentFrame = 0; running; currentFrame++) { @@ -1965,6 +1968,14 @@ int main(int argc, char *argv[]) vector< vector > edi_fragments = edi_pft.ProtectAndFragment(edi_afpacket); + // Send over ethernet + vector< vector >::iterator edi_frag; + for (edi_frag = edi_fragments.begin(); + edi_frag != edi_fragments.end(); + ++edi_frag) { + edi_output.Write(&(edi_frag->front()), edi_frag->size()); + } + #if EDI_DEBUG std::ostream_iterator debug_iterator(edi_debug_file); std::copy(edi_afpacket.begin(), edi_afpacket.end(), debug_iterator); -- cgit v1.2.3