3 // ============================================================================
6 // This is a helper class for the throughput tests of the Event
9 // ============================================================================
11 #ifndef ECT_SUPPLIER_DRIVER_H
12 #define ECT_SUPPLIER_DRIVER_H
16 #if !defined (ACE_LACKS_PRAGMA_ONCE)
18 #endif /* ACE_LACKS_PRAGMA_ONCE */
20 #include "ace/High_Res_Timer.h"
21 #include "orbsvcs/Channel_Clients_T.h"
22 #include "ECT_Driver.h"
23 #include "ECT_Supplier.h"
25 class ECT_Supplier_Driver
: public ECT_Driver
33 ECT_Supplier_Driver (void);
34 virtual ~ECT_Supplier_Driver (void);
36 virtual void shutdown_consumer (void* consumer_cookie
);
41 // Maximum number of suppliers.
44 int run (int argc
, ACE_TCHAR
* argv
[]);
48 int parse_args (int argc
, ACE_TCHAR
* argv
[]);
49 // parse the command line args
51 void connect_suppliers (RtecScheduler::Scheduler_ptr scheduler
,
52 RtecEventChannelAdmin::EventChannel_ptr local_ec
);
53 void disconnect_suppliers (void);
54 // Connect the suppliers.
56 void activate_suppliers (void);
57 // Activate the suppliers, i.e. they start generating events.
59 void dump_results (void);
60 // Dump the results for each supplier.
63 Test_Supplier
* suppliers_
[ECT_Supplier_Driver::MAX_SUPPLIERS
];
64 // The suppliers array.
67 // The number of suppliers.
70 // How many bursts we will send from each supplier.
73 // The number of events
76 // The size of the payload on each event.
79 // The time between each event burst, in microseconds.
83 // We send two types of events, with different contents.
85 const ACE_TCHAR
* pid_file_name_
;
86 // The name of a file where the process stores its pid
89 #endif /* ECT_SUPPLIER_DRIVER_H */