utils.cpp
Go to the documentation of this file.
1 /*
2 * Unpublished Copyright (c) 2009-2019 AutonomouStuff, LLC, All Rights Reserved.
3 *
4 * This file is part of the network_interface ROS driver which is released under the MIT license.
5 * See file LICENSE included with this software or go to https://opensource.org/licenses/MIT for full license details.
6 */
7 
9 #include <string>
10 
12 {
13  if (ret == ReturnStatuses::INIT_FAILED)
14  return "Initialization of the network interface failed.";
15  else if (ret == ReturnStatuses::BAD_PARAM)
16  return "A bad parameter was provided to the network interface during initalization.";
17  else if (ret == ReturnStatuses::SOCKET_ERROR)
18  return "A socket error was encountered.";
19  else if (ret == ReturnStatuses::SOCKET_CLOSED)
20  return "Socket is not currently open.";
21  else if (ret == ReturnStatuses::NO_MESSAGES_RECEIVED)
22  return "No messages were received on the interface.";
23  else if (ret == ReturnStatuses::READ_FAILED)
24  return "A read operation failed on the network interface.";
25  else if (ret == ReturnStatuses::WRITE_FAILED)
26  return "A write operation failed on the network interface.";
27  else if (ret == ReturnStatuses::CLOSE_FAILED)
28  return "Closing the network failed.";
29  else
30  return "Undefined error.";
31 }
network_interface.h
AS::Network::return_status_desc
std::string return_status_desc(const ReturnStatuses &ret)
Definition: utils.cpp:11
AS::Network::ReturnStatuses
ReturnStatuses
Definition: common.h:16


network_interface
Author(s): Joshua Whitley , Daniel Stanek , Joe Kale
autogenerated on Wed Mar 2 2022 00:35:33