blob: 64fd3722ff6dcdd164db3038013046325fa7fd50 (
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
|
// -*- C++ -*-
//=============================================================================
/**
* @file FT_EventService.h
*
* $Id$
*
* @author Huang-Ming Huang <hh1@cse.wustl.edu>
*/
//=============================================================================
#ifndef FT_EVENTSERVICE_H
#define FT_EVENTSERVICE_H
#include "orbsvcs/CosNamingC.h"
#include "orbsvcs/FtRtecEventChannelAdminC.h"
#include "orbsvcs/FtRtEvent/EventChannel/FTEC_Event_Channel.h"
#include "orbsvcs/FtRtEvent/EventChannel/FTEC_Become_Primary_Listener.h"
#include "TP_Task.h"
namespace POA_RtecScheduler
{
class Scheduler;
}
class FT_EventService : private TAO_FTEC_Become_Primary_Listener
{
public:
FT_EventService();
~FT_EventService();
int run(int argc, ACE_TCHAR* argv[]);
private:
int parse_args (int argc, ACE_TCHAR* argv []);
void setup_scheduler(CosNaming::NamingContext_ptr naming_context
ACE_ENV_ARG_DECL);
int report_factory(CORBA::ORB_ptr orb,
FtRtecEventChannelAdmin::EventChannel_ptr ec);
virtual void become_primary();
int global_scheduler_;
// Should we use a global scheduler or a local one?
POA_RtecScheduler::Scheduler *sched_impl_;
// The Scheduler implementation.
TAO_FTEC_Event_Channel::MEMBERSHIP membership_;
int num_threads_;
CORBA::ORB_var orb_;
TP_Task task_;
};
#endif
|