hmbdc
simplify-high-performance-messaging-programming
 All Classes Namespaces Functions Variables Friends Pages
Public Member Functions | List of all members
hmbdc::app::tcpcast::recvtransportengine_detail::RecvTransportEngine< OutputBuffer, MsgArbitrator > Struct Template Reference

impl class More...

#include <RecvTransportEngine.hpp>

Inheritance diagram for hmbdc::app::tcpcast::recvtransportengine_detail::RecvTransportEngine< OutputBuffer, MsgArbitrator >:
hmbdc::app::tcpcast::RecvTransport hmbdc::time::TimerManager hmbdc::time::ReoccuringTimer hmbdc::app::Client< RecvTransportEngine< OutputBuffer, MsgArbitrator > > hmbdc::app::tcpcast::Transport hmbdc::time::Timer

Public Member Functions

 RecvTransportEngine (Config const &cfg, OutputBuffer &outputBuffer, MsgArbitrator arb=NoOpArb())
 ctor More...
 
void rotate ()
 if the user choose no to have a Context to manage and run the engine this method can be called from any thread from time to time to have the engine do its job More...
 
void messageDispatchingStartedCb (uint16_t threadSerialNumber) override
 start the show by schedule the message recv
 
void stoppedCb (std::exception const &e) override
 should not happen ever unless an exception thrown More...
 
void invokedCb (uint16_t threadSerialNumber) HMBDC_RESTRICT override
 power the io_service and other things
 
void handleMessageCb (Subscribe const &t)
 only used by MD
 
void handleMessageCb (Unsubscribe const &t)
 only used by MD
 
void handleMessageCb (TopicSource const &t)
 only used by MD
 
- Public Member Functions inherited from hmbdc::time::TimerManager
void schedule (SysTime fireAt, Timer &timer)
 schedule the timer to start at a specific time More...
 
void cancel (Timer &timer)
 cancel a timer previously scheduled with the TimerManager More...
 
- Public Member Functions inherited from hmbdc::app::Client< RecvTransportEngine< OutputBuffer, MsgArbitrator > >
char const * hmbdcName () const
 return the name of thread that runs this client, override if necessary More...
 
std::tuple< char const *, int > schedSpec () const
 an overrideable method. returns the schedule policy and priority, override if necessary priority is only used when policy is "SCHED_RR", or "SCHED_FIFO" More...
 
size_t maxBatchMessageCount () const
 an overridable method. client receives events in batches and the max batch size is controllable when running in direct mode Context. Here is to specify the max size. More...
 
virtual bool droppedCb ()
 callback called after the Client is safely taken out of the Context More...
 
virtual ~Client ()
 trivial
 
void stopped (std::exception const &e) noexcept
 the following are for internal use, don't change or override
 

Additional Inherited Members

- Protected Member Functions inherited from hmbdc::app::Client< RecvTransportEngine< OutputBuffer, MsgArbitrator > >
void batchDone ()
 the derived user's Client has the option to stop the current batch of event dispatching. More...
 

Detailed Description

template<typename OutputBuffer, typename MsgArbitrator>
struct hmbdc::app::tcpcast::recvtransportengine_detail::RecvTransportEngine< OutputBuffer, MsgArbitrator >

impl class

this needs to be created using NetContext and start in an app::Context

Template Parameters
OutputBuffertype of buffer to hold resulting network messages

Constructor & Destructor Documentation

template<typename OutputBuffer, typename MsgArbitrator>
hmbdc::app::tcpcast::recvtransportengine_detail::RecvTransportEngine< OutputBuffer, MsgArbitrator >::RecvTransportEngine ( Config const &  cfg,
OutputBuffer &  outputBuffer,
MsgArbitrator  arb = NoOpArb() 
)
inline

ctor

io_service could be passed in by user, in this case NO more than two threads should power this io_service instance since that would violate the thread garantee of Client, which is no callbacks are called in parallel

Parameters
cfgspecify the details of the tcpcast transport
outputBufferholding the results
arbarbitrator instance to decide which messages to drop and keep; it ONLY supports hmbdc message (AFTER topic filtering) level (NO packet level since it is tcp)

Member Function Documentation

template<typename OutputBuffer, typename MsgArbitrator>
void hmbdc::app::tcpcast::recvtransportengine_detail::RecvTransportEngine< OutputBuffer, MsgArbitrator >::rotate ( )
inline

if the user choose no to have a Context to manage and run the engine this method can be called from any thread from time to time to have the engine do its job

thread safe and non-blocking, if the engine is already being powered by a Context, this method has no effect

template<typename OutputBuffer, typename MsgArbitrator>
void hmbdc::app::tcpcast::recvtransportengine_detail::RecvTransportEngine< OutputBuffer, MsgArbitrator >::stoppedCb ( std::exception const &  e)
inlineoverridevirtual

should not happen ever unless an exception thrown

Parameters
eexception thown

Reimplemented from hmbdc::app::Client< RecvTransportEngine< OutputBuffer, MsgArbitrator > >.


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