summaryrefslogtreecommitdiff
path: root/TAO/examples/RTScheduling/MIF_Scheduler/test.h
blob: 50385d5bd4a5ad4362f4306b7a7c32a027d50409 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
//$Id$
#ifndef TEST_H
#define TEST_H
#include "ace/pre.h"


#include "MIF_Scheduler.h"
#include "ace/Sched_Params.h"
#include "tao/ORB_Core.h"
#include "ace/Synch.h"
#include "ace/Task.h"
#include "MIF_DT_Creator.h"

class Task_Stats;

class DT_Test //:public ACE_Task <ACE_SYNCH>
{
 public:
  
  DT_Test (void);
  
  int init (int argc, char *argv []
	    ACE_ENV_ARG_DECL_WITH_DEFAULTS);

  void run (int argc, char *argv [] 
	  ACE_ENV_ARG_DECL_WITH_DEFAULTS);

  void dt_creator (MIF_DT_Creator* dt_creator);

  MIF_Scheduler* scheduler (void);

  int activate_task (void);

  RTScheduling::Current_ptr current (void); 

/*   protected: */
/*   /// task svc */
/*   virtual int svc (void); */


 private:
  /// = Policies
  long thr_sched_policy_;
  long thr_scope_policy_;
  ACE_Sched_Params::Policy sched_policy_;
  CORBA::ORB_var orb_;
  int max_priority_;
  int min_priority_;
  RTScheduling::Current_var current_; 
  MIF_DT_Creator* dt_creator_;
  MIF_Scheduler* scheduler_;
};

typedef ACE_Singleton <DT_Test, ACE_Thread_Mutex> DT_TEST;

#include "ace/post.h"
#endif /*TEST_H*/