Go to the documentation of this file.
34 #include <condition_variable>
70 static const uint8_t
CR = 0x0D;
72 static const uint8_t
LF = 0x0A;
137 this->stamp = other.
stamp;
138 this->type = other.type;
139 this->message = other.message;
148 this->stamp = other.
stamp;
149 this->type = other.type;
150 this->message = other.message;
156 template <
typename T>
160 [[nodiscard]]
bool empty()
const noexcept;
161 [[nodiscard]]
size_t size()
const noexcept;
162 void push(
const T& input) noexcept;
163 void pop(T& output) noexcept;
171 template <
typename T>
174 std::lock_guard<std::mutex> lck(mtx_);
175 return queue_.empty();
178 template <
typename T>
181 std::lock_guard<std::mutex> lck(mtx_);
182 return queue_.size();
185 template <
typename T>
189 std::lock_guard<std::mutex> lck(mtx_);
195 template <
typename T>
198 std::unique_lock<std::mutex> lck(mtx_);
199 cond_.wait(lck, [
this] {
return !queue_.empty(); });
200 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