summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2014-05-17 18:13:46 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2014-05-20 21:39:37 +0200
commitefce52fcdb34e77e30769dd998daff1f608688ef (patch)
treee23b39a0ed82daa2c194faafe41c180f0092a530 /src
parentac2e922067be306a89cd10419263cade54b2f60f (diff)
downloaddabmux-efce52fcdb34e77e30769dd998daff1f608688ef.tar.gz
dabmux-efce52fcdb34e77e30769dd998daff1f608688ef.tar.bz2
dabmux-efce52fcdb34e77e30769dd998daff1f608688ef.zip
Add EDI TCP Server
Diffstat (limited to 'src')
-rw-r--r--src/DabMux.cpp11
1 files changed, 11 insertions, 0 deletions
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<uint8_t> > edi_fragments =
edi_pft.ProtectAndFragment(edi_afpacket);
+ // Send over ethernet
+ vector< vector<uint8_t> >::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<uint8_t> debug_iterator(edi_debug_file);
std::copy(edi_afpacket.begin(), edi_afpacket.end(), debug_iterator);