aboutsummaryrefslogtreecommitdiffstats
path: root/lib/edi/common.hpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2024-07-01 13:32:22 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2024-07-01 13:32:22 +0200
commit91181df0cfb2a5e33d16c8458a84978c14a005ba (patch)
treedad9f67a9399538bd73f2878a376dab4df4b6d43 /lib/edi/common.hpp
parent6992225da8c43fc16f5de1a02d218f80e9e60bf1 (diff)
downloaddabmod-91181df0cfb2a5e33d16c8458a84978c14a005ba.tar.gz
dabmod-91181df0cfb2a5e33d16c8458a84978c14a005ba.tar.bz2
dabmod-91181df0cfb2a5e33d16c8458a84978c14a005ba.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;
};