Go to the documentation of this file.
34 #include <condition_variable>
65 static const uint8_t
CR = 0x0D;
67 static const uint8_t
LF = 0x0A;
132 this->stamp = other.
stamp;
133 this->type = other.type;
134 this->message = other.message;
143 this->stamp = other.
stamp;
144 this->type = other.type;
145 this->message = other.message;
151 template <
typename T>
155 [[nodiscard]]
bool empty()
const noexcept;
156 [[nodiscard]]
size_t size()
const noexcept;
157 void push(
const T& input) noexcept;
158 void pop(T& output) noexcept;
166 template <
typename T>
169 std::lock_guard<std::mutex> lck(mtx_);
170 return queue_.empty();
173 template <
typename T>
176 std::lock_guard<std::mutex> lck(mtx_);
177 return queue_.size();
180 template <
typename T>
184 std::lock_guard<std::mutex> lck(mtx_);
190 template <
typename T>
193 std::unique_lock<std::mutex> lck(mtx_);
194 cond_.wait(lck, [
this] {
return !queue_.empty(); });
195 output = queue_.front();
static const uint8_t CONNECTION_DESCRIPTOR_BYTE_D
static const uint8_t NMEA_INS_SYNC_BYTE_3
0x4E is ASCII for N - 3rd byte to indicate NMEA-type ASCII message
Telegram(const Telegram &other) noexcept
telegram_type::TelegramType type
Telegram & operator=(Telegram &&other) noexcept
Telegram(size_t preallocate=3) noexcept
ConcurrentQueue< std::shared_ptr< Telegram > > TelegramQueue
static const uint8_t SYNC_BYTE_1
0x24 is ASCII for $ - 1st byte in each message
static const uint8_t CONNECTION_DESCRIPTOR_BYTE_N
std::vector< uint8_t > message
void pop(T &output) noexcept
bool empty() const noexcept
static const uint8_t SBF_SYNC_BYTE_2
0x40 is ASCII for @ - 2nd byte to indicate SBF block
void push(const T &input) noexcept
std::condition_variable cond_
static const uint8_t RESPONSE_SYNC_BYTE_3
0x3A is ASCII for : - 3rd byte in the response message from the Rx
static const uint8_t CONNECTION_DESCRIPTOR_BYTE_U
static const uint8_t RESPONSE_SYNC_BYTE_3a
0x21 is ASCII for ! 3rd byte in the response message from the Rx
static const uint16_t SBF_HEADER_SIZE
size_t size() const noexcept
Telegram(Telegram &&other) noexcept
static const uint8_t RESPONSE_SYNC_BYTE_2
0x52 is ASCII for R (for "Response") - 2nd byte in each response from the Rx
static const uint16_t MAX_SBF_SIZE
static const uint8_t NMEA_SYNC_BYTE_2
0x47 is ASCII for G - 2nd byte to indicate NMEA-type ASCII message
static const uint8_t NMEA_INS_SYNC_BYTE_2
0x49 is ASCII for I - 2nd byte to indicate INS NMEA-type ASCII message
Telegram & operator=(const Telegram &other) noexcept
static const uint8_t CONNECTION_DESCRIPTOR_FOOTER
0x3E is ASCII for > - end character of connection descriptor
static const uint8_t CONNECTION_DESCRIPTOR_BYTE_I
static const uint8_t CR
0x0D is ASCII for "Carriage Return", i.e. "Enter"
static const uint8_t CONNECTION_DESCRIPTOR_BYTE_C
static const uint8_t ERROR_SYNC_BYTE_3
static const uint8_t NMEA_SYNC_BYTE_3
0x50 is ASCII for P - 3rd byte to indicate NMEA-type ASCII message
static const uint8_t LF
0x0A is ASCII for "Line Feed", i.e. "New Line"
static const uint16_t MAX_UDP_PACKET_SIZE