Add anna_ to libraries and examples
[anna.git] / example / diameter / launcher / MyCounterRecorderClock.hpp
1 // ANNA - Anna is Not Nothingness Anymore                                                         //
2 //                                                                                                //
3 // (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo                         //
4 //                                                                                                //
5 // See project site at http://redmine.teslayout.com/projects/anna-suite                           //
6 // See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE //
7
8
9 #ifndef example_diameter_launcher_MyCounterRecorderClock_hpp
10 #define example_diameter_launcher_MyCounterRecorderClock_hpp
11
12 // Project
13 #include <anna/diameter.comm/OamModule.hpp>
14 #include <anna/diameter/codec/OamModule.hpp>
15 #include <anna/core/core.hpp>
16 #include <anna/timex/Clock.hpp>
17
18
19 class MyCounterRecorderClock : public anna::timex::Clock {
20 public:
21   MyCounterRecorderClock(const char *clockName, const anna::Millisecond & timeout) :
22     anna::timex::Clock(clockName, timeout) {;}
23   //virtual ~MyCounterRecorderClock();
24
25   virtual bool tick() throw(anna::RuntimeException) {
26     anna::diameter::comm::OamModule::instantiate().recordCounters();
27     anna::diameter::codec::OamModule::instantiate().recordCounters();
28     return true;
29   }
30 };
31
32 #endif