famouso::mw::afp::defrag::MultiSourceDemux< DCP > Class Template Reference
Policy: Event demultiplexer that can handle events from multiple sources, but only one event per source simultaneuosly. More...
#include <MultiSourceDemux.h>
Data Structures | |
class | Event |
Internal event representation. | |
Public Types | |
typedef NoEventSeqHeaderSupport< DCP > | EventSeqHeaderPolicy |
Public Member Functions | |
MultiSourceDemux (flen_t mtu) | |
Constructor. | |
~MultiSourceDemux () | |
Destructor. | |
void * | get_defragmenter_handle (const Headers< DCP > &header, const KeyType &event_key) |
Return defragmenter handle of fragment. | |
Defragmenter< DCP > * | get_defragmenter (void *handle) |
Return Defragmenter from handle. | |
void | free_defragmenter (void *handle) |
Frees defragmenter. |
Detailed Description
template<class DCP>
class famouso::mw::afp::defrag::MultiSourceDemux< DCP >
Policy: Event demultiplexer that can handle events from multiple sources, but only one event per source simultaneuosly.
IMPORTANT: This demux policy cannot handle multiple arriving events at one time. Thus multithreading will cause problems if threads share one DefragmentationProcessor! You also have to ensure that a received event's data is not needed anymore when next event's fragments are going to be processed!
Use this policy for channels without packet loss, reordering and late duplicates or if you are sure that fragments of only one event per source will be received during defragmentation. This policy is a little robust concerning packet loss, but may lead to erroneous events if first fragment is lost.
This policy does not use event sequence numbers.
Alternatives: SingleEventDemux, EventSeqDemux
Member Typedef Documentation
typedef NoEventSeqHeaderSupport<DCP> famouso::mw::afp::defrag::MultiSourceDemux< DCP >::EventSeqHeaderPolicy |
Constructor & Destructor Documentation
famouso::mw::afp::defrag::MultiSourceDemux< DCP >::MultiSourceDemux | ( | flen_t | mtu | ) | [inline] |
Constructor.
famouso::mw::afp::defrag::MultiSourceDemux< DCP >::~MultiSourceDemux | ( | ) | [inline] |
Member Function Documentation
void famouso::mw::afp::defrag::MultiSourceDemux< DCP >::free_defragmenter | ( | void * | handle | ) | [inline] |
Frees defragmenter.
- Parameters:
-
handle Defragmenter's handle
References famouso::mw::afp::defrag::detail::PointerMap< KeyT, ItemT, N >::erase().
Referenced by famouso::mw::afp::defrag::MultiSourceDemux< DCP >::get_defragmenter_handle().
Defragmenter<DCP>* famouso::mw::afp::defrag::MultiSourceDemux< DCP >::get_defragmenter | ( | void * | handle | ) | [inline] |
Return Defragmenter from handle.
void* famouso::mw::afp::defrag::MultiSourceDemux< DCP >::get_defragmenter_handle | ( | const Headers< DCP > & | header, | |
const KeyType & | event_key | |||
) | [inline] |
Return defragmenter handle of fragment.
- Parameters:
-
header Header of the fragment event_key Event key to distingush events
- Returns:
- Defragmenter handle, zero to drop the fragment.
References famouso::mw::afp::defrag::detail::PointerMap< KeyT, ItemT, N >::end(), famouso::mw::afp::defrag::Headers< DCP >::ext_length(), FAMOUSO_ASSERT, famouso::mw::afp::defrag::detail::PointerMap< KeyT, ItemT, N >::find(), famouso::mw::afp::defrag::Headers< DCP >::first_fragment, famouso::mw::afp::defrag::MultiSourceDemux< DCP >::free_defragmenter(), famouso::mw::afp::defrag::Headers< DCP >::fseq, famouso::mw::afp::defrag::detail::PointerMap< KeyT, ItemT, N >::insert(), and famouso::mw::afp::defrag::Headers< DCP >::length().
The documentation for this class was generated from the following file:
- include/mw/afp/defrag/MultiSourceDemux.h