summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordengg <dengg@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2005-03-02 00:31:38 +0000
committerdengg <dengg@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2005-03-02 00:31:38 +0000
commit5c7b5dffe99008f196532b0200606a598fdd14c9 (patch)
treec4686268d893d52ff207ef21472719640c0a18b7
parente70171778c3f478a855202e6a2165c71b74d352b (diff)
downloadATCD-5c7b5dffe99008f196532b0200606a598fdd14c9.tar.gz
Mon Mar 01 18:30:25 2005 Gan Deng <gan.deng@vanderbilt.edu>
-rw-r--r--TAO/CIAO/ChangeLog12
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/Hello_Base/Hello_Base.mpc26
-rw-r--r--TAO/CIAO/DAnCE/examples/Hello/step-by-step.html50
-rw-r--r--TAO/CIAO/examples/Hello/step-by-step.html42
4 files changed, 69 insertions, 61 deletions
diff --git a/TAO/CIAO/ChangeLog b/TAO/CIAO/ChangeLog
index 9a08a0ed940..e08cdd8d8dc 100644
--- a/TAO/CIAO/ChangeLog
+++ b/TAO/CIAO/ChangeLog
@@ -1,3 +1,15 @@
+Mon Mar 01 18:30:25 2005 Gan Deng <gan.deng@vanderbilt.edu>
+
+ * examples/Hello/step-by-step.html
+ * DAnCE/examples/Hello/step-by-step.html
+
+ Modified these two documentation page to fix some errors.
+
+
+ * DAnCE/examples/Hello/Hello_Base/Hello_Base.mpc
+
+ Fixed wrong shared library names and project names.
+
Sat Feb 26 14:38:46 2005 Arvind S. Krishna <arvindk@tango.dre.vanderbilt.edu>
* examples/handcrafted/BasicSP_EC/BMClosedED/BMClosedED.mpc:
diff --git a/TAO/CIAO/DAnCE/examples/Hello/Hello_Base/Hello_Base.mpc b/TAO/CIAO/DAnCE/examples/Hello/Hello_Base/Hello_Base.mpc
index cded34e3b3a..c2d0c37e844 100644
--- a/TAO/CIAO/DAnCE/examples/Hello/Hello_Base/Hello_Base.mpc
+++ b/TAO/CIAO/DAnCE/examples/Hello/Hello_Base/Hello_Base.mpc
@@ -2,8 +2,8 @@
// This file is generated with "generate_component_mpc.pl -n Hello_Base"
project(Hello_Base_DnC_stub): ciao_client_dnc {
-
- sharedname = Hello_Base_DnC_stub
+
+ sharedname = Hello_Base_stub
idlflags += -Wb,stub_export_macro=HELLO_BASE_STUB_Export -Wb,stub_export_include=Hello_Base_stub_export.h -Wb,skel_export_macro=HELLO_BASE_SVNT_Export -Wb,skel_export_include=Hello_Base_svnt_export.h
dynamicflags = HELLO_BASE_STUB_BUILD_DLL
@@ -16,19 +16,29 @@ project(Hello_Base_DnC_stub): ciao_client_dnc {
}
}
-project(Hello_Base_DnC_svnt) : ciao_server_dnc {
- after += Hello_Base_DnC_stub
- sharedname = Hello_Base_DnC_svnt
- libs += Hello_Base_DnC_stub
+project(Hello_Base_DnC_svnt) : ciao_servant_dnc {
+ after += Hello_Base_stub
+ sharedname = Hello_Base_svnt
+ libs += Hello_Base_stub
- idlflags += -Wb,stub_export_macro=HELLO_BASE_STUB_Export -Wb,stub_export_include=Hello_Base_stub_export.h -Wb,skel_export_macro=HELLO_BASE_SVNT_Export -Wb,skel_export_include=Hello_Base_svnt_export.h
+ idlflags += -Wb,export_macro=HELLO_BASE_SVNT_Export -Wb,export_include=Hello_Base_svnt_export.h
dynamicflags = HELLO_BASE_SVNT_BUILD_DLL
+ CIDL_Files {
+ Hello_Base.cidl
+ }
+
IDL_Files {
- Hello_Base.idl
+ Hello_BaseE.idl
}
Source_Files {
+ Hello_BaseEC.cpp
Hello_BaseS.cpp
+ Hello_Base_svnt.cpp
}
}
+
+
+
+
diff --git a/TAO/CIAO/DAnCE/examples/Hello/step-by-step.html b/TAO/CIAO/DAnCE/examples/Hello/step-by-step.html
index 81a2b8f5673..d5ce7fbc37f 100644
--- a/TAO/CIAO/DAnCE/examples/Hello/step-by-step.html
+++ b/TAO/CIAO/DAnCE/examples/Hello/step-by-step.html
@@ -35,19 +35,7 @@ This Hello example is contructed in the following ways:
<ul><h3>Hello_Base</h3>
<li>1. Write an IDL file (<code>Hello_Base.idl</code>) which contains all the interfaces and events common to all the components. The reason we do this is becuse the generated lib of this idl file will be linked in by all the components in the system. To reduce the size of the component lib we have to include only the necesary part. In this example, we have an eventtype <code>timeout</code> and an interface <code>ReadMessage</code>, which are used by both the Sender and the Receiver, so we put both of them in Hello.idl.</li>
-<li>2. Use <code>$CIAO_ROOT/bin/generate_component_mpc.pl -n Hello_Base</code> to generate the <a href="http://downloads.ociweb.com/MPC/MakeProjectCreator.pdf">MPC</a> file for ITS_Base. Note: There are only 2 projects in the mpc file, Hello_Base_DnC_stub and Hello_Base_DnC_svnt.</li>
-
-<li>3. Open the mpc file and follow the instructions below</li>
-<ul>For the project <code>Hello_Base_svnt</code>:
- <li>Change the parent prject from <code>ciao_svnt</strong> to <code>ciao_server_dnc.</strong></li>
- <li>Delete the <code>IDL_Files</code> and <code>CIDL_Files</code> part.</li>
- <li>Delete all the files in the <code>Source_File</code> part except <code>Hello_BaseS.cpp.</code></li>
- <br>
- <strong>Note:</strong> These steps are needed because that <code>Hello_Base</code> is not a component but libs(stub and skel) which will be used by the component libraries. However, since we generate the mpc file using the <code>generate_component_mpc.pl</code> we have to handcraft the file. The user can hand write this file if he prefer to.
-</ul>
-
-<br>
-<li>4. Follow the instruction from the output of the last step, use the perl script (<code>generate_export_file.pl</code>) to generate the Export files.</li>
+<li>2. Look at the <code>Hello_Base.mpc</code> file to get an idea how the Hello_Base_stub and Hello_Base_svnt projects are organized. <a href="http://downloads.ociweb.com/MPC/MakeProjectCreator.pdf">MPC</a> is a utility we used to generate makefiles or VC project/solution files for all <a href="http://www.cs.wustl.edu/~schmidt/ACE.html">ACE</a>, <a href="http://www.cs.wustl.edu/~schmidt/TAO.html">TAO</a> and <a href="http://www.cs.wustl.edu/~schmidt/CIAO.html">CIAO</a> libraries.</li>
</ul>
<hr>
@@ -61,43 +49,47 @@ This Hello example is contructed in the following ways:
</code><br></ul>
Note:
<ul>
-<li>I have different directories for <code>Hello_Base/Sender/Receiver</code> respectively.</li>
+<li>I have different directories for <code>"Hello_Base", "Sender", "Receiver"</code> respectively.</li>
<li>For every <code>_stub</code> project, add:<br>
<code>"libs += Hello_Base_DnC_stub"</code><br>
</ul>
-<li>2. Use the export script to generate the export files(3 files per component).</li>
+<li>2. Use the export script to generate the export files. (3 files per component).</li>
-<li>3. Write an idl file for every compoent. Here you can put the component specific IDL definitions in this file. In this example we have a interface <code>trigger</code> specific to the Sender.</li>
+<li>3. Write an idl file for every compoent. Here you can put the component specific IDL definitions in this file. In this example we have a interface <code>trigger</code> specific to the Sender. Please note that the Sender component <code>"supports"</code> (IDL keyword) this interface. </li>
<li>4. Write the CIDL file for every component.</li>
<li>5. Write <code>_exec.h</code> and <code>_exec.cpp</code> files which actually implement the component.</li>
<br>
-Writing all those files could be troublesome to a new CCM user. The best way of learning this is to read the example source code. If you are familliar with CORBA programming, it should not take too much time before you can declare yourself as a CIAO programmer.
+<br>
+Writing all those files could be troublesome to a new CCM user. The best way of learning this is to read the example source code. If you are familliar with CORBA programming, it should not take too much time before you can declare yourself as a CCM programmer.
<hr>
<h3>The Entry Point</h3>
-After both components are implemented we still need a small program to initialize the process. In Sender.idl there is a Sender specific interface with a single method in it created for this purpose. Hence I created a TAO application called starter. The starter will call on a special trigger interface on the Sender to get the whole process started. The starter program should collocate with Sender because it reads the ior of the Sender. Please see the the last part of <code>Hello/Sender/Sender.mpc</code> file for detial.
+After both components are implemented we still need a small program to initialize the process. In Sender.idl there is a Sender specific interface with a single method in it created for this purpose. Hence there is a CORBA client application called <code>starter</code>. The <code>starter</code> will make a invocation on a supported interface called <code>trigger</code> on the Sender component to get the whole distributed application started. The <code>starter</code> will first the Sender component object reference through the ior string. Please see the the last part of <code>Hello/Sender/Sender.mpc</code> file for details.
<hr>
<h3>Make</h3>
-<li>Go to the top directory of your workspace and do:<br>
- <code>$ACE_ROOT/bin/mwc.pl</code>(use -type option if you are using a compiler/IDE other than gnuace -which by default generates GNU makefiles-)</li>
+<li>Go to the directory <code>$CIAO_ROOT/DAnCE</code> and do:<br>
+ <code>$ACE_ROOT/bin/mwc.pl</code> (use -type option if you are using a compiler/IDE other than gnuace -which by default generates GNU makefiles)</li>
+ <br>For example, using <code>$ACE_ROOT/bin/mwc.pl -type vc71</code> if you are using Visual C++ 7.1 IDE.</li>
<li>Look at the generated Makefile(*unx) , Solution/workspace files(Windows) and you got it.</li>
<hr>
<h3>Assemble</h3>
-Now we can step forward to build the assembly. Here we are going to build the simplest case only, which is 1 Receiver and 1 Sender. If you are interested in CIAO you could try 1 Sender wich multiple Receiver. However, you need to change the Sender.idl to make it <em>publishes</em> timeout event instead of <em>emits</em> event.
+Now we can step forward to build the assembly. Here we are going to build the simplest case only, which is 1 Receiver and 1 Sender. If you are interested in CIAO you could try 1 Sender with multiple Receiver. However, you need to change the Sender.idl to make it <em>publishes</em> timeout event instead of <em>emits</em> event.
<br>
+<br>
-<li> You need to create a bunch of XML descriptors which are explained as below.
+<li> You need to create a bunch of XML descriptors which are explained as below:
+<br><br>
<dl>
<dt> Component Interface Descriptor (.ccd) </dt>
@@ -127,13 +119,15 @@ Now we can step forward to build the assembly. Here we are going to build the si
<dd> A component package can contain a single component
A component package can also contain an assembly </dd>
</dl>
+<br>
+<li> Please make sure that the Deployment.xsd and XMI.xsd files are in the Hello/descriptors directory.
+<br>
+<br>
+<li> Create the <em>.dat</em> file containing the CORBALOC IIOP address of each <code>NodeManager (Node_Daemon)</code> where it is running. Please refer to the existing <code>hello.dat</code> for details, as you can see, we only specify 1 <code>NodeManager</code>, which means these two components will be installed in the same <code>NodeApplication</code> server.</li>
-<li> Copy the Deployment.xsd and XMI.xsd files from the Hello/descriptors directory.
-
-<li> Create the <em>.dat</em> file containing the location of each component instance. </li>
-
<br>
-Note: Creating all the descriptors is a tedious and boring job, you can download <a href="http://www.dre.vanderbilt.edu/cosmic"> CoSMIC </a> to assist you in this step.
+<br>
+Note: Creating all the descriptors is a tedious and error-prone job, you can download <a href="http://www.dre.vanderbilt.edu/cosmic"> CoSMIC</a> to assist you in this step.
</li>
<hr>
@@ -142,7 +136,7 @@ Finally you are ready to test the application you have made.
<br><br>
<UL>
- <LI> Change into the <em> descriptors </em> directory Start NodeManagers (NodeDameon) by running <code> basicNodeDaemon.pl </code>
+ <LI> Go into the <em> descriptors </em> directory Start NodeManagers (NodeDameon) by running <code> basicNodeDaemon.pl </code>
<LI> Start the execution manager:
<code>$CIAO_ROOT/DAnCE/ExecutionManager/Execution_Manager -o EM.ior -i hello.dat </code>
diff --git a/TAO/CIAO/examples/Hello/step-by-step.html b/TAO/CIAO/examples/Hello/step-by-step.html
index 70ab9d26c0f..24560995648 100644
--- a/TAO/CIAO/examples/Hello/step-by-step.html
+++ b/TAO/CIAO/examples/Hello/step-by-step.html
@@ -1,5 +1,5 @@
<!--//$Id$ -->
-<!--Made by Tao Lu <lu@dre.vanderbilt.edu>-->
+
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
@@ -34,21 +34,9 @@ This Hello example is contructed in the following ways:
<h2>Step-By-Step</h2>
<hr>
<ul><h3>Hello_Base</h3>
-<li>1. Write an IDL file (<code>Hello_Base.idl</code>) which contains all the interfaces and events common to all the components. The reason we do this is becuse the generated lib of this idl file will be linked in by all the components in the system. To reduce the size of the component lib we have to include only the necesary part. In this example, we have an eventtype <code>timeout</code> and an interface <code>message</code>, which are used by both the Sender and the Receiver, so we put both of them in Hello.idl.</li>
-
-<li>2. Use <code>$CIAO_ROOT/bin/generate_component_mpc.pl -n Hello_Base</code> to generate the <a href="http://downloads.ociweb.com/MPC/MakeProjectCreator.pdf">MPC</a> file for ITS_Base. Note: There are only 2 projects in the mpc file, Hello_stub and Hello_svnt.</li>
-
-<li>3. Open the mpc file and follow the instructions below</li>
-<ul>For the project <code>Hello_Base_svnt</code>:
- <li>Change the parent prject from <code>ciao_svnt</strong> to <code>ciao_server.</strong></li>
- <li>Delete the <code>IDL_Files</code> and <code>CIDL_Files</code> part.</li>
- <li>Delete all the files in the <code>Source_File</code> part except <code>Hello_BaseS.cpp.</code></li>
- <br>
- <strong>Note:</strong> These steps are needed because that <code>Hello_Base</code> is not a component but libs(stub and skel) which will be used by the component libraries. However, since we generate the mpc file using the <code>generate_component_mpc.pl</code> we have to handcraft the file. The user can hand write this file if he prefer to.
-</ul>
+<li>1. Write an IDL file (<code>Hello_Base.idl</code>) which contains all the interfaces and events common to all the components. The reason we do this is becuse the generated lib of this idl file will be linked in by all the components in the system. To reduce the size of the component lib we have to include only the necesary part. In this example, we have an eventtype <code>timeout</code> and an interface <code>ReadMessage</code>, which are used by both the Sender and the Receiver, so we put both of them in Hello.idl.</li>
-<br>
-<li>4. Follow the instruction from the output of the last step, use the perl script (<code>generate_export_file.pl</code>) to generate the Export files.</li>
+<li>2. Look at the <code>Hello_Base.mpc</code> file to get an idea how the Hello_Base_stub and Hello_Base_svnt projects are organized. <a href="http://downloads.ociweb.com/MPC/MakeProjectCreator.pdf">MPC</a> is a utility we used to generate makefiles or VC project/solution files for all <a href="http://www.cs.wustl.edu/~schmidt/ACE.html">ACE</a>, <a href="http://www.cs.wustl.edu/~schmidt/TAO.html">TAO</a> and <a href="http://www.cs.wustl.edu/~schmidt/CIAO.html">CIAO</a> libraries.</li>
</ul>
<hr>
@@ -62,41 +50,44 @@ This Hello example is contructed in the following ways:
</code><br></ul>
Note:
<ul>
-<li>I have different directories for <code>Hello_Base/Sender/Receiver</code> respectively.</li>
+<li>I have different directories for <code>"Hello_Base", "Sender", "Receiver"</code> respectively.</li>
<li>For every <code>_stub</code> project, add:<br>
<code>"libs += Hello_Base_stub"</code><br>
</ul>
-<li>2. Use the export script to generate the export files(3 files per compoennt).</li>
+<li>2. Use the export script to generate the export files. (3 files per component).</li>
-<li>3. Write an idl file for every compoent. Here you can put the component specific IDL definitions in this file. In this example we have a interface <code>trigger</code> specific to the Sender.</li>
+<li>3. Write an idl file for every compoent. Here you can put the component specific IDL definitions in this file. In this example we have a interface <code>trigger</code> specific to the Sender. Please note that the Sender component <code>"supports"</code> (IDL keyword) this interface. </li>
<li>4. Write the CIDL file for every component.</li>
-<li>5. Write <code>_exec.h</code> and <code>_exec.cpp</code> files which actually implement the compnent.</li>
+<li>5. Write <code>_exec.h</code> and <code>_exec.cpp</code> files which actually implement the component.</li>
+<br>
<br>
-Writing all those files could be troublesome to a new CCM user. The best way of learning this is to read the example source code. If you are familliar with CORBA programming, it should not take too much time before you can delcare yourself as a CIAO programmer.
+Writing all those files could be troublesome to a new CCM user. The best way of learning this is to read the example source code. If you are familliar with CORBA programming, it should not take too much time before you can declare yourself as a CCM programmer.
<hr>
<h3>The Entry Point</h3>
-After both components are implemented we still need a small program to initialize the process. In Sender.idl there is a Sender specific interface with a single method in it created for this purpose. Hence I created a TAO application called starter. The starter will call on a sepcial trigger interface on the Sender to get the whole process started. The starter program should collocate with Sender because it reads in the ior of the Sender. Please see the the last part of <code>Hello/Sender/Sender.mpc</code> file for detial.
+After both components are implemented we still need a small program to initialize the process. In Sender.idl there is a Sender specific interface with a single method in it created for this purpose. Hence there is a CORBA client application called <code>starter</code>. The <code>starter</code> will make a invocation on a supported interface called <code>trigger</code> on the Sender component to get the whole distributed application started. The <code>starter</code> will first the Sender component object reference through the ior string. Please see the the last part of <code>Hello/Sender/Sender.mpc</code> file for details.
<hr>
<h3>Make</h3>
-<li>Go to the top directory of your workspace and do:<br>
- <code>$ACE_ROOT/bin/mwc.pl</code>(use -type option if you are on Windows)</li>
-<li>Look at the generated Makefile(*inx) , Solution/workspace file(Windows) and you got it.</li>
+<li>Go to the directory <code>$CIAO_ROOT/examples/Hello</code> and do:<br>
+ <code>$ACE_ROOT/bin/mwc.pl</code> (use -type option if you are using a compiler/IDE other than gnuace -which by default generates GNU makefiles)</li>
+ <br>For example, using <code>$ACE_ROOT/bin/mwc.pl -type vc71</code> if you are using Visual C++ 7.1 IDE.</li>
+<li>Look at the generated Makefile(*unx) , Solution/workspace files(Windows) and you got it.</li>
<hr>
<h3>Assemble</h3>
-Now we can step forward to build the assembly. Here we are going to build the simplest case only, which is 1 Receiver and 1 Sender. If you are interested in CIAO you could try 1 Sender wich multiple Receiver. However, you need to change the Sender.idl to make it <em>pulishes</em> timeout event instead of <em>emits</em> event.
+Now we can step forward to build the assembly. Here we are going to build the simplest case only, which is 1 Receiver and 1 Sender. If you are interested in CIAO you could try 1 Sender with multiple Receiver. However, you need to change the Sender.idl to make it <em>publishes</em> timeout event instead of <em>emits</em> event.
<br>
+<br>
<li>1. Make a new directory with name <em>descriptors</em> in your workspace</li>
<li>2. Construct the <em>CIAO_Installation_Data.ini</em> file. You can use <code>uuidgen</code> to generate the UUIDs</li>
@@ -162,3 +153,4 @@ If you want to get debug information from the component server, please see run_t
<b>Email: </b><a href="mailto:"</a<ADDRESS>ciao-users@cse.wustl.edu</ADDRESS>
</body>
</html>
+