diff --git a/PPI/Connectors.cc b/PPI/Connectors.cc index a39857ef5519197bdf5327d08b1483c44f7960e3..22f39296691b132ecee76ebb2d22272eec171450 100644 --- a/PPI/Connectors.cc +++ b/PPI/Connectors.cc @@ -40,7 +40,14 @@ prefix_ void senf::ppi::connector::Connector::connect(Connector & target) { - SENF_ASSERT( module_ && ! peer_ && target.module_ && ! target.peer_ ); + // The connector is not registered -> route() or noroute() statement missing + SENF_ASSERT( module_ ); + // The connector is already connected + SENF_ASSERT( ! peer_ ); + // The target connector is not registered -> route() or noroute() statement missing + SENF_ASSERT( target.module_ ); + // The target connector is already connected + SENF_ASSERT( ! target.peer_ ); if (! (packetTypeID() == typeid(void) || target.packetTypeID() == typeid(void) || packetTypeID() == target.packetTypeID()) ) @@ -61,6 +68,7 @@ prefix_ void senf::ppi::connector::Connector::connect(Connector & target) prefix_ void senf::ppi::connector::Connector::disconnect() { + // Cannot disconnected a non-connected connector SENF_ASSERT( peer_ ); Connector & peer (*peer_); peer_ = 0; diff --git a/PPI/Connectors.cci b/PPI/Connectors.cci index 089600183fc06e55b7ef338af081ebfb92259df4..122e9e0c001a6cad4934706be132bee88b4dd3fe 100644 --- a/PPI/Connectors.cci +++ b/PPI/Connectors.cci @@ -36,6 +36,7 @@ prefix_ senf::ppi::connector::Connector & senf::ppi::connector::Connector::peer() const { + // The connector is not connected SENF_ASSERT(peer_); return *peer_; } @@ -43,6 +44,8 @@ prefix_ senf::ppi::connector::Connector & senf::ppi::connector::Connector::peer( prefix_ senf::ppi::module::Module & senf::ppi::connector::Connector::module() const { + // The connector is not registered in the module -> probably a route() or noroute() statement is + // missing. SENF_ASSERT(module_); return *module_; } @@ -159,6 +162,7 @@ prefix_ senf::ppi::connector::PassiveConnector::PassiveConnector() prefix_ void senf::ppi::connector::PassiveConnector::emit() { + // No event callback has been registered (onEvent() call missing) SENF_ASSERT(callback_); if (!throttled()) callback_(); @@ -227,6 +231,7 @@ senf::ppi::connector::InputConnector::end() prefix_ senf::Packet senf::ppi::connector::InputConnector::peek() const { + // Cannot peek() head of empty queue SENF_ASSERT( ! queue_.empty() ); return queue_.back(); } diff --git a/PPI/DebugModules.hh b/PPI/DebugModules.hh index 0d7db73e029a2182eaf6a6d0ff1ed55263f0890e..85e51eb6b260201e64e15a6d90241a2b36d4025d 100644 --- a/PPI/DebugModules.hh +++ b/PPI/DebugModules.hh @@ -229,9 +229,9 @@ namespace debug { throttled. \note ActiveFeederSink does \e not have a termination condition like ActiveFeederSource, it - relies on the network to throttle it's input. Also, the same not as for - ActiveFeederSource applies here too: You need to ensure, that no events are active - eventually or senf::ppi::run will not return. + relies on the network to throttle it's input. Additionally, the restrictions of + ActiveFeederSource apply here too: You need to ensure, that no (additional) events are + active (eventually) or senf::ppi::run will not return. ActiveFeederSink is not a module but a collection of two modules: a PassiveSink and an ActiveFeeder. diff --git a/PPI/Module.hh b/PPI/Module.hh index 1062fb07e38c99536add39cea1ff4894cad129d7..c2faf562ab03ee662321de8e6ff0cda07cc57c50 100644 --- a/PPI/Module.hh +++ b/PPI/Module.hh @@ -158,6 +158,13 @@ namespace module { event.enable(); } + void v_init() { + // Optional. Called after before running the module but after connections have been + // set up. This is either directly before senf::ppi::run() or senf::ppi::init() is + // called or, for modules created while the PPI is already running, after returning + // from all event handlers but before going back to the event loop. + } + }; \endcode @@ -290,7 +297,13 @@ namespace module { private: #endif - virtual void v_init(); + virtual void v_init(); ///< Called after module setup + /**< This member is called directly before the PPI (resumes) + execution. It is called after connections have been + setup before entering the PPI main loop. + + You may overload this member. Your overload should + always call the base-class implementation. */ #ifndef DOXYGEN public: diff --git a/PPI/ModuleManager.cc b/PPI/ModuleManager.cc index 91a437333f0d2e054bb449a57ac04072c7afa959..0aab808b44543b64ae4c4cc76834f61bcf6fee3d 100644 --- a/PPI/ModuleManager.cc +++ b/PPI/ModuleManager.cc @@ -71,7 +71,7 @@ prefix_ void senf::ppi::ModuleManager::run() prefix_ senf::ppi::ModuleManager::ModuleManager() : running_(false), terminate_(false), initRunner_ ("senf::ppi::init", membind(&ModuleManager::init, this), false, - scheduler::EventEvent::PRIORITY_LOW) + scheduler::EventHook::POST) {} ///////////////////////////////cc.e//////////////////////////////////////// diff --git a/PPI/ModuleManager.hh b/PPI/ModuleManager.hh index 262dc4ce8b82b3fee6f00edeb63c0bcd4624a72c..76ba447da4505521b4c3e054eaf337e19ed0d87c 100644 --- a/PPI/ModuleManager.hh +++ b/PPI/ModuleManager.hh @@ -106,7 +106,7 @@ namespace ppi { InitQueue initQueue_; - scheduler::EventEvent initRunner_; + scheduler::EventHook initRunner_; friend class module::Module; friend class Initializable; diff --git a/Packets/ArrayParser.cti b/Packets/ArrayParser.cti index e0c5dfd231b48f432edfd6f57e36728349544541..874b2480f23a349af0c92e38b9442631ff986b18 100644 --- a/Packets/ArrayParser.cti +++ b/Packets/ArrayParser.cti @@ -69,6 +69,7 @@ prefix_ typename senf::ArrayParser<elements,ElementParser>::value_type senf::ArrayParser<elements,ElementParser>::operator[](difference_type i) const { + // Access out of range element SENF_ASSERT( i>=0 && i < difference_type(elements) ); return begin()[i]; } diff --git a/Packets/Mainpage.dox b/Packets/Mainpage.dox index a164bd16ddc0f3cfc4cd254fea9e2d204b55b53f..cb9444a0bfb57cb1bb4d5c70e2b393a4dae7d050 100644 --- a/Packets/Mainpage.dox +++ b/Packets/Mainpage.dox @@ -667,7 +667,8 @@ itself but gives us some information about the packet: A timestamp, the interface the packet was received on or other processing related information. - This type of information can be stored using the annotation interface. + This type of information can be stored using the annotation interface. The following example + will read packet data and will store the read timestamp as a packet annotation. \code struct Timestamp { @@ -689,7 +690,7 @@ } \endcode - It is very important to define a specific structure (or class) type for each type of + It is very important to define a specific structure (or class or enum) type for each type of annotation. \e Never directly store a fundamental type as an annotation: The name of the type is used to look up the annotation, so you can store only one annotation for each built-in type. \c typedef does not help since \c typedef does not introduce new type names, it only defines an @@ -722,6 +723,9 @@ } \endcode + Every annotation is automatically default-initialized, there is no way to query, whether a + packet holds a specific annotation -- every packet conceptually always holds all annotations. + You should use annotations economically: Every annotation type used in your program will allocate an annotation slot in \e all packet data structures. So don't use hundreds of different annotation types if this is not really necessary: Reuse annotation types where possible or diff --git a/Packets/Packet.hh b/Packets/Packet.hh index bb2ac904cf3bd0c0e24d422c74cbb71cbb4d8422..ac77eedd960592819d9eaf2ab6af386c53809a19 100644 --- a/Packets/Packet.hh +++ b/Packets/Packet.hh @@ -352,6 +352,8 @@ namespace senf { \endcode (This type is not POD since \c std::string is not POD) + \see \ref packet_usage_annotation + \implementation The annotation system is implemented quite efficiently since annotations are stored within a packet embedded vector of fixed size (the diff --git a/SConstruct b/SConstruct index 3ae0d5eac4362940a380bc4a527e3de24d51e8dd..b992cd6f55da9a6f09f46a785ce9ddeff90fc314 100644 --- a/SConstruct +++ b/SConstruct @@ -196,7 +196,7 @@ Export('env') # Create Doxyfile.local otherwise doxygen will barf on this non-existent file # Create it even when cleaning, to silence the doxygen builder warnings -if not env.GetOption('clean') and not os.path.exists("Doxyfile.local"): +if not os.path.exists("Doxyfile.local"): Execute(Touch("Doxyfile.local")) # Create local_config.h diff --git a/Scheduler/EventEvent.cc b/Scheduler/EventHook.cc similarity index 74% rename from Scheduler/EventEvent.cc rename to Scheduler/EventHook.cc index f2d80972145acea47af05d2560a04f987346990d..e6ca8c34ac4408f1a6fca2a5510b26b108ede9e8 100644 --- a/Scheduler/EventEvent.cc +++ b/Scheduler/EventHook.cc @@ -21,47 +21,47 @@ // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. /** \file - \brief EventEvent non-inline non-template implementation */ + \brief EventHook non-inline non-template implementation */ -#include "EventEvent.hh" -#include "EventEvent.ih" +#include "EventHook.hh" +#include "EventHook.ih" // Custom includes -//#include "EventEvent.mpp" +//#include "EventHook.mpp" #define prefix_ ///////////////////////////////cc.p//////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// -// senf::scheduler::EventEvent +// senf::scheduler::EventHook -prefix_ void senf::scheduler::EventEvent::v_run() +prefix_ void senf::scheduler::EventHook::v_run() { cb_(); } -prefix_ char const * senf::scheduler::EventEvent::v_type() +prefix_ char const * senf::scheduler::EventHook::v_type() const { return "ee"; } -prefix_ std::string senf::scheduler::EventEvent::v_info() +prefix_ std::string senf::scheduler::EventHook::v_info() const { return ""; } /////////////////////////////////////////////////////////////////////////// -// senf::scheduler::detail::EventEventDispatcher +// senf::scheduler::detail::EventHookDispatcher -prefix_ senf::scheduler::detail::EventEventDispatcher::~EventEventDispatcher() +prefix_ senf::scheduler::detail::EventHookDispatcher::~EventHookDispatcher() { for (EventList::iterator i (events_.begin()); i != events_.end(); ++i) FIFORunner::instance().dequeue(&(*i)); } -prefix_ prefix_ void senf::scheduler::detail::EventEventDispatcher::remove(EventEvent & event) +prefix_ prefix_ void senf::scheduler::detail::EventHookDispatcher::remove(EventHook & event) { EventList::iterator i (EventList::current(event)); if (i == events_.end()) @@ -70,7 +70,7 @@ prefix_ prefix_ void senf::scheduler::detail::EventEventDispatcher::remove(Event events_.erase(i); } -prefix_ void senf::scheduler::detail::EventEventDispatcher::prepareRun() +prefix_ void senf::scheduler::detail::EventHookDispatcher::prepareRun() { for (EventList::iterator i (events_.begin()); i != events_.end(); ++i) i->setRunnable(); @@ -79,7 +79,7 @@ prefix_ void senf::scheduler::detail::EventEventDispatcher::prepareRun() ///////////////////////////////cc.e//////////////////////////////////////// #undef prefix_ -//#include "EventEvent.mpp" +//#include "EventHook.mpp" // Local Variables: diff --git a/Scheduler/EventEvent.cci b/Scheduler/EventHook.cci similarity index 69% rename from Scheduler/EventEvent.cci rename to Scheduler/EventHook.cci index 9cb6acefff5e8c357c9099b59a989530e42a4dcb..fd0e3046a74fb6d39309481d6152173a1fd40bc5 100644 --- a/Scheduler/EventEvent.cci +++ b/Scheduler/EventHook.cci @@ -21,9 +21,9 @@ // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. /** \file - \brief EventEvent inline non-template implementation */ + \brief EventHook inline non-template implementation */ -#include "EventEvent.ih" +#include "EventHook.ih" // Custom includes @@ -31,9 +31,9 @@ ///////////////////////////////cci.p/////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// -// senf::scheduler::EventEvent +// senf::scheduler::EventHook -prefix_ senf::scheduler::EventEvent::EventEvent(std::string const & name, Callback const & cb, +prefix_ senf::scheduler::EventHook::EventHook(std::string const & name, Callback const & cb, bool initiallyEnabled, detail::FIFORunner::TaskInfo::Priority priority) : detail::FIFORunner::TaskInfo(name, priority), cb_ (cb) @@ -42,45 +42,45 @@ prefix_ senf::scheduler::EventEvent::EventEvent(std::string const & name, Callba enable(); } -prefix_ senf::scheduler::EventEvent::~EventEvent() +prefix_ senf::scheduler::EventHook::~EventHook() { - if (detail::EventEventDispatcher::alive()) + if (detail::EventHookDispatcher::alive()) disable(); } -prefix_ void senf::scheduler::EventEvent::disable() +prefix_ void senf::scheduler::EventHook::disable() { if (enabled()) - detail::EventEventDispatcher::instance().remove(*this); + detail::EventHookDispatcher::instance().remove(*this); } -prefix_ void senf::scheduler::EventEvent::enable() +prefix_ void senf::scheduler::EventHook::enable() { if (! enabled()) - detail::EventEventDispatcher::instance().add(*this); + detail::EventHookDispatcher::instance().add(*this); } -prefix_ void senf::scheduler::EventEvent::action(Callback const & cb) +prefix_ void senf::scheduler::EventHook::action(Callback const & cb) { cb_ = cb; } /////////////////////////////////////////////////////////////////////////// -// senf::scheduler::detail::EventEventDispatcher +// senf::scheduler::detail::EventHookDispatcher -prefix_ void senf::scheduler::detail::EventEventDispatcher::add(EventEvent & event) +prefix_ void senf::scheduler::detail::EventHookDispatcher::add(EventHook & event) { events_.push_back(event); FIFORunner::instance().enqueue(&event); } -prefix_ bool senf::scheduler::detail::EventEventDispatcher::empty() +prefix_ bool senf::scheduler::detail::EventHookDispatcher::empty() const { return events_.empty(); } -prefix_ senf::scheduler::detail::EventEventDispatcher::EventEventDispatcher() +prefix_ senf::scheduler::detail::EventHookDispatcher::EventHookDispatcher() {} ///////////////////////////////cci.e/////////////////////////////////////// diff --git a/Scheduler/EventEvent.hh b/Scheduler/EventHook.hh similarity index 77% rename from Scheduler/EventEvent.hh rename to Scheduler/EventHook.hh index 4b0b27fe6e6c409ca2594aed86d1089fd36d766b..d59414fc666c36a3fe331f46bd8cfcd917ae5a70 100644 --- a/Scheduler/EventEvent.hh +++ b/Scheduler/EventHook.hh @@ -21,26 +21,26 @@ // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. /** \file - \brief EventEvent public header */ + \brief EventHook public header */ -#ifndef HH_EventEvent_ -#define HH_EventEvent_ 1 +#ifndef HH_EventHook_ +#define HH_EventHook_ 1 // Custom includes #include <boost/function.hpp> #include "../boost/intrusive/ilist_hook.hpp" #include "FIFORunner.hh" -//#include "EventEvent.mpp" +//#include "EventHook.mpp" ///////////////////////////////hh.p//////////////////////////////////////// namespace senf { namespace scheduler { namespace detail { - struct EventEventListTag; - typedef boost::intrusive::ilist_base_hook<EventEventListTag> EventEventListBase; - class EventEventDispatcher; + struct EventHookListTag; + typedef boost::intrusive::ilist_base_hook<EventHookListTag> EventHookListBase; + class EventHookDispatcher; } /** \brief Event hook event @@ -53,22 +53,20 @@ namespace scheduler { void beforeEventHook(); void afterEventHook(); - senf::scheduler::EventEvent beforeEventHookEvent ( - "beforeEventHook", beforeEventHook, true, senf::scheduler::EventEvent::PRIORITY_LOW); - senf::scheduler::EventEvent afterEventHookEvent ( - "afterEventHook", afterEventHook, true, senf::scheduler::EventEvent::PRIORITY_HIGH); + senf::scheduler::EventHook beforeEventHookEvent ( + "beforeEventHook", beforeEventHook, true, senf::scheduler::EventHook::POST); + senf::scheduler::EventHook afterEventHookEvent ( + "afterEventHook", afterEventHook, true, senf::scheduler::EventHook::PRE); \endcode - This usage assumes, that all ordinary events are registered with \c PRIORITY_NORMAL. - - The EventEvent class is an implementation of the RAII idiom: The event will be automatically - unregistered in the EventEvent destructor. The EventEvent instance should be created within + The EventHook class is an implementation of the RAII idiom: The event will be automatically + unregistered in the EventHook destructor. The EventHook instance should be created within the same scope or on a scope below where the callback is defined (e.g. if the callback is a member function it should be defined as a class member). */ - class EventEvent + class EventHook : public detail::FIFORunner::TaskInfo, - public detail::EventEventListBase + public detail::EventHookListBase { public: /////////////////////////////////////////////////////////////////////////// @@ -76,12 +74,15 @@ namespace scheduler { typedef boost::function<void ()> Callback; + static Priority const PRE = PRIORITY_HIGH; ///< Execute hook BEFORE all other events + static Priority const POST = PRIORITY_LOW; ///< Execute hook AFTER all other events + /////////////////////////////////////////////////////////////////////////// ///\name Structors and default members ///@{ - EventEvent(std::string const & name, Callback const & cb, - bool initiallyEnabled = true, Priority priority = PRIORITY_NORMAL); + EventHook(std::string const & name, Callback const & cb, + bool initiallyEnabled = true, Priority priority = POST); ///< Register an event hook /**< Registers \a cb to be called whenever any other event is signaled by the scheduler. If \a initiallyEnabled is @@ -93,8 +94,8 @@ namespace scheduler { \param[in] initiallyEnabled if set \c false, do not enable callback automatically. \param[in] priority event priority, defaults to - PRIORITY_NORMAL */ - ~EventEvent(); + POST */ + ~EventHook(); ///@} /////////////////////////////////////////////////////////////////////////// @@ -113,15 +114,15 @@ namespace scheduler { Callback cb_; - friend class detail::EventEventDispatcher; + friend class detail::EventHookDispatcher; }; }} ///////////////////////////////hh.e//////////////////////////////////////// -#include "EventEvent.cci" -//#include "EventEvent.ct" -//#include "EventEvent.cti" +#include "EventHook.cci" +//#include "EventHook.ct" +//#include "EventHook.cti" #endif diff --git a/Scheduler/EventEvent.ih b/Scheduler/EventHook.ih similarity index 75% rename from Scheduler/EventEvent.ih rename to Scheduler/EventHook.ih index 823b50b2033d4e460e5470868e5547bcb8574800..e526bce74e4994a5a67462c5d021925a529147f7 100644 --- a/Scheduler/EventEvent.ih +++ b/Scheduler/EventHook.ih @@ -21,10 +21,10 @@ // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. /** \file - \brief EventEvent internal header */ + \brief EventHook internal header */ -#ifndef IH_EventEvent_ -#define IH_EventEvent_ 1 +#ifndef IH_EventHook_ +#define IH_EventHook_ 1 // Custom includes #include "../Utils/singleton.hh" @@ -38,31 +38,31 @@ namespace scheduler { namespace detail { - class EventEventDispatcher - : public singleton<EventEventDispatcher> + class EventHookDispatcher + : public singleton<EventHookDispatcher> { public: - using singleton<EventEventDispatcher>::instance; - using singleton<EventEventDispatcher>::alive; + using singleton<EventHookDispatcher>::instance; + using singleton<EventHookDispatcher>::alive; - void add(EventEvent & event); - void remove(EventEvent & event); + void add(EventHook & event); + void remove(EventHook & event); void prepareRun(); bool empty() const; private: - EventEventDispatcher(); - ~EventEventDispatcher(); + EventHookDispatcher(); + ~EventHookDispatcher(); typedef boost::intrusive::ilist< - EventEventListBase::value_traits<EventEvent>, false > EventList; + EventHookListBase::value_traits<EventHook>, false > EventList; EventList events_; friend void senf::scheduler::restart(); - friend class singleton<EventEventDispatcher>; + friend class singleton<EventHookDispatcher>; }; }}} diff --git a/Scheduler/ReadHelper.ct b/Scheduler/ReadHelper.ct index d5553c9d04c1c3a25a7776e5385d14a7e29d427e..ca4397a90a6dc3350e983ae99af6a1464e50d1e2 100644 --- a/Scheduler/ReadHelper.ct +++ b/Scheduler/ReadHelper.ct @@ -36,7 +36,7 @@ template <class Handle> prefix_ senf::ReadHelper<Handle>::ReadHelper(Handle handle, std::string::size_type maxSize, InternalPredicate * predicate, Callback cb) : handle_(handle), - fde_("ReadHelper", boost::bind(&ReadHelper::dispatchProcess,ptr(this), handle, _1), + fde_("senf::ReadHelper", boost::bind(&ReadHelper::dispatchProcess,ptr(this), handle, _1), handle, senf::scheduler::FdEvent::EV_READ), maxSize_(maxSize), predicate_(predicate), callback_(cb), errno_(0), complete_(false) { diff --git a/Scheduler/Scheduler.cc b/Scheduler/Scheduler.cc index 74761daa127cee2ae11dc7f8f02c73c85780123e..7d865230c912e1ddcbb3371b0fb91a936ef1af39 100644 --- a/Scheduler/Scheduler.cc +++ b/Scheduler/Scheduler.cc @@ -60,7 +60,7 @@ prefix_ void senf::scheduler::process() detail::TimerDispatcher::instance().blockSignals(); detail::SignalDispatcher::instance().blockSignals(); detail::FileDispatcher::instance().prepareRun(); - detail::EventEventDispatcher::instance().prepareRun(); + detail::EventHookDispatcher::instance().prepareRun(); detail::FIFORunner::instance().run(); } } @@ -73,9 +73,9 @@ prefix_ void senf::scheduler::restart() detail::TimerDispatcher* tdd (&detail::TimerDispatcher::instance()); detail::SignalDispatcher* sdd (&detail::SignalDispatcher::instance()); detail::FileDispatcher* fld (&detail::FileDispatcher::instance()); - detail::EventEventDispatcher* eed (&detail::EventEventDispatcher::instance()); + detail::EventHookDispatcher* eed (&detail::EventHookDispatcher::instance()); - eed->~EventEventDispatcher(); + eed->~EventHookDispatcher(); fld->~FileDispatcher(); sdd->~SignalDispatcher(); tdd->~TimerDispatcher(); @@ -89,7 +89,7 @@ prefix_ void senf::scheduler::restart() new (tdd) detail::TimerDispatcher(); new (sdd) detail::SignalDispatcher(); new (fld) detail::FileDispatcher(); - new (eed) detail::EventEventDispatcher(); + new (eed) detail::EventHookDispatcher(); } prefix_ bool senf::scheduler::empty() @@ -98,7 +98,7 @@ prefix_ bool senf::scheduler::empty() && detail::TimerDispatcher::instance().empty() && detail::FileDispatcher::instance().empty() && detail::SignalDispatcher::instance().empty() - && detail::EventEventDispatcher::instance().empty(); + && detail::EventHookDispatcher::instance().empty(); } /////////////////////////////////////////////////////////////////////////// diff --git a/Scheduler/Scheduler.hh b/Scheduler/Scheduler.hh index 7cf64098178db281d18bcb4caf5b30b4e3488798..c6b0db8c30132b096be01a2fea31b5b402047e57 100644 --- a/Scheduler/Scheduler.hh +++ b/Scheduler/Scheduler.hh @@ -32,7 +32,7 @@ #include "FdEvent.hh" #include "TimerEvent.hh" #include "SignalEvent.hh" -#include "EventEvent.hh" +#include "EventHook.hh" //#include "scheduler.mpp" ///////////////////////////////hh.p//////////////////////////////////////// @@ -65,7 +65,7 @@ namespace senf { \li senf::scheduler::FdEvent for file descriptor events \li senf::scheduler::TimerEvent for single-shot deadline timer events \li senf::scheduler::SignalEvent for UNIX signal events - \li senf::scheduler::EventEvent for a special event hook + \li senf::scheduler::EventHook for a special event hook These instance are owned and managed by the user of the scheduler \e not by the scheduler so the RAII concept can be used. diff --git a/Scheduler/Scheduler.test.cc b/Scheduler/Scheduler.test.cc index bc627a3b61d6b9bf7c9f07948e2fa4c19e995959..c8dc0b4195ac311ae8fb9796879fc388d75b9a2e 100644 --- a/Scheduler/Scheduler.test.cc +++ b/Scheduler/Scheduler.test.cc @@ -244,8 +244,8 @@ BOOST_AUTO_UNIT_TEST(testScheduler) /////////////////////////////////////////////////////////////////////////// - senf::scheduler::EventEvent evev ("eventCounter", eventeventhandler, true, - senf::scheduler::EventEvent::PRIORITY_HIGH); + senf::scheduler::EventHook evev ("eventCounter", eventeventhandler, true, + senf::scheduler::EventHook::PRE); { senf::scheduler::FdEvent fde1 ("testFdEvent", boost::bind(&callback, sock, _1),