hmbdc
simplify-high-performance-messaging-programming
 All Classes Namespaces Functions Variables Friends Pages
Public Member Functions | List of all members
hmbdc::app::utils::pingpong_detail::Ponger< Sender > Struct Template Reference
Inheritance diagram for hmbdc::app::utils::pingpong_detail::Ponger< Sender >:
hmbdc::app::Client< Ponger< Sender >, Ball >

Public Member Functions

void messageDispatchingStartedCb (uint16_t) override
 called before any messages got dispatched - only once More...
 
void stoppedCb (exception const &e) override
 callback called when this Client is taken out of message dispatching More...
 
- Public Member Functions inherited from hmbdc::app::Client< Ponger< Sender >, Ball >
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 void invokedCb (uint16_t threadSerialNumber)
 this callback is called all the time (frequently) - the exact timing is after a batch of messages are dispatched. After this call returns, the previously dispatched message's addresses are no longer valid, which means if you cache the event addresses in the previous handleMessageCb()s, you cannot use those after the return of the next invokeCb function. 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< Ponger< Sender >, Ball >
void batchDone ()
 the derived user's Client has the option to stop the current batch of event dispatching. More...
 

Member Function Documentation

template<typename Sender >
void hmbdc::app::utils::pingpong_detail::Ponger< Sender >::messageDispatchingStartedCb ( uint16_t  threadSerialNumber)
inlineoverridevirtual

called before any messages got dispatched - only once

this is the place some preparation code goes to

Parameters
threadSerialNumbernormally the number indicating which thread is in action, except when INTERESTS_SIZE == 0 it is another undefined value

Reimplemented from hmbdc::app::Client< Ponger< Sender >, Ball >.

template<typename Sender >
void hmbdc::app::utils::pingpong_detail::Ponger< Sender >::stoppedCb ( exception const &  e)
inlineoverridevirtual

callback called when this Client is taken out of message dispatching

after this call the Client is still at hook from the Context point of view (until droppedCb is called), so don't delete this Client yet or add it back to the Context. any exception thrown here is ignored,

Parameters
ethe exception that caused the Client to be taken out of message dispatching e could be thrown by the Client itself in a callback function to voluntarily take itself out

Reimplemented from hmbdc::app::Client< Ponger< Sender >, Ball >.


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