diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-05-20 18:55:12 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-05-20 18:55:12 +0000 |
commit | 84fdd980fae75013901f47113eb0fe3a6eb8c27e (patch) | |
tree | 6177c259bbe5e8725edb5bc0845df55d43c47e15 /TAO/orbsvcs/tests/Event/Basic/Observer.h | |
parent | 3e5cfb1f1d3faef57b391450fb188f0232722b82 (diff) | |
download | ATCD-84fdd980fae75013901f47113eb0fe3a6eb8c27e.tar.gz |
ChangeLogTag:Thu May 20 13:53:11 1999 Carlos O'Ryan <coryan@cs.wustl.edu>
Diffstat (limited to 'TAO/orbsvcs/tests/Event/Basic/Observer.h')
-rw-r--r-- | TAO/orbsvcs/tests/Event/Basic/Observer.h | 116 |
1 files changed, 116 insertions, 0 deletions
diff --git a/TAO/orbsvcs/tests/Event/Basic/Observer.h b/TAO/orbsvcs/tests/Event/Basic/Observer.h new file mode 100644 index 00000000000..297a4096ae5 --- /dev/null +++ b/TAO/orbsvcs/tests/Event/Basic/Observer.h @@ -0,0 +1,116 @@ +/* -*- C++ -*- */ +// $Id$ +// +// ============================================================================ +// +// = LIBRARY +// ORBSVCS Real-time Event Channel testsuite +// +// = FILENAME +// Observer +// +// = AUTHOR +// Carlos O'Ryan (coryan@cs.wustl.edu) +// +// ============================================================================ + +#ifndef EC_OBSERVER_H +#define EC_OBSERVER_H + +#include "Driver.h" +#include "orbsvcs/Event/EC_Gateway.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +class EC_Observer; + +class EC_Master +{ + // = TITLE + // Run multiple events channels + // + // = DESCRIPTION + // This test runs multiple event channels, all connected using + // gateways. + // +public: + EC_Master (void); + + virtual ~EC_Master (void); + + virtual int run (int argc, char* argv[]); + // Execute the test. + + virtual void initialize_orb_and_poa (int& argc, char* argv[], + CORBA::Environment& env); + // Obtain the orb and the poa pointers + + int channel_count (void) const; + EC_Observer* channel (int i) const; + // Accessors + +private: + int parse_args (int &argc, char *argv []); + +private: + ACE_RANDR_TYPE seed_; + // The seed + + int n_channels_; + EC_Observer** channels_; + // The driver programs + + CORBA::ORB_var orb_; + // The ORB + + PortableServer::POA_var root_poa_; + // The Root POA +}; + +class EC_Observer : public EC_Driver +{ + // + // = TITLE + // Test the EC observers + // + // = DESCRIPTION + // +public: + EC_Observer (EC_Master *master, + ACE_RANDR_TYPE seed, + CORBA::ORB_ptr orb, + PortableServer::POA_ptr root_poa, + int id); + // Constructor + + // = The EC_Driver methods + virtual void initialize_orb_and_poa (int& argc, char* argv[], + CORBA::Environment& env); + virtual int parse_args (int& argc, char* argv[]); + virtual void print_args (void) const; + virtual void print_usage (void); + // add some command line args to enable/disable observerions + + void execute_test (CORBA::Environment& ACE_TRY_ENV); + // Run the suppliers, using the <thread_manager> parameter + + void dump_results (void); + void connect_consumer ( + RtecEventChannelAdmin::ConsumerAdmin_ptr consumer_admin, + int i, + CORBA::Environment &ACE_TRY_ENV); + void consumer_push (void*, + const RtecEventComm::EventSet&, + CORBA::Environment& ACE_TRY_ENV); + +private: + EC_Master *master_; + ACE_RANDR_TYPE seed_; + int id_; + + TAO_EC_Gateway_IIOP *gwys_; +}; + +#endif /* EC_OBSERVER_H */ |