47 #include <boost/asio.hpp> 48 #include <boost/thread.hpp> 55 #include <udp_com/UdpPacket.h> 56 #include <udp_com/UdpSend.h> 57 #include <udp_com/UdpSocket.h> 59 using boost::asio::ip::udp;
80 UdpCom(std::string computer_address, std::string sensor_address,
109 size_t send(
const std::vector<u_char> &data,
const std::string &ip_address,
110 const uint16_t udp_port);
std::string computer_address_
Source (computer) IP Address.
boost::asio::io_service io_service_
UDP IO service.
std::string getIp()
Returns the src IP for the created socket.
UdpPacket udp_packet_
UDP packet to be sent.
UdpCom(std::string computer_address, std::string sensor_address, uint16_t port, bool is_multicast, ros::Publisher publisher)
udp::endpoint receiver_endpoint_
UDP endpoint receiver.
Implements the UDP methods for recieving and sending within the ROS ecosystem.
size_t send(const std::vector< u_char > &data, const std::string &ip_address, const uint16_t udp_port)
ros::Publisher udp_packet_publisher_
ROS publisher.
udp::socket socket_
UDP socket.
udp::endpoint sender_endpoint_
UDP endpoint sender.
boost::thread thread_
Thread for service.