Public Types | Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes
rosserial_server::Session< Socket > Class Template Reference

#include <session.h>

List of all members.

Public Types

enum  Version { PROTOCOL_UNKNOWN = 0, PROTOCOL_VER1 = 1, PROTOCOL_VER2 = 2, PROTOCOL_MAX }

Public Member Functions

 Session (boost::asio::io_service &io_service)
Socket & socket ()
void start ()
virtual ~Session ()

Private Types

enum  { buffer_max = 1023 }

Private Member Functions

void abort_servers ()
void attempt_sync ()
template<typename M >
bool check_set (std::string param_name, M map)
void handle_time (ros::serialization::IStream &stream)
void read_body (ros::serialization::IStream &stream, uint16_t topic_id)
void read_failed (const boost::system::error_code &error)
void read_id_length (ros::serialization::IStream &stream)
void read_sync_first (ros::serialization::IStream &stream)
void read_sync_header ()
void read_sync_second (ros::serialization::IStream &stream)
void request_topics ()
void required_topics_check (const boost::system::error_code &error)
void set_sync_timeout (const boost::posix_time::time_duration &interval)
void setup_publisher (ros::serialization::IStream &stream)
void setup_service_client_publisher (ros::serialization::IStream &stream)
void setup_service_client_subscriber (ros::serialization::IStream &stream)
void setup_service_server_publisher (ros::serialization::IStream &stream)
void setup_service_server_subscriber (ros::serialization::IStream &stream)
void setup_subscriber (ros::serialization::IStream &stream)
void sync_timeout (const boost::system::error_code &error)
void write_buffer (BufferPtr buffer_ptr)
void write_cb (const boost::system::error_code &error, BufferPtr buffer_ptr)
void write_message (Buffer &message, const uint16_t topic_id, Session::Version version)

Static Private Member Functions

static uint8_t checksum (ros::serialization::IStream &stream)
static uint8_t checksum (uint16_t val)

Private Attributes

AsyncReadBuffer< Socket > async_read_buffer_
boost::posix_time::time_duration attempt_interval_
std::map< uint16_t,
boost::function< void(ros::serialization::IStream)> > 
callbacks_
Session::Version client_version
Session::Version client_version_try
ros::NodeHandle nh_
std::map< uint16_t, PublisherPtrpublishers_
boost::posix_time::time_duration require_check_interval_
boost::asio::deadline_timer require_check_timer_
std::map< std::string,
ServiceClientPtr
service_clients_
std::map< std::string,
ServiceServerPtr
service_servers_
Socket socket_
std::map< uint16_t, SubscriberPtrsubscribers_
boost::asio::deadline_timer sync_timer_
boost::posix_time::time_duration timeout_interval_

Detailed Description

template<typename Socket>
class rosserial_server::Session< Socket >

Definition at line 58 of file session.h.


Member Enumeration Documentation

template<typename Socket>
anonymous enum [private]
Enumerator:
buffer_max 

Definition at line 521 of file session.h.

template<typename Socket>
enum rosserial_server::Session::Version
Enumerator:
PROTOCOL_UNKNOWN 
PROTOCOL_VER1 
PROTOCOL_VER2 
PROTOCOL_MAX 

Definition at line 108 of file session.h.


Constructor & Destructor Documentation

template<typename Socket>
rosserial_server::Session< Socket >::Session ( boost::asio::io_service &  io_service) [inline]

Definition at line 61 of file session.h.

template<typename Socket>
virtual rosserial_server::Session< Socket >::~Session ( ) [inline, virtual]

Definition at line 89 of file session.h.


Member Function Documentation

template<typename Socket>
void rosserial_server::Session< Socket >::abort_servers ( ) [inline, private]

Definition at line 302 of file session.h.

template<typename Socket>
void rosserial_server::Session< Socket >::attempt_sync ( ) [inline, private]

Definition at line 290 of file session.h.

template<typename Socket>
template<typename M >
bool rosserial_server::Session< Socket >::check_set ( std::string  param_name,
map 
) [inline, private]

Definition at line 355 of file session.h.

template<typename Socket>
static uint8_t rosserial_server::Session< Socket >::checksum ( ros::serialization::IStream stream) [inline, static, private]

Definition at line 376 of file session.h.

template<typename Socket>
static uint8_t rosserial_server::Session< Socket >::checksum ( uint16_t  val) [inline, static, private]

Definition at line 384 of file session.h.

template<typename Socket>
void rosserial_server::Session< Socket >::handle_time ( ros::serialization::IStream stream) [inline, private]

Definition at line 502 of file session.h.

template<typename Socket>
void rosserial_server::Session< Socket >::read_body ( ros::serialization::IStream stream,
uint16_t  topic_id 
) [inline, private]

Definition at line 179 of file session.h.

template<typename Socket>
void rosserial_server::Session< Socket >::read_failed ( const boost::system::error_code &  error) [inline, private]

Definition at line 213 of file session.h.

template<typename Socket>
void rosserial_server::Session< Socket >::read_id_length ( ros::serialization::IStream stream) [inline, private]

Definition at line 154 of file session.h.

template<typename Socket>
void rosserial_server::Session< Socket >::read_sync_first ( ros::serialization::IStream stream) [inline, private]

Definition at line 123 of file session.h.

template<typename Socket>
void rosserial_server::Session< Socket >::read_sync_header ( ) [inline, private]

Definition at line 119 of file session.h.

template<typename Socket>
void rosserial_server::Session< Socket >::read_sync_second ( ros::serialization::IStream stream) [inline, private]

Definition at line 133 of file session.h.

template<typename Socket>
void rosserial_server::Session< Socket >::request_topics ( ) [inline, private]

Definition at line 317 of file session.h.

template<typename Socket>
void rosserial_server::Session< Socket >::required_topics_check ( const boost::system::error_code &  error) [inline, private]

Definition at line 342 of file session.h.

template<typename Socket>
void rosserial_server::Session< Socket >::set_sync_timeout ( const boost::posix_time::time_duration &  interval) [inline, private]

Definition at line 295 of file session.h.

template<typename Socket>
void rosserial_server::Session< Socket >::setup_publisher ( ros::serialization::IStream stream) [inline, private]

Definition at line 390 of file session.h.

template<typename Socket>
void rosserial_server::Session< Socket >::setup_service_client_publisher ( ros::serialization::IStream stream) [inline, private]

Definition at line 418 of file session.h.

template<typename Socket>
void rosserial_server::Session< Socket >::setup_service_client_subscriber ( ros::serialization::IStream stream) [inline, private]

Definition at line 438 of file session.h.

template<typename Socket>
void rosserial_server::Session< Socket >::setup_service_server_publisher ( ros::serialization::IStream stream) [inline, private]

Definition at line 460 of file session.h.

template<typename Socket>
void rosserial_server::Session< Socket >::setup_service_server_subscriber ( ros::serialization::IStream stream) [inline, private]

Definition at line 480 of file session.h.

template<typename Socket>
void rosserial_server::Session< Socket >::setup_subscriber ( ros::serialization::IStream stream) [inline, private]

Definition at line 401 of file session.h.

template<typename Socket>
Socket& rosserial_server::Session< Socket >::socket ( ) [inline]

Definition at line 95 of file session.h.

template<typename Socket>
void rosserial_server::Session< Socket >::start ( ) [inline]

Definition at line 100 of file session.h.

template<typename Socket>
void rosserial_server::Session< Socket >::sync_timeout ( const boost::system::error_code &  error) [inline, private]

Definition at line 307 of file session.h.

template<typename Socket>
void rosserial_server::Session< Socket >::write_buffer ( BufferPtr  buffer_ptr) [inline, private]

Definition at line 267 of file session.h.

template<typename Socket>
void rosserial_server::Session< Socket >::write_cb ( const boost::system::error_code &  error,
BufferPtr  buffer_ptr 
) [inline, private]

Definition at line 272 of file session.h.

template<typename Socket>
void rosserial_server::Session< Socket >::write_message ( Buffer message,
const uint16_t  topic_id,
Session< Socket >::Version  version 
) [inline, private]

Definition at line 230 of file session.h.


Member Data Documentation

template<typename Socket>
AsyncReadBuffer<Socket> rosserial_server::Session< Socket >::async_read_buffer_ [private]

Definition at line 520 of file session.h.

template<typename Socket>
boost::posix_time::time_duration rosserial_server::Session< Socket >::attempt_interval_ [private]

Definition at line 527 of file session.h.

template<typename Socket>
std::map< uint16_t, boost::function<void(ros::serialization::IStream)> > rosserial_server::Session< Socket >::callbacks_ [private]

Definition at line 532 of file session.h.

template<typename Socket>
Session::Version rosserial_server::Session< Socket >::client_version [private]

Definition at line 524 of file session.h.

template<typename Socket>
Session::Version rosserial_server::Session< Socket >::client_version_try [private]

Definition at line 525 of file session.h.

template<typename Socket>
ros::NodeHandle rosserial_server::Session< Socket >::nh_ [private]

Definition at line 522 of file session.h.

template<typename Socket>
std::map<uint16_t, PublisherPtr> rosserial_server::Session< Socket >::publishers_ [private]

Definition at line 533 of file session.h.

template<typename Socket>
boost::posix_time::time_duration rosserial_server::Session< Socket >::require_check_interval_ [private]

Definition at line 528 of file session.h.

template<typename Socket>
boost::asio::deadline_timer rosserial_server::Session< Socket >::require_check_timer_ [private]

Definition at line 530 of file session.h.

template<typename Socket>
std::map<std::string, ServiceClientPtr> rosserial_server::Session< Socket >::service_clients_ [private]

Definition at line 535 of file session.h.

template<typename Socket>
std::map<std::string, ServiceServerPtr> rosserial_server::Session< Socket >::service_servers_ [private]

Definition at line 536 of file session.h.

template<typename Socket>
Socket rosserial_server::Session< Socket >::socket_ [private]

Definition at line 519 of file session.h.

template<typename Socket>
std::map<uint16_t, SubscriberPtr> rosserial_server::Session< Socket >::subscribers_ [private]

Definition at line 534 of file session.h.

template<typename Socket>
boost::asio::deadline_timer rosserial_server::Session< Socket >::sync_timer_ [private]

Definition at line 529 of file session.h.

template<typename Socket>
boost::posix_time::time_duration rosserial_server::Session< Socket >::timeout_interval_ [private]

Definition at line 526 of file session.h.


The documentation for this class was generated from the following file:


rosserial_server
Author(s): Mike Purvis
autogenerated on Thu Jun 6 2019 19:56:34