mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-13 19:50:34 +00:00
changed error message to reflect error cause, renamed function
Signed-off-by: Lenhart <malte.lenhart@mailbox.org>
This commit is contained in:
parent
419fb3925c
commit
2270958343
@ -35,13 +35,13 @@ int main(int argc, char *argv[])
|
||||
while (true)
|
||||
{
|
||||
gnss_sdr::navMsg message;
|
||||
if (udp_listener.read_nav_message(message))
|
||||
if (udp_listener.receive_and_parse_nav_message(message))
|
||||
{
|
||||
udp_listener.print_message(message);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "Error: the message cannot be parsed.\n";
|
||||
std::cout << "Error: the message cannot be parsed." << std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ Nav_Msg_Udp_Listener::Nav_Msg_Udp_Listener(unsigned short port)
|
||||
* \param[out] message navigation message class to contain parsed output
|
||||
* \return true if message parsed succesfully, false ow
|
||||
*/
|
||||
bool Nav_Msg_Udp_Listener::read_nav_message(gnss_sdr::navMsg &message)
|
||||
bool Nav_Msg_Udp_Listener::receive_and_parse_nav_message(gnss_sdr::navMsg &message)
|
||||
{
|
||||
char buff[8192]; // Buffer for storing the received data.
|
||||
|
||||
|
@ -24,7 +24,7 @@ class Nav_Msg_Udp_Listener
|
||||
public:
|
||||
explicit Nav_Msg_Udp_Listener(unsigned short port);
|
||||
void print_message(gnss_sdr::navMsg &message) const;
|
||||
bool read_nav_message(gnss_sdr::navMsg &message);
|
||||
bool receive_and_parse_nav_message(gnss_sdr::navMsg &message);
|
||||
|
||||
private:
|
||||
boost::asio::io_service io_service;
|
||||
|
Loading…
Reference in New Issue
Block a user