Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / examples / Simulator / Event_Supplier / Logging_Sup.h
blobdc73fa496dc583428c7e254174003b35a19f2770
2 //=============================================================================
3 /**
4 * @file Logging_Sup.h
6 * Event supplier for visualization of scheduling behavior, using
7 * arrival and dispatch data logged by an EC dispatch command object
9 * @author Chris Gill (cdgill@cs.wustl.edu) Adapted from the orginal DOVE simulation event supplier written by Michael Kircher (mk1@cs.wustl.edu)
11 //=============================================================================
14 #ifndef LOGGING_SUP_H
15 #define LOGGING_SUP_H
17 //#include <ctype.h>
18 //#include <stdio.h>
19 #include "NavWeapC.h"
20 #include "DOVE_Supplier.h"
22 struct Schedule_Viewer_Data
24 char operation_name [BUFSIZ];
25 double utilitzation;
26 double overhead;
27 u_long arrival_time;
28 u_long deadline_time;
29 u_long completion_time;
30 u_long computation_time;
33 /**
34 * @class Logging_Supplier
36 * @brief Event Supplier.
38 * Reads Scheduler information out of a file and
39 * feeds it with additional navigation and
40 * weapon data into the dove_supplier, which
41 * is connected to the event channel
43 class Logging_Supplier
45 public:
46 Logging_Supplier (int argc, ACE_TCHAR** argv);
48 ~Logging_Supplier ();
50 /// connect the DOVE_Supplier
51 int init ();
53 /// here is really something going on,
54 /// here we deliver the messages
55 void start_generating_events ();
57 /// Load the scheduling information into memory
58 void load_schedule_data (ACE_Unbounded_Queue<Schedule_Viewer_Data *> &schedule_data);
61 private:
62 /// just a helper to put all the information into the CORBA::Any
63 void insert_event_data (CORBA::Any &data,
64 ACE_Unbounded_Queue_Iterator<Schedule_Viewer_Data *> &schedule_iter);
66 unsigned int get_options (int argc, ACE_TCHAR *argv []);
68 DOVE_Supplier dOVE_Supplier_;
69 Navigation navigation_;
70 Weapons weapons_;
72 int argc_;
73 ACE_TCHAR **argv_;
74 unsigned long total_messages_;
75 ACE_TCHAR *input_file_name_;
76 unsigned long update_data_;
77 const ACE_TCHAR* schedule_file_name_;
80 #endif /* LOGGING_SUP_H */