diff options
19 files changed, 1200 insertions, 2359 deletions
diff --git a/TAO/ChangeLog-98c b/TAO/ChangeLog-98c index 20071c8b4a8..962b5fa6b2b 100644 --- a/TAO/ChangeLog-98c +++ b/TAO/ChangeLog-98c @@ -1,3 +1,15 @@ +Tue Jul 14 15:56:46 1998 Nagarajan Surendran <naga@cs.wustl.edu> + + * orbsvcs/tests/AVStreams: + Removed files Machine_Properties.{h,cpp} and + Property_Exporter.{h,cpp} as they are moved to + orbsvcs/tests/AVStreams/mpeg/source/server. + + Removed server.{h,cpp} and client.{h,cpp} as they are + outdated. + + Removed Makefile for the above files. + Tue Jul 14 15:28:44 1998 Carlos O'Ryan <coryan@cs.wustl.edu> * TAO_IDL/be/be_visitor_field/field_ch.cpp: diff --git a/TAO/orbsvcs/tests/AVStreams/Machine_Properties.cpp b/TAO/orbsvcs/tests/AVStreams/Machine_Properties.cpp deleted file mode 100644 index 042b07acde6..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/Machine_Properties.cpp +++ /dev/null @@ -1,227 +0,0 @@ -// $Id$ - -#include "Machine_Properties.h" - -const int DEFAULT_TIMEOUT_SEC = 10; -const int DEFAULT_TIMEOUT_USEC = 0; - -const char* TAO_Machine_Properties::PROP_NAMES[] = -{ - "CPU", - "DISK", - "PAGES", - "SWAPS", - "PACKETS", - "ERRORS", - "CONTEXT_SWITCHES", - "COLLISIONS", - "INTERRUPTS", - "LOAD" -}; - -const CORBA::TypeCode_ptr -TAO_Machine_Properties::PROP_TYPE = CORBA::_tc_float; - -TAO_Machine_Properties:: -TAO_Machine_Properties (void) - : timeout_ (ACE_Time_Value (DEFAULT_TIMEOUT_SEC, DEFAULT_TIMEOUT_USEC)), - timestamp_ (0) -{ - this->init (); -} - - -TAO_Machine_Properties:: -TAO_Machine_Properties (const ACE_Time_Value& timeout) - : timeout_ (timeout), - timestamp_ (0) -{ - this->init (); -} - -void -TAO_Machine_Properties::init (void) -{ - this->rstat_client_ = - ::clnt_create("localhost", RSTATPROG, RSTATVERS_TIME, "udp"); - - if (this->rstat_client_ == 0) - { - ACE_ERROR ((LM_ERROR, "(%P|%t) %s\n", - ::clnt_spcreateerror ("localhost"))); - } - - if (this->retrieve_stats () == -1) - ::memset (&this->old_stats_, 0, sizeof (statstime)); - else - this->timestamp_.sec (0); -} - -int -TAO_Machine_Properties::retrieve_stats (void) -{ - if (this->rstat_client_ == 0) - return -1; - - static struct timeval timeout = {25, 0}; - if (clnt_call (this->rstat_client_, - RSTATPROC_STATS, - xdr_void, - 0, - (xdrproc_t) xdr_statstime, - (caddr_t) &this->stats_, - timeout) != RPC_SUCCESS) - { - ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) %s\n", - ::clnt_sperror (this->rstat_client_, "localhost")), -1); - } - - this->sample_time_ = ACE_OS::gettimeofday () - this->timestamp_; - this->timestamp_ = ACE_OS::gettimeofday (); -} - -CORBA::Any* -TAO_Machine_Properties::evalDP(const CORBA::Any& extra_info, - CORBA::TypeCode_ptr returned_type, - CORBA::Environment& _env) - TAO_THROW_SPEC ((CosTradingDynamic::DPEvalFailure)) -{ - CORBA::Any* return_value = 0; - - if (ACE_OS::gettimeofday () - this->timestamp_ > this->timeout_) - { - if (this->retrieve_stats () == -1) - return return_value; - } - - char* prop_name = 0; - extra_info >>= prop_name; - - if (prop_name == 0) - return return_value; - - ACE_NEW_RETURN (return_value, CORBA::Any, 0); - - int elapsed_seconds = this->sample_time_.sec () + - (this->sample_time_.usec () > 500000) ? 1 : 0; - - if (ACE_OS::strcmp (prop_name, PROP_NAMES[CPU]) == 0) - this->compute_cpu (*return_value, elapsed_seconds); - else if (ACE_OS::strcmp (prop_name, PROP_NAMES[DISK]) == 0) - this->compute_disk (*return_value, elapsed_seconds); - else if (ACE_OS::strcmp (prop_name, PROP_NAMES[PAGES]) == 0) - this->compute_pages (*return_value, elapsed_seconds); - else if (ACE_OS::strcmp (prop_name, PROP_NAMES[SWAPS]) == 0) - this->compute_swaps (*return_value, elapsed_seconds); - else if (ACE_OS::strcmp (prop_name, PROP_NAMES[PACKETS]) == 0) - this->compute_packets (*return_value, elapsed_seconds); - else if (ACE_OS::strcmp (prop_name, PROP_NAMES[CONTEXT_SWITCHES]) == 0) - this->compute_context (*return_value, elapsed_seconds); - else if (ACE_OS::strcmp (prop_name, PROP_NAMES[COLLISIONS]) == 0) - this->compute_collisions (*return_value, elapsed_seconds); - else if (ACE_OS::strcmp (prop_name, PROP_NAMES[INTERRUPTS]) == 0) - this->compute_interrupts (*return_value, elapsed_seconds); - else if (ACE_OS::strcmp (prop_name, PROP_NAMES[LOAD]) == 0) - this->compute_load (*return_value, elapsed_seconds); - - ::memcpy (&this->old_stats_, &this->stats_, sizeof (statstime)); -} - -void -TAO_Machine_Properties::compute_cpu (CORBA::Any& value, int elapsed_seconds) -{ - // The first three cpu stats are for user, kernal, iowait - CORBA::Float used = 0.0; - for (int i = 0; i < RSTAT_CPUSTATES -1; i++) - used += (this->stats_.cp_time[i] - this->old_stats_.cp_time[i]); - - // The last is the amount idle. - CORBA::Float idle = - this->stats_.cp_time[RSTAT_CPUSTATES - 1] - - this->old_stats_.cp_time[RSTAT_CPUSTATES - 1]; - - // The CPU usage is the amount used over the total available. - value <<= (CORBA::Float) (used / (used + idle) * 100.0); -} - -void -TAO_Machine_Properties::compute_disk (CORBA::Any& value, int elapsed_seconds) -{ - CORBA::Float used = 0.0; - for (int i = 0; i < RSTAT_DK_NDRIVE; i++) - used += (this->stats_.dk_xfer[i] - this->old_stats_.dk_xfer[i]); - - value <<= (CORBA::Float)(used / (float) elapsed_seconds); -} - -void -TAO_Machine_Properties::compute_pages (CORBA::Any& value, int elapsed_seconds) -{ - CORBA::Float pages = - (this->stats_.v_pgpgin - this->old_stats_.v_pgpgin) + - (this->stats_.v_pgpgout - this->old_stats_.v_pgpgout); - - value <<= (CORBA::Float) (pages / elapsed_seconds); -} - -void -TAO_Machine_Properties::compute_swaps (CORBA::Any& value, int elapsed_seconds) -{ - CORBA::Float swaps = - (this->stats_.v_pswpin - this->old_stats_.v_pswpin) + - (this->stats_.v_pswpout - this->old_stats_.v_pswpout); - - value <<= (CORBA::Float) (swaps / elapsed_seconds); -} - -void -TAO_Machine_Properties::compute_packets (CORBA::Any& value, int elapsed_seconds) -{ - CORBA::Float packets = - (this->stats_.if_ipackets - this->old_stats_.if_ipackets) + - (this->stats_.if_opackets - this->old_stats_.if_opackets); - - value <<= (CORBA::Float) (packets / elapsed_seconds); -} - -void -TAO_Machine_Properties::compute_errors (CORBA::Any& value, int elapsed_seconds) -{ - CORBA::Float packets = - (this->stats_.if_ipackets - this->old_stats_.if_ipackets) + - (this->stats_.if_opackets - this->old_stats_.if_opackets); - - value <<= (CORBA::Float) (packets / elapsed_seconds); -} - -void -TAO_Machine_Properties:: -compute_context (CORBA::Any& value, int elapsed_seconds) -{ - CORBA::Float switches = (this->stats_.v_swtch - this->old_stats_.v_swtch); - value <<= (CORBA::Float) (switches / elapsed_seconds); -} - -void -TAO_Machine_Properties:: -compute_collisions (CORBA::Any& value, int elapsed_seconds) -{ - CORBA::Float cols = - (this->stats_.if_collisions - this->old_stats_.if_collisions); - value <<= (CORBA::Float) (cols / elapsed_seconds); -} - -void -TAO_Machine_Properties:: -compute_interrupts (CORBA::Any& value, int elapsed_seconds) -{ - CORBA::Float intr = (this->stats_.v_intr - this->old_stats_.v_intr); - value <<= (CORBA::Float) (intr / elapsed_seconds); -} - -void -TAO_Machine_Properties::compute_load (CORBA::Any& value, int elapsed_seconds) -{ - CORBA::Float load = (float) this->stats_.avenrun[0] / FSCALE; - value <<= load; -} diff --git a/TAO/orbsvcs/tests/AVStreams/Machine_Properties.h b/TAO/orbsvcs/tests/AVStreams/Machine_Properties.h deleted file mode 100644 index 76cbaeb4862..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/Machine_Properties.h +++ /dev/null @@ -1,84 +0,0 @@ -/* -*- C++ -*- */ - -// ============================================================================ -// $Id$ -// - -// = FILENAME -// Machine_Properties.h -// -// = DESCRIPTION -// As a trading service dynamic property, retrieves machine -// statistics from the rstatd using Sun RPC. -// -// = AUTHORS -// Seth Widoff <sbw1@cs.wustl.edu> -// -// ============================================================================ - -#if (! defined TAO_MACHINE_PROPERTIES) -#define TAO_MACHINE_PROPERTIES - -#include "orbsvcs/Trader/Dynamic_Property.h" - -//RPC related includes -#include <rpc/rpc.h> -#include <rpcsvc/rstat.h> - -class TAO_Machine_Properties : public TAO_DP_Evaluation_Handler -{ -public: - - enum PROP_TYPES - { - CPU, - DISK, - PAGES, - SWAPS, - PACKETS, - ERRORS, - CONTEXT_SWITCHES, - COLLISIONS, - INTERRUPTS, - LOAD - }; - - static const char* PROP_NAMES[]; - static const CORBA::TypeCode_ptr PROP_TYPE; - - TAO_Machine_Properties (void); - TAO_Machine_Properties (const ACE_Time_Value& timeout); - - virtual CORBA::Any* evalDP(const CORBA::Any& extra_info, - CORBA::TypeCode_ptr returned_type, - CORBA::Environment& _env) - TAO_THROW_SPEC ((CosTradingDynamic::DPEvalFailure)); - -private: - - void init (void); - - int retrieve_stats (void); - - void compute_cpu (CORBA::Any& value, int elapsed_time); - void compute_disk (CORBA::Any& value, int elapsed_time); - void compute_pages (CORBA::Any& value, int elapsed_time); - void compute_swaps (CORBA::Any& value, int elapsed_time); - void compute_packets (CORBA::Any& value, int elapsed_time); - void compute_errors (CORBA::Any& value, int elapsed_time); - void compute_context (CORBA::Any& value, int elapsed_time); - void compute_collisions (CORBA::Any& value, int elapsed_time); - void compute_interrupts (CORBA::Any& value, int elapsed_time); - void compute_load (CORBA::Any& value, int elapsed_time); - - const ACE_Time_Value timeout_; - ACE_Time_Value timestamp_; - ACE_Time_Value sample_time_; - - statstime stats_; - statstime old_stats_; - CLIENT* rstat_client_; - -}; - -#endif /* TAO_MACHINE_PROPERTIES */ diff --git a/TAO/orbsvcs/tests/AVStreams/Makefile b/TAO/orbsvcs/tests/AVStreams/Makefile deleted file mode 100644 index 00854694923..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/Makefile +++ /dev/null @@ -1,96 +0,0 @@ -#---------------------------------------------------------------------------- -# $Id$ -# -# Top-level Makefile for the AVStreams demo of the TAO ORB -# -#---------------------------------------------------------------------------- - -#--------------- -# STL (start) -#--------------- - -include $(STL_ROOT)/config/local.cfg - -STD=$(STL_ROOT)/ospace/std -STL=$(STL_ROOT)/stl - -CC_INCLUDES += -I$(STD) -CC_INCLUDES += -pta - -CPPFLAGS += \ - -I$(TOOLKIT) \ - $(CC_INCLUDES) \ - $(CC_FLAGS) \ - $(CC_DEFINES) \ - $(CC_EH) \ - $(CC_MT) - -ifndef exceptions -CPPFLAGS += -DOS_NO_EXCEPTION_SPECIFIER -else -CPPFLAGS += -DOS_STL_ASSERT -endif - -LDFLAGS += -L$(STL_ROOT)/lib - -#--------------- -# STL (end) -#--------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -LDLIBS = -lorbsvcs -lospace -lTAO -lrpcsvc - -AVStreams_SERVER_OBJS = server.o Machine_Properties.o Property_Exporter.o -AVStreams_CLIENT_OBJS = client.o - -COSPROPERTY_OBJS = main.o - -BIN = server client -BUILD = $(BIN) -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU -#include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU -include $(ACE_ROOT)/include/makeinclude/rules.local.GNU - -ifndef TAO_ROOT -TAO_ROOT = $(ACE_ROOT)/TAO -endif - -DCFLAGS = -g -LDFLAGS += -L$(TAO_ROOT)/orbsvcs/orbsvcs -L$(TAO_ROOT)/tao -CPPFLAGS += -I$(TAO_ROOT)/orbsvcs -I$(TAO_ROOT) -I$(TAO_ROOT)/tao/compat $(TSS_ORB_FLAG) \ - -DTAO_HAS_DYNAMIC_PROPERTY_BUG - -server:$(addprefix $(VDIR),$(AVStreams_SERVER_OBJS)) - $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK) - -client:$(addprefix $(VDIR),$(AVStreams_CLIENT_OBJS)) - $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK) - -realclean: clean - -/bin/rm -rf - - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - - - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY - - - - - - diff --git a/TAO/orbsvcs/tests/AVStreams/Property_Exporter.cpp b/TAO/orbsvcs/tests/AVStreams/Property_Exporter.cpp deleted file mode 100644 index b7d0601d7d4..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/Property_Exporter.cpp +++ /dev/null @@ -1,411 +0,0 @@ -// $Id$ - -#include "Property_Exporter.h" -#include "orbsvcs/Trader/Property_Evaluator.h" - -// ************************************************************* -// DP_Adapter -// ************************************************************* - -class DP_Adapter : public TAO_DP_Evaluation_Handler -// = TITLE -// This class links the a dynamic property in a Trading Service -// Offer with its value in a CosPropertyService::PropertySet. -{ -public: - - DP_Adapter (const char* prop_name, - CosPropertyService::PropertySet_ptr prop_set); - - ~DP_Adapter (void); - - virtual CORBA::Any* evalDP (const CORBA::Any& extra_info, - CORBA::TypeCode_ptr returned_type, - CORBA::Environment& _env) - TAO_THROW_SPEC ((CosTradingDynamic::DPEvalFailure)); - // Call back to the Property Service interface. The Property - // Service reference is contained in the extra_info -- an - // Asynchronous Completion Token. - -private: - - const char* prop_name_; - CosPropertyService::PropertySet_var prop_set_; -}; - -DP_Adapter::DP_Adapter (const char* prop_name, - CosPropertyService::PropertySet_ptr prop_set) - : prop_name_ (prop_name), - prop_set_ (prop_set) -{ -} - -DP_Adapter::~DP_Adapter (void) -{ -} - -CORBA::Any* -DP_Adapter::evalDP (const CORBA::Any& extra_info, - CORBA::TypeCode_ptr returned_type, - CORBA::Environment& _env) - TAO_THROW_SPEC ((CosTradingDynamic::DPEvalFailure)) -{ - TAO_TRY - { - CORBA::Any* return_value = - this->prop_set_->get_property_value (this->prop_name_, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - return return_value; - } - TAO_CATCHANY - { - TAO_THROW_RETURN (CosTradingDynamic::DPEvalFailure - (this->prop_name_, returned_type, extra_info), - 0); - } - TAO_ENDTRY; -} - -// ************************************************************* -// TAO_Property_Exporter -// ************************************************************* - -#if defined TAO_HAS_DYNAMIC_PROPERTY_BUG -TAO_Property_Exporter:: -TAO_Property_Exporter (CosTrading::Lookup_var lookup_if, - CosPropertyService::PropertySet_ptr prop_set, - CORBA::ORB_ptr orb, - CORBA::ULong initial_size) - : orb_ (CORBA::ORB::_duplicate (orb)), - increment_ (initial_size), - lookup_ (lookup_if), - prop_set_ (prop_set), - tprops_ (initial_size), - pprops_ (initial_size), - pcount_ (0), - tcount_ (0) -{ -} -#else -TAO_Property_Exporter:: -TAO_Property_Exporter (CosTrading::Lookup_var lookup_if, - CosPropertyService::PropertySet_ptr prop_set, - CORBA::ULong initial_size) - : increment_ (initial_size), - lookup_ (lookup_if), - prop_set_ (prop_set), - tprops_ (initial_size), - pprops_ (initial_size), - pcount_ (0), - tcount_ (0) -{ -} -#endif /* TAO_HAS_DYNAMIC_PROPERTY_BUG */ - -TAO_Property_Exporter::~TAO_Property_Exporter (void) -{ -} - -void -TAO_Property_Exporter::add_static_property (const char* name, - const CORBA::Any& value) -{ - CORBA::ULong plength = this->pprops_.length (), - tlength = this->tprops_.length (); - - if (tlength == this->tcount_) - this->tprops_.length (tlength + this->increment_); - - if (plength == this->pcount_) - this->pprops_.length (plength + this->increment_); - - this->tprops_[this->tcount_].name = name; - this->tprops_[this->tcount_].value = value; - this->tcount_++; - - this->pprops_[this->pcount_].property_name = name; - this->pprops_[this->pcount_].property_value = value; - this->pcount_++; -} - - -void -TAO_Property_Exporter:: -add_dynamic_property (const char* name, - const CORBA::Any& value, - TAO_DP_Dispatcher& dynamic_prop) -{ - // Add a property to the PropSet and a dynamic property to the - // Offer. Have the dynamic property connect to the PropSet accessor - // for that name. - DP_Adapter* dp_adapter; - ACE_NEW_RETURN (dp_adapter, DP_Adapter (name, this->prop_set_),); - - CORBA::ULong plength = this->pprops_.length (), - tlength = this->tprops_.length (); - - if (tlength == this->tcount_) - this->tprops_.length (tlength + this->increment_); - - if (plength == this->pcount_) - this->pprops_.length (plength + this->increment_); - - CORBA::Any extra_info; - -#if defined TAO_HAS_DYNAMIC_PROPERTY_BUG - CosTradingDynamic::DynamicProp* dp_struct = - dynamic_prop.construct_dynamic_prop (name, - value.type (), - extra_info, - this->orb_.ptr ()); -#else - CosTradingDynamic::DynamicProp* dp_struct = - dynamic_prop.construct_dynamic_prop (name, value.type (), extra_info); -#endif /* TAO_HAS_DYNAMIC_PROPERTY_BUG */ - - dynamic_prop.register_handler (name, dp_adapter, CORBA::B_TRUE); - - this->tprops_[this->tcount_].name = name; - this->tprops_[this->tcount_].value <<= *dp_struct; - this->tcount_++; - - this->pprops_[this->pcount_].property_name = name; - this->pprops_[this->pcount_].property_value = value; - this->pcount_++; -} - -void -TAO_Property_Exporter:: -add_dynamic_property (const char* name, - CosTradingDynamic::DynamicProp& dp_struct) -{ - CORBA::ULong tlength = this->tprops_.length (); - - if (tlength == this->tcount_) - this->tprops_.length (tlength + this->increment_); - - this->tprops_[this->tcount_].name = name; - this->tprops_[this->tcount_].value <<= dp_struct; - this->tcount_++; -} - - -CosTrading::OfferId -TAO_Property_Exporter::export (const CORBA::Object_ptr object_ref, - const CosTrading::ServiceTypeName type, - CORBA::Environment& _env) - TAO_THROW_SPEC ((CORBA::SystemException, - CosTrading::Register::InvalidObjectRef, - CosTrading::IllegalServiceType, - CosTrading::UnknownServiceType, - CosTrading::Register::InterfaceTypeMismatch, - CosTrading::IllegalPropertyName, - CosTrading::PropertyTypeMismatch, - CosTrading::ReadonlyDynamicProperty, - CosTrading::MissingMandatoryProperty, - CosTrading::DuplicatePropertyName)) -{ - CosTrading::Register_var reg = this->lookup_->register_if (_env); - TAO_CHECK_ENV_RETURN (_env, 0); - - // Export the offer to the trader under the given type. - CosTrading::OfferId offer_id = 0; - this->tprops_.length (this->tcount_); - offer_id = reg->export (object_ref, type, this->tprops_, _env); - TAO_CHECK_ENV_RETURN (_env, 0); - - this->pprops_.length (this->pcount_); - this->prop_set_->define_properties (this->pprops_, _env); - TAO_CHECK_ENV_RETURN (_env, offer_id); - - return offer_id; -} - -CosTrading::OfferId -TAO_Property_Exporter::export (const CORBA::Object_ptr object_ref, - const CosTrading::ServiceTypeName type, - const TRADING_REPOS::PropStructSeq& props, - const TRADING_REPOS::ServiceTypeNameSeq& stypes, - CORBA::Environment& _env) - TAO_THROW_SPEC ((CORBA::SystemException, - CosTrading::IllegalServiceType, - TRADING_REPOS::ServiceTypeExists, - TRADING_REPOS::InterfaceTypeMismatch, - CosTrading::IllegalPropertyName, - CosTrading::DuplicatePropertyName, - TRADING_REPOS::ValueTypeRedefinition, - TRADING_REPOS::DuplicateServiceTypeName, - CosTrading::Register::InvalidObjectRef, - CosTrading::Register::InterfaceTypeMismatch, - CosTrading::ReadonlyDynamicProperty, - CosTrading::MissingMandatoryProperty, - CosTrading::DuplicatePropertyName)) -{ - CosTrading::Register_var reg; - CosTrading::OfferId offer_id = 0; - - TAO_TRY - { - reg = this->lookup_->register_if (TAO_TRY_ENV); - TAO_CHECK_ENV; - - this->pprops_.length (this->pcount_); - this->prop_set_->define_properties (this->pprops_, TAO_TRY_ENV); - TAO_CHECK_ENV; - - /***************** UTTER HACK: REMOVE WHEN EXCEPTIONS WORK! ****/ - CosTrading::TypeRepository_ptr obj = this->lookup_->type_repos (_env); - ACE_DEBUG ((LM_DEBUG, "Attempting add_type.\n")); - CosTradingRepos::ServiceTypeRepository_var str = - CosTradingRepos::ServiceTypeRepository::_narrow (obj, _env); - TAO_CHECK_ENV_RETURN (_env, 0); - - str->add_type (type, - object_ref->_interface_repository_id (), - props, - stypes, - _env); - TAO_CHECK_ENV_RETURN (_env, 0); - /***************** UTTER HACK: REMOVE WHEN EXCEPTIONS WORK! ****/ - - // Attempt to export the offer. - ACE_DEBUG ((LM_DEBUG, "Attempting export.\n")); - this->tprops_.length (this->tcount_); - offer_id = reg->export (object_ref, type, this->tprops_, TAO_TRY_ENV); - TAO_CHECK_ENV; - } - TAO_CATCH (CosTrading::UnknownServiceType, excp) - { - CosTrading::TypeRepository_ptr obj = this->lookup_->type_repos (_env); - TAO_CHECK_ENV_RETURN (_env, 0); - - ACE_DEBUG ((LM_DEBUG, "Export failed. Attempting add_type.\n")); - CosTradingRepos::ServiceTypeRepository_var str = - CosTradingRepos::ServiceTypeRepository::_narrow (obj, _env); - TAO_CHECK_ENV_RETURN (_env, 0); - - // If the ServiceTypeName wasn't found, we'll have to add the - // type to the Service Type repository ourselves. - str->add_type (type, - object_ref->_interface_repository_id (), - props, - stypes, - _env); - TAO_CHECK_ENV_RETURN (_env, 0); - - // Now we'll try again to register the offer. - ACE_DEBUG ((LM_DEBUG, "Attempting export again.\n")); - offer_id = reg->export (object_ref, type, this->tprops_, _env); - TAO_CHECK_ENV_RETURN (_env, 0); - } - TAO_CATCHANY - { - // Sigh, all our efforts were for naight. - TAO_RETHROW_RETURN (0); - } - TAO_ENDTRY; - - return offer_id; -} - -// ************************************************************* -// TAO_Property_Modifier -// ************************************************************* - -TAO_Property_Modifier:: -TAO_Property_Modifier (CosTrading::Lookup_var lookup_if, - CosPropertyService::PropertySet_ptr prop_set, - CORBA::ULong initial_size) - : increment_ (initial_size), - lookup_ (lookup_if), - prop_set_ (prop_set), - pdelete_ (initial_size), - pmodify_ (initial_size), - tdelete_ (initial_size), - tmodify_ (initial_size), - pdcount_ (0), - pmcount_ (0), - tdcount_ (0), - tmcount_ (0) -{ -} - -void -TAO_Property_Modifier::delete_property (const char* name) -{ - CORBA::ULong plength = this->pdelete_.length (), - tlength = this->tdelete_.length (); - - if (tlength == this->tdcount_) - this->tdelete_.length (tlength + this->increment_); - - if (plength == this->pdcount_) - this->pdelete_.length (plength + this->increment_); - - this->tdelete_[this->tdcount_] = name; - this->tdcount_++; - - this->pdelete_[this->pdcount_] = name; - this->pdcount_++; -} - -void -TAO_Property_Modifier::modify_property (const char* name, const Any& value) -{ - CORBA::ULong plength = this->pmodify_.length (), - tlength = this->tmodify_.length (); - - if (tlength == this->tmcount_) - this->tmodify_.length (tlength + this->increment_); - - if (plength == this->pmcount_) - this->pmodify_.length (plength + this->increment_); - - this->tmodify_[this->tmcount_].name = name; - this->tmodify_[this->tmcount_].value = value; - this->tdcount_++; - - this->pmodify_[this->pmcount_].property_name = name; - this->pmodify_[this->pmcount_].property_value = value; - this->pdcount_++; -} - -void -TAO_Property_Modifier::commit (CosTrading::OfferId id, - CORBA::Environment& _env) - TAO_THROW_SPEC ((CORBA::SystemException, - CosPropertyService::MultipleExceptions, - CosTrading::NotImplemented, - CosTrading::IllegalOfferId, - CosTrading::UnknownOfferId, - CosTrading::Register::ProxyOfferId, - CosTrading::IllegalPropertyName, - CosTrading::Register::UnknownPropertyName, - CosTrading::PropertyTypeMismatch, - CosTrading::ReadonlyDynamicProperty, - CosTrading::Register::MandatoryProperty, - CosTrading::Register::ReadonlyProperty, - CosTrading::DuplicatePropertyName)) -{ - this->tdelete_.length (this->tdcount_); - this->tmodify_.length (this->tmcount_); - this->pdelete_.length (this->pdcount_); - this->pmodify_.length (this->pmcount_); - - CosTrading::Register_var reg = this->lookup_->register_if (_env); - TAO_CHECK_ENV_RETURN (_env,); - - reg->modify (id, this->tdelete_, this->tmodify_, _env); - TAO_CHECK_ENV_RETURN (_env,); - - this->prop_set_->define_properties (this->pmodify_, _env); - TAO_CHECK_ENV_RETURN (_env,); - - this->prop_set_->delete_properties (this->pdelete_, _env); - TAO_CHECK_ENV_RETURN (_env,); -} - - - diff --git a/TAO/orbsvcs/tests/AVStreams/Property_Exporter.h b/TAO/orbsvcs/tests/AVStreams/Property_Exporter.h deleted file mode 100644 index 54cdb5725fe..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/Property_Exporter.h +++ /dev/null @@ -1,196 +0,0 @@ -/* -*- C++ -*- */ - -// ======================================================================== -// $Id$ -// -// = LIBRARY -// TAO/orbsvcs/orbsvcs -// -// = FILENAME -// Property_Exporter.h -// -// = DESCRIPTION -// Allows a service to export properties to both a Property Set and -// a Trading Service simulatenously. -// -// = AUTHORS -// Seth Widoff <sbw1@cs.wustl.edu> -// -// ======================================================================== - -#if ! defined (TAO_PROPERTY_EXPORTER_H) -#define TAO_PROPERTY_EXPORTER_H - -#include "orbsvcs/CosTradingC.h" -#include "orbsvcs/CosPropertyServiceC.h" -#include "orbsvcs/Trader/Dynamic_Property.h" - -class TAO_Property_Exporter -// = TITLE -// Publish public properties of a servant to a -// CosPropertyService::PropSet instance and a Trading Service -// offer. -// -// Use this class in the following way: -// 1. Instantiate. -// 2. for (int i = 0; i < num_properties; i++) add_*_property (); -// 3. export () -{ - public: - -#if defined TAO_HAS_DYNAMIC_PROPERTY_BUG - TAO_Property_Exporter (CosTrading::Lookup_var lookup_if, - CosPropertyService::PropertySet_ptr prop_set, - CORBA::ORB_ptr orb, - CORBA::ULong initial_size = 10); -#else - TAO_Property_Exporter (CosTrading::Lookup_var lookup_if, - CosPropertyService::PropertySet_ptr prop_set, - CORBA::ULong initial_size = 10); - -#endif /* TAO_HAS_DYNAMIC_PROPERTY_BUG */ - - ~TAO_Property_Exporter (void); - // Delete all Dynamic Property adapters - - void add_static_property (const char* name, - const CORBA::Any& value); - // Add a property to the Offer and the PropSet. - - void add_dynamic_property (const char* name, - const CORBA::Any& intial_value, - TAO_DP_Dispatcher& dp); - // Add a property to the PropSet and a dynamic property to the - // Offer. Have the dynamic property connect to the PropSet accessor - // for that name. - - void add_dynamic_property (const char* name, - CosTradingDynamic::DynamicProp& dp_struct); - - CosTrading::OfferId export (const CORBA::Object_ptr object_ref, - const CosTrading::ServiceTypeName type, - CORBA::Environment& _env) - TAO_THROW_SPEC ((CORBA::SystemException, - CosPropertyService::MultipleExceptions, - CosTrading::Register::InvalidObjectRef, - CosTrading::IllegalServiceType, - CosTrading::UnknownServiceType, -o CosTrading::Register::InterfaceTypeMismatch, - CosTrading::IllegalPropertyName, - CosTrading::PropertyTypeMismatch, - CosTrading::ReadonlyDynamicProperty, - CosTrading::MissingMandatoryProperty, - CosTrading::DuplicatePropertyName)); - // Export the offer to the trader under the given type. - - typedef CosTradingRepos::ServiceTypeRepository TRADING_REPOS; - CosTrading::OfferId export (const CORBA::Object_ptr object_ref, - const CosTrading::ServiceTypeName type, - const TRADING_REPOS::PropStructSeq& props, - const TRADING_REPOS::ServiceTypeNameSeq& stypes, - CORBA::Environment& _env) - TAO_THROW_SPEC ((CORBA::SystemException, - CosPropertyService::MultipleExceptions, - CosTrading::IllegalServiceType, - TRADING_REPOS::ServiceTypeExists, - TRADING_REPOS::InterfaceTypeMismatch, - CosTrading::IllegalPropertyName, - CosTrading::DuplicatePropertyName, - TRADING_REPOS::ValueTypeRedefinition, - TRADING_REPOS::DuplicateServiceTypeName, - CosTrading::Register::InvalidObjectRef, - CosTrading::Register::InterfaceTypeMismatch, - CosTrading::ReadonlyDynamicProperty, - CosTrading::MissingMandatoryProperty, - CosTrading::DuplicatePropertyName)); - // Export the offer to the trader under the given type. Register the - // type with the current definition if the type can't be found in - // the service type repository. - -private: - - TAO_Property_Exporter (const TAO_Property_Exporter&); - void operator= (const TAO_Property_Exporter&); - // These don't make sense on this class. - -#if defined TAO_HAS_DYNAMIC_PROPERTY_BUG - CORBA::ORB_var orb_; -#endif /* TAO_HAS_DYNAMIC_PROPERTY_BUG */ - - const int increment_; - - CosTrading::Lookup_var lookup_; - CosPropertyService::PropertySet_var prop_set_; - - CORBA::ULong pcount_, tcount_; - CosTrading::PropertySeq tprops_; - CosPropertyService::Properties pprops_; -}; - -class TAO_Property_Modifier -// = TITLE -// Modify or delete properties published in a PropSet instance or as -// an offer in a Trading Service instance. -// -// = DESCRIPTION -// This interface is primarily for properties registered as static -// with the trading service, yet periodically change. The change -// isn't frequent enough to warrant the constant overhead of dynamic -// properties, which can affect the server performance. -{ -public: - - TAO_Property_Modifier (CosTrading::Lookup_var lookup_if, - CosPropertyService::PropertySet_ptr prop_set, - CORBA::ULong initial_size = 10); - - // If no Lookup Interface is provided to the constructor, then - // resolve_initial_references ("TradingService") will be used. - - void delete_property (const char* name); - // Remove a property from the current prop_set/offer. - - void modify_property (const char* name, const CORBA::Any& value); - // Modify a property from the current prop_set/offer. - - void commit (CosTrading::OfferId id, CORBA::Environment& _env) - TAO_THROW_SPEC ((CORBA::SystemException, - CosPropertyService::MultipleExceptions, - CosTrading::NotImplemented, - CosTrading::IllegalOfferId, - CosTrading::UnknownOfferId, - CosTrading::Register::ProxyOfferId, - CosTrading::IllegalPropertyName, - CosTrading::Register::UnknownPropertyName, - CosTrading::PropertyTypeMismatch, - CosTrading::ReadonlyDynamicProperty, - CosTrading::Register::MandatoryProperty, - CosTrading::Register::ReadonlyProperty, - CosTrading::DuplicatePropertyName)); - // Commit your changes to the trading service. - - private: - - const int increment_; - - int pdcount_; - int pmcount_; - - int tdcount_; - int tmcount_; - - CosTrading::Lookup_var lookup_; - CosPropertyService::PropertySet_var prop_set_; - - CosPropertyService::PropertyNames pdelete_; - CosPropertyService::Properties pmodify_; - - CosTrading::PropertyNameSeq tdelete_; - CosTrading::PropertySeq tmodify_; - - TAO_Property_Modifier (const TAO_Property_Modifier&); - void operator= (const TAO_Property_Modifier&); - // These don't make sense on this class. -}; - -#endif /* TAO_PROPERTY_EXPORTER_H */ diff --git a/TAO/orbsvcs/tests/AVStreams/benchmark/Makefile b/TAO/orbsvcs/tests/AVStreams/benchmark/Makefile index a49a3be098e..431a588ad85 100644 --- a/TAO/orbsvcs/tests/AVStreams/benchmark/Makefile +++ b/TAO/orbsvcs/tests/AVStreams/benchmark/Makefile @@ -11,11 +11,11 @@ LDLIBS = -lorbsvcs -lTAO -SERVER_OBJS = server.o +SERVER_OBJS = server.o child.o CLIENT_OBJS = client.o CHILD_OBJS = child.o -BIN = server client child +BIN = server client #child BUILD = $(BIN) VLDLIBS = $(LDLIBS:%=%$(VAR)) @@ -42,8 +42,8 @@ endif DCFLAGS = -g LDFLAGS += -L$(TAO_ROOT)/orbsvcs/orbsvcs -L$(TAO_ROOT)/tao -CPPFLAGS += -I$(TAO_ROOT)/orbsvcs -I$(TAO_ROOT) -I$(TAO_ROOT)/tao/compat $(TSS_ORB_FLAG) \ - -DTAO_HAS_DYNAMIC_PROPERTY_BUG +CPPFLAGS += -I$(TAO_ROOT)/orbsvcs -I$(TAO_ROOT) -I$(TAO_ROOT)/tao/compat $(TSS_ORB_FLAG) + server:$(addprefix $(VDIR),$(SERVER_OBJS)) $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK) @@ -62,127 +62,421 @@ realclean: clean # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. .obj/client.o .obj/client.so .shobj/client.o .shobj/client.so: client.cpp client.h \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h \ - $(ACE_ROOT)/ace/ARGV.h \ - $(ACE_ROOT)/ace/ARGV.i \ + $(ACE_ROOT)ace/Reactor.h \ + $(ACE_ROOT)ace/Handle_Set.h \ + $(ACE_ROOT)ace/ACE.h \ + $(ACE_ROOT)ace/OS.h \ + $(ACE_ROOT)ace/inc_user_config.h \ + $(ACE_ROOT)ace/config.h \ + $(ACE_ROOT)ace/config-sunos5.5.h \ + $(ACE_ROOT)ace/config-g++-common.h \ + $(ACE_ROOT)ace/streams.h \ + $(ACE_ROOT)ace/Basic_Types.h \ + $(ACE_ROOT)ace/Basic_Types.i \ + $(ACE_ROOT)ace/OS.i \ + $(ACE_ROOT)ace/Trace.h \ + $(ACE_ROOT)ace/Log_Msg.h \ + $(ACE_ROOT)ace/Log_Record.h \ + $(ACE_ROOT)ace/ACE.i \ + $(ACE_ROOT)ace/Log_Priority.h \ + $(ACE_ROOT)ace/Log_Record.i \ + $(ACE_ROOT)ace/Handle_Set.i \ + $(ACE_ROOT)ace/Timer_Queue.h \ + $(ACE_ROOT)ace/Synch.h \ + $(ACE_ROOT)ace/SV_Semaphore_Complex.h \ + $(ACE_ROOT)ace/SV_Semaphore_Simple.h \ + $(ACE_ROOT)ace/SV_Semaphore_Simple.i \ + $(ACE_ROOT)ace/SV_Semaphore_Complex.i \ + $(ACE_ROOT)ace/Synch.i \ + $(ACE_ROOT)ace/Synch_T.h \ + $(ACE_ROOT)ace/Event_Handler.h \ + $(ACE_ROOT)ace/Event_Handler.i \ + $(ACE_ROOT)ace/Synch_T.i \ + $(ACE_ROOT)ace/Thread.h \ + $(ACE_ROOT)ace/Thread.i \ + $(ACE_ROOT)ace/Atomic_Op.i \ + $(ACE_ROOT)ace/Synch_T.cpp \ + $(ACE_ROOT)ace/Timer_Queue_T.h \ + $(ACE_ROOT)ace/Free_List.h \ + $(ACE_ROOT)ace/Free_List.i \ + $(ACE_ROOT)ace/Free_List.cpp \ + $(ACE_ROOT)ace/Timer_Queue_T.i \ + $(ACE_ROOT)ace/Timer_Queue_T.cpp \ + $(ACE_ROOT)ace/Signal.h \ + $(ACE_ROOT)ace/Containers.h \ + $(ACE_ROOT)ace/Containers.i \ + $(ACE_ROOT)ace/Containers.cpp \ + $(ACE_ROOT)ace/Malloc.h \ + $(ACE_ROOT)ace/Malloc_Base.h \ + $(ACE_ROOT)ace/Malloc.i \ + $(ACE_ROOT)ace/Malloc_T.h \ + $(ACE_ROOT)ace/Malloc_T.i \ + $(ACE_ROOT)ace/Malloc_T.cpp \ + $(ACE_ROOT)ace/Memory_Pool.h \ + $(ACE_ROOT)ace/Mem_Map.h \ + $(ACE_ROOT)ace/Mem_Map.i \ + $(ACE_ROOT)ace/Memory_Pool.i \ + $(ACE_ROOT)ace/Signal.i \ + $(ACE_ROOT)ace/Object_Manager.h \ + $(ACE_ROOT)ace/Object_Manager.i \ + $(ACE_ROOT)ace/Managed_Object.h \ + $(ACE_ROOT)ace/Managed_Object.i \ + $(ACE_ROOT)ace/Managed_Object.cpp \ + $(ACE_ROOT)ace/Reactor.i \ + $(ACE_ROOT)ace/Reactor_Impl.h \ + $(ACE_ROOT)ace/ARGV.h \ + $(ACE_ROOT)ace/ARGV.i \ $(TAO_ROOT)/tao/TAO.h \ $(TAO_ROOT)/tao/corba.h \ - $(ACE_ROOT)/ace/Get_Opt.h \ - $(ACE_ROOT)/ace/Get_Opt.i \ - $(ACE_ROOT)/ace/SOCK_Stream.h \ - $(ACE_ROOT)/ace/SOCK_IO.h \ - $(ACE_ROOT)/ace/SOCK.h \ - $(ACE_ROOT)/ace/Addr.h \ - $(ACE_ROOT)/ace/Addr.i \ - $(ACE_ROOT)/ace/IPC_SAP.h \ - $(ACE_ROOT)/ace/IPC_SAP.i \ - $(ACE_ROOT)/ace/SOCK.i \ - $(ACE_ROOT)/ace/SOCK_IO.i \ - $(ACE_ROOT)/ace/INET_Addr.h \ - $(ACE_ROOT)/ace/INET_Addr.i \ - $(ACE_ROOT)/ace/SOCK_Stream.i \ - $(ACE_ROOT)/ace/Hash_Map_Manager.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/SOCK_Acceptor.h \ - $(ACE_ROOT)/ace/Time_Value.h \ - $(ACE_ROOT)/ace/SOCK_Acceptor.i \ - $(ACE_ROOT)/ace/SOCK_Connector.h \ - $(ACE_ROOT)/ace/SOCK_Connector.i \ - $(ACE_ROOT)/ace/Strategies.h \ - $(ACE_ROOT)/ace/Strategies_T.h \ - $(ACE_ROOT)/ace/Service_Config.h \ - $(ACE_ROOT)/ace/Service_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.i \ - $(ACE_ROOT)/ace/Service_Object.i \ - $(ACE_ROOT)/ace/Service_Config.i \ - $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ - $(ACE_ROOT)/ace/Synch_Options.h \ - $(ACE_ROOT)/ace/Connector.h \ - $(ACE_ROOT)/ace/Map_Manager.h \ - $(ACE_ROOT)/ace/Map_Manager.i \ - $(ACE_ROOT)/ace/Svc_Handler.h \ - $(ACE_ROOT)/ace/Task.h \ - $(ACE_ROOT)/ace/Thread_Manager.h \ - $(ACE_ROOT)/ace/Thread_Manager.i \ - $(ACE_ROOT)/ace/Task.i \ - $(ACE_ROOT)/ace/Task_T.h \ - $(ACE_ROOT)/ace/Message_Queue.h \ - $(ACE_ROOT)/ace/Message_Block.h \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - $(ACE_ROOT)/ace/Message_Block.i \ - $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ - $(ACE_ROOT)/ace/Message_Queue.i \ - $(ACE_ROOT)/ace/Task_T.i \ - $(ACE_ROOT)/ace/Dynamic.h \ - $(ACE_ROOT)/ace/Dynamic.i \ - $(ACE_ROOT)/ace/Singleton.h \ - $(ACE_ROOT)/ace/Singleton.i \ - $(ACE_ROOT)/ace/Svc_Handler.i \ - $(ACE_ROOT)/ace/Connector.i \ - $(ACE_ROOT)/ace/Acceptor.h \ - $(ACE_ROOT)/ace/Acceptor.i \ + $(TAO_ROOT)/tao/orbconf.h \ + $(ACE_ROOT)ace/Get_Opt.h \ + $(ACE_ROOT)ace/Get_Opt.i \ + $(ACE_ROOT)ace/SOCK_Stream.h \ + $(ACE_ROOT)ace/SOCK_IO.h \ + $(ACE_ROOT)ace/SOCK.h \ + $(ACE_ROOT)ace/Addr.h \ + $(ACE_ROOT)ace/Addr.i \ + $(ACE_ROOT)ace/IPC_SAP.h \ + $(ACE_ROOT)ace/IPC_SAP.i \ + $(ACE_ROOT)ace/SOCK.i \ + $(ACE_ROOT)ace/SOCK_IO.i \ + $(ACE_ROOT)ace/INET_Addr.h \ + $(ACE_ROOT)ace/INET_Addr.i \ + $(ACE_ROOT)ace/SOCK_Stream.i \ + $(ACE_ROOT)ace/Hash_Map_Manager.h \ + $(ACE_ROOT)ace/Hash_Map_Manager.cpp \ + $(ACE_ROOT)ace/Service_Config.h \ + $(ACE_ROOT)ace/Service_Object.h \ + $(ACE_ROOT)ace/Shared_Object.h \ + $(ACE_ROOT)ace/Shared_Object.i \ + $(ACE_ROOT)ace/Service_Object.i \ + $(ACE_ROOT)ace/SString.h \ + $(ACE_ROOT)ace/SString.i \ + $(ACE_ROOT)ace/Service_Config.i \ + $(ACE_ROOT)ace/Svc_Conf_Tokens.h \ + $(ACE_ROOT)ace/SOCK_Acceptor.h \ + $(ACE_ROOT)ace/Time_Value.h \ + $(ACE_ROOT)ace/SOCK_Acceptor.i \ + $(ACE_ROOT)ace/SOCK_Connector.h \ + $(ACE_ROOT)ace/SOCK_Connector.i \ + $(ACE_ROOT)ace/Strategies.h \ + $(ACE_ROOT)ace/Strategies_T.h \ + $(ACE_ROOT)ace/Synch_Options.h \ + $(ACE_ROOT)ace/Synch_Options.i \ + $(ACE_ROOT)ace/Strategies_T.i \ + $(ACE_ROOT)ace/Strategies_T.cpp \ + $(ACE_ROOT)ace/Service_Repository.h \ + $(ACE_ROOT)ace/Service_Types.h \ + $(ACE_ROOT)ace/Service_Types.i \ + $(ACE_ROOT)ace/Service_Repository.i \ + $(ACE_ROOT)ace/Thread_Manager.h \ + $(ACE_ROOT)ace/Thread_Manager.i \ + $(ACE_ROOT)ace/WFMO_Reactor.h \ + $(ACE_ROOT)ace/Message_Queue.h \ + $(ACE_ROOT)ace/Message_Block.h \ + $(ACE_ROOT)ace/Message_Block.i \ + $(ACE_ROOT)ace/IO_Cntl_Msg.h \ + $(ACE_ROOT)ace/Message_Queue.i \ + $(ACE_ROOT)ace/Message_Queue.cpp \ + $(ACE_ROOT)ace/WFMO_Reactor.i \ + $(ACE_ROOT)ace/Strategies.i \ + $(ACE_ROOT)ace/Connector.h \ + $(ACE_ROOT)ace/Map_Manager.h \ + $(ACE_ROOT)ace/Map_Manager.i \ + $(ACE_ROOT)ace/Map_Manager.cpp \ + $(ACE_ROOT)ace/Svc_Handler.h \ + $(ACE_ROOT)ace/Task.h \ + $(ACE_ROOT)ace/Task.i \ + $(ACE_ROOT)ace/Task_T.h \ + $(ACE_ROOT)ace/Task_T.i \ + $(ACE_ROOT)ace/Task_T.cpp \ + $(ACE_ROOT)ace/Module.h \ + $(ACE_ROOT)ace/Module.i \ + $(ACE_ROOT)ace/Module.cpp \ + $(ACE_ROOT)ace/Stream_Modules.h \ + $(ACE_ROOT)ace/Stream_Modules.i \ + $(ACE_ROOT)ace/Stream_Modules.cpp \ + $(ACE_ROOT)ace/Dynamic.h \ + $(ACE_ROOT)ace/Dynamic.i \ + $(ACE_ROOT)ace/Singleton.h \ + $(ACE_ROOT)ace/Singleton.i \ + $(ACE_ROOT)ace/Singleton.cpp \ + $(ACE_ROOT)ace/Svc_Handler.i \ + $(ACE_ROOT)ace/Svc_Handler.cpp \ + $(ACE_ROOT)ace/Connector.i \ + $(ACE_ROOT)ace/Connector.cpp \ + $(ACE_ROOT)ace/Acceptor.h \ + $(ACE_ROOT)ace/Acceptor.i \ + $(ACE_ROOT)ace/Acceptor.cpp \ $(TAO_ROOT)/tao/compat/objbase.h \ $(TAO_ROOT)/tao/compat/initguid.h \ + $(TAO_ROOT)/tao/Align.h \ + $(TAO_ROOT)/tao/ORB.h \ + $(TAO_ROOT)/tao/Sequence.h \ + $(TAO_ROOT)/tao/Sequence.i \ + $(TAO_ROOT)/tao/Sequence_T.h \ + $(TAO_ROOT)/tao/Sequence_T.i \ + $(TAO_ROOT)/tao/Sequence_T.cpp \ + $(TAO_ROOT)/tao/Object_KeyC.h \ + $(TAO_ROOT)/tao/Object_KeyC.i \ + $(TAO_ROOT)/tao/ORB.i \ + $(TAO_ROOT)/tao/Exception.h \ + $(TAO_ROOT)/tao/Exception.i \ + $(TAO_ROOT)/tao/Any.h \ + $(TAO_ROOT)/tao/Any.i \ + $(TAO_ROOT)/tao/params.h \ + $(TAO_ROOT)/tao/params.i \ + $(TAO_ROOT)/tao/Client_Strategy_Factory.h \ + $(TAO_ROOT)/tao/Server_Strategy_Factory.h \ + $(TAO_ROOT)/tao/default_client.h \ + $(TAO_ROOT)/tao/default_client.i \ + $(TAO_ROOT)/tao/default_server.h \ + $(TAO_ROOT)/tao/ORB_Strategies_T.h \ + $(TAO_ROOT)/tao/ORB_Strategies_T.i \ + $(TAO_ROOT)/tao/ORB_Strategies_T.cpp \ + $(TAO_ROOT)/tao/default_server.i \ + $(TAO_ROOT)/tao/NVList.h \ + $(TAO_ROOT)/tao/NVList.i \ + $(TAO_ROOT)/tao/Principal.h \ + $(TAO_ROOT)/tao/Request.h \ + $(TAO_ROOT)/tao/Request.i \ + $(TAO_ROOT)/tao/Stub.h \ + $(TAO_ROOT)/tao/Stub.i \ + $(TAO_ROOT)/tao/Object.h \ + $(TAO_ROOT)/tao/Object.i \ + $(TAO_ROOT)/tao/Typecode.h \ + $(TAO_ROOT)/tao/Typecode.i \ + $(TAO_ROOT)/tao/Marshal.h \ + $(TAO_ROOT)/tao/Marshal.i \ + $(TAO_ROOT)/tao/CDR.h \ + $(TAO_ROOT)/tao/CDR.i \ + $(TAO_ROOT)/tao/PolicyC.h \ + $(TAO_ROOT)/tao/PolicyC.i \ + $(TAO_ROOT)/tao/CurrentC.h \ + $(TAO_ROOT)/tao/CurrentC.i \ + $(TAO_ROOT)/tao/POA.h \ + $(TAO_ROOT)/tao/POAC.h \ + $(TAO_ROOT)/tao/POAC.i \ + $(TAO_ROOT)/tao/Servant_Base.h \ + $(TAO_ROOT)/tao/POAS.h \ + $(TAO_ROOT)/tao/POA_CORBA.h \ + $(TAO_ROOT)/tao/POAS.i \ + $(TAO_ROOT)/tao/Object_Table.h \ + $(TAO_ROOT)/tao/POA.i \ + $(TAO_ROOT)/tao/poa_macros.h \ + $(TAO_ROOT)/tao/Connect.h \ + $(TAO_ROOT)/tao/Connect.i \ + $(TAO_ROOT)/tao/ORB_Core.h \ + $(TAO_ROOT)/tao/ORB_Core.i \ + $(ACE_ROOT)ace/Dynamic_Service.h \ + $(ACE_ROOT)ace/Dynamic_Service.cpp \ + $(TAO_ROOT)/tao/Operation_Table.h \ + $(TAO_ROOT)/tao/debug.h \ + $(TAO_ROOT)/tao/IIOP_Object.h \ + $(TAO_ROOT)/tao/IIOP_Object.i \ + $(TAO_ROOT)/tao/IIOP_ORB.h \ + $(TAO_ROOT)/tao/IIOP_ORB.i \ + $(TAO_ROOT)/tao/IIOP_Interpreter.h \ + $(TAO_ROOT)/tao/GIOP.h \ + $(TAO_ROOT)/tao/GIOP.i \ + $(TAO_ROOT)/tao/Server_Request.h \ + $(TAO_ROOT)/tao/Server_Request.i \ + $(TAO_ROOT)/tao/singletons.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \ + $(ACE_ROOT)ace/SOCK_Dgram.h \ + $(ACE_ROOT)ace/SOCK_Dgram.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/AV/AVStreams_i.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.cpp \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsC.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsC.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.cpp \ + $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Property/CosPropertyService_i.h \ + $(ACE_ROOT)ace/Process.h \ + $(ACE_ROOT)ace/Process.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlC.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlC.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.cpp \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS.i \ + $(ACE_ROOT)ace/High_Res_Timer.h \ + $(ACE_ROOT)ace/High_Res_Timer.i +.obj/server.o .obj/server.so .shobj/server.o .shobj/server.so: server.cpp server.h \ + $(ACE_ROOT)ace/Get_Opt.h \ + $(ACE_ROOT)ace/ACE.h \ + $(ACE_ROOT)ace/OS.h \ + $(ACE_ROOT)ace/inc_user_config.h \ + $(ACE_ROOT)ace/config.h \ + $(ACE_ROOT)ace/config-sunos5.5.h \ + $(ACE_ROOT)ace/config-g++-common.h \ + $(ACE_ROOT)ace/streams.h \ + $(ACE_ROOT)ace/Basic_Types.h \ + $(ACE_ROOT)ace/Basic_Types.i \ + $(ACE_ROOT)ace/OS.i \ + $(ACE_ROOT)ace/Trace.h \ + $(ACE_ROOT)ace/Log_Msg.h \ + $(ACE_ROOT)ace/Log_Record.h \ + $(ACE_ROOT)ace/ACE.i \ + $(ACE_ROOT)ace/Log_Priority.h \ + $(ACE_ROOT)ace/Log_Record.i \ + $(ACE_ROOT)ace/Get_Opt.i \ + $(ACE_ROOT)ace/Acceptor.h \ + $(ACE_ROOT)ace/Service_Config.h \ + $(ACE_ROOT)ace/Service_Object.h \ + $(ACE_ROOT)ace/Shared_Object.h \ + $(ACE_ROOT)ace/Shared_Object.i \ + $(ACE_ROOT)ace/Event_Handler.h \ + $(ACE_ROOT)ace/Event_Handler.i \ + $(ACE_ROOT)ace/Service_Object.i \ + $(ACE_ROOT)ace/Signal.h \ + $(ACE_ROOT)ace/Synch.h \ + $(ACE_ROOT)ace/SV_Semaphore_Complex.h \ + $(ACE_ROOT)ace/SV_Semaphore_Simple.h \ + $(ACE_ROOT)ace/SV_Semaphore_Simple.i \ + $(ACE_ROOT)ace/SV_Semaphore_Complex.i \ + $(ACE_ROOT)ace/Synch.i \ + $(ACE_ROOT)ace/Synch_T.h \ + $(ACE_ROOT)ace/Synch_T.i \ + $(ACE_ROOT)ace/Thread.h \ + $(ACE_ROOT)ace/Thread.i \ + $(ACE_ROOT)ace/Atomic_Op.i \ + $(ACE_ROOT)ace/Synch_T.cpp \ + $(ACE_ROOT)ace/Containers.h \ + $(ACE_ROOT)ace/Containers.i \ + $(ACE_ROOT)ace/Containers.cpp \ + $(ACE_ROOT)ace/Malloc.h \ + $(ACE_ROOT)ace/Malloc_Base.h \ + $(ACE_ROOT)ace/Malloc.i \ + $(ACE_ROOT)ace/Malloc_T.h \ + $(ACE_ROOT)ace/Free_List.h \ + $(ACE_ROOT)ace/Free_List.i \ + $(ACE_ROOT)ace/Free_List.cpp \ + $(ACE_ROOT)ace/Malloc_T.i \ + $(ACE_ROOT)ace/Malloc_T.cpp \ + $(ACE_ROOT)ace/Memory_Pool.h \ + $(ACE_ROOT)ace/Mem_Map.h \ + $(ACE_ROOT)ace/Mem_Map.i \ + $(ACE_ROOT)ace/Memory_Pool.i \ + $(ACE_ROOT)ace/Signal.i \ + $(ACE_ROOT)ace/Object_Manager.h \ + $(ACE_ROOT)ace/Object_Manager.i \ + $(ACE_ROOT)ace/Managed_Object.h \ + $(ACE_ROOT)ace/Managed_Object.i \ + $(ACE_ROOT)ace/Managed_Object.cpp \ + $(ACE_ROOT)ace/SString.h \ + $(ACE_ROOT)ace/SString.i \ + $(ACE_ROOT)ace/Service_Config.i \ + $(ACE_ROOT)ace/Reactor.h \ + $(ACE_ROOT)ace/Handle_Set.h \ + $(ACE_ROOT)ace/Handle_Set.i \ + $(ACE_ROOT)ace/Timer_Queue.h \ + $(ACE_ROOT)ace/Timer_Queue_T.h \ + $(ACE_ROOT)ace/Timer_Queue_T.i \ + $(ACE_ROOT)ace/Timer_Queue_T.cpp \ + $(ACE_ROOT)ace/Reactor.i \ + $(ACE_ROOT)ace/Reactor_Impl.h \ + $(ACE_ROOT)ace/Svc_Conf_Tokens.h \ + $(ACE_ROOT)ace/Svc_Handler.h \ + $(ACE_ROOT)ace/Synch_Options.h \ + $(ACE_ROOT)ace/Synch_Options.i \ + $(ACE_ROOT)ace/Task.h \ + $(ACE_ROOT)ace/Thread_Manager.h \ + $(ACE_ROOT)ace/Thread_Manager.i \ + $(ACE_ROOT)ace/Task.i \ + $(ACE_ROOT)ace/Task_T.h \ + $(ACE_ROOT)ace/Message_Queue.h \ + $(ACE_ROOT)ace/Message_Block.h \ + $(ACE_ROOT)ace/Message_Block.i \ + $(ACE_ROOT)ace/IO_Cntl_Msg.h \ + $(ACE_ROOT)ace/Strategies.h \ + $(ACE_ROOT)ace/Strategies_T.h \ + $(ACE_ROOT)ace/Hash_Map_Manager.h \ + $(ACE_ROOT)ace/Hash_Map_Manager.cpp \ + $(ACE_ROOT)ace/Strategies_T.i \ + $(ACE_ROOT)ace/Strategies_T.cpp \ + $(ACE_ROOT)ace/Service_Repository.h \ + $(ACE_ROOT)ace/Service_Types.h \ + $(ACE_ROOT)ace/Service_Types.i \ + $(ACE_ROOT)ace/Service_Repository.i \ + $(ACE_ROOT)ace/WFMO_Reactor.h \ + $(ACE_ROOT)ace/WFMO_Reactor.i \ + $(ACE_ROOT)ace/Strategies.i \ + $(ACE_ROOT)ace/Message_Queue.i \ + $(ACE_ROOT)ace/Message_Queue.cpp \ + $(ACE_ROOT)ace/Task_T.i \ + $(ACE_ROOT)ace/Task_T.cpp \ + $(ACE_ROOT)ace/Module.h \ + $(ACE_ROOT)ace/Module.i \ + $(ACE_ROOT)ace/Module.cpp \ + $(ACE_ROOT)ace/Stream_Modules.h \ + $(ACE_ROOT)ace/Stream_Modules.i \ + $(ACE_ROOT)ace/Stream_Modules.cpp \ + $(ACE_ROOT)ace/Dynamic.h \ + $(ACE_ROOT)ace/Dynamic.i \ + $(ACE_ROOT)ace/Singleton.h \ + $(ACE_ROOT)ace/Singleton.i \ + $(ACE_ROOT)ace/Singleton.cpp \ + $(ACE_ROOT)ace/Svc_Handler.i \ + $(ACE_ROOT)ace/Svc_Handler.cpp \ + $(ACE_ROOT)ace/Acceptor.i \ + $(ACE_ROOT)ace/Acceptor.cpp \ + $(ACE_ROOT)ace/SOCK_Acceptor.h \ + $(ACE_ROOT)ace/SOCK_Stream.h \ + $(ACE_ROOT)ace/SOCK_IO.h \ + $(ACE_ROOT)ace/SOCK.h \ + $(ACE_ROOT)ace/Addr.h \ + $(ACE_ROOT)ace/Addr.i \ + $(ACE_ROOT)ace/IPC_SAP.h \ + $(ACE_ROOT)ace/IPC_SAP.i \ + $(ACE_ROOT)ace/SOCK.i \ + $(ACE_ROOT)ace/SOCK_IO.i \ + $(ACE_ROOT)ace/INET_Addr.h \ + $(ACE_ROOT)ace/INET_Addr.i \ + $(ACE_ROOT)ace/SOCK_Stream.i \ + $(ACE_ROOT)ace/Time_Value.h \ + $(ACE_ROOT)ace/SOCK_Acceptor.i \ + $(ACE_ROOT)ace/SOCK_CODgram.h \ + $(ACE_ROOT)ace/SOCK_CODgram.i \ + $(ACE_ROOT)ace/Select_Reactor.h \ + $(ACE_ROOT)ace/Token.h \ + $(ACE_ROOT)ace/Token.i \ + $(ACE_ROOT)ace/Pipe.h \ + $(ACE_ROOT)ace/Pipe.i \ + $(ACE_ROOT)ace/Select_Reactor.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Naming_Utils.h \ + $(TAO_ROOT)/tao/corba.h \ $(TAO_ROOT)/tao/orbconf.h \ + $(ACE_ROOT)ace/SOCK_Connector.h \ + $(ACE_ROOT)ace/SOCK_Connector.i \ + $(ACE_ROOT)ace/Connector.h \ + $(ACE_ROOT)ace/Map_Manager.h \ + $(ACE_ROOT)ace/Map_Manager.i \ + $(ACE_ROOT)ace/Map_Manager.cpp \ + $(ACE_ROOT)ace/Connector.i \ + $(ACE_ROOT)ace/Connector.cpp \ + $(TAO_ROOT)/tao/compat/objbase.h \ + $(TAO_ROOT)/tao/compat/initguid.h \ $(TAO_ROOT)/tao/Align.h \ $(TAO_ROOT)/tao/ORB.h \ $(TAO_ROOT)/tao/Sequence.h \ $(TAO_ROOT)/tao/Sequence.i \ $(TAO_ROOT)/tao/Sequence_T.h \ $(TAO_ROOT)/tao/Sequence_T.i \ + $(TAO_ROOT)/tao/Sequence_T.cpp \ $(TAO_ROOT)/tao/Object_KeyC.h \ $(TAO_ROOT)/tao/Object_KeyC.i \ $(TAO_ROOT)/tao/ORB.i \ @@ -199,6 +493,7 @@ realclean: clean $(TAO_ROOT)/tao/default_server.h \ $(TAO_ROOT)/tao/ORB_Strategies_T.h \ $(TAO_ROOT)/tao/ORB_Strategies_T.i \ + $(TAO_ROOT)/tao/ORB_Strategies_T.cpp \ $(TAO_ROOT)/tao/default_server.i \ $(TAO_ROOT)/tao/NVList.h \ $(TAO_ROOT)/tao/NVList.i \ @@ -209,8 +504,279 @@ realclean: clean $(TAO_ROOT)/tao/Stub.i \ $(TAO_ROOT)/tao/Object.h \ $(TAO_ROOT)/tao/Object.i \ + $(TAO_ROOT)/tao/Typecode.h \ + $(TAO_ROOT)/tao/Typecode.i \ + $(TAO_ROOT)/tao/Marshal.h \ + $(TAO_ROOT)/tao/Marshal.i \ + $(TAO_ROOT)/tao/CDR.h \ + $(TAO_ROOT)/tao/CDR.i \ + $(TAO_ROOT)/tao/PolicyC.h \ + $(TAO_ROOT)/tao/PolicyC.i \ + $(TAO_ROOT)/tao/CurrentC.h \ + $(TAO_ROOT)/tao/CurrentC.i \ + $(TAO_ROOT)/tao/POA.h \ + $(TAO_ROOT)/tao/POAC.h \ + $(TAO_ROOT)/tao/POAC.i \ + $(TAO_ROOT)/tao/Servant_Base.h \ + $(TAO_ROOT)/tao/POAS.h \ + $(TAO_ROOT)/tao/POA_CORBA.h \ + $(TAO_ROOT)/tao/POAS.i \ + $(TAO_ROOT)/tao/Object_Table.h \ + $(TAO_ROOT)/tao/POA.i \ + $(TAO_ROOT)/tao/poa_macros.h \ + $(TAO_ROOT)/tao/Connect.h \ + $(TAO_ROOT)/tao/Connect.i \ + $(TAO_ROOT)/tao/ORB_Core.h \ + $(TAO_ROOT)/tao/ORB_Core.i \ + $(ACE_ROOT)ace/Dynamic_Service.h \ + $(ACE_ROOT)ace/Dynamic_Service.cpp \ + $(TAO_ROOT)/tao/Operation_Table.h \ + $(TAO_ROOT)/tao/debug.h \ + $(TAO_ROOT)/tao/IIOP_Object.h \ + $(TAO_ROOT)/tao/IIOP_Object.i \ + $(TAO_ROOT)/tao/IIOP_ORB.h \ + $(TAO_ROOT)/tao/IIOP_ORB.i \ + $(TAO_ROOT)/tao/IIOP_Interpreter.h \ + $(TAO_ROOT)/tao/GIOP.h \ + $(TAO_ROOT)/tao/GIOP.i \ $(TAO_ROOT)/tao/Server_Request.h \ $(TAO_ROOT)/tao/Server_Request.i \ + $(TAO_ROOT)/tao/singletons.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/IOR_Multicast.h \ + $(ACE_ROOT)ace/SOCK_Dgram_Mcast.h \ + $(ACE_ROOT)ace/SOCK_Dgram.h \ + $(ACE_ROOT)ace/SOCK_Dgram.i \ + $(ACE_ROOT)ace/SOCK_Dgram_Mcast.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/CosNaming_i.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.cpp \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Entries.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/AV/AVStreams_i.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.cpp \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsC.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsC.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.cpp \ + $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Property/CosPropertyService_i.h \ + $(ACE_ROOT)ace/Process.h \ + $(ACE_ROOT)ace/Process.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy.h \ + $(TAO_ROOT)/tao/TAO.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlC.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlC.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.cpp \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS.i \ + client.h $(ACE_ROOT)ace/ARGV.h \ + $(ACE_ROOT)ace/ARGV.i \ + $(ACE_ROOT)ace/High_Res_Timer.h \ + $(ACE_ROOT)ace/High_Res_Timer.i child.h +.obj/child.o .obj/child.so .shobj/child.o .shobj/child.so: child.cpp child.h \ + $(ACE_ROOT)ace/Get_Opt.h \ + $(ACE_ROOT)ace/ACE.h \ + $(ACE_ROOT)ace/OS.h \ + $(ACE_ROOT)ace/inc_user_config.h \ + $(ACE_ROOT)ace/config.h \ + $(ACE_ROOT)ace/config-sunos5.5.h \ + $(ACE_ROOT)ace/config-g++-common.h \ + $(ACE_ROOT)ace/streams.h \ + $(ACE_ROOT)ace/Basic_Types.h \ + $(ACE_ROOT)ace/Basic_Types.i \ + $(ACE_ROOT)ace/OS.i \ + $(ACE_ROOT)ace/Trace.h \ + $(ACE_ROOT)ace/Log_Msg.h \ + $(ACE_ROOT)ace/Log_Record.h \ + $(ACE_ROOT)ace/ACE.i \ + $(ACE_ROOT)ace/Log_Priority.h \ + $(ACE_ROOT)ace/Log_Record.i \ + $(ACE_ROOT)ace/Get_Opt.i \ + $(ACE_ROOT)ace/Acceptor.h \ + $(ACE_ROOT)ace/Service_Config.h \ + $(ACE_ROOT)ace/Service_Object.h \ + $(ACE_ROOT)ace/Shared_Object.h \ + $(ACE_ROOT)ace/Shared_Object.i \ + $(ACE_ROOT)ace/Event_Handler.h \ + $(ACE_ROOT)ace/Event_Handler.i \ + $(ACE_ROOT)ace/Service_Object.i \ + $(ACE_ROOT)ace/Signal.h \ + $(ACE_ROOT)ace/Synch.h \ + $(ACE_ROOT)ace/SV_Semaphore_Complex.h \ + $(ACE_ROOT)ace/SV_Semaphore_Simple.h \ + $(ACE_ROOT)ace/SV_Semaphore_Simple.i \ + $(ACE_ROOT)ace/SV_Semaphore_Complex.i \ + $(ACE_ROOT)ace/Synch.i \ + $(ACE_ROOT)ace/Synch_T.h \ + $(ACE_ROOT)ace/Synch_T.i \ + $(ACE_ROOT)ace/Thread.h \ + $(ACE_ROOT)ace/Thread.i \ + $(ACE_ROOT)ace/Atomic_Op.i \ + $(ACE_ROOT)ace/Synch_T.cpp \ + $(ACE_ROOT)ace/Containers.h \ + $(ACE_ROOT)ace/Containers.i \ + $(ACE_ROOT)ace/Containers.cpp \ + $(ACE_ROOT)ace/Malloc.h \ + $(ACE_ROOT)ace/Malloc_Base.h \ + $(ACE_ROOT)ace/Malloc.i \ + $(ACE_ROOT)ace/Malloc_T.h \ + $(ACE_ROOT)ace/Free_List.h \ + $(ACE_ROOT)ace/Free_List.i \ + $(ACE_ROOT)ace/Free_List.cpp \ + $(ACE_ROOT)ace/Malloc_T.i \ + $(ACE_ROOT)ace/Malloc_T.cpp \ + $(ACE_ROOT)ace/Memory_Pool.h \ + $(ACE_ROOT)ace/Mem_Map.h \ + $(ACE_ROOT)ace/Mem_Map.i \ + $(ACE_ROOT)ace/Memory_Pool.i \ + $(ACE_ROOT)ace/Signal.i \ + $(ACE_ROOT)ace/Object_Manager.h \ + $(ACE_ROOT)ace/Object_Manager.i \ + $(ACE_ROOT)ace/Managed_Object.h \ + $(ACE_ROOT)ace/Managed_Object.i \ + $(ACE_ROOT)ace/Managed_Object.cpp \ + $(ACE_ROOT)ace/SString.h \ + $(ACE_ROOT)ace/SString.i \ + $(ACE_ROOT)ace/Service_Config.i \ + $(ACE_ROOT)ace/Reactor.h \ + $(ACE_ROOT)ace/Handle_Set.h \ + $(ACE_ROOT)ace/Handle_Set.i \ + $(ACE_ROOT)ace/Timer_Queue.h \ + $(ACE_ROOT)ace/Timer_Queue_T.h \ + $(ACE_ROOT)ace/Timer_Queue_T.i \ + $(ACE_ROOT)ace/Timer_Queue_T.cpp \ + $(ACE_ROOT)ace/Reactor.i \ + $(ACE_ROOT)ace/Reactor_Impl.h \ + $(ACE_ROOT)ace/Svc_Conf_Tokens.h \ + $(ACE_ROOT)ace/Svc_Handler.h \ + $(ACE_ROOT)ace/Synch_Options.h \ + $(ACE_ROOT)ace/Synch_Options.i \ + $(ACE_ROOT)ace/Task.h \ + $(ACE_ROOT)ace/Thread_Manager.h \ + $(ACE_ROOT)ace/Thread_Manager.i \ + $(ACE_ROOT)ace/Task.i \ + $(ACE_ROOT)ace/Task_T.h \ + $(ACE_ROOT)ace/Message_Queue.h \ + $(ACE_ROOT)ace/Message_Block.h \ + $(ACE_ROOT)ace/Message_Block.i \ + $(ACE_ROOT)ace/IO_Cntl_Msg.h \ + $(ACE_ROOT)ace/Strategies.h \ + $(ACE_ROOT)ace/Strategies_T.h \ + $(ACE_ROOT)ace/Hash_Map_Manager.h \ + $(ACE_ROOT)ace/Hash_Map_Manager.cpp \ + $(ACE_ROOT)ace/Strategies_T.i \ + $(ACE_ROOT)ace/Strategies_T.cpp \ + $(ACE_ROOT)ace/Service_Repository.h \ + $(ACE_ROOT)ace/Service_Types.h \ + $(ACE_ROOT)ace/Service_Types.i \ + $(ACE_ROOT)ace/Service_Repository.i \ + $(ACE_ROOT)ace/WFMO_Reactor.h \ + $(ACE_ROOT)ace/WFMO_Reactor.i \ + $(ACE_ROOT)ace/Strategies.i \ + $(ACE_ROOT)ace/Message_Queue.i \ + $(ACE_ROOT)ace/Message_Queue.cpp \ + $(ACE_ROOT)ace/Task_T.i \ + $(ACE_ROOT)ace/Task_T.cpp \ + $(ACE_ROOT)ace/Module.h \ + $(ACE_ROOT)ace/Module.i \ + $(ACE_ROOT)ace/Module.cpp \ + $(ACE_ROOT)ace/Stream_Modules.h \ + $(ACE_ROOT)ace/Stream_Modules.i \ + $(ACE_ROOT)ace/Stream_Modules.cpp \ + $(ACE_ROOT)ace/Dynamic.h \ + $(ACE_ROOT)ace/Dynamic.i \ + $(ACE_ROOT)ace/Singleton.h \ + $(ACE_ROOT)ace/Singleton.i \ + $(ACE_ROOT)ace/Singleton.cpp \ + $(ACE_ROOT)ace/Svc_Handler.i \ + $(ACE_ROOT)ace/Svc_Handler.cpp \ + $(ACE_ROOT)ace/Acceptor.i \ + $(ACE_ROOT)ace/Acceptor.cpp \ + $(ACE_ROOT)ace/SOCK_Acceptor.h \ + $(ACE_ROOT)ace/SOCK_Stream.h \ + $(ACE_ROOT)ace/SOCK_IO.h \ + $(ACE_ROOT)ace/SOCK.h \ + $(ACE_ROOT)ace/Addr.h \ + $(ACE_ROOT)ace/Addr.i \ + $(ACE_ROOT)ace/IPC_SAP.h \ + $(ACE_ROOT)ace/IPC_SAP.i \ + $(ACE_ROOT)ace/SOCK.i \ + $(ACE_ROOT)ace/SOCK_IO.i \ + $(ACE_ROOT)ace/INET_Addr.h \ + $(ACE_ROOT)ace/INET_Addr.i \ + $(ACE_ROOT)ace/SOCK_Stream.i \ + $(ACE_ROOT)ace/Time_Value.h \ + $(ACE_ROOT)ace/SOCK_Acceptor.i \ + $(ACE_ROOT)ace/SOCK_CODgram.h \ + $(ACE_ROOT)ace/SOCK_CODgram.i \ + $(ACE_ROOT)ace/Select_Reactor.h \ + $(ACE_ROOT)ace/Token.h \ + $(ACE_ROOT)ace/Token.i \ + $(ACE_ROOT)ace/Pipe.h \ + $(ACE_ROOT)ace/Pipe.i \ + $(ACE_ROOT)ace/Select_Reactor.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Naming_Utils.h \ + $(TAO_ROOT)/tao/corba.h \ + $(TAO_ROOT)/tao/orbconf.h \ + $(ACE_ROOT)ace/SOCK_Connector.h \ + $(ACE_ROOT)ace/SOCK_Connector.i \ + $(ACE_ROOT)ace/Connector.h \ + $(ACE_ROOT)ace/Map_Manager.h \ + $(ACE_ROOT)ace/Map_Manager.i \ + $(ACE_ROOT)ace/Map_Manager.cpp \ + $(ACE_ROOT)ace/Connector.i \ + $(ACE_ROOT)ace/Connector.cpp \ + $(TAO_ROOT)/tao/compat/objbase.h \ + $(TAO_ROOT)/tao/compat/initguid.h \ + $(TAO_ROOT)/tao/Align.h \ + $(TAO_ROOT)/tao/ORB.h \ + $(TAO_ROOT)/tao/Sequence.h \ + $(TAO_ROOT)/tao/Sequence.i \ + $(TAO_ROOT)/tao/Sequence_T.h \ + $(TAO_ROOT)/tao/Sequence_T.i \ + $(TAO_ROOT)/tao/Sequence_T.cpp \ + $(TAO_ROOT)/tao/Object_KeyC.h \ + $(TAO_ROOT)/tao/Object_KeyC.i \ + $(TAO_ROOT)/tao/ORB.i \ + $(TAO_ROOT)/tao/Exception.h \ + $(TAO_ROOT)/tao/Exception.i \ + $(TAO_ROOT)/tao/Any.h \ + $(TAO_ROOT)/tao/Any.i \ + $(TAO_ROOT)/tao/params.h \ + $(TAO_ROOT)/tao/params.i \ + $(TAO_ROOT)/tao/Client_Strategy_Factory.h \ + $(TAO_ROOT)/tao/Server_Strategy_Factory.h \ + $(TAO_ROOT)/tao/default_client.h \ + $(TAO_ROOT)/tao/default_client.i \ + $(TAO_ROOT)/tao/default_server.h \ + $(TAO_ROOT)/tao/ORB_Strategies_T.h \ + $(TAO_ROOT)/tao/ORB_Strategies_T.i \ + $(TAO_ROOT)/tao/ORB_Strategies_T.cpp \ + $(TAO_ROOT)/tao/default_server.i \ + $(TAO_ROOT)/tao/NVList.h \ + $(TAO_ROOT)/tao/NVList.i \ + $(TAO_ROOT)/tao/Principal.h \ + $(TAO_ROOT)/tao/Request.h \ + $(TAO_ROOT)/tao/Request.i \ + $(TAO_ROOT)/tao/Stub.h \ + $(TAO_ROOT)/tao/Stub.i \ + $(TAO_ROOT)/tao/Object.h \ + $(TAO_ROOT)/tao/Object.i \ $(TAO_ROOT)/tao/Typecode.h \ $(TAO_ROOT)/tao/Typecode.i \ $(TAO_ROOT)/tao/Marshal.h \ @@ -219,20 +785,24 @@ realclean: clean $(TAO_ROOT)/tao/CDR.i \ $(TAO_ROOT)/tao/PolicyC.h \ $(TAO_ROOT)/tao/PolicyC.i \ + $(TAO_ROOT)/tao/CurrentC.h \ + $(TAO_ROOT)/tao/CurrentC.i \ $(TAO_ROOT)/tao/POA.h \ $(TAO_ROOT)/tao/POAC.h \ $(TAO_ROOT)/tao/POAC.i \ $(TAO_ROOT)/tao/Servant_Base.h \ $(TAO_ROOT)/tao/POAS.h \ - $(TAO_ROOT)/tao/PolicyS.h \ - $(TAO_ROOT)/tao/PolicyS.i \ + $(TAO_ROOT)/tao/POA_CORBA.h \ $(TAO_ROOT)/tao/POAS.i \ $(TAO_ROOT)/tao/Object_Table.h \ + $(TAO_ROOT)/tao/POA.i \ + $(TAO_ROOT)/tao/poa_macros.h \ $(TAO_ROOT)/tao/Connect.h \ $(TAO_ROOT)/tao/Connect.i \ $(TAO_ROOT)/tao/ORB_Core.h \ $(TAO_ROOT)/tao/ORB_Core.i \ - $(ACE_ROOT)/ace/Dynamic_Service.h \ + $(ACE_ROOT)ace/Dynamic_Service.h \ + $(ACE_ROOT)ace/Dynamic_Service.cpp \ $(TAO_ROOT)/tao/Operation_Table.h \ $(TAO_ROOT)/tao/debug.h \ $(TAO_ROOT)/tao/IIOP_Object.h \ @@ -242,30 +812,54 @@ realclean: clean $(TAO_ROOT)/tao/IIOP_Interpreter.h \ $(TAO_ROOT)/tao/GIOP.h \ $(TAO_ROOT)/tao/GIOP.i \ + $(TAO_ROOT)/tao/Server_Request.h \ + $(TAO_ROOT)/tao/Server_Request.i \ $(TAO_ROOT)/tao/singletons.h \ $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \ $(TAO_ROOT)/orbsvcs/orbsvcs/orbsvcs_export.h \ $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i \ - $(ACE_ROOT)/ace/SOCK_Dgram.h \ - $(ACE_ROOT)/ace/SOCK_Dgram.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/IOR_Multicast.h \ + $(ACE_ROOT)ace/SOCK_Dgram_Mcast.h \ + $(ACE_ROOT)ace/SOCK_Dgram.h \ + $(ACE_ROOT)ace/SOCK_Dgram.i \ + $(ACE_ROOT)ace/SOCK_Dgram_Mcast.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/CosNaming_i.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS_T.cpp \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingS.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/Entries.h \ $(TAO_ROOT)/orbsvcs/orbsvcs/AV/AVStreams_i.h \ $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS.h \ $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.h \ $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceC.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS_T.cpp \ $(TAO_ROOT)/orbsvcs/orbsvcs/CosPropertyServiceS.i \ $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS.h \ $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsC.h \ $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsC.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS_T.cpp \ $(TAO_ROOT)/orbsvcs/orbsvcs/AVStreamsS.i \ $(TAO_ROOT)/orbsvcs/orbsvcs/Property/CosPropertyService_i.h \ - $(ACE_ROOT)/ace/Process.h \ - $(ACE_ROOT)/ace/Process.i \ + $(ACE_ROOT)ace/Process.h \ + $(ACE_ROOT)ace/Process.i \ $(TAO_ROOT)/orbsvcs/orbsvcs/AV/Endpoint_Strategy.h \ + $(TAO_ROOT)/tao/TAO.h \ $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS.h \ $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlC.h \ $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlC.i \ - $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS.i -.obj/server.o .obj/server.so .shobj/server.o .shobj/server.so: server.cpp server.h -.obj/child.o .obj/child.so .shobj/child.o .shobj/child.so: child.cpp + $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS_T.cpp \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Null_MediaCtrlS.i \ + client.h $(ACE_ROOT)ace/ARGV.h \ + $(ACE_ROOT)ace/ARGV.i \ + $(ACE_ROOT)ace/High_Res_Timer.h \ + $(ACE_ROOT)ace/High_Res_Timer.i # IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/TAO/orbsvcs/tests/AVStreams/benchmark/child.cpp b/TAO/orbsvcs/tests/AVStreams/benchmark/child.cpp index 6054e6b3d3c..93d8f885850 100644 --- a/TAO/orbsvcs/tests/AVStreams/benchmark/child.cpp +++ b/TAO/orbsvcs/tests/AVStreams/benchmark/child.cpp @@ -4,6 +4,10 @@ #include "child.h" // Bench_Server_StreamEndPoint methods. +Bench_Server_StreamEndPoint::Bench_Server_StreamEndPoint (void) +{ +} + int Bench_Server_StreamEndPoint::handle_open (void) { @@ -42,30 +46,106 @@ CORBA::Boolean Bench_Server_StreamEndPoint::handle_connection_requested (AVStreams::flowSpec &the_spec, CORBA::Environment &env) { - ACE_DEBUG ((LM_DEBUG,"(%P|%t) Bench_Server_StreamEndPoint::handle_connection_requested:() \n")); - - ACE_INET_Addr client_addr (the_spec [0]); - - if (this->connector_.connect (this->tcp_stream_, - client_addr) == -1) + ACE_DEBUG ((LM_DEBUG,"(%P|%t) Bench_Server_StreamEndPoint::handle_connection_requested:() length =%d\n", + the_spec.length ())); + + return CORBA::B_TRUE; + + ACE_INET_Addr client_addr (the_spec [0]); + u_short local_port = 0; + ACE_INET_Addr local_addr (local_port,"merengue-atm.cs.wustl.edu"); + + if (this->connector_.connect (this->tcp_stream_, + client_addr, + 0, + local_addr) == -1) ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) Connection to server failed: %p\n", "connect"), CORBA::B_FALSE); - return CORBA::B_TRUE; + ACE_DEBUG ((LM_DEBUG,"(%P|%t) tcp connect succeeded %d\n",this->tcp_stream_.get_handle ())); + + int sndbufsize = ACE_DEFAULT_MAX_SOCKET_BUFSIZ; + int rcvbufsize = ACE_DEFAULT_MAX_SOCKET_BUFSIZ; + + if (this->tcp_stream_.set_option (SOL_SOCKET, + SO_SNDBUF, + (void *) &sndbufsize, + sizeof (sndbufsize)) == -1 + && errno != ENOTSUP) + return -1; + else if (this->tcp_stream_.set_option (SOL_SOCKET, + SO_RCVBUF, + (void *) &rcvbufsize, + sizeof (rcvbufsize)) == -1 + && errno != ENOTSUP) + return -1; + + int one = 1; + if (this->tcp_stream_.set_option (SOL_SOCKET, + TCP_NODELAY, + (char *)& one, + sizeof (one)) == -1 ) + return -1; + + ACE_NEW_RETURN (this->stream_handler_, + ttcp_Stream_Handler (this->tcp_stream_.get_handle ()), + CORBA::B_FALSE); + int result; + + result = TAO_ORB_Core_instance ()->reactor ()->register_handler (this->stream_handler_, + ACE_Event_Handler::READ_MASK); + if (result < 0) + return CORBA::B_FALSE; + + ACE_DEBUG ((LM_DEBUG,"(%P|%t) register handler for tcp_Stream success\n")); + return CORBA::B_TRUE; } -// -------------------------------------------------------------------------------- +ttcp_Stream_Handler::ttcp_Stream_Handler (int control_fd) + : control_handle_ (control_fd) +{ +} + +// Called by the reactor to extract the handle associated with this handler. +ACE_HANDLE +ttcp_Stream_Handler::get_handle (void) const +{ + return this->control_handle_ ; +} +// Called by the Reactor when data is ready to be read from the +// video control handle, which indicates a control message from the client. int -main (int argc, char **argv) +ttcp_Stream_Handler::handle_input (ACE_HANDLE handle) { - TAO_AV_Child_Process_B<Bench_Server_StreamEndPoint,TAO_VDev,AV_Null_MediaCtrl> bench_child; + // ACE_DEBUG ((LM_DEBUG,"(%P|%t) Bench_Server_StreamEndPoint::handle_input ()\n")); - if (bench_child.init (argc,argv) == -1) - return 1; - if (bench_child.run () == -1) - return 2; - + char buf[BUFSIZ]; + int result =ACE_OS::read (this->control_handle_,buf,BUFSIZ); + if (result < 0 ) + ACE_ERROR_RETURN ((LM_ERROR, + "(%P|%t) Bench_Server_StreamEndPoint::handle_input ()\n"), + -1); + + if (result == 0) + return 0; return 0; } + + +// -------------------------------------------------------------------------------- + + +// int +// main (int argc, char **argv) +// { +// TAO_AV_Child_Process_B<Bench_Server_StreamEndPoint,TAO_VDev,AV_Null_MediaCtrl> bench_child; + +// if (bench_child.init (argc,argv) == -1) +// return 1; +// if (bench_child.run () == -1) +// return 2; + +// return 0; +// } diff --git a/TAO/orbsvcs/tests/AVStreams/benchmark/child.h b/TAO/orbsvcs/tests/AVStreams/benchmark/child.h index b7c0f43044c..7a69562ebfb 100644 --- a/TAO/orbsvcs/tests/AVStreams/benchmark/child.h +++ b/TAO/orbsvcs/tests/AVStreams/benchmark/child.h @@ -15,10 +15,36 @@ #include "ace/SOCK_Connector.h" #include "client.h" -class Bench_Server_StreamEndPoint : - public virtual TAO_Server_StreamEndPoint + +class ttcp_Stream_Handler : public virtual ACE_Event_Handler +{ + // = TITLE + // Defines the event handler class for the Video Control. + // + // = DESCRIPTION + // This class makes use of a TCP socket.It contains a pointer to + // the current state which is implemented using the state pattern. +public: + + ttcp_Stream_Handler (int ttcp_Stream_fd); + // Construct this handler with a control (TCP) fd + // %% use sock stream instead of fd + + virtual int handle_input (ACE_HANDLE fd = ACE_INVALID_HANDLE); + // Called when input events occur (e.g., connection or data). + + virtual ACE_HANDLE get_handle (void) const; + // Returns the handle used by the event_handler. +private: + ACE_HANDLE control_handle_; +}; + +class Bench_Server_StreamEndPoint + :public TAO_Server_StreamEndPoint { public: + Bench_Server_StreamEndPoint (void); + virtual int handle_open (void) ; // called when streamendpoint is instantiated @@ -43,6 +69,7 @@ public: private: ACE_SOCK_Connector connector_; ACE_SOCK_Stream tcp_stream_; + ttcp_Stream_Handler *stream_handler_; }; diff --git a/TAO/orbsvcs/tests/AVStreams/benchmark/client.cpp b/TAO/orbsvcs/tests/AVStreams/benchmark/client.cpp index bacf2533919..4cc70cf5f30 100644 --- a/TAO/orbsvcs/tests/AVStreams/benchmark/client.cpp +++ b/TAO/orbsvcs/tests/AVStreams/benchmark/client.cpp @@ -26,6 +26,7 @@ Client_StreamEndPoint::handle_close (void) CORBA::Boolean Client_StreamEndPoint::handle_preconnect (AVStreams::flowSpec &the_spec) { + // return CORBA::B_TRUE; the_spec.length (0); ACE_DEBUG ((LM_DEBUG,"(%P|%t) handle_preconnect called\n")); return 0; @@ -37,6 +38,7 @@ Client_StreamEndPoint::handle_preconnect (AVStreams::flowSpec &the_spec) CORBA::Boolean Client_StreamEndPoint::handle_postconnect (AVStreams::flowSpec& server_spec) { + // return CORBA::B_TRUE; ACE_DEBUG ((LM_DEBUG,"(%P|%t) handle_postconnect called \n")); return 0; } @@ -81,8 +83,9 @@ ttcp_Acceptor::make_svc_handler (ttcp_Client_StreamEndPoint *&sh) //------------------------------------------------------------ -ttcp_Client_StreamEndPoint::ttcp_Client_StreamEndPoint (void) - :acceptor_ (this) +ttcp_Client_StreamEndPoint::ttcp_Client_StreamEndPoint (Client *client) + :acceptor_ (this), + client_ (client) { } @@ -93,6 +96,7 @@ ttcp_Client_StreamEndPoint::handle_preconnect (AVStreams::flowSpec &the_spec) ACE_INET_Addr tcp_addr; + // tcp_addr.set (TCP_PORT,"mambo-atm.cs.wustl.edu"); tcp_addr.set (TCP_PORT); if (this->acceptor_.open (tcp_addr, @@ -106,7 +110,8 @@ ttcp_Client_StreamEndPoint::handle_preconnect (AVStreams::flowSpec &the_spec) char client_address_string [BUFSIZ]; ::sprintf (client_address_string, "%s:%d", - local_addr.get_host_name (), + // local_addr.get_host_name (), + "mambo-atm.cs.wustl.edu", local_addr.get_port_number ()); the_spec.length (1); the_spec [0] = CORBA::string_dup (client_address_string); @@ -118,26 +123,77 @@ ttcp_Client_StreamEndPoint::handle_preconnect (AVStreams::flowSpec &the_spec) return CORBA::B_TRUE; } +CORBA::Boolean +ttcp_Client_StreamEndPoint::handle_postconnect (AVStreams::flowSpec& server_spec) +{ + ACE_DEBUG ((LM_DEBUG,"ttcp_Client_StreamEndPoint::handle_postconnect \n")); + this->client_->set_stream (this->peer ()); + return CORBA::B_TRUE; +} + int ttcp_Client_StreamEndPoint::open (void *) { + ACE_DEBUG ((LM_DEBUG,"(%P|%t) ttcp_Client_StreamEndPoint::open () called\n")); return 0; } Client::Client (int argc, char **argv, ACE_Barrier *barrier) - : reactive_strategy_ (&orb_manager_), + : reactive_strategy_ (&orb_manager_), + // :reactive_strategy_ (&orb_manager_,this), client_mmdevice_ (&reactive_strategy_), argc_ (argc), argv_ (argv), + block_size_ (1), + number_ (10), barrier_ (barrier) { } +void +Client::set_stream (ACE_SOCK_Stream & control) +{ + this->stream_ = control; +} + +int +Client::parse_args (int argc, + char **argv) +{ + ACE_Get_Opt opts (argc,argv,"b:"); + + int c; + + while ((c = opts ()) != -1) + switch (c) + { + case 'b': + this->block_size_ = ACE_OS::atoi (opts.optarg); + break; +// case 'n': +// this->number_ = ACE_OS::atoi (opts.optarg); +// break; + case '?': + ACE_DEBUG ((LM_DEBUG,"Usage %s [-b block_size] [-n number_of times]", + argv[0])); + break; + } + return 0; +} + int Client::svc (void) { + // Now start pumping data. + ACE_High_Res_Timer timer; + ACE_Time_Value tv1,tv2; + ACE_DEBUG ((LM_DEBUG, "(%P|%t) Thread created\n")); + + if (this->parse_args (this->argc_, + this->argv_) == -1) + return -1; TAO_TRY { this->orb_manager_.init (this->argc_, @@ -165,15 +221,66 @@ Client::svc (void) AVStreams::streamQoS_var the_qos (new AVStreams::streamQoS); AVStreams::flowSpec_var the_flows (new AVStreams::flowSpec); // Bind the client and server mmdevices. - + + timer.start (); this->streamctrl_.bind_devs (this->client_mmdevice_._this (TAO_TRY_ENV), this->server_mmdevice_.in (), the_qos.inout (), the_flows.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; + + timer.stop (); + timer.elapsed_time (tv1); + long time_taken = tv1.sec () + tv1.usec () /1000000; + tv1.dump (); + //ACE_DEBUG ((LM_DEBUG,"(%P|%t)time taken is %ld \n", + // time_taken )); + + return 0; + + int sndbufsize = ACE_DEFAULT_MAX_SOCKET_BUFSIZ; + int rcvbufsize = ACE_DEFAULT_MAX_SOCKET_BUFSIZ; + + if (this->stream_.set_option (SOL_SOCKET, + SO_SNDBUF, + (void *) &sndbufsize, + sizeof (sndbufsize)) == -1 + && errno != ENOTSUP) + return -1; + else if (this->stream_.set_option (SOL_SOCKET, + SO_RCVBUF, + (void *) &rcvbufsize, + sizeof (rcvbufsize)) == -1 + && errno != ENOTSUP) + return -1; + + int one = 1; + if (this->stream_.set_option (SOL_SOCKET, + TCP_NODELAY, + (char *)& one, + sizeof (one)) == -1 ) + return -1; + + char *buffer; + long buffer_siz = this->block_size_*1024; + + ACE_NEW_RETURN (buffer, + char [buffer_siz], + -1); + timer.start (); + long number = 64 *1024/this->block_size_; + for (int i=0;i<number;i++) + this->stream_.send_n (buffer,buffer_siz); + timer.stop (); + timer.elapsed_time (tv2); + double total_time = tv2.sec ()+tv2.usec ()/1000000.0; + double total_data = 64*1024*1024; + ACE_DEBUG ((LM_DEBUG,"Total data = %f , Total time = %f \n", + total_data,total_time)); + ACE_DEBUG ((LM_DEBUG,"(%P|%t) Thruput for block size is:%d\t%f Mb/s \n", + buffer_siz,total_data/(total_time*1024.0*1024.0))); } TAO_CATCHANY { @@ -266,21 +373,21 @@ int main (int argc, char **argv) { ACE_Get_Opt opts (argc, argv, "T:"); - int thread_count = 0; + int thread_count = 1; - int c; - while ((c = opts ()) != -1) - switch (c) - { - case 'T': - thread_count = (u_int) ACE_OS::atoi (opts.optarg); - continue; - default: -// ACE_DEBUG ((LM_DEBUG, -// "Usage: %s -t number_of_threads\n", -// argv [0])); - break; - } +int c; +while ((c = opts ()) != -1) + switch (c) + { + case 'T': + thread_count = (u_int) ACE_OS::atoi (opts.optarg); + continue; + default: +// ACE_DEBUG ((LM_DEBUG, +// "Usage: %s -t number_of_threads\n", +// argv [0])); + break; + } ACE_Barrier *barrier; ACE_NEW_RETURN (barrier, @@ -310,3 +417,23 @@ main (int argc, char **argv) ACE_Thread_Manager::instance ()->wait (); } + +// ----------------------------------------------------------- +// Video_Endpoint_Reactive_Strategy_A methods + +ttcp_Endpoint_Reactive_Strategy_A::ttcp_Endpoint_Reactive_Strategy_A (TAO_ORB_Manager *orb_manager, + Client *client) + : TAO_AV_Endpoint_Reactive_Strategy_A<ttcp_Client_StreamEndPoint,TAO_VDev,AV_Null_MediaCtrl> (orb_manager), + client_ (client) +{ +} + +int +ttcp_Endpoint_Reactive_Strategy_A::make_stream_endpoint (ttcp_Client_StreamEndPoint *&endpoint) +{ + ACE_NEW_RETURN (endpoint, + ttcp_Client_StreamEndPoint (this->client_), + -1); + + return 0; +} diff --git a/TAO/orbsvcs/tests/AVStreams/benchmark/client.h b/TAO/orbsvcs/tests/AVStreams/benchmark/client.h index eb6abf24021..5819213d018 100644 --- a/TAO/orbsvcs/tests/AVStreams/benchmark/client.h +++ b/TAO/orbsvcs/tests/AVStreams/benchmark/client.h @@ -13,11 +13,12 @@ #include "orbsvcs/AV/AVStreams_i.h" #include "ace/SOCK_Acceptor.h" #include "ace/Synch.h" +#include "ace/High_Res_Timer.h" #define TCP_PORT 5000 class Client_StreamEndPoint - : public virtual TAO_Client_StreamEndPoint + : public TAO_Client_StreamEndPoint { // = TITLE // Defines a client StreamEndpoint class @@ -63,23 +64,45 @@ private: ttcp_Client_StreamEndPoint *endpoint_; }; +class Client; + class ttcp_Client_StreamEndPoint :public Client_StreamEndPoint, public virtual ACE_Svc_Handler <ACE_SOCK_STREAM, ACE_NULL_SYNCH> { public: - ttcp_Client_StreamEndPoint (void); + ttcp_Client_StreamEndPoint (Client *client =0); // constructor virtual CORBA::Boolean handle_preconnect (AVStreams::flowSpec &the_spec); // called before connecting + virtual CORBA::Boolean handle_postconnect (AVStreams::flowSpec &the_spec); + // called after connecting + virtual int open (void *); // called when server connects to us. private: ttcp_Acceptor acceptor_; // The Acceptor. + + Client *client_; +}; +class ttcp_Endpoint_Reactive_Strategy_A + : public TAO_AV_Endpoint_Reactive_Strategy_A<ttcp_Client_StreamEndPoint,TAO_VDev,AV_Null_MediaCtrl> +{ +public: + ttcp_Endpoint_Reactive_Strategy_A (TAO_ORB_Manager *orb_manager, + Client *client_ptr); + // constructor . The orb manager is needed for the TAO_AV_Endpoint_Reactive_Strategy_A. + + virtual int make_stream_endpoint (ttcp_Client_StreamEndPoint *& endpoint); + // hook to make our streamendpoint taking a Client pointer +private: + Client *client_; + // pointer to command handler object }; + class Client : public ACE_Task<ACE_SYNCH> // one of these per client thread { @@ -88,8 +111,10 @@ public: virtual int svc (void); + void set_stream (ACE_SOCK_Stream & stream); private: - + + int parse_args (int argc,char **argv); int bind_to_server (void); int establish_stream (void); @@ -97,8 +122,9 @@ private: TAO_ORB_Manager orb_manager_; - TAO_AV_Endpoint_Reactive_Strategy_A<Client_StreamEndPoint, TAO_VDev, - AV_Null_MediaCtrl> reactive_strategy_; + // ttcp_Endpoint_Reactive_Strategy_A reactive_strategy_; + + TAO_AV_Endpoint_Reactive_Strategy_A<Client_StreamEndPoint,TAO_VDev,AV_Null_MediaCtrl> reactive_strategy_; AVStreams::MMDevice_var server_mmdevice_; @@ -110,9 +136,16 @@ private: int argc_; char **argv_; - + + int block_size_; + // size of the block to be sent in Kilobytes. + + int number_; + // number of times to send the block + ACE_Barrier *barrier_; + ACE_SOCK_Stream stream_; }; #endif /* TAO_AV_BENCH_CLIENT_H */ diff --git a/TAO/orbsvcs/tests/AVStreams/benchmark/server.cpp b/TAO/orbsvcs/tests/AVStreams/benchmark/server.cpp index a8daa980d4a..fb591faec58 100644 --- a/TAO/orbsvcs/tests/AVStreams/benchmark/server.cpp +++ b/TAO/orbsvcs/tests/AVStreams/benchmark/server.cpp @@ -3,8 +3,118 @@ #include "server.h" +// AV_Server_Sig_Handler routines + +AV_Server_Sig_Handler::AV_Server_Sig_Handler (void) +{ +} + +int +AV_Server_Sig_Handler::register_handler (void) +{ + // Assign the Sig_Handler a dummy I/O descriptor. Note that even + // though we open this file "Write Only" we still need to use the + // ACE_Event_Handler::NULL_MASK when registering this with the + // ACE_Reactor (see below). + this->handle_ = ACE_OS::open (ACE_DEV_NULL, O_WRONLY); + ACE_ASSERT (this->handle_ != -1); + // ACE_DEBUG ((LM_DEBUG,"(%P|%t) sig_handler == %d\n",this->handle_)); + + // Register signal handler object. Note that NULL_MASK is used to + // keep the ACE_Reactor from calling us back on the "/dev/null" + // descriptor. + + if (TAO_ORB_Core_instance ()->reactor ()->register_handler + (this, ACE_Event_Handler::NULL_MASK) == -1) + ACE_ERROR_RETURN ((LM_ERROR, + "%p\n", + "register_handler"), + -1); + + // handles these signals. + // this->sig_set.fill_set (); + this->sig_set.sig_add (SIGCHLD); + this->sig_set.sig_add (SIGBUS); + this->sig_set.sig_add (SIGINT); + this->sig_set.sig_add (SIGTERM); + + // Register the signal handler object to catch the signals. if + if (TAO_ORB_Core_instance ()->reactor ()->register_handler + (this->sig_set, this) == -1) + ACE_ERROR_RETURN ((LM_ERROR, + "%p\n", + "register_handler"), + -1); + return 0; +} + +// Called by the ACE_Reactor to extract the fd. +ACE_HANDLE +AV_Server_Sig_Handler::get_handle (void) const +{ + return this->handle_; +} + +int +AV_Server_Sig_Handler::handle_input (ACE_HANDLE) +{ + ACE_DEBUG ((LM_DEBUG, "(%t) handling asynchonrous input...\n")); + return 0; +} + +int +AV_Server_Sig_Handler::shutdown (ACE_HANDLE, ACE_Reactor_Mask) +{ + ACE_DEBUG ((LM_DEBUG, "(%t) closing down Sig_Handler...\n")); + return 0; +} + +// This method handles all the signals that are being caught by this +// object. In our simple example, we are simply catching SIGALRM, +// SIGINT, and SIGQUIT. Anything else is logged and ignored. +// +// There are several advantages to using this approach. First, +// the behavior triggered by the signal is handled in the main event +// loop, rather than in the signal handler. Second, the ACE_Reactor's +// signal handling mechanism eliminates the need to use global signal +// handler functions and data. + +int +AV_Server_Sig_Handler::handle_signal (int signum, siginfo_t *, ucontext_t *) +{ + ACE_DEBUG ((LM_DEBUG, "(%P|%t) received signal %S\n", signum)); + + // switch (signum) +// { +// case SIGCHLD: +// // Handle the death of child signal. +// this->clear_child (SIGCHLD); +// break; +// case SIGBUS: +// // Handle the Bus error signal +// case SIGINT: +// // Handle the interrupt signal +// case SIGTERM: +// // Handle the process termination signal. +// this->int_handler (signum); +// break; +// default: +// // ACE_DEBUG ((LM_DEBUG, "(%P|%t) %S: not handled, returning to program\n", signum)); +// break; +// } + return 0; +} + +AV_Server_Sig_Handler::~AV_Server_Sig_Handler (void) +{ + TAO_ORB_Core_instance ()->reactor ()->remove_handler (this->sig_set); +} + + +//------------------------------------------------------------ Server::Server (void) - :process_strategy_ (&process_options_) + // :process_strategy_ (&process_options_) + :reactive_strategy_(&orb_manager_) { this->process_options_.command_line ("./child -ORBport 0 -ORBobjrefstyle url"); } @@ -47,7 +157,8 @@ Server::init (int argc, // Register the video mmdevice object with the ORB ACE_NEW_RETURN (this->mmdevice_, - TAO_MMDevice (&this->process_strategy_), + // TAO_MMDevice (&this->process_strategy_), + TAO_MMDevice (&this->reactive_strategy_), -1); // create the video server mmdevice with the naming service pointer. @@ -74,6 +185,12 @@ Server::init (int argc, env); TAO_CHECK_ENV_RETURN (env,-1); } +// result = this->signal_handler_.register_handler (); + +// if (result < 0) +// ACE_ERROR_RETURN ((LM_ERROR, +// "(%P|%t) Error registering signal handler"), +// -1); return 0; } diff --git a/TAO/orbsvcs/tests/AVStreams/benchmark/server.h b/TAO/orbsvcs/tests/AVStreams/benchmark/server.h index 948d37b9ce6..db539184ae5 100644 --- a/TAO/orbsvcs/tests/AVStreams/benchmark/server.h +++ b/TAO/orbsvcs/tests/AVStreams/benchmark/server.h @@ -15,6 +15,39 @@ #include "orbsvcs/AV/AVStreams_i.h" #include "orbsvcs/AV/Endpoint_Strategy.h" #include "client.h" +#include "child.h" + +class AV_Server_Sig_Handler + : public virtual ACE_Event_Handler +{ +public: + AV_Server_Sig_Handler (void); + + virtual ACE_HANDLE get_handle (void) const; + + int register_handler (void); + // this will register this sig_handler + // with the reactor for SIGCHLD,SIGTERM,SIGINT + + virtual int shutdown (ACE_HANDLE, + ACE_Reactor_Mask); + + virtual int handle_input (ACE_HANDLE); + // handle input on the dummy handle. + + virtual int handle_signal (ACE_HANDLE signum, + siginfo_t * = 0, + ucontext_t* = 0); + // handles the SIGCHLD,SIGTERM,SIGINT for the parent process i.e + // the main thread.. + ~AV_Server_Sig_Handler (void); + // Destructor + +private: + ACE_HANDLE handle_; + // dummy handle for the sig handler. + ACE_Sig_Set sig_set; +}; class Server { @@ -36,12 +69,17 @@ private: CosNaming::NamingContext_var naming_context_; // The root naming context of the naming service + // AV_Server_Sig_Handler signal_handler_; + ACE_Process_Options process_options_; // The process options for the process to be spawned by the process strategy - TAO_AV_Endpoint_Process_Strategy_B process_strategy_; + // TAO_AV_Endpoint_Process_Strategy_B process_strategy_; // The proces strategy for the video. + TAO_AV_Endpoint_Reactive_Strategy_B<Bench_Server_StreamEndPoint,TAO_VDev,AV_Null_MediaCtrl> reactive_strategy_; + // Reactive strategy + TAO_MMDevice *mmdevice_; // The video server multimedia device }; diff --git a/TAO/orbsvcs/tests/AVStreams/benchmark/svc.conf b/TAO/orbsvcs/tests/AVStreams/benchmark/svc.conf index 3a2eb59bfed..8b10c3c7e53 100644 --- a/TAO/orbsvcs/tests/AVStreams/benchmark/svc.conf +++ b/TAO/orbsvcs/tests/AVStreams/benchmark/svc.conf @@ -46,5 +46,5 @@ # dynamic Resource_Factory Service_Object * TAO:_make_TAO_Resource_Factory() "-ORBresources global" dynamic Client_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Client_Strategy_Factory() -dynamic Server_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Server_Strategy_Factory() "-ORBconcurrency reactive -ORBdemuxstrategy dynamic -ORBtablesize 128" +dynamic Server_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Server_Strategy_Factory() "-ORBconcurrency thread-per-connection -ORBdemuxstrategy dynamic -ORBtablesize 128" diff --git a/TAO/orbsvcs/tests/AVStreams/client.cpp b/TAO/orbsvcs/tests/AVStreams/client.cpp deleted file mode 100644 index e2a0addcdee..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/client.cpp +++ /dev/null @@ -1,769 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO/orbsvcs/tests/AVStreams -// -// = FILENAME -// client.cpp -// -// = DESCRIPTION -// Test client for the AVStreams demo -// -// = AUTHORS -// Sumedh Mungee <sumedh@cs.wustl.edu> -// -// ============================================================================ - -#include "client.h" - -Video_Client_StreamEndPoint::Video_Client_StreamEndPoint (void) -{ -} - -void -Video_Client_StreamEndPoint::handle_stop (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env) -{ - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) Video_Client_StreamEndPoint::handle_stop: called\n")); -} - -void -Video_Client_StreamEndPoint::handle_start (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env) -{ - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) Video_Client_StreamEndPoint::handle_start: called\n")); -} - -void -Video_Client_StreamEndPoint::handle_destroy (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env) -{ - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) Video_Client_StreamEndPoint::handle_destroy: called\n")); -} - -CORBA::Boolean -Video_Client_StreamEndPoint::handle_connection_established (AVStreams::StreamEndPoint_ptr responder, - AVStreams::streamQoS &qos_spec, - const AVStreams::flowSpec &the_spec, - CORBA::Environment &env) -{ - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) Video_Client_StreamEndPoint::handle_connection_established: called\n")); - return 1; -} - -Client::Client (void) -{ -} - -// initialize the ORB, get a grip on the remote mmdevice, and store it -// in this->remote_mmdevice_. Also create a stream controlller and a -// local mmdevice. - -int -Client::init (int argc, - char *argv[], - CORBA::Environment &env) -{ - // Init the ORB. - manager_.init (argc, - argv, - env); - TAO_CHECK_ENV_RETURN (env, 1); - - // Create the local mmdevice. - TAO_Client_MMDevice <Video_Client_StreamEndPoint> *mmdevice_impl; - - ACE_NEW_RETURN (mmdevice_impl, - TAO_Client_MMDevice <Video_Client_StreamEndPoint>, - -1); - - this->local_mmdevice_ = mmdevice_impl->_this (env); - TAO_CHECK_ENV_RETURN (env, 1); - - // Create the local streamctrl. - TAO_StreamCtrl *stream_ctrl; - - ACE_NEW_RETURN (stream_ctrl, - TAO_StreamCtrl (manager_.orb ()), - -1); - this->stream_ctrl_ = stream_ctrl->_this (env); - TAO_CHECK_ENV_RETURN (env, 1); - - // Bind to a remote mmdevice, as supplied by argc argv. - this->bind_to_remote_mmdevice (argc, argv, env); - - manager_.orb ()->open (); - // Create a locall mmdevice for now.. - // mmdevice_impl = new TAO_MMDevice; - // this->remote_mmdevice_ = mmdevice_impl->_this (env); - - TAO_CHECK_ENV_RETURN (env, 1); -} - -// Use stream_ctrl_ to bind local_mmdevice_ and remote_mmdevice_. - -int -Client::run (CORBA::Environment &env) -{ - // Initialize the in parameters. - - // @@ Alex, please make sure you restructure this code so that you - // test for allocation failures. - AVStreams::streamQoS_var the_qos (new AVStreams::streamQoS); - AVStreams::flowSpec_var the_flows (new AVStreams::flowSpec); - - // Allocate the qos_list. - struct AVStreams::QoS qos_list; - // @@ Alex, please take a careful look at this code and figure out - // if you really need to use "magic numbers" like 64 here. - qos_list.QoSType = CORBA::string_alloc (64); - qos_list.QoSParams = CORBA::string_alloc (64); - strcpy (qos_list.QoSType, "foo"); - strcpy (qos_list.QoSParams, "bar"); - - the_qos->length (1); - the_qos [0] = qos_list; - - // Allocate the flow_list. - const char *flow_list [] = - { - "alpha", - "beta", - "gamma" - }; - - CORBA::ULong len = sizeof (flow_list)/sizeof (char *); - - // Set the length of the sequence. - the_flows->length (len); - - // Now set each individual element. - for (CORBA::ULong i=0; i < the_flows->length (); i++) - { - // Generate some arbitrary string to be filled into the ith - // location in the sequence. - // char *str = gen->gen_string (); - //this->in_[i] = str; - the_flows [i] = flow_list [i]; - } - - // Bind the devices together. - this->stream_ctrl_->bind_devs (local_mmdevice_, - remote_mmdevice_, - the_qos.inout (), - the_flows.in (), - env); - - TAO_CHECK_ENV_RETURN (env, 1); - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) Devices bound successfully!\n")); - - // Start the flow of the stream. - this->stream_ctrl_-> start (the_flows.in (), - env); - - TAO_CHECK_ENV_RETURN (env, 1); - return 0; -} - -// Bind to a remote mmdevice, as given by the command line arguments. - -int -Client::bind_to_remote_mmdevice (int argc, - char *argv[], - CORBA::Environment &env) -{ - ACE_Get_Opt get_opts (argc, argv, "k:"); - int c; - char *ior = 0; - - // @@ Alex, can you please move this into a "parse_args()" helper - // method? - - // Parse the command line. - while ((c = get_opts ()) != -1) - switch (c) - { - case 'k': - ior = - ACE_OS::strdup (get_opts.optarg); - break; - case '?': - default: - ACE_ERROR_RETURN ((LM_ERROR, - "usage: %s" - " [-k mmdevice_key]" - "\n", - argv [0]), - -1); - } - - // We didn't get an IOR from the command line! - if (ior == 0) - ACE_ERROR_RETURN ((LM_ERROR, - "usage: %s" - " [-k mmdevice_key]" - "\n", - argv [0]), - -1); - - // Get the object reference. - CORBA::Object_var mmdevice_object = - this->manager_.orb ()->string_to_object (ior, - env); - TAO_CHECK_ENV_RETURN (env, 1); - - // Narrow the reference. - this->remote_mmdevice_ = - AVStreams::MMDevice::_narrow (mmdevice_object.in (), - env); - TAO_CHECK_ENV_RETURN (env, 1); - - if (CORBA::is_nil (this->remote_mmdevice_.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - "invalid key <%s>\n", - ior), - -1); - - ACE_DEBUG ((LM_DEBUG, - "Object received OK\n")); - - ACE_DEBUG ((LM_DEBUG, - "\n(%P|%t) Bound to remote mmdevice")); - return 0; -} - - -// Testing the methods of the property service. - -int -Client::property_tester (CORBA::Environment &env) -{ - TAO_TRY - { - // Testing define_property () of PropertySet interface. - this->test_define_property (TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Test the number of properties. - this->test_get_number_of_properties (TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Testing get_all_property_names. - this->test_get_all_property_names (TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Testing delete property. - this->test_delete_property ("string_property",TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Testing get_properties. - this->test_get_properties (TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Testing delete_properties. - this->test_delete_properties (TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Test the number of properties. - this->test_get_number_of_properties (TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Testing define_properties. - this->test_define_properties (TAO_TRY_ENV); - TAO_CHECK_ENV; - - - // Test the number of properties. - this->test_get_number_of_properties (TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Testing get_all_property_names. - this->test_get_all_property_names (TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Testing get_all_properties. - this->test_get_all_properties (TAO_TRY_ENV); - TAO_CHECK_ENV; - } - TAO_CATCH (CORBA::UserException, ex) - { - TAO_TRY_ENV.print_exception ("User exception"); - return -1; - } - TAO_CATCH (CORBA::SystemException, ex) - { - TAO_TRY_ENV.print_exception ("System exception"); - return -1; - } - TAO_ENDTRY; -} - -// Testing define_property. - -int -Client::test_define_property (CORBA::Environment &env) -{ - ACE_DEBUG ((LM_DEBUG, - "\nChecking define_property\n")); - - CORBA::Any anyval; - - // Prepare a char and "define" that in the PropertySet. - CORBA::Char ch = '#'; - anyval <<= from_char (ch); - ch = '*'; - anyval >>= to_char (ch); - - ACE_DEBUG ((LM_DEBUG, - "Main : Char ch = %c\n", - ch)); - this->remote_mmdevice_->define_property ("char_property", - anyval, - env); - - // Check if that is an user exception, if so, print it out. - if ((env.exception () != 0) && - (CORBA::UserException::_narrow (env.exception ()) != 0)) - { - env.print_exception ("char_property"); - env.clear (); - } - - // Prepare a Short and "define" that in the PropertySet. - CORBA::Short s = 3; - anyval <<= s; - s = 7; - anyval >>= s; - - ACE_DEBUG ((LM_DEBUG, - "Main : Short s = %d\n", - s)); - remote_mmdevice_->define_property ("short_property", - anyval, - env); - - // Check if that is an user exception, if so, print it out. - if ((env.exception () != 0) && - (CORBA::UserException::_narrow (env.exception ()) != 0)) - { - env.print_exception ("char_property"); - env.clear (); - } - - // Prepare a Long and "define" that in the PropertySet. - CORBA::Long l = 931232; - anyval <<= l; - l = 931233; - anyval >>= l; - ACE_DEBUG ((LM_DEBUG, - "Main : Long l = %d\n", - l)); - CORBA::Any newany(anyval); - remote_mmdevice_->define_property ("long_property", - anyval, - env); - - // Check if that is an user exception, if so, print it out. - if ((env.exception () != 0) && - (CORBA::UserException::_narrow (env.exception ()) != 0)) - { - env.print_exception ("char_property"); - env.clear (); - } - - // Prepare a Float and "define" that in the PropertySet. - CORBA::Float f = 3.14; - anyval <<= f; - f = 4.14; - anyval >>= f; - ACE_DEBUG ((LM_DEBUG, - "Main : Float f = %f\n", - f)); - remote_mmdevice_->define_property ("float_property", - anyval, - env); - - // Check if that is an user exception, if so, print it out. - if ((env.exception () != 0) && - (CORBA::UserException::_narrow (env.exception ()) != 0)) - { - env.print_exception ("char_property"); - env.clear (); - } - - // Prepare a String and "define" that in the PropertySet. - ACE_DEBUG ((LM_DEBUG, - "Main: Any holding String\n")); - CORBA::String_var strvar (CORBA::string_dup ("Test_String")); - anyval <<= strvar.in (); - CORBA::String newstr; - anyval >>= newstr; - - ACE_DEBUG ((LM_DEBUG, - "Main: String : %s, From any : %s\n", - strvar.in (), - newstr)); - remote_mmdevice_->define_property ("string_property", - anyval, - env); - TAO_CHECK_ENV_RETURN (env, 1); - - return 0; -} - -// Testing get_all_property_names of the PropertySet. - -int -Client::test_get_all_property_names (CORBA::Environment &env) -{ - ACE_DEBUG ((LM_DEBUG, - "\nTesting get_all_property_names ()\n")); - - // Get the size. - CORBA::ULong num_of_properties = - remote_mmdevice_->get_number_of_properties (env); - TAO_CHECK_ENV_RETURN (env, 1); - - // Get half on the names and half of on the iterator. - CORBA::ULong how_many = num_of_properties / 2; - CosPropertyService::PropertyNames_var names_var; - CosPropertyService::PropertyNamesIterator_var iterator_var; - remote_mmdevice_->get_all_property_names (how_many, - names_var.out (), - iterator_var.out (), - env); - TAO_CHECK_ENV_RETURN (env, 1); - - // Print out the names in the names-sequence. - if (names_var.ptr () != 0) - { - CORBA::ULong len = names_var->length (); - - for (CORBA::ULong ni = 0; ni < len; ni++) - ACE_DEBUG ((LM_DEBUG, - "%s\n", - (const char *) names_var [ni])); - } - - // Iterate thru and print out the names in the iterator, if any. - if (iterator_var.ptr () != 0) - { - CosPropertyService::PropertyName_var name_var; - - while (iterator_var->next_one (name_var.out (), env) == CORBA::B_TRUE) - { - TAO_CHECK_ENV_RETURN (env, 1); - ACE_DEBUG ((LM_DEBUG, "%s\n", name_var.in ())); - } - - TAO_CHECK_ENV_RETURN (env, 1); - } -} - -// Test get_properties. Give a sequence of names and get all their -// properties. - -int -Client::test_get_properties (CORBA::Environment &env) -{ - // Get float_property, string_property and no_property. If return - // value is false and type is tc_void then that name is not there in - // the PropertySet. - ACE_DEBUG ((LM_DEBUG, "\nTesting get_properties\n")); - CosPropertyService::PropertyNames_var names; - CosPropertyService::PropertyNames_ptr names_ptr; - - ACE_NEW_RETURN (names_ptr, - CosPropertyService::PropertyNames, - -1); - names = names_ptr; - - names->length (3); - names [0] = CORBA::string_dup ("float_property"); - //names [1] = CORBA::string_dup ("string_property"); - names [1] = CORBA::string_dup ("long_property"); - //names [2] = CORBA::string_dup ("char_property"); - names [2] = CORBA::string_dup ("char_property"); - - CosPropertyService::Properties_var properties; - - // Get the properties. - CORBA::Boolean return_val = remote_mmdevice_->get_properties (names.in (), - properties.out (), - env); - TAO_CHECK_ENV_RETURN (env, -1); - - // Check return value. - if (return_val == CORBA::B_TRUE) - ACE_DEBUG ((LM_DEBUG, "All properties are valid\n")); - else - ACE_DEBUG ((LM_DEBUG, "Some properties not found/had invalid names\n")); - - if (properties.ptr () != 0) - { - // Go thru the properties and print them out. - CORBA::ULong len = properties->length (); - for (CORBA::ULong pi = 0; pi < len; pi++) - { - // Print the name. - ACE_DEBUG ((LM_DEBUG, - "%s : ", - (const char *) properties [pi].property_name.in ())); - - // Print the property value. - CORBA::Any::dump (properties [pi].property_value); - } - } - return 0; -} - -// Testing, get_number_of_properties. - -int -Client::test_get_number_of_properties (CORBA::Environment &env) -{ - ACE_DEBUG ((LM_DEBUG, - "\nNumber of props : %d\n", - this->remote_mmdevice_->get_number_of_properties (env))); - TAO_CHECK_ENV_RETURN (env, 1); - - return 0; -} - -// Test delete_property. - -int -Client::test_delete_property (CORBA::String property_name, - CORBA::Environment &env) -{ - ACE_DEBUG ((LM_DEBUG, "\nDeleting %s\n",property_name)); - - TAO_TRY - { - this->remote_mmdevice_->delete_property (property_name, TAO_TRY_ENV); - TAO_CHECK_ENV; - } - TAO_CATCH (CORBA::UserException, ex) - { - TAO_TRY_ENV.print_exception ("User exception"); - return -1; - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("Not an user exception"); - return -1; - } - TAO_ENDTRY; - - return 0; -} - -// Test delete_properties. -// Make a sequence of property names and delete them from the -// PropertySet. Deleting char, short, long, float and string -// properties. - -int -Client::test_delete_properties (CORBA::Environment &env) -{ - ACE_DEBUG ((LM_DEBUG, - "\nChecking delete_properties\n")); - CosPropertyService::PropertyNames prop_names; - prop_names.length (4); - prop_names [0] = CORBA::string_dup ("char_property"); - prop_names [1] = CORBA::string_dup ("short_property"); - prop_names [2] = CORBA::string_dup ("long_property"); - prop_names [3] = CORBA::string_dup ("float_property"); - ACE_DEBUG ((LM_DEBUG, - "Length of sequence %d, Maxlength : %d\n", - prop_names.length (), - prop_names.maximum ())); - - // Call delete properties, it raises Multiple Exceptions. - TAO_TRY - { - this->remote_mmdevice_->delete_properties (prop_names, - TAO_TRY_ENV); - TAO_CHECK_ENV; - } - TAO_CATCH (CosPropertyService::MultipleExceptions, ex) - { - TAO_TRY_ENV.print_exception ("User exception"); - for (size_t ei = 0; ei < ex.exceptions.length (); ei++) - ACE_DEBUG ((LM_DEBUG, - "Property name %s\tException reson %d", - ex.exceptions [ei].failing_property_name.in (), - ex.exceptions [ei].reason)); - } - TAO_CATCH (CORBA::SystemException, sys_ex) - { - TAO_TRY_ENV.print_exception ("System exception"); - return -1; - } - TAO_ENDTRY; - - return 0; -} - -// Defines a sequnce of properties containing, char, short, long, -// float in the property set. - -int -Client::test_define_properties (CORBA::Environment &env) -{ - ACE_DEBUG ((LM_DEBUG, - "\nChecking define_properties\n")); - CosPropertyService::Properties nproperties; - nproperties.length (4); - CORBA::Any anyval; - // Prepare a char and "define" that in the PropertySet. - CORBA::Char ch = '#'; - anyval <<= from_char (ch); - ch = '*'; - anyval >>= to_char (ch); - nproperties[0].property_name = CORBA::string_copy ("char_property"); - nproperties[0].property_value <<= from_char (ch); - - // Prepare a Short and "define" that in the PropertySet. - CORBA::Short s = 3; - anyval <<= s; - s = 7; - anyval >>= s; - nproperties[1].property_name = CORBA::string_copy ("short_property"); - nproperties[1].property_value <<= s; - - // Prepare a Long and "define" that in the PropertySet. - CORBA::Long l = 931232; - anyval <<= l; - l = 931233; - anyval >>= l; - nproperties[2].property_name = CORBA::string_copy ("long_property"); - nproperties[2].property_value <<= l; - - // Prepare a Float and "define" that in the PropertySet. - CORBA::Float f = 3.14; - anyval <<= f; - f = 4.14; - anyval >>= f; - nproperties[3].property_name = CORBA::string_copy ("float_property"); - nproperties[3].property_value <<= f; - - // Define this sequence of properties now. Define properties raises - // Multiple exceptions. - TAO_TRY - { - this->remote_mmdevice_->define_properties (nproperties, TAO_TRY_ENV); - TAO_CHECK_ENV; - } - TAO_CATCH (CosPropertyService::MultipleExceptions, ex) - { - TAO_TRY_ENV.print_exception ("multiple exceptios"); - - for (size_t ei = 0; ei < ex.exceptions.length (); ei++) - ACE_DEBUG ((LM_DEBUG, - "Property name %s\tException reson %d", - ex.exceptions [ei].failing_property_name, - ex.exceptions [ei].reason)); - } - TAO_CATCH (CORBA::SystemException, ex) - { - TAO_TRY_ENV.print_exception ("System exception"); - return -1; - } - TAO_ENDTRY; - - return 0; -} - -// Test get_all_properties. - -int -Client::test_get_all_properties (CORBA::Environment &env) -{ - ACE_DEBUG ((LM_DEBUG, - "\nTesting get_all_properties\n")); - // Get the number of current properties. - CORBA::ULong num_of_properties = - this->remote_mmdevice_->get_number_of_properties (env); - TAO_CHECK_ENV_RETURN (env, 1); - - // Get half on the properties and half of on the iterator. - CORBA::ULong how_many = 0; - CosPropertyService::Properties_var properties; - CosPropertyService::PropertiesIterator_var iterator; - remote_mmdevice_->get_all_properties (how_many, - properties.out (), - iterator.out (), - env); - TAO_CHECK_ENV_RETURN (env, 1); - - // Print out the properties now. - if (properties.ptr () != 0) - { - CORBA::ULong len = properties->length (); - - for (CORBA::ULong pi = 0; pi < len; pi++) - { - // Print the property_name. - ACE_DEBUG ((LM_DEBUG, - "%s : ", - properties [pi].property_name.in ())); - - // Print the property value. - CORBA::Any::dump (properties [pi].property_value); - } - } - - // Pass thru the iterator. - if (iterator.ptr () != 0) - { - CosPropertyService::Property_var property; - - while (iterator->next_one (property.out (), env) != CORBA::B_FALSE) - { - ACE_DEBUG ((LM_DEBUG, "Iteration over PropertyIterartor")); - TAO_CHECK_ENV_RETURN (env, 1); - - // Print the property name. - ACE_DEBUG ((LM_DEBUG, - "%s : ", - property->property_name.in ())); - - // Print the property value. - CORBA::Any::dump (property->property_value); - } - TAO_CHECK_ENV_RETURN (env, 1); - } -} - -int -main (int argc, char **argv) -{ - TAO_TRY - { - Client client; - - if (client.init (argc, - argv, - TAO_TRY_ENV) == -1) - return 1; - TAO_CHECK_ENV; - - client.run (TAO_TRY_ENV); - client.property_tester (TAO_TRY_ENV); - TAO_CHECK_ENV; - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("AVStreams: client"); - return -1; - } - TAO_ENDTRY; -} diff --git a/TAO/orbsvcs/tests/AVStreams/client.h b/TAO/orbsvcs/tests/AVStreams/client.h deleted file mode 100644 index 8aaafd4e2d6..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/client.h +++ /dev/null @@ -1,130 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO/orbsvcs/tests/AVStreams -// -// = FILENAME -// client.h -// -// = DESCRIPTION -// Test client for the AVStreams demo -// -// = AUTHORS -// Sumedh Mungee <sumedh@cs.wustl.edu> -// -// ============================================================================ - -#if !defined (AVSTREAMS_CLIENT_H) -#define AVSTREAMS_CLIENT_H - -#include "ace/Synch.h" -#include "ace/Task.h" -#include "ace/Thread_Manager.h" -#include "orbsvcs/Property/CosPropertyService_i.h" -#include "orbsvcs/AV/AVStreams_i.h" -#include "ace/Get_Opt.h" -#include "tao/TAO.h" - -class Client -{ - // = TITLE - // Client for A/V Streams demo. - // - // = DESCRIPTION - // Encapsulates client functionality. -public: - Client (void); - // Constructor. - - int init (int argc, - char **argv, - CORBA::Environment &env); - // Initialize the ORB etc, and bind the MMDevices. - - int run (CORBA::Environment &env); - // Run the client. This will call StreamCtrl::bind_devs. - - int property_tester (CORBA::Environment &env); - // Testing the property service methods. - -protected: - int bind_to_remote_mmdevice (int argc, - char *argv[], - CORBA::Environment &env); - // Bind to the remote MMDevice. - - // = Property Testing. - - int test_define_property (CORBA::Environment &env); - // Testing the define property method. - - int test_get_number_of_properties (CORBA::Environment &env); - // Testing the number of properties, currently in the Property Set. - - int test_get_all_property_names (CORBA::Environment &env); - //Testing get_all_property_names. - - int test_get_properties (CORBA::Environment &env); - //Testing get_properties. Give the names and get their properties. - - int test_get_all_properties (CORBA::Environment &env); - // Testing get_all_properties. - - int test_delete_property (CORBA::String property_name, - CORBA::Environment &env); - // Testing delete_property. - - int test_delete_properties (CORBA::Environment &env); - // Testing delete_properties. - - int test_define_properties (CORBA::Environment &env); - // Defining a sequence of properties. - - TAO_ORB_Manager manager_; - // The ORB manager, handles ORB initialization etc. - - AVStreams::MMDevice_var local_mmdevice_; - // Our MMDevice. - - AVStreams::MMDevice_var remote_mmdevice_; - // Servers MMDevice. - - AVStreams::StreamCtrl_var stream_ctrl_; - // Stream Controller. -}; - -class Video_Client_StreamEndPoint - : public virtual TAO_Client_StreamEndPoint -{ - // = TITLE - // Stream Endpoint for the video client. - // - // = DESCRIPTION - // Implements the callbacks that are made by the AVStreams library. -public: - Video_Client_StreamEndPoint (void); - // Constructor. - - virtual void handle_stop (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env); - // Handles stream stoppage. - - virtual void handle_start (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env); - // Handles stream start. Starts the flow of data. - - virtual void handle_destroy (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env); - // Handles the destruction of the stream, tears down the transport. - - virtual CORBA::Boolean handle_connection_established (AVStreams::StreamEndPoint_ptr responder, - AVStreams::streamQoS &qos_spec, - const AVStreams::flowSpec &the_spec, - CORBA::Environment &env); - // Handles stream bind, establishes the transport. -}; - -#endif /* AVSTREAMS_CLIENT_H */ diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/Makefile b/TAO/orbsvcs/tests/AVStreams/mpeg/source/Makefile index 436da0b23b9..e650595e4e6 100644 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/Makefile +++ b/TAO/orbsvcs/tests/AVStreams/mpeg/source/Makefile @@ -30,3 +30,4 @@ include $(ACE_ROOT)/include/makeinclude/rules.nested.GNU include $(ACE_ROOT)/include/makeinclude/rules.nolocal.GNU + diff --git a/TAO/orbsvcs/tests/AVStreams/server.cpp b/TAO/orbsvcs/tests/AVStreams/server.cpp deleted file mode 100644 index 68a926f3ec0..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/server.cpp +++ /dev/null @@ -1,218 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO/orbsvcs/tests/AVStreams -// -// = FILENAME -// server.cpp -// -// = DESCRIPTION -// Test server for the AVStreams demo -// -// = AUTHORS -// Sumedh Mungee <sumedh@cs.wustl.edu> -// -// ============================================================================ - -#include "server.h" -#include "Property_Exporter.h" -#include "Machine_Properties.h" -#include "orbsvcs/Trader/Dynamic_Property.h" - -// Callbacks made by the AVStreams library into the application. - -Video_Server_StreamEndPoint::Video_Server_StreamEndPoint (void) -{ -} - -int -Video_Server_StreamEndPoint::handle_stop (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env) -{ - return -1; -} - -int -Video_Server_StreamEndPoint::handle_start (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env) -{ - return -1; -} - -int -Video_Server_StreamEndPoint::handle_destroy (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env) -{ - return -1; -} - -CORBA::Boolean -Video_Server_StreamEndPoint::handle_connection_requested (AVStreams::StreamEndPoint_ptr initiator, - CORBA::Boolean is_mcast, - AVStreams::streamQoS &qos, - AVStreams::flowSpec &the_spec, - CORBA::Environment &env) -{ - return 1; -} - -void -fill_service_type (CosTradingRepos::ServiceTypeRepository::PropStructSeq& prop_seq) -{ - prop_seq.length (10); - - for (int i = 0; i <= TAO_Machine_Properties::LOAD; i++) - { - prop_seq[i].name = TAO_Machine_Properties::PROP_NAMES[i]; - prop_seq[i].value_type = TAO_Machine_Properties::PROP_TYPE; - prop_seq[i].mode = CosTradingRepos::ServiceTypeRepository::PROP_NORMAL; - } -} - -int -export_properties (CORBA::ORB_ptr orb, - CORBA::Object_ptr mmdevice, - TAO_Machine_Properties& mach_props, - TAO_DP_Dispatcher& dprop) -{ - // Bootstrap to the Lookup interface. - ACE_DEBUG ((LM_ERROR, "Bootstrap to the Lookup interface.\n")); - CORBA::Object_var trading_obj = - orb->resolve_initial_references ("TradingService"); - - if (CORBA::is_nil (trading_obj.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to initialize the POA.\n"), - -1); - - TAO_TRY - { - ACE_DEBUG ((LM_ERROR, "Narrow the Lookup interface.\n")); - // Narrow the lookup interface. - ACE_DEBUG ((LM_DEBUG, "Narrowing the lookup interface.\n")); - CosTrading::Lookup_var lookup_if = - CosTrading::Lookup::_narrow (trading_obj.in (), TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Narrow the mmdevice to a property set reference. - CORBA::Any extra_info; - CosPropertyService::PropertySet_ptr prop_set = - CosPropertyService::PropertySet::_narrow (mmdevice, TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Instantiate the property exporter helper class. -#if defined TAO_HAS_DYNAMIC_PROPERTY_BUG - TAO_Property_Exporter prop_exporter (lookup_if, prop_set, orb); -#else - TAO_Property_Exporter prop_exporter (lookup_if, prop_set); -#endif /* TAO_HAS_DYNAMIC_PROPERTY_BUG */ - - // Add properties to server description. - - - // Add the machine properties. - ACE_DEBUG ((LM_ERROR, "Adding machine properties.\n")); - for (int i = (int) TAO_Machine_Properties::CPU; - i <= (int) TAO_Machine_Properties::LOAD; i++) - { - CORBA::Any extra_info; - const char* name = TAO_Machine_Properties::PROP_NAMES[i]; - const CORBA::TypeCode_ptr prop_type = TAO_Machine_Properties::PROP_TYPE; - -#if defined TAO_HAS_DYNAMIC_PROPERTY_BUG - CosTradingDynamic::DynamicProp* dp_struct = - dprop.construct_dynamic_prop (name, prop_type, extra_info, orb); -#else - CosTradingDynamic::DynamicProp* dp_struct = - dprop.construct_dynamic_prop (name, prop_type, extra_info); -#endif /* TAO_HAS_DYNAMIC_PROPERTY_BUG */ - - dprop.register_handler (name, &mach_props); - prop_exporter.add_dynamic_property (name, *dp_struct); - } - - ACE_DEBUG ((LM_ERROR, "Exporting to the Trader.\n")); - CosTradingRepos::ServiceTypeRepository::PropStructSeq prop_struct_seq; - CosTradingRepos::ServiceTypeRepository::ServiceTypeNameSeq type_name_seq; - - ::fill_service_type (prop_struct_seq); - CosTrading::OfferId_var offer_id = - prop_exporter.export (mmdevice, - "MMDevice", - prop_struct_seq, - type_name_seq, - TAO_TRY_ENV); - TAO_CHECK_ENV; - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("export_properties"); - } - TAO_ENDTRY; -} - -// Main program. - -int -main (int argc, char *argv[]) -{ - TAO_TRY - { - TAO_ORB_Manager orb_manager; - - // Initialize the ORB. - orb_manager.init (argc, - argv, - TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Create server-side MMDevice. - TAO_Server_MMDevice <Video_Server_StreamEndPoint> *mmdevice_impl; - ACE_NEW_RETURN (mmdevice_impl, - TAO_Server_MMDevice <Video_Server_StreamEndPoint>, - -1); - - // Activate the MMDevice, i.e., register with POA. - CORBA::Object_var obj_ptr = mmdevice_impl->_this (TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Add properties - TAO_DP_Dispatcher dprop_dispatcher; - TAO_Machine_Properties mach_props; - ::export_properties (orb_manager.orb (), - obj_ptr, - mach_props, - dprop_dispatcher); - - // Activate Dynamic Properties - CORBA::String_var dp_ior = - orb_manager.activate (&dprop_dispatcher, TAO_TRY_ENV); - - // Print the IOR. - ACE_DEBUG ((LM_DEBUG, - "\nThe IOR is: <%s>\n", - orb_manager.orb ()-> object_to_string (obj_ptr, TAO_TRY_ENV))); - TAO_CHECK_ENV; - - // Run the ORB Event loop. - orb_manager.run (TAO_TRY_ENV); - TAO_CHECK_ENV; - } - TAO_CATCH (CORBA::SystemException, sysex) - { - TAO_TRY_ENV.print_exception ("System Exception"); - return -1; - } - TAO_CATCH (CORBA::UserException, userex) - { - TAO_TRY_ENV.print_exception ("User Exception"); - return -1; - } - TAO_ENDTRY; - ACE_DEBUG ((LM_DEBUG, - "\nServer is terminating")); - return 0; -} - diff --git a/TAO/orbsvcs/tests/AVStreams/server.h b/TAO/orbsvcs/tests/AVStreams/server.h deleted file mode 100644 index 6ffd90859b4..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/server.h +++ /dev/null @@ -1,57 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO/orbsvcs/tests/AVStreams -// -// = FILENAME -// server.h -// -// = DESCRIPTION -// Test server for the AVStreams demo -// -// = AUTHORS -// Sumedh Mungee <sumedh@cs.wustl.edu> -// -// ============================================================================ - -#if !defined (AVSTREAMS_SERVER_H) -#define AVSTREAMS_SERVER_H - -#include "orbsvcs/AV/AVStreams_i.h" -#include "tao/TAO.h" - -class Video_Server_StreamEndPoint : public virtual TAO_Server_StreamEndPoint -{ - // = TITLE - // Server Stream Endpoint for A/V Streams demo. - // - // = DESCRIPTION - // Encapsulates server side transport functionality. -public: - Video_Server_StreamEndPoint (void); - // Constructor. - - virtual int handle_stop (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env); - // Handles stream stoppage. - - virtual int handle_start (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env); - // Handles stream start. Starts the flow of data. - - virtual int handle_destroy (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env); - // Handles the destruction of the stream, tears down the transport. - - virtual CORBA::Boolean handle_connection_requested (AVStreams::StreamEndPoint_ptr initiator, - CORBA::Boolean is_mcast, - AVStreams::streamQoS &qos, - AVStreams::flowSpec &the_spec, - CORBA::Environment &env); - // Handles stream bind, establishes the transport. -}; - -#endif /* AVSTREAMS_SERVER_H */ |