Changes to attempt to silence bcc64x
[ACE_TAO.git] / TAO / orbsvcs / tests / Notify / lib / Periodic_Supplier.h
blobf1a56c220d8b8831b21b3133157d55eb7ca25d9a
1 /* -*- C++ -*- */
2 /**
3 * @file Periodic_Supplier.h
5 * @author Pradeep Gore <pradeep@oomworks.com>
6 */
8 #ifndef TAO_Notify_Tests_PERIODIC_SUPPLIER_H
9 #define TAO_Notify_Tests_PERIODIC_SUPPLIER_H
10 #include /**/ "ace/pre.h"
12 #include "notify_test_export.h"
14 #if !defined (ACE_LACKS_PRAGMA_ONCE)
15 # pragma once
16 #endif /* ACE_LACKS_PRAGMA_ONCE */
18 #include "Notify_StructuredPushSupplier.h"
19 #include "Task_Stats.h"
20 #include "StructuredEvent.h"
21 #include "ace/Task.h"
22 #include "ace/Barrier.h"
23 #include "ace/Arg_Shifter.h"
25 class TAO_Notify_Tests_Task_Callback;
27 /**
28 * @class TAO_Notify_Tests_Periodic_Supplier
30 * @brief A Periodic Supplier.
32 class TAO_NOTIFY_TEST_Export TAO_Notify_Tests_Periodic_Supplier : public TAO_Notify_Tests_StructuredPushSupplier, public ACE_Task <ACE_SYNCH>
34 public:
35 /// Constructor
36 TAO_Notify_Tests_Periodic_Supplier ();
38 /// Destructor
39 ~TAO_Notify_Tests_Periodic_Supplier ();
41 /// set the helper callback
42 void task_callback(TAO_Notify_Tests_Task_Callback* client);
44 /// Init the state of this object.
45 int init_state (ACE_Arg_Shifter& arg_shifter);
47 /// Activate this task, synch on the given barrier.
48 virtual int activate_task (ACE_Barrier* barrier);
50 /// task svc
51 virtual int svc ();
53 /// Dump stats.
54 void dump_stats (ACE_TCHAR* msg, int dump_samples);
56 /// Get the name of the proxy
57 const char* proxy_name ();
59 protected:
60 /// svc method.
61 void handle_svc ();
63 /// Send a few events before the actual measurements.
64 void send_warmup_events ();
66 /// Send Prologue
67 void send_prologue ();
69 /// All tasks synch at this barrier.
70 ACE_Barrier* barrier_;
72 /// The event to send.
73 TAO_Notify_Tests_StructuredEvent event_;
75 TAO_Notify_Tests_StructuredEvent zeroth_event;
77 /// The priority of this task.
78 CORBA::Short priority_;
80 /// Period
81 long period_;
83 /// Counts the total number of deadlines missed.
84 long total_deadlines_missed_;
86 /// RunTime - The Max. time to run the supplier.
87 long run_time_;
89 /// Worst case exec. time.
90 unsigned long exec_time_;
92 /// Phase
93 long phase_;
95 /// Number of times to exec. Job
96 int iter_;
98 /// A load factor supplied to each Job.
99 CORBA::ULong load_;
101 /// Stats house keeping
102 Task_Stats stats_;
104 /// Client
105 TAO_Notify_Tests_Task_Callback* client_;
108 #include /**/ "ace/post.h"
109 #endif /* TAO_Notify_Tests_PERIODIC_SUPPLIER_H */