3 // ============================================================================
5 * @file RTEvent_Consumer.h
7 * An example of using the RTEvent_Logging_Service.
8 * The RTEvent_Consumer consumes log-generated events.
10 * @author D A Hanvey (d.hanvey@qub.ac.uk)
12 // ============================================================================
14 #ifndef RTEVENT_CONSUMER_H
15 #define RTEVENT_CONSUMER_H
17 #include "orbsvcs/RtecEventCommS.h"
18 #include "orbsvcs/RTEventLogAdminC.h"
19 #include "orbsvcs/CosNamingC.h"
21 #if !defined (ACE_LACKS_PRAGMA_ONCE)
23 #endif /* ACE_LACKS_PRAGMA_ONCE */
25 class Consumer
: public POA_RtecEventComm::PushConsumer
28 // Simple consumer object
31 // This class is a consumer of events.
32 // It simply registers for one event type.
38 int run (int argc
, ACE_TCHAR
* argv
[]);
41 // = The RtecEventComm::PushConsumer methods
43 virtual void push (const RtecEventComm::EventSet
& events
);
44 virtual void disconnect_push_consumer ();
45 // The skeleton methods.
48 CORBA::ULong event_count_
;
49 // Keep track of the number of events received.
52 // The orb, just a pointer because the ORB does not outlive the
55 CosNaming::NamingContext_var naming_context_
;
56 // Handle to the name service.
58 RTEventLogAdmin::EventLogFactory_var event_log_factory_
;
59 // The Event Log Factory that generates the events to be consumed.
61 RtecEventChannelAdmin::ProxyPushSupplier_var supplier_
;
62 // The proxy that we are connected to.
65 #endif /* RTEVENT_CONSUMER_H */