Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Friends | List of all members
scip2::Connection Class Referenceabstract

#include <connection.h>

Inheritance diagram for scip2::Connection:
Inheritance graph
[legend]

Public Types

using Ptr = std::shared_ptr< Connection >
 

Public Member Functions

 Connection ()
 
void registerCloseCallback (CallbackClose cb)
 
void registerConnectCallback (CallbackConnect cb)
 
void registerReceiveCallback (CallbackReceive cb)
 
virtual void send (const std::string &, CallbackSend=CallbackSend())=0
 
virtual void spin ()=0
 
virtual void startWatchdog (const boost::posix_time::time_duration &)=0
 
virtual void stop ()=0
 

Protected Types

using CallbackClose = boost::function< void(void)>
 
using CallbackConnect = boost::function< void(void)>
 
using CallbackReceive = boost::function< void(boost::asio::streambuf &, const boost::posix_time::ptime &)>
 
using CallbackSend = boost::function< void(const boost::posix_time::ptime &)>
 

Protected Member Functions

void close ()
 
void connect ()
 
void receive (boost::asio::streambuf &buf, const boost::posix_time::ptime &time_read)
 

Protected Attributes

CallbackClose cb_close_
 
CallbackConnect cb_connect_
 
CallbackReceive cb_receive_
 

Friends

class Protocol
 

Detailed Description

Definition at line 28 of file connection.h.

Member Typedef Documentation

using scip2::Connection::CallbackClose = boost::function<void(void)>
protected

Definition at line 34 of file connection.h.

using scip2::Connection::CallbackConnect = boost::function<void(void)>
protected

Definition at line 33 of file connection.h.

using scip2::Connection::CallbackReceive = boost::function<void( boost::asio::streambuf &, const boost::posix_time::ptime &)>
protected

Definition at line 36 of file connection.h.

using scip2::Connection::CallbackSend = boost::function<void( const boost::posix_time::ptime &)>
protected

Definition at line 38 of file connection.h.

using scip2::Connection::Ptr = std::shared_ptr<Connection>

Definition at line 63 of file connection.h.

Constructor & Destructor Documentation

scip2::Connection::Connection ( )
inline

Definition at line 82 of file connection.h.

Member Function Documentation

void scip2::Connection::close ( )
inlineprotected

Definition at line 44 of file connection.h.

void scip2::Connection::connect ( )
inlineprotected

Definition at line 49 of file connection.h.

void scip2::Connection::receive ( boost::asio::streambuf &  buf,
const boost::posix_time::ptime &  time_read 
)
inlineprotected

Definition at line 54 of file connection.h.

void scip2::Connection::registerCloseCallback ( CallbackClose  cb)
inline

Definition at line 70 of file connection.h.

void scip2::Connection::registerConnectCallback ( CallbackConnect  cb)
inline

Definition at line 78 of file connection.h.

void scip2::Connection::registerReceiveCallback ( CallbackReceive  cb)
inline

Definition at line 74 of file connection.h.

virtual void scip2::Connection::send ( const std::string &  ,
CallbackSend  = CallbackSend() 
)
pure virtual

Implemented in scip2::ConnectionTcp.

virtual void scip2::Connection::spin ( )
pure virtual

Implemented in scip2::ConnectionTcp.

virtual void scip2::Connection::startWatchdog ( const boost::posix_time::time_duration &  )
pure virtual

Implemented in scip2::ConnectionTcp.

virtual void scip2::Connection::stop ( )
pure virtual

Implemented in scip2::ConnectionTcp.

Friends And Related Function Documentation

friend class Protocol
friend

Definition at line 30 of file connection.h.

Member Data Documentation

CallbackClose scip2::Connection::cb_close_
protected

Definition at line 41 of file connection.h.

CallbackConnect scip2::Connection::cb_connect_
protected

Definition at line 40 of file connection.h.

CallbackReceive scip2::Connection::cb_receive_
protected

Definition at line 42 of file connection.h.


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


urg_stamped
Author(s): Atsushi Watanabe
autogenerated on Thu Jun 6 2019 19:55:59