 |
Belle II Software
release-05-02-19
|
13 #include <framework/core/Module.h>
36 class AsyncWrapper :
public Module {
static int numAvailableEvents()
Retun number of events available in the RingBuffer.
static RingBuffer * s_currentRingBuffer
if s_isAsync is true, this contains the corresponding RingBuffer, see numAvailableEvents().
static bool s_isAsync
true if the current process is on the receiving (async) side of an AsyncWrapper.
Module to decode data store contents from RingBuffer.
Module for encoding data store contents into a RingBuffer.
void terminate() override
Call this from terminate().
ModulePtr getWrapped()
Access wrapped module (owned by AsyncWrapper).
TxModule * m_tx
transmitting module.
Class to manage a Ring Buffer placed in an IPC shared memory.
static bool isAsync()
returns true if the current process is on the receiving (async) side of an AsyncWrapper.
void event() override
Call this from event().
bool m_discardOldEvents
Discard old events when buffer is full.
Abstract base class for different kinds of events.
std::shared_ptr< Module > ModulePtr
Defines a pointer to a module object as a boost shared pointer.
RxModule * m_rx
receiving module.
void initialize() override
Call this from initialize().
AsyncWrapper(const std::string &moduleType)
Wrap am module of given type.
ModulePtr m_wrappedModule
The wrapped module.
RingBuffer * m_ringBuffer
shared memory buffer