diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2019-01-28 17:13:28 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2019-01-28 17:13:28 +0100 |
commit | aec2a980fc37bd5d28f06c8e48a98b51ae65ac32 (patch) | |
tree | 932ed3e29416db801caf567da2c615f04a41581f /src/InputReader.h | |
parent | 23f00d4b1292b7c798a7950dea09ac42e4f16d36 (diff) | |
download | dabmod-aec2a980fc37bd5d28f06c8e48a98b51ae65ac32.tar.gz dabmod-aec2a980fc37bd5d28f06c8e48a98b51ae65ac32.tar.bz2 dabmod-aec2a980fc37bd5d28f06c8e48a98b51ae65ac32.zip |
Represent ZMQ input failures more clearly
Diffstat (limited to 'src/InputReader.h')
-rw-r--r-- | src/InputReader.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/InputReader.h b/src/InputReader.h index 98eab2b..63451e5 100644 --- a/src/InputReader.h +++ b/src/InputReader.h @@ -184,7 +184,15 @@ class InputZeroMQReader : public InputReader, public RemoteControllable std::atomic<bool> m_running = ATOMIC_VAR_INIT(false); std::string m_uri; size_t m_max_queued_frames = 0; - ThreadsafeQueue<std::vector<uint8_t> > m_in_messages; + + // Either must contain a full ETI frame, or one flag must be set + struct message_t { + std::vector<uint8_t> eti_frame; + bool overflow = false; + bool timeout = false; + bool fault = false; + }; + ThreadsafeQueue<message_t> m_in_messages; mutable std::mutex m_last_in_messages_size_mutex; size_t m_last_in_messages_size = 0; |