DDS  ver. 1.6
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
dds::protocol_api::CBaseChannelImpl< T > Class Template Reference

#include <BaseChannelImpl.h>

Inheritance diagram for dds::protocol_api::CBaseChannelImpl< T >:
dds::protocol_api::CChannelEventsImpl< T > dds::protocol_api::CChannelMessageHandlersImpl dds::protocol_api::CStatImpl dds::protocol_api::CClientChannelImpl< T > dds::protocol_api::CServerChannelImpl< T >

Public Types

typedef std::shared_ptr< T > connectionPtr_t
 
typedef std::weak_ptr< T > weakConnectionPtr_t
 
typedef std::vector< connectionPtr_tconnectionPtrVector_t
 
typedef std::vector< weakConnectionPtr_tweakConnectionPtrVector_t
 
- Public Types inherited from dds::protocol_api::CChannelEventsImpl< T >
typedef boost::signals2::signal< void(T *)> signal_t
 
typedef boost::signals2::connection connection_t
 

Public Member Functions

 ~CBaseChannelImpl ()
 
bool isHanshakeOK () const
 
EChannelType getChannelType () const
 
void setChannelType (EChannelType _channelType)
 
void start ()
 
void stop ()
 
boost::asio::ip::tcp::socket & socket ()
 
template<ECmdType _cmd>
void dequeueMsg ()
 
template<ECmdType _cmd, class A >
void accumulativePushMsg (const A &_attachment)
 
template<ECmdType _cmd>
void accumulativePushMsg ()
 
template<ECmdType _cmd, class A >
void pushMsg (const A &_attachment)
 
template<ECmdType _cmd>
void pushMsg ()
 
template<ECmdType _cmd, class A >
void sendYourself (const A &_attachment)
 
template<ECmdType _cmd>
void sendYourself ()
 
void pushBinaryAttachmentCmd (const std::string &_srcFilePath, const std::string &_fileName, uint16_t _cmdSource)
 
void pushBinaryAttachmentCmd (const MiscCommon::BYTEVector_t &_data, const std::string &_fileName, uint16_t _cmdSource)
 
void processBinaryAttachmentStartCmd (SCommandAttachmentImpl< cmdBINARY_ATTACHMENT_START >::ptr_t _attachment)
 
void processBinaryAttachmentCmd (SCommandAttachmentImpl< cmdBINARY_ATTACHMENT >::ptr_t _attachment)
 
void registerDisconnectEventHandler (handlerDisconnectEventFunction_t _handler)
 
bool started ()
 
std::string remoteEndIDString ()
 
- Public Member Functions inherited from dds::protocol_api::CChannelEventsImpl< T >
 CChannelEventsImpl ()
 
 ~CChannelEventsImpl ()
 
connection_t subscribeOnEvent (EChannelEvents _type, typename signal_t::slot_function_type _subscriber)
 
void onEvent (EChannelEvents _type)
 
- Public Member Functions inherited from dds::protocol_api::CChannelMessageHandlersImpl
template<ECmdType _cmd, typename Func >
void registerMessageHandler (Func _handler)
 
template<class... Args>
void dispatchMessageHandlers (ECmdType _cmd, Args &&... args)
 
template<ECmdType _cmd>
size_t getNofMessageHandlers () const
 
- Public Member Functions inherited from dds::protocol_api::CStatImpl
 CStatImpl (boost::asio::io_service &_service)
 
SReadStat getReadStat () const
 Return read statistics. More...
 
SWriteStat getWriteStat () const
 Return write statistics. More...
 
void setStatEnabled (bool _statEnabled)
 Enable/disable statistics accumulation. More...
 
void logReadMessage (CProtocolMessage::protocolMessagePtr_t _message)
 
void logWriteMessages (const protocolMessagePtrQueue_t &_messageQueue)
 

Static Public Member Functions

static connectionPtr_t makeNew (boost::asio::io_service &_service)
 

Protected Member Functions

 CBaseChannelImpl (boost::asio::io_service &_service)
 

Protected Attributes

bool m_isHandshakeOK
 
EChannelType m_channelType
 

Member Typedef Documentation

◆ connectionPtr_t

template<class T>
typedef std::shared_ptr<T> dds::protocol_api::CBaseChannelImpl< T >::connectionPtr_t

◆ connectionPtrVector_t

template<class T>
typedef std::vector<connectionPtr_t> dds::protocol_api::CBaseChannelImpl< T >::connectionPtrVector_t

◆ weakConnectionPtr_t

template<class T>
typedef std::weak_ptr<T> dds::protocol_api::CBaseChannelImpl< T >::weakConnectionPtr_t

◆ weakConnectionPtrVector_t

Constructor & Destructor Documentation

◆ CBaseChannelImpl()

template<class T>
dds::protocol_api::CBaseChannelImpl< T >::CBaseChannelImpl ( boost::asio::io_service &  _service)
inlineprotected

◆ ~CBaseChannelImpl()

template<class T>
dds::protocol_api::CBaseChannelImpl< T >::~CBaseChannelImpl ( )
inline

Member Function Documentation

◆ accumulativePushMsg() [1/2]

template<class T>
template<ECmdType _cmd, class A >
void dds::protocol_api::CBaseChannelImpl< T >::accumulativePushMsg ( const A &  _attachment)
inline

◆ accumulativePushMsg() [2/2]

template<class T>
template<ECmdType _cmd>
void dds::protocol_api::CBaseChannelImpl< T >::accumulativePushMsg ( )
inline

◆ dequeueMsg()

template<class T>
template<ECmdType _cmd>
void dds::protocol_api::CBaseChannelImpl< T >::dequeueMsg ( )
inline

◆ getChannelType()

template<class T>
EChannelType dds::protocol_api::CBaseChannelImpl< T >::getChannelType ( ) const
inline

◆ isHanshakeOK()

template<class T>
bool dds::protocol_api::CBaseChannelImpl< T >::isHanshakeOK ( ) const
inline

◆ makeNew()

template<class T>
static connectionPtr_t dds::protocol_api::CBaseChannelImpl< T >::makeNew ( boost::asio::io_service &  _service)
inlinestatic

◆ processBinaryAttachmentCmd()

template<class T>
void dds::protocol_api::CBaseChannelImpl< T >::processBinaryAttachmentCmd ( SCommandAttachmentImpl< cmdBINARY_ATTACHMENT >::ptr_t  _attachment)
inline

◆ processBinaryAttachmentStartCmd()

template<class T>
void dds::protocol_api::CBaseChannelImpl< T >::processBinaryAttachmentStartCmd ( SCommandAttachmentImpl< cmdBINARY_ATTACHMENT_START >::ptr_t  _attachment)
inline

◆ pushBinaryAttachmentCmd() [1/2]

template<class T>
void dds::protocol_api::CBaseChannelImpl< T >::pushBinaryAttachmentCmd ( const std::string &  _srcFilePath,
const std::string &  _fileName,
uint16_t  _cmdSource 
)
inline

◆ pushBinaryAttachmentCmd() [2/2]

template<class T>
void dds::protocol_api::CBaseChannelImpl< T >::pushBinaryAttachmentCmd ( const MiscCommon::BYTEVector_t _data,
const std::string &  _fileName,
uint16_t  _cmdSource 
)
inline

◆ pushMsg() [1/2]

template<class T>
template<ECmdType _cmd, class A >
void dds::protocol_api::CBaseChannelImpl< T >::pushMsg ( const A &  _attachment)
inline

◆ pushMsg() [2/2]

template<class T>
template<ECmdType _cmd>
void dds::protocol_api::CBaseChannelImpl< T >::pushMsg ( )
inline

◆ registerDisconnectEventHandler()

template<class T>
void dds::protocol_api::CBaseChannelImpl< T >::registerDisconnectEventHandler ( handlerDisconnectEventFunction_t  _handler)
inline

◆ remoteEndIDString()

template<class T>
std::string dds::protocol_api::CBaseChannelImpl< T >::remoteEndIDString ( )
inline

◆ sendYourself() [1/2]

template<class T>
template<ECmdType _cmd, class A >
void dds::protocol_api::CBaseChannelImpl< T >::sendYourself ( const A &  _attachment)
inline

◆ sendYourself() [2/2]

template<class T>
template<ECmdType _cmd>
void dds::protocol_api::CBaseChannelImpl< T >::sendYourself ( )
inline

◆ setChannelType()

template<class T>
void dds::protocol_api::CBaseChannelImpl< T >::setChannelType ( EChannelType  _channelType)
inline

◆ socket()

template<class T>
boost::asio::ip::tcp::socket& dds::protocol_api::CBaseChannelImpl< T >::socket ( )
inline

◆ start()

template<class T>
void dds::protocol_api::CBaseChannelImpl< T >::start ( )
inline

◆ started()

template<class T>
bool dds::protocol_api::CBaseChannelImpl< T >::started ( )
inline

◆ stop()

template<class T>
void dds::protocol_api::CBaseChannelImpl< T >::stop ( )
inline

Member Data Documentation

◆ m_channelType

template<class T>
EChannelType dds::protocol_api::CBaseChannelImpl< T >::m_channelType
protected

◆ m_isHandshakeOK

template<class T>
bool dds::protocol_api::CBaseChannelImpl< T >::m_isHandshakeOK
protected

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