DDS  ver. 3.4
Public Types | Public Member Functions | Protected Member Functions | List of all members
dds::protocol_api::CConnectionManagerImpl< T, A > Class Template Reference

Base class for connection managers. More...

#include <ConnectionManagerImpl.h>

Public Types

typedef SChannelInfo< T > channelInfo_t
 
typedef SWeakChannelInfo< T > weakChannelInfo_t
 
typedef std::function< bool(const channelInfo_t &_channelInfo, bool &)> conditionFunction_t
 
using channelContainerCache_t = std::map< uint64_t, weakChannelInfo_t >
 

Public Member Functions

 CConnectionManagerImpl (size_t _minPort, size_t _maxPort, bool _useUITransport)
 
 ~CConnectionManagerImpl ()
 
void start (bool _join=true, unsigned int _nThreads=0)
 
void runService (short _counter, boost::asio::io_context &_io_context)
 
void stop ()
 

Protected Member Functions

void updateChannelProtocolHeaderID (const weakChannelInfo_t &_channelInfo)
 
weakChannelInfo_t getChannelByID (uint64_t _protocolHeaderID)
 
weakChannelInfo_t::container_t getChannels (conditionFunction_t _condition=nullptr)
 
template<ECmdType _cmd, class AttachmentType >
void broadcastMsg (const AttachmentType &_attachment, conditionFunction_t _condition=nullptr)
 
template<ECmdType _cmd, class AttachmentType >
void accumulativeBroadcastMsg (const AttachmentType &_attachment, conditionFunction_t _condition=nullptr)
 
template<ECmdType _cmd>
void broadcastSimpleMsg (conditionFunction_t _condition=nullptr)
 
void broadcastBinaryAttachmentCmd (const std::string &_srcFilePath, const std::string &_fileName, uint16_t _cmdSource, conditionFunction_t _condition=nullptr)
 
void broadcastBinaryAttachmentCmd (const MiscCommon::BYTEVector_t &_data, const std::string &_fileName, uint16_t _cmdSource, conditionFunction_t _condition=nullptr)
 
size_t countNofChannels (conditionFunction_t _condition=nullptr)
 
void addDisconnectedChannelsStatToStat (SReadStat &_readStat, SWriteStat &_writeStat)
 

Detailed Description

template<class T, class A>
class dds::protocol_api::CConnectionManagerImpl< T, A >

Base class for connection managers.

Member Typedef Documentation

◆ channelContainerCache_t

template<class T, class A>
using dds::protocol_api::CConnectionManagerImpl< T, A >::channelContainerCache_t = std::map<uint64_t, weakChannelInfo_t>

◆ channelInfo_t

template<class T, class A>
typedef SChannelInfo<T> dds::protocol_api::CConnectionManagerImpl< T, A >::channelInfo_t

◆ conditionFunction_t

template<class T, class A>
typedef std::function<bool(const channelInfo_t& _channelInfo, bool& )> dds::protocol_api::CConnectionManagerImpl< T, A >::conditionFunction_t

◆ weakChannelInfo_t

template<class T, class A>
typedef SWeakChannelInfo<T> dds::protocol_api::CConnectionManagerImpl< T, A >::weakChannelInfo_t

Constructor & Destructor Documentation

◆ CConnectionManagerImpl()

template<class T, class A>
dds::protocol_api::CConnectionManagerImpl< T, A >::CConnectionManagerImpl ( size_t  _minPort,
size_t  _maxPort,
bool  _useUITransport 
)
inline

◆ ~CConnectionManagerImpl()

template<class T, class A>
dds::protocol_api::CConnectionManagerImpl< T, A >::~CConnectionManagerImpl ( )
inline

Member Function Documentation

◆ accumulativeBroadcastMsg()

template<class T, class A>
template<ECmdType _cmd, class AttachmentType >
void dds::protocol_api::CConnectionManagerImpl< T, A >::accumulativeBroadcastMsg ( const AttachmentType &  _attachment,
conditionFunction_t  _condition = nullptr 
)
inlineprotected

◆ addDisconnectedChannelsStatToStat()

template<class T, class A>
void dds::protocol_api::CConnectionManagerImpl< T, A >::addDisconnectedChannelsStatToStat ( SReadStat _readStat,
SWriteStat _writeStat 
)
inlineprotected

◆ broadcastBinaryAttachmentCmd() [1/2]

template<class T, class A>
void dds::protocol_api::CConnectionManagerImpl< T, A >::broadcastBinaryAttachmentCmd ( const std::string &  _srcFilePath,
const std::string &  _fileName,
uint16_t  _cmdSource,
conditionFunction_t  _condition = nullptr 
)
inlineprotected

◆ broadcastBinaryAttachmentCmd() [2/2]

template<class T, class A>
void dds::protocol_api::CConnectionManagerImpl< T, A >::broadcastBinaryAttachmentCmd ( const MiscCommon::BYTEVector_t _data,
const std::string &  _fileName,
uint16_t  _cmdSource,
conditionFunction_t  _condition = nullptr 
)
inlineprotected

◆ broadcastMsg()

template<class T, class A>
template<ECmdType _cmd, class AttachmentType >
void dds::protocol_api::CConnectionManagerImpl< T, A >::broadcastMsg ( const AttachmentType &  _attachment,
conditionFunction_t  _condition = nullptr 
)
inlineprotected

◆ broadcastSimpleMsg()

template<class T, class A>
template<ECmdType _cmd>
void dds::protocol_api::CConnectionManagerImpl< T, A >::broadcastSimpleMsg ( conditionFunction_t  _condition = nullptr)
inlineprotected

◆ countNofChannels()

template<class T, class A>
size_t dds::protocol_api::CConnectionManagerImpl< T, A >::countNofChannels ( conditionFunction_t  _condition = nullptr)
inlineprotected

◆ getChannelByID()

template<class T, class A>
weakChannelInfo_t dds::protocol_api::CConnectionManagerImpl< T, A >::getChannelByID ( uint64_t  _protocolHeaderID)
inlineprotected

◆ getChannels()

template<class T, class A>
weakChannelInfo_t::container_t dds::protocol_api::CConnectionManagerImpl< T, A >::getChannels ( conditionFunction_t  _condition = nullptr)
inlineprotected

◆ runService()

template<class T, class A>
void dds::protocol_api::CConnectionManagerImpl< T, A >::runService ( short  _counter,
boost::asio::io_context &  _io_context 
)
inline

◆ start()

template<class T, class A>
void dds::protocol_api::CConnectionManagerImpl< T, A >::start ( bool  _join = true,
unsigned int  _nThreads = 0 
)
inline

◆ stop()

template<class T, class A>
void dds::protocol_api::CConnectionManagerImpl< T, A >::stop ( )
inline

◆ updateChannelProtocolHeaderID()

template<class T, class A>
void dds::protocol_api::CConnectionManagerImpl< T, A >::updateChannelProtocolHeaderID ( const weakChannelInfo_t _channelInfo)
inlineprotected

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