summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordengg <dengg@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2006-04-20 01:47:42 +0000
committerdengg <dengg@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2006-04-20 01:47:42 +0000
commit14c7083790394dde849d0562426944a419c8c1f9 (patch)
tree59bfad0533634c910efa003c6eb41e3ce6f8d619
parentfa0096840fed53dd51408e4b5bf9a74293577b35 (diff)
downloadATCD-14c7083790394dde849d0562426944a419c8c1f9.tar.gz
Thu Apr 20 01:40:11 UTC 2006 Gan Deng <gan.deng@vanderbilt.edu>
-rw-r--r--TAO/CIAO/ChangeLog13
-rw-r--r--TAO/CIAO/DAnCE/DomainApplicationManager/DomainApplicationManager_Impl.cpp45
-rw-r--r--TAO/CIAO/DAnCE/NodeApplication/NodeApplication_Impl.cpp60
-rw-r--r--TAO/CIAO/DAnCE/NodeApplication/NodeApplication_Impl.h6
-rw-r--r--TAO/CIAO/examples/Hello/descriptors_events/flattened_deploymentplan_events.cdp25
-rw-r--r--TAO/CIAO/tools/Config_Handlers/DP_Handler.cpp26
-rw-r--r--TAO/CIAO/tools/Config_Handlers/PSPE_Handler.cpp13
7 files changed, 116 insertions, 72 deletions
diff --git a/TAO/CIAO/ChangeLog b/TAO/CIAO/ChangeLog
index 9465042d8bb..71d77e2f0e5 100644
--- a/TAO/CIAO/ChangeLog
+++ b/TAO/CIAO/ChangeLog
@@ -1,3 +1,16 @@
+Thu Apr 20 01:40:11 UTC 2006 Gan Deng <gan.deng@vanderbilt.edu>
+
+ * ciao/Deployment_Core.idl
+ * DAnCE/DomainApplicationManager/DomainApplicationManager_Impl.cpp
+ * DAnCE/NodeApplication/NodeApplication_Impl.cpp
+ * DAnCE/NodeApplication/NodeApplication_Impl.h
+ * examples/Hello/descriptors_events/flattened_deploymentplan_events.cdp
+ * tools/Config_Handlers/DP_Handler.cpp
+ * tools/Config_Handlers/PSPE_Handler.cpp
+
+ Reverted CCMComponentPortKind definition back to spec defined
+ data type.
+
Thu Apr 13 13:43:19 UTC 2006 William R. Otte <wotte@dre.vanderbilt.edu>
* First cut integration point.
diff --git a/TAO/CIAO/DAnCE/DomainApplicationManager/DomainApplicationManager_Impl.cpp b/TAO/CIAO/DAnCE/DomainApplicationManager/DomainApplicationManager_Impl.cpp
index 0a501d506df..71a0f2fdd2c 100644
--- a/TAO/CIAO/DAnCE/DomainApplicationManager/DomainApplicationManager_Impl.cpp
+++ b/TAO/CIAO/DAnCE/DomainApplicationManager/DomainApplicationManager_Impl.cpp
@@ -60,6 +60,8 @@ DomainApplicationManager_Impl (CORBA::ORB_ptr orb,
"CIAOEvents") != 0)
continue;
+ // Note, we should do a sanity check here to make
+ // sure we didn't pick up the wrong infoProperty!!
this->plan_.infoProperty[0].value >>= this->esd_;
break;
}
@@ -703,7 +705,7 @@ install_all_es (void)
// Invoke install_es () operation on each cached NodeApplication object.
::Deployment::NodeApplication_ptr my_na =
(entry->int_id_).node_application_.in ();
-
+
::Deployment::CIAO_Event_Services_var event_services =
my_na->install_es (es_infos);
@@ -916,7 +918,7 @@ finishLaunch (CORBA::Boolean start,
{
if (CORBA::is_nil (entry->int_id_.node_application_.in ()))
throw Deployment::StartError ();
-
+
entry->int_id_.node_application_->finishLaunch
(*unnecessary_connections,
start,
@@ -1240,25 +1242,14 @@ populate_connection_for_binding (
{
const CORBA::ULong binding_len = binding.internalEndpoint.length ();
+ // If only 1 internalEndpoint, then we know it's through event service.
if (binding_len == 1)
{
- switch (binding.internalEndpoint[0].kind)
- {
- case Deployment::rtecEventPublisher:
- case Deployment::rtecEventConsumer:
- return
- this->handle_es_connection (instname,
- binding,
- plan,
- retv);
- default:
- ACE_ERROR ((LM_ERROR,
- "DAnCE (%P|%t) DomainApplicationManager_Impl.cpp -"
- "CIAO::DomainApplicationManager_Impl::"
- "populate_connection_for_binding -"
- "invalid connection specified in deployment plan\n"));
- return false;
- }
+ return
+ this->handle_es_connection (instname,
+ binding,
+ plan,
+ retv);
}
else if (binding_len == 2)
{
@@ -1338,7 +1329,9 @@ handle_es_connection (
retv[len].event_service = es._retn ();
// One more thing needs to be done if this is a es_consumer connection
- if (endpoint.kind == Deployment::rtecEventConsumer)
+ // We need to populate the <endpoint> field of this connection, which
+ // is the object reference of this event consumer port.
+ if (endpoint.kind == Deployment::EventConsumer)
{
// Now we search in the received connections to get the objRef of event sink
bool found = false;
@@ -1463,7 +1456,7 @@ handle_direct_connection (
false);
}
break;
- }
+ }
}
return true;
}
@@ -1888,16 +1881,6 @@ dump_connections (const ::Deployment::Connections & connections)
ACE_DEBUG ((LM_DEBUG, "EventConsumer\n"));
break;
- case Deployment::rtecEventPublisher:
-
- ACE_DEBUG ((LM_DEBUG, "rtecEventPublisher\n"));
- break;
-
- case Deployment::rtecEventConsumer:
-
- ACE_DEBUG ((LM_DEBUG, "rtecEventConsumer\n"));
- break;
-
default:
ACE_DEBUG ((LM_DEBUG, "Unknown port kind.\n"));
}
diff --git a/TAO/CIAO/DAnCE/NodeApplication/NodeApplication_Impl.cpp b/TAO/CIAO/DAnCE/NodeApplication/NodeApplication_Impl.cpp
index 028e522c7cb..5edb7a51b3a 100644
--- a/TAO/CIAO/DAnCE/NodeApplication/NodeApplication_Impl.cpp
+++ b/TAO/CIAO/DAnCE/NodeApplication/NodeApplication_Impl.cpp
@@ -95,7 +95,8 @@ CIAO::NodeApplication_Impl::finishLaunch_i (
// For ES_to_Consumer connection, we simply call
// handle_es_consumer_connection method.
- if (connections[i].kind == Deployment::rtecEventConsumer)
+ //if (connections[i].kind == Deployment::rtecEventConsumer)
+ if (this->_is_es_consumer_conn (connections[i]))
{
this->handle_es_consumer_connection (
connections[i],
@@ -121,7 +122,7 @@ CIAO::NodeApplication_Impl::finishLaunch_i (
Components::EventConsumerBase_var consumer;
Components::CCMObject_var comp = comp_state.objref_;
-
+
if (CORBA::is_nil (comp.in ()))
{
ACE_DEBUG ((LM_DEBUG, "comp is nil\n"));
@@ -146,23 +147,16 @@ CIAO::NodeApplication_Impl::finishLaunch_i (
break;
case Deployment::EventPublisher:
- this->handle_publisher_consumer_connection (
- comp.in (),
- connections[i],
- add_connection);
- break;
-
- case Deployment::rtecEventPublisher:
- this->handle_publisher_es_connection (
- comp.in (),
- connections[i],
- add_connection);
- break;
-
- case Deployment::rtecEventConsumer:
- this->handle_es_consumer_connection (
- connections[i],
- add_connection);
+ if (this->_is_publisher_es_conn (connections[i]))
+ this->handle_publisher_es_connection (
+ comp.in (),
+ connections[i],
+ add_connection);
+ else
+ this->handle_publisher_consumer_connection (
+ comp.in (),
+ connections[i],
+ add_connection);
break;
default:
@@ -922,7 +916,7 @@ handle_publisher_es_connection (
ACE_THROW_SPEC ((CORBA::SystemException,
Deployment::InvalidConnection))
{
- if (connection.kind != Deployment::rtecEventPublisher)
+ if (! this->_is_publisher_es_conn (connection))
{
ACE_DEBUG ((LM_DEBUG,
"CIAO (%P|%t) - NodeApplication_Impl.cpp, "
@@ -1018,7 +1012,7 @@ handle_es_consumer_connection (
ACE_THROW_SPEC ((CORBA::SystemException,
Deployment::InvalidConnection))
{
- if (connection.kind != Deployment::rtecEventConsumer)
+ if (! this->_is_es_consumer_conn (connection))
{
ACE_DEBUG ((LM_DEBUG,
"CIAO (%P|%t) - NodeApplication_Impl.cpp, "
@@ -1091,7 +1085,7 @@ handle_es_consumer_connection (
for (CORBA::ULong j = 0; j < size; ++j)
{
- consumer_config->insert_source ((*filter).sources[j].in ());
+ consumer_config->insert_source ((*filter).sources[j]);
}
}
@@ -1240,3 +1234,25 @@ CIAO::NodeApplication_Impl::build_event_connection (
ACE_DEBUG ((LM_DEBUG, "CIAO::NodeApplication_Impl::build_connection () completed!!!!\n"));
}
+
+bool
+CIAO::NodeApplication_Impl::
+_is_es_consumer_conn (Deployment::Connection conn)
+{
+ if (conn.kind == Deployment::EventConsumer &&
+ ACE_OS::strcmp (conn.endpointPortName, "CIAO_ES") == 0)
+ return true;
+ else
+ return false;
+}
+
+bool
+CIAO::NodeApplication_Impl::
+_is_publisher_es_conn (Deployment::Connection conn)
+{
+ if (conn.kind == Deployment::EventPublisher &&
+ ACE_OS::strcmp (conn.endpointPortName, "CIAO_ES") == 0)
+ return true;
+ else
+ return false;
+}
diff --git a/TAO/CIAO/DAnCE/NodeApplication/NodeApplication_Impl.h b/TAO/CIAO/DAnCE/NodeApplication/NodeApplication_Impl.h
index d1c14c43baa..d86974df468 100644
--- a/TAO/CIAO/DAnCE/NodeApplication/NodeApplication_Impl.h
+++ b/TAO/CIAO/DAnCE/NodeApplication/NodeApplication_Impl.h
@@ -279,6 +279,12 @@ namespace CIAO
ACE_THROW_SPEC ((CORBA::SystemException,
Deployment::InvalidConnection));
+ virtual bool
+ _is_es_consumer_conn (Deployment::Connection conn);
+
+ virtual bool
+ _is_publisher_es_conn (Deployment::Connection conn);
+
/// Register the publisher to the CIAO event service
/// The only fields of <connection> struct used in this method
/// are: <type>, <event_service>, <instanceName>, <portName>.
diff --git a/TAO/CIAO/examples/Hello/descriptors_events/flattened_deploymentplan_events.cdp b/TAO/CIAO/examples/Hello/descriptors_events/flattened_deploymentplan_events.cdp
index b2c75e78c02..526d9552628 100644
--- a/TAO/CIAO/examples/Hello/descriptors_events/flattened_deploymentplan_events.cdp
+++ b/TAO/CIAO/examples/Hello/descriptors_events/flattened_deploymentplan_events.cdp
@@ -151,9 +151,27 @@
<connection>
<name>hello_event_ec_publisher_connection</name>
+
+ <!-- The position of the below "deployRequirement" element matters -->
+ <deployRequirement>
+ <resourceType>ciao::rtec</resourceType>
+ <name>dummy</name>
+ <property>
+ <name>dummy</name>
+ <value>
+ <type>
+ <kind>tk_string</kind>
+ </type>
+ <value>
+ <string>dummy</string>
+ </value>
+ </value>
+ </property>
+ </deployRequirement>
+
<internalEndpoint>
<portName>click_out</portName>
- <kind>rtecEventPublisher</kind>
+ <kind>EventPublisher</kind>
<instance>Hello-Sender-idd</instance>
</internalEndpoint>
<externalReference>
@@ -163,9 +181,12 @@
<connection>
<name>hello_event_ec_consumer_connection</name>
+
+
+
<internalEndpoint>
<portName>click_in</portName>
- <kind>rtecEventConsumer</kind>
+ <kind>EventConsumer</kind>
<instance>Hello-Receiver-idd</instance>
</internalEndpoint>
<externalReference>
diff --git a/TAO/CIAO/tools/Config_Handlers/DP_Handler.cpp b/TAO/CIAO/tools/Config_Handlers/DP_Handler.cpp
index 5737e682eb8..833bb0d645d 100644
--- a/TAO/CIAO/tools/Config_Handlers/DP_Handler.cpp
+++ b/TAO/CIAO/tools/Config_Handlers/DP_Handler.cpp
@@ -140,10 +140,7 @@ ACE_RCSID (Config_Handlers,
this->idl_dp_->infoProperty.length (len + 1);
- if (pstart->name () != "CIAOServerResources")
- Property_Handler::get_property (*pstart,
- this->idl_dp_->infoProperty [len]);
- else
+ if (pstart->name () == "CIAOServerResources")
{
/*
* Hook for RT-CCM
@@ -160,6 +157,27 @@ ACE_RCSID (Config_Handlers,
this->idl_dp_->infoProperty [len].name = pstart->name ().c_str ();
this->idl_dp_->infoProperty [len].value <<= *(srd_handler.srd_idl ());
}
+ else if (pstart->name () == "CIAOEvents")
+ {
+ /*
+ * Hook for EVENTS
+ */
+
+ ACE_DEBUG ((LM_DEBUG,
+ "Importing CIAOEvents...\n"));
+
+ // Parse the SR document
+ CIAOEvents_Handler event_handler (pstart->value ().value ().begin_string ()->c_str ());
+
+ // Populate the property
+ this->idl_dp_->infoProperty [len].name = pstart->name ().c_str ();
+ this->idl_dp_->infoProperty [len].value <<= *(event_handler.esd_idl ());
+ }
+ else
+ {
+ Property_Handler::get_property (*pstart,
+ this->idl_dp_->infoProperty [len]);
+ }
}
// Read in the realizes, if present
if (xsc_dp.realizes_p ())
diff --git a/TAO/CIAO/tools/Config_Handlers/PSPE_Handler.cpp b/TAO/CIAO/tools/Config_Handlers/PSPE_Handler.cpp
index 4df8b9cb92c..d18285c8b12 100644
--- a/TAO/CIAO/tools/Config_Handlers/PSPE_Handler.cpp
+++ b/TAO/CIAO/tools/Config_Handlers/PSPE_Handler.cpp
@@ -133,19 +133,6 @@ namespace CIAO
case ::Deployment::EventConsumer:
pspe.kind (CCMComponentPortKind::EventConsumer);
break;
-
- case ::Deployment::ecEventEmitter:
- case ::Deployment::ecEventPublisher:
- case ::Deployment::ecEventConsumer:
- case ::Deployment::rtecEventEmitter:
- case ::Deployment::rtecEventPublisher:
- case ::Deployment::rtecEventConsumer:
- case ::Deployment::nsEventEmitter:
- case ::Deployment::nsEventPublisher:
- case ::Deployment::nsEventConsumer:
- ACE_ERROR ((LM_ERROR, "Unsupported PortKind\n"));
- break;
-
}