hmbdc
simplify-high-performance-messaging-programming
Private Member Functions | Friends | List of all members
hmbdc::app::netmap::RecvTransportEngine< OutBuffer, MsgArbitrator > Struct Template Reference

impl class, More...

#include <RecvTransportEngine.hpp>

Inheritance diagram for hmbdc::app::netmap::RecvTransportEngine< OutBuffer, MsgArbitrator >:
hmbdc::app::netmap::RecvTransport hmbdc::app::Client< RecvTransportEngine< OutBuffer, MsgArbitrator > > hmbdc::app::MessageHandler< RecvTransportEngine< OutBuffer, MsgArbitrator >, Subscribe, Unsubscribe > hmbdc::app::MessageHandler< RecvTransportEngine< OutBuffer, MsgArbitrator >, Messages... > hmbdc::pattern::PoolConsumer

Private Member Functions

 RecvTransportEngine (Config const &config, OutBuffer &outBuffer, MsgArbitrator arb=NoOpArb())
 ctor More...
 
void syncNetmap () HMBDC_RESTRICT
 sync using busy wait or poll depending on config More...
 

Friends

struct hmbdc::app::netmap::NetContext
 

Additional Inherited Members

- Public Member Functions inherited from hmbdc::app::Client< RecvTransportEngine< OutBuffer, MsgArbitrator > >
 Client ()
 trivial constructor
 
void messageDispatchingStartedCb (uint16_t threadSerialNumber) override
 called before any messages got dispatched - only once More...
 
void stoppedCb (std::exception const &e) override
 callback called when this Client is taken out of message dispatching More...
 
bool droppedCb () override
 callback called after the Client is safely taken out of the Context More...
 
void invokedCb (uint16_t threadSerialNumber) override
 this callback is called all the time (frequently) More...
 
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...
 
void handleRangeImpl (BufIt &it, BufIt const &end, uint16_t threadSerialNumber) override
 internal use, don't change or override
 

Detailed Description

template<typename OutBuffer, typename MsgArbitrator = RecvTransport::NoOpArb>
struct hmbdc::app::netmap::RecvTransportEngine< OutBuffer, 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
MsgArbitratorarbitrator to decide drop or keep messages, suited to arbitrate between different recv transports. By default, keeping all

Constructor & Destructor Documentation

template<typename OutBuffer, typename MsgArbitrator = RecvTransport::NoOpArb>
hmbdc::app::netmap::RecvTransportEngine< OutBuffer, MsgArbitrator >::RecvTransportEngine ( Config const &  config,
OutBuffer &  outBuffer,
MsgArbitrator  arb = NoOpArb() 
)
inlineprivate

ctor

Parameters
cfgspecify the details of the mcast transport
outputBufferholding the results
arbarbitrator instance to decide which messages to drop and keep; it supports either raw netmap (udp) packet (BEFORE topic filtering) or hmbdc message (AFTER topic filtering) level arbitration depending on which one of int operator()(void* bytes, size_t len) or int operator()(TransportMessageHeader const* header) presents in the arb

Member Function Documentation

template<typename OutBuffer, typename MsgArbitrator = RecvTransport::NoOpArb>
void hmbdc::app::netmap::RecvTransportEngine< OutBuffer, MsgArbitrator >::syncNetmap ( )
inlineprivate

sync using busy wait or poll depending on config

it turns out busy wait performance is very poor when using vale poll works mostly, but it works well only when an enough timeout is given less than 10 milli wont work well


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