Merge pull request #1551 from DOCGroup/plm_jira_333
[ACE_TAO.git] / TAO / examples / RTScheduling / Fixed_Priority_Scheduler / test.h
blob59616b7a4fb4d21abf52b694534873f0f4f56143
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:
19 DT_Test (void);
21 void check_supported_priorities (void);
23 int init (int argc, ACE_TCHAR *argv []);
25 void run (int argc, ACE_TCHAR *argv []);
27 void dt_creator (FP_DT_Creator* dt_creator);
28 FP_DT_Creator* dt_creator (void);
30 Fixed_Priority_Scheduler* scheduler (void);
32 int activate_task (void);
34 CORBA::ORB_ptr orb (void);
36 ACE_hrtime_t base_t;
38 protected:
39 /// task svc
40 virtual int svc (void);
44 private:
45 /// = Policies
46 long thr_sched_policy_;
47 long thr_scope_policy_;
48 ACE_Sched_Params::Policy sched_policy_;
49 CORBA::ORB_var orb_;
50 int max_priority_;
51 int min_priority_;
52 RTScheduling::Current_var current_;
53 FP_DT_Creator* dt_creator_;
54 PortableServer::Servant_var<Fixed_Priority_Scheduler> scheduler_;
55 RTCORBA::RTORB_var rt_orb_;
56 /// Reference to the root poa.
57 PortableServer::POA_var root_poa_;
61 typedef ACE_Singleton <DT_Test, TAO_SYNCH_MUTEX> DT_TEST;
63 #include /**/ "ace/post.h"
64 #endif /*TEST_H*/