DDS  ver. 3.4
Public Types | Public Member Functions | Static Public 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::CChannelEventHandlersImpl dds::protocol_api::CChannelMessageHandlersImpl dds::protocol_api::CStatImpl dds::protocol_api::CBaseEventHandlersImpl< EChannelEvents > dds::protocol_api::CBaseEventHandlersImpl< ECmdType > 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 Member Functions

 DDS_DECLARE_EVENT_HANDLER_CLASS (CChannelEventHandlersImpl) DDS_DECLARE_EVENT_HANDLER_CLASS(CChannelMessageHandlersImpl) protected
 
 ~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 ()
 
void accumulativePushMsg (CProtocolMessage::protocolMessagePtr_t _msg, ECmdType _cmd)
 
template<ECmdType _cmd, class A >
void accumulativePushMsg (const A &_attachment, uint64_t _protocolHeaderID=0)
 
template<ECmdType _cmd>
void accumulativePushMsg (uint64_t _protocolHeaderID=0)
 
void pushMsg (CProtocolMessage::protocolMessagePtr_t _msg, ECmdType _cmd, uint64_t _protocolHeaderID=0)
 
template<ECmdType _cmd, class A >
void pushMsg (const A &_attachment, uint64_t _protocolHeaderID=0)
 
template<ECmdType _cmd>
void pushMsg (uint64_t _protocolHeaderID=0)
 
template<ECmdType _cmd, class A >
void sendYourself (const A &_attachment, uint64_t _protocolHeaderID=0)
 
template<ECmdType _cmd>
void sendYourself (uint64_t _protocolHeaderID=0)
 
void pushBinaryAttachmentCmd (const std::string &_srcFilePath, const std::string &_fileName, uint16_t _cmdSource, uint64_t _protocolHeaderID)
 
void pushBinaryAttachmentCmd (const MiscCommon::BYTEVector_t &_data, const std::string &_fileName, uint16_t _cmdSource, uint64_t _protocolHeaderID)
 
void processBinaryAttachmentStartCmd (const SSenderInfo &_sender, SCommandAttachmentImpl< cmdBINARY_ATTACHMENT_START >::ptr_t _attachment)
 
void processBinaryAttachmentCmd (const SSenderInfo &_sender, SCommandAttachmentImpl< cmdBINARY_ATTACHMENT >::ptr_t _attachment)
 
bool started ()
 
std::string remoteEndIDString ()
 
uint64_t getProtocolHeaderID () const
 
- Public Member Functions inherited from dds::protocol_api::CStatImpl
 CStatImpl (boost::asio::io_context &_context)
 
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

template<class... Args>
static connectionPtr_t makeNew (boost::asio::io_context &_service, uint64_t _protocolHeaderID, Args &(... args))
 

Protected Attributes

bool m_isHandshakeOK
 
EChannelType m_channelType
 
std::string m_sessionID
 
uint64_t m_protocolHeaderID
 
boost::asio::io_context & m_ioContext
 

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 ( )
inline

Member Function Documentation

◆ accumulativePushMsg() [1/3]

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

◆ accumulativePushMsg() [2/3]

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

◆ accumulativePushMsg() [3/3]

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

◆ DDS_DECLARE_EVENT_HANDLER_CLASS()

template<class T>
dds::protocol_api::CBaseChannelImpl< T >::DDS_DECLARE_EVENT_HANDLER_CLASS ( CChannelEventHandlersImpl  )
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

◆ getProtocolHeaderID()

template<class T>
uint64_t dds::protocol_api::CBaseChannelImpl< T >::getProtocolHeaderID ( ) const
inline

◆ isHanshakeOK()

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

◆ makeNew()

template<class T>
template<class... Args>
static connectionPtr_t dds::protocol_api::CBaseChannelImpl< T >::makeNew ( boost::asio::io_context &  _service,
uint64_t  _protocolHeaderID,
Args &  ... args 
)
inlinestatic

◆ processBinaryAttachmentCmd()

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

◆ processBinaryAttachmentStartCmd()

template<class T>
void dds::protocol_api::CBaseChannelImpl< T >::processBinaryAttachmentStartCmd ( const SSenderInfo _sender,
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,
uint64_t  _protocolHeaderID 
)
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,
uint64_t  _protocolHeaderID 
)
inline

◆ pushMsg() [1/3]

template<class T>
void dds::protocol_api::CBaseChannelImpl< T >::pushMsg ( CProtocolMessage::protocolMessagePtr_t  _msg,
ECmdType  _cmd,
uint64_t  _protocolHeaderID = 0 
)
inline

◆ pushMsg() [2/3]

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

◆ pushMsg() [3/3]

template<class T>
template<ECmdType _cmd>
void dds::protocol_api::CBaseChannelImpl< T >::pushMsg ( uint64_t  _protocolHeaderID = 0)
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,
uint64_t  _protocolHeaderID = 0 
)
inline

◆ sendYourself() [2/2]

template<class T>
template<ECmdType _cmd>
void dds::protocol_api::CBaseChannelImpl< T >::sendYourself ( uint64_t  _protocolHeaderID = 0)
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_ioContext

template<class T>
boost::asio::io_context& dds::protocol_api::CBaseChannelImpl< T >::m_ioContext
protected

◆ m_isHandshakeOK

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

◆ m_protocolHeaderID

template<class T>
uint64_t dds::protocol_api::CBaseChannelImpl< T >::m_protocolHeaderID
protected

◆ m_sessionID

template<class T>
std::string dds::protocol_api::CBaseChannelImpl< T >::m_sessionID
protected

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