3 // ============================================================================
6 // This is a helper class for the throughput tests of the Event
9 // ============================================================================
11 #ifndef ECT_SUPPLIER_H
12 #define ECT_SUPPLIER_H
14 #include "ECT_Driver.h"
16 #if !defined (ACE_LACKS_PRAGMA_ONCE)
18 #endif /* ACE_LACKS_PRAGMA_ONCE */
20 #include "orbsvcs/Channel_Clients_T.h"
21 #include "orbsvcs/RtecEventChannelAdminC.h"
22 #include "orbsvcs/RtecSchedulerC.h"
25 class Test_Supplier
: public ACE_Task
<ACE_SYNCH
>
29 // Simplifies the supplier task startup.
34 Test_Supplier (ECT_Driver
*driver
);
37 // Run the test, just forwards to the driver
39 void connect (RtecScheduler::Scheduler_ptr scheduler
,
47 RtecEventChannelAdmin::EventChannel_ptr ec
);
48 // This method connects the supplier to the EC.
50 void disconnect (void);
51 // Disconnect from the EC.
53 virtual void disconnect_push_supplier (void);
54 // The methods in the skeleton.
56 RtecEventComm::EventSourceID
supplier_id (void) const;
59 RtecEventChannelAdmin::ProxyPushConsumer_ptr
consumer_proxy (void);
60 // We talk to the EC (as a supplier) using this proxy, no duplicates
63 void dump_results (const ACE_TCHAR
* name
,
64 ACE_Basic_Stats::scale_factor_type global_scale_factor
);
65 // Dump the results...
67 void accumulate (ACE_Throughput_Stats
& stats
) const;
68 // Add our statistics to <stats>
72 // Class we forward to.
75 // The test provide us a cookie so we can give back our identity.
77 RtecEventComm::EventSourceID supplier_id_
;
78 // We generate an id based on the name....
80 RtecEventChannelAdmin::ProxyPushConsumer_var consumer_proxy_
;
81 // We talk to the EC (as a supplier) using this proxy.
83 ACE_PushSupplier_Adapter
<Test_Supplier
> supplier_
;
84 // We also connect to the EC as a consumer so we can receive the
87 ACE_Throughput_Stats throughput_
;
88 // Measure the elapsed time spent while sending the events.
99 #endif /* ECT_SUPPLIER_H */