Package rospy :: Package impl :: Module udpros :: Class UDPROSTransport

Class UDPROSTransport

source code

transport.Transport --+
                      |
                     UDPROSTransport

Instance Methods
 
__init__(self, protocol, name, header)
ctor
source code
 
send_message(self, msg, seq)
Convenience routine for services to send a message across a particular connection.
source code
 
write_data(self, data)
Write raw data to transport
source code
[Msg]
receive_once(self)
block until messages are read off of socket
source code
 
receive_loop(self, msgs_callback) source code
 
close(super) source code
Class Variables
  transport_type = 'UDPROS'
Method Details

__init__(self, protocol, name, header)
(Constructor)

source code 

ctor

Parameters:
  • name (str:) - topic name
  • protocol - protocol implementation
  • protocol - UDPROSTransportProtocol
  • header (dict) - handshake header if transport handshake header was already read off of transport.

send_message(self, msg, seq)

source code 

Convenience routine for services to send a message across a particular connection. NOTE: write_data is much more efficient if same message is being sent to multiple connections. Not threadsafe.

Parameters:
  • msg (Msg) - message to send
  • seq (int) - sequence number for message
Raises:

write_data(self, data)

source code 

Write raw data to transport

Raises:
  • TransportInitialiationError - could not be initialized
  • TransportTerminated - no longer open for publishing

receive_once(self)

source code 

block until messages are read off of socket

Returns: [Msg]
list of newly received messages
Raises: