summaryrefslogtreecommitdiff
path: root/modules/CIAO/docs/tutorials/Quoter/Simple/01.html
diff options
context:
space:
mode:
Diffstat (limited to 'modules/CIAO/docs/tutorials/Quoter/Simple/01.html')
-rw-r--r--modules/CIAO/docs/tutorials/Quoter/Simple/01.html375
1 files changed, 375 insertions, 0 deletions
diff --git a/modules/CIAO/docs/tutorials/Quoter/Simple/01.html b/modules/CIAO/docs/tutorials/Quoter/Simple/01.html
new file mode 100644
index 00000000000..379d2653444
--- /dev/null
+++ b/modules/CIAO/docs/tutorials/Quoter/Simple/01.html
@@ -0,0 +1,375 @@
+<!-- $Id$ -->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>Getting Started</title>
+ <meta http-equiv="Content-Type" content=
+ "text/html; charset=us-ascii" />
+ <style type="text/css">
+/*<![CDATA[*/
+ <!--
+ @font-face {
+ font-family:Tahoma;
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ }
+ h3 {
+ font-size:13.5pt;
+ font-family:"Times New Roman";
+ font-weight:bold;
+ }
+ a:link, span.MsoHyperlink {
+ color:#000FFF;
+ text-decoration:underline;
+ text-underline:single;
+ }
+ a:visited, span.MsoHyperlinkFollowed {
+ color:#FF0F0F;
+ text-decoration:underline;
+ text-underline:single;
+ }
+ p {
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ }
+ address {
+ font-size:12.0pt;
+ font-family:"Times New Roman";
+ font-style:italic;
+ }
+ code {
+ font-family:"Courier New";
+ }
+ p.MsoAcetate, li.MsoAcetate, div.MsoAcetate {
+ font-size:8.0pt;
+ font-family:Tahoma;
+ }
+ div.Section1 {
+ page:Section1
+ }
+ -->
+ /*]]>*/
+ </style><!-- 01.html,v 1.3 2006/02/10 14:34:35 mxiong Exp -->
+
+ <style type="text/css">
+/*<![CDATA[*/
+ body {
+ background-color: #FFFFFF;
+ }
+ :link { color: #000FFF }
+ :visited { color: #FF0F0F }
+ address.c50 {LINE-HEIGHT: 150%}
+ address.c49 {LINE-HEIGHT:150%}
+ div.c48 {LINE-HEIGHT: 150%; TEXT-ALIGN: center; text-align: center}
+ hr.c47 {text-align: center}
+ p.c46 {LINE-HEIGHT: 150%; TEXT-ALIGN: center; text-align: center}
+ p.c45 {LINE-HEIGHT:150%}
+ p.c44 {MARGIN-LEFT:1.75in;TEXT-INDENT:-0.75in;LINE-HEIGHT:150%;}
+ p.c43 {MARGIN-LEFT:0.5in;TEXT-INDENT:1.25in;LINE-HEIGHT:150%}
+ span.c42 {COLOR:black; FONT-FAMILY:'Courier New'}
+ span.c41 {LINE-HEIGHT:150%;FONT-FAMILY:'Times New Roman';}
+ p.c40 {LINE-HEIGHT: 150%; TEXT-INDENT: 0.5in; font-weight: bold}
+ p.c39 {MARGIN-LEFT: 1.25in; TEXT-INDENT: -0.25in; LINE-HEIGHT: 150%;}
+ span.c38 {COLOR: black; FONT-FAMILY: 'Courier New';}
+ span.c37 {FONT-SIZE: 10pt; COLOR: black; LINE-HEIGHT: 150%}
+ span.c36 {COLOR: black; FONT-FAMILY: Symbol;}
+ span.c35 {FONT: 7pt 'Times New Roman'}
+ p.c34 {MARGIN-LEFT:1.5in;LINE-HEIGHT:150%}
+ p.c33 {MARGIN-LEFT: 1.25in; LINE-HEIGHT: 150%}
+ span.c32 {COLOR: black;}
+ p.c31 {MARGIN-LEFT:1.25in;LINE-HEIGHT:150%}
+ span.c30 {font-family: Times New Roman}
+ span.c29 {font-family: Courier; font-size: 80%}
+ p.c28 {MARGIN-LEFT: 0.5in; TEXT-INDENT: 1.25in; LINE-HEIGHT: 150%}
+ span.c27 {COLOR: black; FONT-FAMILY: 'Courier New'}
+ p.c26 {MARGIN-LEFT:1.25in;TEXT-INDENT:-0.25in;LINE-HEIGHT:150%;}
+ span.c25 {FONT-SIZE: 10pt;COLOR: black;LINE-HEIGHT: 150%}
+ span.c24 {COLOR:black;LINE-HEIGHT:150%;FONT-FAMILY:'Times New Roman';}
+ span.c23 {FONT-SIZE:10pt; COLOR:black; LINE-HEIGHT:150%}
+ p.c22 {TEXT-INDENT:0.5in;LINE-HEIGHT:150%}
+ p.c21 {MARGIN-LEFT:0.75in;LINE-HEIGHT:150%}
+ span.c20 {COLOR:black;}
+ p.c19 {MARGIN-LEFT:0.5in;TEXT-INDENT:0.5in;LINE-HEIGHT:150%}
+ span.c18 {COLOR:black; FONT-FAMILY:'Courier New';}
+ p.c17 {MARGIN-LEFT:0.75in;TEXT-INDENT:-0.25in;LINE-HEIGHT:150%;}
+ span.c16 {FONT-SIZE:10pt;COLOR:black;LINE-HEIGHT:150%}
+ span.c15 {COLOR:black;FONT-FAMILY:Symbol;}
+ p.c14 {LINE-HEIGHT: 150%; font-weight: bold}
+ h3.c13 {MARGIN:0in 0in 0pt 1.5in; TEXT-INDENT:-0.25in; LINE-HEIGHT:150%;}
+ span.c12 {FONT-WEIGHT:normal; FONT-SIZE:12pt; COLOR:black; LINE-HEIGHT:150%;}
+ h3.c11 {MARGIN:0in 0in 0pt 0.75in; TEXT-INDENT:-0.25in; LINE-HEIGHT:150%;}
+ span.c10 {FONT-WEIGHT:normal; FONT-SIZE:12pt; COLOR:black; LINE-HEIGHT:150%; FONT-FAMILY:Symbol;}
+ h3.c9 {MARGIN:0in 0in 0pt; TEXT-INDENT:0.5in; LINE-HEIGHT:150%}
+ span.c8 {FONT-SIZE:12pt;COLOR:black;LINE-HEIGHT:150%}
+ p.c7 {MARGIN:0in 0in 0pt 0.75in; TEXT-INDENT:-0.25in; LINE-HEIGHT:150%;}
+ span.c6 {FONT-FAMILY:Symbol;}
+ span.c5 {FONT:7pt 'Times New Roman'}
+ span.c4 {FONT-WEIGHT:normal;FONT-SIZE:12pt;COLOR:black;LINE-HEIGHT:150%;}
+ h3.c3 {MARGIN:0in 0in 0pt; LINE-HEIGHT:150%}
+ h3.c2 {LINE-HEIGHT: 150%; MARGIN: 0in 0in 0pt; TEXT-ALIGN: center; text-align: center}
+ span.c1 {COLOR:black}
+ /*]]>*/
+ </style>
+</head>
+
+<body lang="EN-US" xml:lang="EN-US">
+ <h3 class="Section1 c2"><span class='c1'>Step 1: Define your
+ interfaces and component types</span></h3>
+
+ <h3 class="Section1 c2"><span class='c1'><img width="447" height=
+ "350" id="_x0000_i1025" src="images/step1.jpg" name=
+ "_x0000_i1025" /></span></h3>
+
+ <h3 class="Section1 c3"><span class='c1'>&nbsp;</span></h3>
+
+ <h3 class="Section1 c3"><span class='c4'>Please make sure to read
+ the following article to under the Stock Quoter system
+ architecture before delving further into the
+ tutorial:</span></h3>
+
+ <p class="Section1 c7"><span class='c6'>&middot;<span class=
+ "c5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span> <a href=
+ "http://www.cuj.com/documents/s=9152/cujexp0404vinoski/">The
+ CORBA Component Model, Part 2: Defining Components with the IDL
+ 3.x Types</a></p>
+
+ <h3 class="Section1 c3"><span class='c4'>&nbsp;</span></h3>
+
+ <h3 class="Section1 c3"><span class='c8'>Directory
+ Structure:</span></h3>
+
+ <h3 class="Section1 c3"><span class='c4'>The tutorial relies on
+ the following directory structure. Create Quoter and all its
+ subdirectories as shown below. We will describe the purpose of
+ these directories later in the tutorial.</span></h3>
+
+ <h3 class="Section1 c9"><span class='c4'>Quoter</span></h3>
+
+ <h3 class="Section1 c3"><span class=
+ 'c4'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ |---- descriptors</span></h3>
+
+ <h3 class="Section1 c3"><span class=
+ 'c4'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ |---- Stock_Base</span></h3>
+
+ <h3 class="Section1 c3"><span class=
+ 'c4'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ |---- Distributor</span></h3>
+
+ <h3 class="Section1 c3"><span class=
+ 'c4'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ |---- Broker</span></h3>
+
+ <h3 class="Section1 c3"><span class='c4'>&nbsp;</span></h3>
+
+ <h3 class="Section1 c3"><span class=
+ 'c8'>Preliminaries:</span></h3>
+
+ <h3 class="Section1 c11"><span class='c10'>&middot;<span class=
+ "c5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+ <span class='c4'>We use the Make Project Creator (MPC) throughout
+ this tutorial. Understanding MPC will aid you in understanding
+ this tutorial. For more information on MPC please look at the
+ following:</span></h3>
+
+ <h3 class="Section1 c13"><span class='c12'>1.<span class=
+ "c5">&nbsp;&nbsp;&nbsp;&nbsp;</span></span> <span class='c4'>MPC
+ <a href=
+ "../../../../../../MPC/docs/MakeProjectCreator.pdf">Chapter</a>.</span></h3>
+
+ <h3 class="Section1 c13"><span class='c12'>2.<span class=
+ "c5">&nbsp;&nbsp;&nbsp;&nbsp;</span></span> <span class=
+ 'c4'>$ACE_ROOT/MPC/README</span></h3>
+
+ <p class='c14'><span class='c1'>Interface Design:</span></p>
+
+ <p class='c17'><span class='c15'>&middot;<span class=
+ "c5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+ <span class='c1'>In the <i>Quoter/Stock_Base</i> sub-directory,
+ place an idl file</span> <code><i><span class=
+ 'c16'>Stock_Base.idl</span></i></code> <span class='c1'>that you
+ could copy from <a href="Stock_Base/Stock_Base.idl">here</a> .
+ This file defines the interfaces and events that will be used by
+ both StockDistributor and StockBroker components. We put together
+ the common interface definitions so the base library can be
+ shared by both components, reducing the footprint of "real"
+ components.</span></p>
+
+ <p class='c17'><span class='c15'>&middot;<span class=
+ "c5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+ <span class='c1'>Next, we need to create a Make Project Creator
+ (MPC) file to generate the make files for us. From the
+ <i>Quoter/Stock_Base</i> subdirectory, type the following
+ command:</span></p>
+
+ <p class='c19'><span class="c18">generate_component_mpc.pl
+ &ndash;n Stock_Base</span></p>
+
+ <p class='c21'><span class='c20'>The command above will generate
+ a <i>Stock_Base.mpc</i> file that contains two projects
+ <i>Stock_Base_stub</i> and <i>Stock_Base_skel</i> for the Stub
+ and Servant code respectively. The MPC file should look like
+ <a href="Stock_Base/Stock_Base.mpc">this</a>.<br/>
+ Mind that "libout" and "libpaths" are added. This is done to make
+ the compilation of this example easier and at runtime, all deliveralbes
+ are in one directory. Beware that you need to add this
+ directory to your system path when running the executables (see page 4).
+ </span></p>
+
+ <p class='c14'><span class='c1'>Component Design:</span></p>
+
+ <p class='c22'><b><span class=
+ 'c1'>Distributor:</span></b><span class=
+ 'c1'>&nbsp;&nbsp;&nbsp;</span></p>
+
+ <p class='c26'><span class='c15'>&middot;<span class=
+ "c5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+ <span class='c1'>In the</span> <code><i><span class=
+ 'c23'>Quoter/Distributor</span></i></code> <code><span class=
+ "c24">sub-directory</span></code><span class='c1'>, place an idl
+ file</span> <code><i><span class=
+ 'c25'>StockDistributor.idl</span></i></code> <span class=
+ 'c1'>that looks like <a href=
+ "Distributor/StockDistributor.idl">this</a>. This file defines
+ the StockDistributor component interfaces.</span></p>
+
+ <p class='c26'><span class='c15'>&middot;<span class=
+ "c5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+ <span class='c1'>Next, we need to create a Make Project Creator
+ (MPC) file to generate the make files for us. From the
+ <i>Quoter/Distributor</i> <span>&nbsp;</span>sub-directory, type
+ the following command</span></p>
+
+ <p class="c28"><span class="c27">generate_component_mpc.pl -p
+ Stock_Base -c StockDistributorDriver StockDistributor</span></p>
+
+ <p class='c31'><span class='c20'>The command above takes a few
+ optional parameters. The -p option indicates that the <span class=
+ "c29">StockDistributor</span> component has a dependency on
+ <span class="c29">Stock_Base</span>, the -c option
+ causes the script to generate MPC files for a simple driver
+ program. In this tutorial, we use a simple driver program to
+ demonstrate how a non-CCM applications can interact with
+ component applications.</span></span></p>
+
+ <p class="c33"><span class="c32">The command above will generate
+ a <i>StockDistributor.mpc</i> file that contains&nbsp;several
+ projects that will build the Stub, Servant, and Executor code
+ respectively.
+ <p class="c39">&middot;&nbsp;&nbsp;&nbsp;&nbsp;
+ <span class="c32">Next we write a simple driver program
+ (<code><i><span class=
+ "c37">StockDistributorDriver.cpp)</span></i></code> that will
+ control the <span class="c29">StockDistributor</span> component.
+ The simple driver program controls when the <span class=
+ "c29">StockDistributor</span> component publishes stock quotes,
+ the rates of publication, and when publication of stock quotes
+ stops. The simple driver program should look
+ like&nbsp;</span><span class="c32"><a href=
+ "Distributor/StockDistributorDriver.cpp">this</a>.</span></span></p>
+
+ <p class='c26'><span class='c15'>&middot;<span class=
+ "c5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+ <span class='c20'>The generated</span> <span class='c20'>MPC file
+ should look like <a href=
+ "Distributor/StockDistributor.mpc">this</a>. Both "libout" and "libpaths"
+ are added again.
+ </span></p>
+
+ <p class='c40'><span class='c1'>Broker:</span></p>
+
+ <p class='c26'><span class='c15'>&middot;<span class=
+ "c5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+ <span class='c1'>In the</span> <code><i><span class=
+ 'c23'>Quoter/Broker</span></i></code> <span class=
+ 'c1'><code><span class="c41">sub-directory,</span></code> place
+ an idl file</span> <code><i><span class=
+ 'c16'>StockBroker.id</span></i></code><code><span class=
+ 'c23'>l</span></code> <span class='c1'>that looks like <a href=
+ "Broker/StockBroker.idl">this</a>. This file defines the
+ StockBroker component interface.</span></p>
+
+ <p class='c26'><span class='c15'>&middot;<span class=
+ "c5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+ <span class='c1'>Next, we need to create a Make Project Creator
+ (MPC) file to generate the make files for us. From the
+ <i>Quoter/Broker</i> sub-directory, type the following
+ command:</span></p>
+
+ <p class='c43'><span class="c42"><span class=
+ "c27">generate_component_mpc.pl -p Stock_Base -c
+ StockBrokerDriver StockBroker</span></span></p>
+
+ <p class='c31'><span class='c20'><span class="c32">The command
+ above takes a few optional parameter. The -p option states that
+ the <span class="c29">StockBroker</span> component has a
+ dependency on <span class="c29">Stock_Base<span class="c30">, the
+ -c option causes the script to generates make files for a simple
+ driver program. In this tutorial, we use a simple driver program
+ to demonstrate how a non-CCM applications can interact with
+ Components.</span></span></span></span></p>
+
+ <p class="c33"><span class="c32"><span class="c32">The command
+ above will generate a <i>StockBroker.mpc</i> file that
+ contains&nbsp;several projects that will build the Stub, Servant,
+ and Executor code respectively.
+
+ <p class="c39"><span class="c36">&middot;<span class=
+ "c35">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+ <span class="c32">Next we write a simple driver program
+ (<code><i><span class=
+ "c37">StockBrokerDriver.cpp)</span></i></code> that would control
+ the <span class="c29">StockBroker</span> component. The simple
+ driver program controls what stocks the <span class=
+ "c29">StockBroker</span> component subscribes to. The simple
+ driver program should look like&nbsp;</span><span class=
+ "c32"><a href="Broker/StockBrokerDriver.cpp">this</a>.</span></p>
+
+ <p class='c44'><span class='c15'>&middot;<span class=
+ "c5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
+ <span class='c20'><span class="c32">The generated</span>
+ <span class="c32">MPC file should look like</span> <a href=
+ "Broker/StockBroker.mpc">this</a>. Both "libout" and "libpaths"
+ are added again.</span></p>
+
+ <p class='c45'><span class='c1'><br />
+ <b>Note:</b></span></p>
+
+ <p class='c45'><span class='c1'>To understand the meaning of
+ different parameters passed to</span> <span class=
+ "c42">generate_component_mpc.pl</span><span class='c20'>click
+ <a href="../../../generate_component_mpc.html">here</a> or type
+ the</span> <span class='c1'>following command:</span></p>
+
+ <p class='c45'><span class="c42">generate_component_mpc.pl
+ -h</span><span class='c1'><br />
+ <br /></span></p>
+
+ <p class='c46'><span class='c1'><a href=
+ "index.html">Previous</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <a href="02.html">Next</a></span></p>
+
+ <div class='c48'>
+ <hr class="c47" size="2" width="100%" />
+ </div>
+
+ <div class="Section1">
+ <address class='c49'>
+ <span class='c1'><a href=
+ "mailto:ming.xiong@vanderbilt.edu">Ming
+ Xiong<br /></a></span> <a href=
+ "mailto:abdullah.sowayan@lmco.com">Abdullah Sowayan</a>
+ </address>
+
+ <address class="c50">
+ &nbsp;
+ </address>
+
+ <address class="c50">
+ $Id$
+ </address>
+ </div>
+</body>
+</html>