Merge pull request #2301 from sonndinh/remove-dup-reactor-functions
[ACE_TAO.git] / TAO / examples / Simulator / Event_Supplier / Event_Sup.h
bloba15bc247c4ada593ae4abf5beb3b7f8ffe742c47
2 //=============================================================================
3 /**
4 * @file Event_Sup.h
6 * Event Supplier for the simulation
8 * @author Michael Kircher (mk1@cs.wustl.edu)
9 */
10 //=============================================================================
13 #ifndef EVENT_SUP_H
14 #define EVENT_SUP_H
16 //#include <ctype.h>
17 //#include <stdio.h>
18 #include "NavWeapC.h"
19 #include "DOVE_Supplier.h"
21 struct Schedule_Viewer_Data
23 char operation_name [BUFSIZ];
24 double utilitzation;
25 double overhead;
26 u_long arrival_time;
27 u_long deadline_time;
28 u_long completion_time;
29 u_long computation_time;
32 /**
33 * @class Event_Supplier
35 * @brief Event Supplier.
37 * Reads Scheduler information out of a file and
38 * feeds it with additional navigation and
39 * weapon data into the dove_supplier, which
40 * is connected to the event channel
42 class Event_Supplier
44 public:
45 Event_Supplier (int argc, ACE_TCHAR** argv);
47 ~Event_Supplier ();
49 /// connect the DOVE_Supplier
50 int init ();
52 /// here is really something going on,
53 /// here we deliver the messages
54 void start_generating_events ();
56 /// Load the scheduling information into memory
57 void load_schedule_data (ACE_Unbounded_Queue<Schedule_Viewer_Data *> &schedule_data);
60 private:
61 /// just a helper to put all the information into the CORBA::Any
62 void insert_event_data (CORBA::Any &data,
63 ACE_Unbounded_Queue_Iterator<Schedule_Viewer_Data *> &schedule_iter);
65 unsigned int get_options (int argc, ACE_TCHAR *argv []);
67 DOVE_Supplier dOVE_Supplier_;
68 Navigation navigation_;
69 Weapons weapons_;
71 int argc_;
72 ACE_TCHAR **argv_;
73 unsigned long total_messages_;
74 ACE_TCHAR *input_file_name_;
77 #endif /* EVENT_SUP_H */