=default for generated implementation copy ctor
[ACE_TAO.git] / TAO / examples / AMH / Sink_Server / Client_Task.h
blobfcfc9e8fd7ff8a3c5cfe8502080516acdc2243a9
1 // -*- C++ -*-
3 // =========================================================================
4 /**
5 * @file Client_Task.h
7 * @desc Provides common functionality needed to run a client
8 * thread. Also incorporates functionality to collect and print
9 * statistics about the test.
11 * @author Mayur Deshpande <mayur@ics.uci.edu>
13 // =========================================================================
15 #ifndef MT_CLIENT_TASK_H
16 #define MT_CLIENT_TASK_H
18 #include "ace/Task.h"
19 #include "ace/Basic_Stats.h"
20 #include "ace/High_Res_Timer.h"
22 #include "TestC.h"
24 // Helper class for common client functionality
25 class Client_Task : public ACE_Task_Base
27 public:
28 /// Constructor
29 Client_Task (int &argc, ACE_TCHAR **argv);
31 int parse_args ();
33 void try_RT_scheduling ();
35 int narrow_servant (CORBA::ORB_ptr orb);
37 int run_test ();
39 protected:
40 /// The service method
41 virtual int svc ();
43 private:
44 /// Print Statistics
45 void accumulate_and_dump (ACE_Basic_Stats &totals,
46 const ACE_TCHAR *msg,
47 ACE_High_Res_Timer::global_scale_factor_type gsf);
49 private:
50 /// The object reference used for this test
51 Test::Roundtrip_var roundtrip_;
53 /// Keep track of the latency (minimum, average, maximum and jitter)
54 ACE_Basic_Stats latency_;
56 int &argc_;
57 ACE_TCHAR **argv_;
58 const ACE_TCHAR *ior_;
59 int iterations_;
62 #endif // Client_Task_H