Go to the documentation of this file.
35 #ifndef ROSCPP_TRANSPORT_UDP_H
36 #define ROSCPP_TRANSPORT_UDP_H
41 #include <boost/thread/mutex.hpp>
43 #include <ros/common.h>
53 #define ROS_UDP_DATA0 0
54 #define ROS_UDP_DATAN 1
55 #define ROS_UDP_PING 2
84 bool connect(
const std::string& host,
int port,
int conn_id);
89 std::string getClientURI();
95 bool createIncoming(
int port,
bool is_server);
99 TransportUDPPtr createOutgoing(std::string host,
int port,
int conn_id,
int max_datagram_size);
106 virtual int32_t read(uint8_t* buffer, uint32_t size);
107 virtual int32_t write(uint8_t* buffer, uint32_t size);
109 virtual void enableWrite();
110 virtual void disableWrite();
111 virtual void enableRead();
112 virtual void disableRead();
114 virtual void close();
116 virtual std::string getTransportInfo();
120 virtual const char*
getType() {
return "UDPROS";}
128 bool initializeSocket();
135 bool setSocket(
int sock);
137 void socketUpdate(
int events);
176 #endif // ROSCPP_TRANSPORT_UDP_H
int getServerPort() const
Returns the port this transport is listening on.
int getMaxDatagramSize() const
boost::shared_ptr< TransportUDP > TransportUDPPtr
TransportUDPHeader reorder_header_
Abstract base class that allows abstraction of the transport type, eg. TCP, shared memory,...
virtual bool requiresHeader()
Returns a boolean to indicate if the transport mechanism is reliable or not.
uint32_t max_datagram_size_
virtual const char * getType()
Return a string that details the type of transport (Eg. TCPROS)
boost::mutex close_mutex_
sockaddr_in local_address_
uint8_t * reorder_buffer_
std::string cached_remote_host_
struct ros::TransportUDPHeader TransportUDPHeader
sockaddr_in server_address_
Manages a set of sockets being polled through the poll() function call.
uint8_t current_message_id_
roscpp
Author(s): Morgan Quigley, Josh Faust, Brian Gerkey, Troy Straszheim, Dirk Thomas
, Jacob Perron
autogenerated on Sat Sep 14 2024 02:59:36