aboutsummaryrefslogtreecommitdiffstats
path: root/lib/edi/common.hpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2024-07-01 13:32:10 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2024-07-01 13:32:10 +0200
commitc055764200393e4f2ce48daea7d175fd6af26b72 (patch)
treece3292b15018118dd75df1e481f5477e3ff766e9 /lib/edi/common.hpp
parentb006fa5dc614aa9745584a6fb73244b11da0b8af (diff)
downloaddabmux-c055764200393e4f2ce48daea7d175fd6af26b72.tar.gz
dabmux-c055764200393e4f2ce48daea7d175fd6af26b72.tar.bz2
dabmux-c055764200393e4f2ce48daea7d175fd6af26b72.zip
Common 649e0cb: Replace edi tagpacket callback by AF packet callback
Diffstat (limited to 'lib/edi/common.hpp')
-rw-r--r--lib/edi/common.hpp10
1 files changed, 6 insertions, 4 deletions
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(const std::vector<uint8_t>&)>;
- void register_tagpacket_handler(tagpacket_handler&& h);
+ /* The complete AF packet can also be retrieved */
+ using afpacket_handler = std::function<void(std::vector<uint8_t>&&)>;
+ 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<uint8_t> m_input_data;
std::map<std::string, tag_handler> m_handlers;
std::function<void()> m_af_packet_completed;
- tagpacket_handler m_tagpacket_handler;
+ afpacket_handler m_afpacket_handler;
std::vector<std::string> m_ignored_tags;
};