From 7ab73d85a9709d9971298ce4c6125f9f7ce7617e Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Wed, 3 Jul 2019 12:40:41 +0200 Subject: EDI: make tagDSTI persistent so that DFLC counter works --- src/Outputs.cpp | 12 ++++++------ src/Outputs.h | 3 +++ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/Outputs.cpp b/src/Outputs.cpp index be5b841..6249e2d 100644 --- a/src/Outputs.cpp +++ b/src/Outputs.cpp @@ -161,6 +161,8 @@ void EDI::add_tcp_destination(const std::string& host, int port) } dest->dest_port = port; m_edi_conf.destinations.push_back(dest); + + m_edi_conf.dump = true; } bool EDI::enabled() const @@ -177,11 +179,9 @@ bool EDI::write_frame(const uint8_t *buf, size_t len) edi::TagStarPTR edi_tagStarPtr; edi_tagStarPtr.protocol = "DSTI"; - edi::TagDSTI edi_tagDSTI; - - edi_tagDSTI.stihf = false; - edi_tagDSTI.atstf = false; - edi_tagDSTI.rfadf = false; + m_edi_tagDSTI.stihf = false; + m_edi_tagDSTI.atstf = false; + m_edi_tagDSTI.rfadf = false; // DFCT is handled inside the TagDSTI edi::TagSSm edi_tagPayload; @@ -194,7 +194,7 @@ bool EDI::write_frame(const uint8_t *buf, size_t len) // put tags *ptr, DETI and all subchannels into one TagPacket edi_tagpacket.tag_items.push_back(&edi_tagStarPtr); - edi_tagpacket.tag_items.push_back(&edi_tagDSTI); + edi_tagpacket.tag_items.push_back(&m_edi_tagDSTI); edi_tagpacket.tag_items.push_back(&edi_tagPayload); m_edi_sender->write(edi_tagpacket); diff --git a/src/Outputs.h b/src/Outputs.h index 297f926..513def4 100644 --- a/src/Outputs.h +++ b/src/Outputs.h @@ -143,6 +143,9 @@ class EDI: public Base { private: edi::configuration_t m_edi_conf; std::shared_ptr m_edi_sender; + + edi::TagDSTI m_edi_tagDSTI; + }; } -- cgit v1.2.3