Go to the documentation of this file.
36 #ifndef ROSCPP_TRANSPORT_UDP_H
37 #define ROSCPP_TRANSPORT_UDP_H
39 #include <ros/types.h>
40 #include <ros/transport/transport.h>
44 #include <ros/common.h>
54 #define ROS_UDP_DATA0 0
55 #define ROS_UDP_DATAN 1
56 #define ROS_UDP_PING 2
85 bool connect(
const std::string& host,
int port,
int conn_id);
90 std::string getClientURI();
96 bool createIncoming(
int port,
bool is_server);
100 TransportUDPPtr createOutgoing(std::string host,
int port,
int conn_id,
int max_datagram_size);
107 virtual int32_t
read(uint8_t* buffer, uint32_t size);
108 virtual int32_t write(uint8_t* buffer, uint32_t size);
110 virtual void enableWrite();
111 virtual void disableWrite();
112 virtual void enableRead();
113 virtual void disableRead();
115 virtual void close();
117 virtual std::string getTransportInfo();
121 virtual const char*
getType() {
return "UDPROS";}
129 bool initializeSocket();
136 bool setSocket(
int sock);
138 void socketUpdate(
int events);
177 #endif // ROSCPP_TRANSPORT_UDP_H
int getMaxDatagramSize() const
TransportUDPHeader reorder_header_
uint8_t * reorder_buffer_
std::shared_ptr< TransportUDP > TransportUDPPtr
sockaddr_in server_address_
uint32_t max_datagram_size_
virtual const char * getType()
Return a string that details the type of transport (Eg. TCPROS)
virtual bool requiresHeader()
Returns a boolean to indicate if the transport mechanism is reliable or not.
struct roswrap::TransportUDPHeader TransportUDPHeader
sockaddr_in local_address_
T read(const std::string &str)
General template which is unimplemented; implemented specializations follow below.
uint8_t current_message_id_
Manages a set of sockets being polled through the poll() function call.
Abstract base class that allows abstraction of the transport type, eg. TCP, shared memory,...
int getServerPort() const
Returns the port this transport is listening on.
std::string cached_remote_host_
sick_scan_xd
Author(s): Michael Lehning
, Jochen Sprickerhof , Martin Günther
autogenerated on Fri Oct 25 2024 02:47:12