Merge pull request #2303 from jwillemsen/jwi-803
[ACE_TAO.git] / TAO / examples / RTScheduling / Fixed_Priority_Scheduler / test.h
blob9391080ff6bd4966647c51709799a090acd023ce
1 #ifndef TEST_H
2 #define TEST_H
3 #include /**/ "ace/pre.h"
6 #include "FP_Scheduler.h"
7 #include "ace/Sched_Params.h"
8 #include "tao/ORB_Core.h"
9 #include "ace/Synch.h"
10 #include "ace/Task.h"
11 #include "FP_DT_Creator.h"
13 class Task_Stats;
15 class DT_Test :public ACE_Task <ACE_SYNCH>
17 public:
18 DT_Test ();
20 void check_supported_priorities ();
22 int init (int argc, ACE_TCHAR *argv []);
24 void run (int argc, ACE_TCHAR *argv []);
26 void dt_creator (FP_DT_Creator* dt_creator);
27 FP_DT_Creator* dt_creator ();
29 Fixed_Priority_Scheduler* scheduler ();
31 int activate_task ();
33 CORBA::ORB_ptr orb ();
35 ACE_hrtime_t base_t;
37 protected:
38 /// task svc
39 virtual int svc ();
42 private:
43 /// = Policies
44 long thr_sched_policy_;
45 long thr_scope_policy_;
46 ACE_Sched_Params::Policy sched_policy_;
47 CORBA::ORB_var orb_;
48 int max_priority_;
49 int min_priority_;
50 RTScheduling::Current_var current_;
51 FP_DT_Creator* dt_creator_;
52 PortableServer::Servant_var<Fixed_Priority_Scheduler> scheduler_;
53 RTCORBA::RTORB_var rt_orb_;
54 /// Reference to the root poa.
55 PortableServer::POA_var root_poa_;
58 typedef ACE_Singleton <DT_Test, TAO_SYNCH_MUTEX> DT_TEST;
60 #include /**/ "ace/post.h"
61 #endif /*TEST_H*/