From 91181df0cfb2a5e33d16c8458a84978c14a005ba Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Mon, 1 Jul 2024 13:32:22 +0200 Subject: Common 649e0cb: Replace edi tagpacket callback by AF packet callback --- lib/edi/common.hpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'lib/edi/common.hpp') diff --git a/lib/edi/common.hpp b/lib/edi/common.hpp index c3e6c40..f273ecf 100644 --- a/lib/edi/common.hpp +++ b/lib/edi/common.hpp @@ -32,6 +32,8 @@ namespace EdiDecoder { +constexpr size_t AFPACKET_HEADER_LEN = 10; // includes SYNC + struct frame_timestamp_t { uint32_t seconds = 0; uint32_t utco = 0; @@ -133,9 +135,9 @@ class TagDispatcher { */ void register_tag(const std::string& tag, tag_handler&& h); - /* The complete tagpacket can also be retrieved */ - using tagpacket_handler = std::function&)>; - void register_tagpacket_handler(tagpacket_handler&& h); + /* The complete AF packet can also be retrieved */ + using afpacket_handler = std::function&&)>; + void register_afpacket_handler(afpacket_handler&& h); seq_info_t get_seq_info() const { return m_last_sequences; @@ -160,7 +162,7 @@ class TagDispatcher { std::vector m_input_data; std::map m_handlers; std::function m_af_packet_completed; - tagpacket_handler m_tagpacket_handler; + afpacket_handler m_afpacket_handler; std::vector m_ignored_tags; }; -- cgit v1.2.3