1 // ANNA - Anna is Not Nothingness Anymore //
3 // (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo //
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 //
9 #ifndef anna_test_Communicator_hpp
10 #define anna_test_Communicator_hpp
12 #include <anna/comm/Communicator.hpp>
18 class Communicator : public comm::Communicator {
20 Communicator () : comm::Communicator (),
25 a_avgDelay ("AvgDelay"),
29 void setDelay (const Millisecond delay) throw () { a_delay = delay; }
30 void setMaxMessage (const int maxMessage) throw () { a_maxMessage = maxMessage; }
32 int getMaxMessage () const throw () { return a_maxMessage; }
33 int getMessage () const throw () { return a_messageCounter; }
35 bool canContinue (const comm::ClientSocket&) throw (RuntimeException);
36 void delay () throw (RuntimeException);
38 void terminate () throw ();
41 Millisecond a_initTime;
45 Average <Microsecond> a_avgDelay;
47 void eventOverQuota (const comm::ClientSocket&) throw ();