diff options
author | Marijke Hengstmengel <MHengstmengel@users.noreply.github.com> | 2010-06-30 10:36:39 +0000 |
---|---|---|
committer | Marijke Hengstmengel <MHengstmengel@users.noreply.github.com> | 2010-06-30 10:36:39 +0000 |
commit | 63fa979b0b984518db6cd65a4b88ed4103b5febf (patch) | |
tree | 6da6666054f13708e30fddf1366328881f380f12 | |
parent | 90354fdfab082847d9b54403ed5eb0d86ddf8fa9 (diff) | |
download | ATCD-63fa979b0b984518db6cd65a4b88ed4103b5febf.tar.gz |
ed Jun 30 10:35:10 UTC 2010 Marijke Hengstmengel <mhengstmengel@remedy.nl>
* connectors/ami4ccm/tutorials/Hello/Tutorial/01_general.html
* connectors/ami4ccm/tutorials/Hello/Tutorial/02_idl.html
* connectors/ami4ccm/tutorials/Hello/Tutorial/03_executors.html
* connectors/ami4ccm/tutorials/Hello/Tutorial/04_ami4ccm.html
* connectors/ami4ccm/tutorials/Hello/Tutorial/05_compilation.html
Changes after review.
6 files changed, 382 insertions, 495 deletions
diff --git a/CIAO/ChangeLog b/CIAO/ChangeLog index edff33bd9e3..8ce57711387 100644 --- a/CIAO/ChangeLog +++ b/CIAO/ChangeLog @@ -1,3 +1,12 @@ +Wed Jun 30 10:35:10 UTC 2010 Marijke Hengstmengel <mhengstmengel@remedy.nl> + + * connectors/ami4ccm/tutorials/Hello/Tutorial/01_general.html + * connectors/ami4ccm/tutorials/Hello/Tutorial/02_idl.html + * connectors/ami4ccm/tutorials/Hello/Tutorial/03_executors.html + * connectors/ami4ccm/tutorials/Hello/Tutorial/04_ami4ccm.html + * connectors/ami4ccm/tutorials/Hello/Tutorial/05_compilation.html + Changes after review. + Wed Jun 30 09:20:10 UTC 2010 Martin Corino <mcorino@remedy.nl> * DAnCE/DomainApplicationManager/DomainApplicationManager_Impl.cpp: diff --git a/CIAO/connectors/ami4ccm/tutorials/Hello/Tutorial/01_general.html b/CIAO/connectors/ami4ccm/tutorials/Hello/Tutorial/01_general.html index 0812b351214..455beadb294 100644 --- a/CIAO/connectors/ami4ccm/tutorials/Hello/Tutorial/01_general.html +++ b/CIAO/connectors/ami4ccm/tutorials/Hello/Tutorial/01_general.html @@ -1,41 +1,31 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<!--//$Id$ --> <HTML> <HEAD> <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252"> <TITLE>AMI4CCM Hello Tutorial - General</TITLE> - <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.2 (Win32)"> - <META NAME="CREATED" CONTENT="0;0"> - <META NAME="CHANGEDBY" CONTENT="Marijke Hengstmengel"> - <META NAME="CHANGED" CONTENT="20100625;13251200"> - <META NAME="CHANGEDBY" CONTENT="Marijke Hengstmengel"> - <STYLE TYPE="text/css"> - <!--//$Id$ --> - <!-- - H2.cjk { font-family: "SimSun" } - --> - </STYLE> </HEAD> -<BODY LANG="nl-NL" DIR="ltr"> +<BODY> <TABLE WIDTH="100%" BORDER=0 CELLPADDING=2 CELLSPACING=2 STYLE="PAGE-BREAK-BEFORE: always"> - <TR> - <TD> - <P><BR></P></TD> - <TD> - <P ALIGN=center><IMG border=0 name=graphics1 align=bottom src="images/images.png" width="4%" height="5%" ></P></TD> - <TD> - <P ALIGN=right><A href="02_idl.html">Next</A></P></TD></TR></TABLE> + <TR> + <TD> </TD> + <TD ALIGN=center><IMG border=0 align=bottom src="images/images.png" width="4%" height="5%" ></TD> + <TD ALIGN=right><A href="02_idl.html">Next</A></TD> + </TR> +</TABLE> <HR> <H1>General</H1> <P>This tutorial explains how to use Asynchronous Method Invocation for CCM (AMI4CCM). The AMI Connector component handles the asynchronous invocation using CORBA AMI.</P> -<P STYLE="MARGIN-BOTTOM: 0cm"><BR></P> + <H2 CLASS="western">System</H2> <P>The system consists of three components: </P> <UL> - <LI><P STYLE="MARGIN-BOTTOM: 0cm">A Sender component </P> - <LI><P STYLE="MARGIN-BOTTOM: 0cm">A Receiver component </P> - <LI><P>An AMI connector </P></LI></UL> + <LI>A Sender component</LI> + <LI>A Receiver component</LI> + <LI>An AMI connector</LI> +</UL> <P>In this tutorial a Sender wants to invoke methods on the Receiver asynchronously and synchronously. Therefor the Sender and the Receiver are connected via an AMI connector for the asynchronously invoked methods and @@ -47,77 +37,58 @@ the asynchronous invocation and callback to the user component. The Receiver <P>There are different methods used in this example in order to show different aspects: </P> <UL> - <LI><P STYLE="MARGIN-BOTTOM: 0cm"><FONT COLOR="#000000"><FONT SIZE=3>method with return - value, in- and out argument:</FONT></FONT></P></LI></UL> -<P STYLE="MARGIN-BOTTOM: 0cm; MARGIN-LEFT: 2cm"><FONT SIZE=2><FONT COLOR="#0000ff">long</FONT><FONT COLOR="#000000"> -</FONT><FONT COLOR="#000000">foo (</FONT><FONT COLOR="#0000ff">in</FONT><FONT COLOR="#000000"> -</FONT><FONT COLOR="#0000ff">string</FONT><FONT COLOR="#000000"> </FONT><FONT COLOR="#000000">in_str, -</FONT><FONT COLOR="#0000ff">out</FONT><FONT COLOR="#000000"> </FONT><FONT COLOR="#0000ff">string</FONT><FONT COLOR="#000000"> -</FONT><FONT COLOR="#000000">answer);</FONT></FONT></P> -<UL> - <LI><P STYLE="MARGIN-BOTTOM: 0cm"><FONT COLOR="#000000"><FONT SIZE=3>void method with out - argument:</FONT></FONT></P></LI></UL> -<P STYLE="MARGIN-BOTTOM: 0cm; MARGIN-LEFT: 2cm"><FONT SIZE=2><FONT COLOR="#0000ff">void</FONT><FONT COLOR="#000000"> -</FONT><FONT COLOR="#000000">hello (</FONT><FONT COLOR="#0000ff">out</FONT><FONT COLOR="#000000"> </FONT><FONT COLOR="#0000ff">long</FONT><FONT COLOR="#000000"> -</FONT><FONT COLOR="#000000">answer);</FONT></FONT></P> -<UL> - <LI><P STYLE="MARGIN-BOTTOM: 0cm"><FONT COLOR="#000000"><FONT SIZE=3>method to set and get - an attribute:</FONT></FONT></P></LI></UL> -<P STYLE="MARGIN-BOTTOM: 0cm; MARGIN-LEFT: 2cm"><FONT COLOR="#000000"> -<FONT SIZE=2>attribute -</FONT></FONT><FONT COLOR="#0000ff"><FONT SIZE=2>short</FONT></FONT><FONT COLOR="#000000"><FONT SIZE=2> -rw_attrib<BR></FONT></FONT> -<FONT COLOR="#000000"><FONT SIZE=2> getraises -(InternalError)<BR></FONT></FONT> -<FONT COLOR="#000000"><FONT SIZE=2> setraises -(InternalError);</FONT></FONT></P> -<UL> - <LI><P STYLE="MARGIN-BOTTOM: 0cm"><FONT COLOR="#000000"><FONT SIZE=3>method to get an - readonly attribute:</FONT></FONT></P></LI></UL> -<P STYLE="MARGIN-BOTTOM: 0cm; MARGIN-LEFT: 2cm"><FONT COLOR="#0000ff"> -<FONT SIZE=2>readonly</FONT><FONT COLOR="#000000"> -</FONT><FONT COLOR="#000000">attribute </FONT><FONT COLOR="#0000ff">short</FONT><FONT COLOR="#000000"> </FONT><FONT COLOR="#000000">ro_attrib -raises (InternalError);</FONT></FONT></P> -<H2 CLASS="western">Directory structure</H2> + <LI>method with return value, in- and out argument:<br> + <CODE>long foo (in string in_str, out string answer);</CODE></LI> + <LI>void method with out argument:<br> + <CODE>void hello (out long answer);</CODE></LI> + <LI><method to set and get an attribute:<br> + <CODE>attribute short rw_attrib<BR> + getraises(InternalError)<BR> + setraises (InternalError);</CODE></LI> + <LI>method to get an readonly attribute:<br> + <CODE>readonly attribute short ro_attrib raises (InternalError);</CODE></LI> +</UL> + +<H2>Directory structure</H2> <P>The following convention is used: </P> <UL> - <LI><P STYLE="MARGIN-BOTTOM: 0cm">|--<B>*_asm</B> - : Directory contains an assembly. </P> - <LI><P STYLE="MARGIN-BOTTOM: 0cm"> |--<B>ports</B> : C:\ACE\latest\ACE_wrappers\TAO\CIAO\connectors\ami4ccm\tutorials\Hello\Tutorial\02_idl.html + <LI>|--<B>*_asm</B> + : Directory contains an assembly.</LI> + <LI> |--<B>ports</B> : C:\ACE\latest\ACE_wrappers\TAO\CIAO\connectors\ami4ccm\tutorials\Hello\Tutorial\02_idl.html + Directory contains common IDL code for the assembly. </LI> + <LI> |--<B>*_comp</B> : Directory contains an + component. </LI> + <LI> |-- + <B>ports</B> : Directory contains common IDL code for the component. </LI> + <LI> |-- <B>src</B> : Directory contains the IDL + and *_exec-files for the component.</LI></UL> - Directory contains common IDL code for the assembly. </P> - <LI><P STYLE="MARGIN-BOTTOM: 0cm"> |--<B>*_comp</B> : Directory contains an - component. </P> - <LI><P STYLE="MARGIN-BOTTOM: 0cm"> |-- - <B>ports</B> : Directory contains common IDL - code for the component. </P> - <LI><P> |-- <B>src</B> : Directory contains the IDL - and *_exec-files for the component. </P></LI></UL> -<H2 CLASS="western">File naming convention</H2> +<H2 >File naming convention</H2> <P>The following convention is used: </P> <UL> - <LI><P STYLE="MARGIN-BOTTOM: 0cm"><B>*_defn.idl</B> - These files will contain definitions, - like enumerations, constants and so on. Typically located in *_asm/ports. </P> - <LI><P STYLE="MARGIN-BOTTOM: 0cm"><B>*_obj.idl</B> - These files will contain the interfaces - between components. Typically located in *_asm/ports. </P> - <LI><P><B>*_comp.idl</B> - These files - will contain the component declaration. Typically located in *_asm/*_comp/src. - </P></LI></UL> -<H2 CLASS="western">Additional conventions</H2> + <LI><B>*_defn.idl</B> - These files will contain definitions, + like enumerations, constants and so on. Typically located in *_asm/ports. </LI> + <LI><B>*_obj.idl</B> - These files will contain the interfaces + between components. Typically located in *_asm/ports. </LI> + <LI><B>*_comp.idl</B> - These files will contain the component declaration. Typically located in *_asm/*_comp/src. + </LI> +</UL> +<H2>Additional conventions</H2> <UL> - <LI><P STYLE="MARGIN-BOTTOM: 0cm">MPC files are located in + <LI>MPC files are located in the same directory as the IDL for the common mpc files and in the same - directory as the executor files for the component mpc files. </P> - <LI><P>Files that were generated by the TAO IDL compiler + directory as the executor files for the component mpc files. </LI> + <LI>Files that were generated by the TAO IDL compiler should all be located in one subdirectory. In this tutorial the name of this - subdirectory is "GeneratedCode". </P> - <TABLE WIDTH="100%" BORDER=0 CELLPADDING=2 CELLSPACING=2> - <TR> - <TD></TD> - <TD> - <P ALIGN=center><IMG border=0 name=graphics3 align=bottom src="images/images.png" width="4%" height="5%" ></P></TD> - <TD> - <P ALIGN=left><A href="02_idl.html">Next</A></P></TD></TR></TABLE></LI></UL> + subdirectory is "GeneratedCode". </LI> +</UL> +<TABLE WIDTH="100%" BORDER=0 CELLPADDING=2 CELLSPACING=2> + <TR> + <TD> </TD> + <TD align=center><IMG border=0 name=graphics3 align=bottom src="images/images.png" width="4%" height="5%" ></TD> + <TD align - right><A href="02_idl.html">Next</A></TD> + </TR> +</TABLE> <P><BR><BR></P> </BODY> </HTML> diff --git a/CIAO/connectors/ami4ccm/tutorials/Hello/Tutorial/02_idl.html b/CIAO/connectors/ami4ccm/tutorials/Hello/Tutorial/02_idl.html index ebba8f542a5..71d00fa7660 100644 --- a/CIAO/connectors/ami4ccm/tutorials/Hello/Tutorial/02_idl.html +++ b/CIAO/connectors/ami4ccm/tutorials/Hello/Tutorial/02_idl.html @@ -1,124 +1,94 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<!--//$Id$ --> <HTML> <HEAD> <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252"> <TITLE>AMI4CCM Tutorial Hello - IDL</TITLE> - <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.2 (Win32)"> - <META NAME="CREATED" CONTENT="0;0"> - <META NAME="CHANGEDBY" CONTENT="Marijke Hengstmengel"> - <META NAME="CHANGED" CONTENT="20100628;14101200"> - <META NAME="CHANGEDBY" CONTENT="Marijke Hengstmengel"> - <!--//$Id$ --> - <STYLE TYPE="text/css"> - <!-- - H2.cjk { font-family: "SimSun" } - CODE.cjk { font-family: "NSimSun", monospace } - --> - </STYLE> </HEAD> -<BODY LANG="nl-NL" DIR="ltr"> +<BODY> <TABLE WIDTH="100%" BORDER=0 CELLPADDING=2 CELLSPACING=2 STYLE="PAGE-BREAK-BEFORE: always"> - <TR> - <TD> - <P ALIGN=left><A href="01_general.html">Previous</A></P></TD> - <TD> - <P ALIGN=center><IMG border=0 name=graphics1 align=bottom src="images/images.png" width="4%" height="5%" ></P></TD> - <TD> - <P ALIGN=right><A href="03_executors.html">Next</A></P></TD></TR></TABLE> + <TR> + <TD ALIGN=left><A href="01_general.html">Previous</A></TD> + <TD ALIGN=center><IMG border=0 name=graphics1 align=bottom src="images/images.png" width="4%" height="5%" ></TD> + <TD ALIGN=right><A href="03_executors.html">Next</A></TD> + </TR> +</TABLE> <HR> -<H1 STYLE="MARGIN-LEFT: 0cm">IDL files</H1> +<H1 >IDL files</H1> <P>The IDL files are generated by the modelling tools. To understand this example better, it'll give an overview of which IDL files are generated. </P> + <H2 CLASS="western">Common IDL files</H2> <P>Below an simplied represenation of the common IDL files. Use the links to view the file itself. The following IDL files can be found in Hello_asm/ports: </P> <UL> - <LI><P STYLE="MARGIN-BOTTOM: 0cm"><A href="../Hello_asm/ports/Hello_Common_defn.idl">Hello_Common_defn.idl</A> + <LI><A href="../Hello_asm/ports/Hello_Common_defn.idl">Hello_Common_defn.idl</A> : <BR>for common includes and IDL defenitions. -</P></LI></UL> -<P STYLE="MARGIN-BOTTOM: 0cm; MARGIN-LEFT: 2cm"><CODE CLASS="western"><FONT COLOR="#0000ff"><FONT FACE="Times New Roman, serif"><FONT SIZE=2>module</FONT></FONT></FONT></CODE><CODE CLASS="western"><FONT COLOR="#000000"><FONT SIZE=2> </FONT></FONT></CODE><CODE CLASS="western"><FONT COLOR="#000000"><FONT FACE="Times New Roman, serif"><FONT SIZE=2>Hello</FONT></FONT></FONT></CODE><FONT COLOR="#000000"><FONT SIZE=2>{ </FONT></FONT><FONT COLOR="#000000"><FONT SIZE=2>exception -InternalError { </FONT></FONT><FONT COLOR="#0000ff"><FONT SIZE=2>long</FONT></FONT><FONT COLOR="#000000"> </FONT><FONT COLOR="#0000ff"><FONT SIZE=2>id</FONT></FONT><FONT COLOR="#000000"><FONT SIZE=2>; </FONT></FONT><FONT COLOR="#0000ff"><FONT SIZE=2>string</FONT></FONT><FONT COLOR="#000000"> </FONT><FONT COLOR="#000000"><FONT SIZE=2>error_string; }; };</FONT></FONT><CODE CLASS="western"> </CODE></P> -<UL> - <LI><P STYLE="MARGIN-BOTTOM: 0cm"><A href="../Hello_asm/ports/Hello_MyFoo_obj.idl">Hello_MyFoo_obj.idl</A> + <CODE module Hello { exception InternalError { long id; string error_string; }; };</CODE></LI> + <LI><A href="../Hello_asm/ports/Hello_MyFoo_obj.idl">Hello_MyFoo_obj.idl</A> : <BR>for IDL interfaces. This IDL contains the #pragma's for enabling AMI4CCM , needed by the TAO_IDL compiler: </P> - <UL> - - <LI><P STYLE="MARGIN-BOTTOM: 0cm"><CODE CLASS="western"><FONT COLOR="#0000ff"><FONT FACE="Times New Roman, serif"><FONT SIZE=2>#pragma</FONT></FONT></FONT></CODE><CODE CLASS="western"><FONT COLOR="#000000"> - </FONT></CODE><CODE CLASS="western"><FONT COLOR="#000000"><FONT FACE="Times New Roman, serif"><FONT SIZE=2>ciao lem - "Hello_MyFoo_objE.idl", -</FONT></FONT></FONT></CODE></P> - <LI><P STYLE="MARGIN-BOTTOM: 0cm"><CODE CLASS="western"><FONT COLOR="#0000ff"><FONT FACE="Times New Roman, serif"><FONT SIZE=2>#pragma</FONT></FONT></FONT></CODE><CODE CLASS="western"><FONT COLOR="#000000"> - </FONT></CODE><CODE CLASS="western"><FONT COLOR="#000000"><FONT FACE="Times New Roman, serif"><FONT SIZE=2>ciao lem - "Hello_MyFoo_objAE.idl"</FONT></FONT></FONT></CODE></P> - <LI><P STYLE="MARGIN-BOTTOM: 0cm"> - <FONT COLOR="#000000"><FONT SIZE=3>Pragma needed per interface for implying ami.</FONT></FONT><br> - <FONT COLOR="#0000ff"><FONT SIZE=2>#pragma</FONT></FONT><FONT COLOR="#000000"> </FONT> - <FONT COLOR="#000000"><FONT SIZE=2>ciao ami4ccm </FONT></FONT> - <FONT COLOR="#0000ff"><FONT SIZE=2>interface </FONT><FONT COLOR="#000000">"Hello::MyFoo_obj"</FONT></FONT> - </P> - <LI><P STYLE="MARGIN-BOTTOM: 0cm"><FONT COLOR="#000000"><FONT SIZE=3>Name implied IDL file, used by IDL compiler to generate ami4ccm - functionality:</FONT><br><FONT SIZE=2><FONT COLOR="#0000ff">#pragma</FONT></FONT> - <FONT COLOR="#000000"><FONT SIZE=2>ciao ami4ccm idl "Hello_MyFoo_objA.idl" </FONT></FONT> - </P> - </LI></UL></LI></UL> -<P STYLE="MARGIN-BOTTOM: 0cm; MARGIN-LEFT: 1cm"><FONT COLOR="#000000"><FONT SIZE=3>Also this -IDL contains the interface between Sender and Receiver</FONT></FONT></P> -<P STYLE="MARGIN-BOTTOM: 0cm; MARGIN-LEFT: 2cm"><FONT SIZE=2><FONT COLOR="#0000ff">interface</FONT><FONT COLOR="#000000"> -MyFoo_obj<BR></FONT></FONT><FONT SIZE=2>{<BR></FONT><FONT SIZE=2><FONT COLOR="#0000ff"> long</FONT><FONT COLOR="#000000"> foo (</FONT><FONT COLOR="#0000ff">in</FONT><FONT COLOR="#000000"> -</FONT><FONT COLOR="#0000ff">string</FONT><FONT COLOR="#000000"> in_str, </FONT><FONT COLOR="#0000ff">out</FONT><FONT COLOR="#000000"> -</FONT><FONT COLOR="#0000ff">string</FONT><FONT COLOR="#000000"> -answer)<BR></FONT></FONT><FONT SIZE=2><FONT color=#0000ff> </FONT>raises -(InternalError);</FONT></P> -<P STYLE="MARGIN-BOTTOM: 0cm; MARGIN-LEFT: 2cm"><FONT SIZE=2><FONT COLOR="#0000ff"> void</FONT><FONT COLOR="#000000"> hello (</FONT><FONT COLOR="#0000ff">out</FONT><FONT COLOR="#000000"> -</FONT><FONT COLOR="#0000ff">long</FONT><FONT COLOR="#000000"> answer)<BR></FONT></FONT><FONT SIZE=2><FONT color=#0000ff> </FONT>raises -(InternalError);</FONT><BR></P> -<P STYLE="MARGIN-BOTTOM: 0cm; MARGIN-LEFT: 2cm"><FONT SIZE=2><FONT COLOR="#000000"><FONT -color=#0000ff> </FONT>attribute </FONT><FONT COLOR="#0000ff">short</FONT><FONT COLOR="#000000"> rw_attrib<BR></FONT></FONT><FONT SIZE=2><FONT -color=#0000ff> </FONT>getraises (InternalError)<BR></FONT><FONT SIZE=2><FONT -color=#0000ff> </FONT>setraises -(InternalError);</FONT></P> -<P STYLE="MARGIN-BOTTOM: 0cm; MARGIN-LEFT: 2cm"><FONT SIZE=2><FONT COLOR="#0000ff"> readonly</FONT><FONT COLOR="#000000"> attribute </FONT><FONT COLOR="#0000ff">short</FONT><FONT COLOR="#000000"> -ro_attrib<BR></FONT></FONT><FONT SIZE=2><FONT color=#0000ff> </FONT>raises -(InternalError);<BR></FONT><FONT COLOR="#000000"><FONT SIZE=2>};</FONT></FONT><CODE CLASS="western"> </CODE></P> -<H2 CLASS="western">Component IDL files:</H2> -<H2 CLASS="western"><FONT SIZE=4 STYLE="FONT-SIZE: 16pt">Sender component IDL file</FONT></H2> + <UL> + <LI><CODE>#pragma ciao lem "Hello_MyFoo_objE.idl" </CODE></LI> + <LI><CODE>#pragma ciao lem "Hello_MyFoo_objAE.idl"</CODE></LI> + <LI>Pragma needed per interface for implying ami.<br> + <CODE>#pragma ciao ami4ccm interface "Hello::MyFoo_obj"</CODE></LI> + <LI>Name implied IDL file, used by IDL compiler to generate ami4ccm functionality:<br> + <CODE>#pragma ciao ami4ccm idl "Hello_MyFoo_objA.idl" </CODE></LI> + </UL> + </LI> +</UL> + +<P>Also this IDL contains the interface between Sender and Receiver</P> +<P STYLE="MARGIN-BOTTOM: 0cm; MARGIN-LEFT: 1cm"><CODE>interface MyFoo_obj<BR> +{<BR> + <font color="blue">long</font> foo (<font color="blue">in string </font>in_str, <font color="blue">out string</font> answer)<BR> + raises +(InternalError);<br> + <font color="blue">void </font>hello (<font color="blue">out long </font>answer)<BR> + raises (InternalError);<BR> + attribute <font color="blue">short</font> rw_attrib<BR> + getraises (InternalError)<BR> + setraises +(InternalError);</FONT><br> + readonly attribute <font color="blue">short</font> +ro_attrib<BR> raises (InternalError);<BR> +};</CODE></P> + +<H2>Component IDL files:</H2> +<H3><U>Sender component IDL file</U></H3> <P>The <A href="../Hello_asm/Sender_comp/src/Hello_Sender_comp.idl">Hello_Sender_comp.idl</A> file in the Sender_comp/src directory defines the asynchronous and -synchronous connections. <FONT COLOR="#000000"><FONT SIZE=3>For synchronous invocations, the Sender component uses the -MyFoo_obj interface (which the Receiver provides):<BR><br></FONT></FONT> -<FONT COLOR="#000000"><FONT SIZE=2>component -Sender<br>{<BR> </FONT></FONT><FONT COLOR="#008000"><FONT SIZE=2>// For synchronous -invocation</FONT></FONT> <BR> -<FONT COLOR="#000000"><FONT SIZE=2> uses MyFoo run_my_foo;<BR>}; -</FONT></FONT></P> +synchronous connections.<br> For synchronous invocations, the Sender component uses the +MyFoo_obj interface (which the Receiver provides):<BR><br> +<CODE>component Sender<br>{<BR> + <FONT COLOR="green">// For synchronous invocation</FONT><BR> + uses MyFoo run_my_foo;<BR>};</CODE> +</P> <P><FONT COLOR="#000000"><FONT SIZE=3>For asynchronous invocations, the Sender component uses the AMI_MyFoo_obj interface of the AMI component and provides the -AMI_MyFoo_objReplyHandler interface to the AMI component. This is indicated with the following pragma:<br><br> -</FONT></FONT><FONT COLOR="#000000"><FONT SIZE=2>#pragma ciao ami4ccm receptacle "Hello::Sender_comp::run_my_foo" -.</FONT></FONT></P> -<H2 CLASS="western"><FONT SIZE=4 STYLE="FONT-SIZE: 16pt">Receiver component IDL file</FONT></H2> +AMI_MyFoo_objReplyHandler interface to the AMI component.<br> This is indicated with the following pragma:<br><br> +<CODE>#pragma ciao ami4ccm receptacle "Hello::Sender_comp::run_my_foo" +.</CODE></P> + +<H3><U>Receiver component IDL file</U></H3> <P>The <A href="../Hello_asm/Receiver_comp/src/Hello_Receiver_comp.idl">Hello_Receiver_comp.idl</A> file in the Receiver_comp/src directory indicates the port the -receiver provide<FONT COLOR="#000000"><FONT SIZE=2>.</FONT></FONT></P> -<P STYLE="MARGIN-BOTTOM: 0cm"><FONT COLOR="#000000"><FONT SIZE=2>component -Receiver<BR></FONT></FONT><FONT COLOR="#000000"><FONT SIZE=2>{<BR></FONT></FONT><FONT COLOR="#008000"><FONT SIZE=2> // -Provides<BR></FONT></FONT><FONT COLOR="#000000"><FONT SIZE=2> provides MyFoo_obj -do_my_foo;<BR></FONT></FONT><FONT COLOR="#000000"><FONT SIZE=2>};</FONT></FONT></P> -<P STYLE="MARGIN-BOTTOM: 0cm"><CODE CLASS="western"> -<FONT COLOR="#000000"><FONT FACE="Times New Roman"><FONT SIZE=3>The receiver isn't aware of the calls are a- or -synchronously.</FONT></FONT></FONT></CODE></P> -<P><BR><BR></P> +receiver provide.</P> +<P> <CODE>component Receiver<BR> +{<BR> + <FONT color="green">//Provides<BR></FONT> + provides MyFoo_obj do_my_foo;<BR> +};</CODE><BR><br> +The receiver isn't aware of the calls are a- or synchronously.</P> + <TABLE WIDTH="100%" BORDER=0 CELLPADDING=2 CELLSPACING=2> - <TR> - <TD> - <P ALIGN=left><A href="01_general.html">Previous</A></P></TD> - <TD> - <P ALIGN=center><IMG border=0 name=graphics2 align=bottom src="images/images.png" width="4%" height="5%" ></P></TD> - <TD> - <P ALIGN=right><A href="03_executors.html">Next</A></P></TD></TR></TABLE> +<TR> + <TD ALIGN=left><A href="01_general.html">Previous</A></TD> + <TD ALIGN=center><IMG border=0 name=graphics2 align=bottom src="images/images.png" width="4%" height="5%" ></TD> + <TD ALIGN=right><A href="03_executors.html">Next</A></TD></TR></TABLE> <P><BR><BR></P> </BODY> </HTML> diff --git a/CIAO/connectors/ami4ccm/tutorials/Hello/Tutorial/03_executors.html b/CIAO/connectors/ami4ccm/tutorials/Hello/Tutorial/03_executors.html index 6cd9b4ecaf6..6d8854fca5f 100644 --- a/CIAO/connectors/ami4ccm/tutorials/Hello/Tutorial/03_executors.html +++ b/CIAO/connectors/ami4ccm/tutorials/Hello/Tutorial/03_executors.html @@ -1,41 +1,27 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<!--//$Id$ --> <HTML> <HEAD> <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252"> <TITLE>AMI4CCM Tutorial Hello - Executors</TITLE> - <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.2 (Win32)"> - <META NAME="CREATED" CONTENT="0;0"> - <META NAME="CHANGEDBY" CONTENT="Marijke Hengstmengel"> - <META NAME="CHANGED" CONTENT="20100625;14524300"> - <META NAME="CHANGEDBY" CONTENT="Marijke Hengstmengel"> - <!--//$Id$ --> - <STYLE TYPE="text/css"> - <!-- - H2.cjk { font-family: "SimSun" } - CODE.cjk { font-family: "NSimSun", monospace } - --> - </STYLE> </HEAD> -<BODY LANG="nl-NL" DIR="ltr"> +<BODY> <TABLE WIDTH="100%" BORDER=0 CELLPADDING=2 CELLSPACING=2 STYLE="PAGE-BREAK-BEFORE: always"> - <TR> - <TD> - <P ALIGN=left><A href="02_idl.html">Previous</A></P></TD> - <TD> - <P ALIGN=center><IMG border=0 name=graphics1 align=bottom src="images/images.png" width="4%" height="5%" ></P></TD> - <TD> - <P ALIGN=right><A href="04_ami4ccm.html">Next</A></P></TD></TR></TABLE> +<TR> + <TD ALIGN=left><A href="02_idl.html">Previous</A></TD> + <TD ALIGN=center><IMG border=0 name=graphics1 align=bottom src="images/images.png" width="4%" height="5%" ></TD> + <TD ALIGN=right><A href="04_ami4ccm.html">Next</A></TD></TR></TABLE> <HR> <H1>Executors</H1> <P>Once the IDL files are created, the business logic for the components should be implemented. Since components can be complex, we can use the IDL compiler to create empty executor files. This part of the tutorial explains how this can be done. </P> -<H2 CLASS="western">Sender</H2> +<H2>Sender</H2> <P>In a command shell windows, navigate to the Hello_asm/Sender_comp/src and invoke the TAO IDL compiler by running the following command: </P> -<P><CODE CLASS="western"><FONT SIZE=3>tao_idl +<P><CODE>tao_idl -I../../ports -I../../GeneratedCode -I%TAO_ROOT% -I%TAO_ROOT%/tao -I%CIAO_ROOT% -I%CIAO_ROOT%/ccm -I%CIAO_ROOT%/ciao -Gex Hello_Senmder_comp.idl</CODE></P> <FONT face="Times New Roman>An example of the generated code can be found <A href=" @@ -51,24 +37,17 @@ by running the following command: </P> <P><CODE class=western>tao_idl -I../../ports -I../../GeneratedCode -I%TAO_ROOT% -I%TAO_ROOT%/tao -I%CIAO_ROOT% -I%CIAO_ROOT%/ccm -I%CIAO_ROOT%/ciao -Gex Hello_Receiver_comp.idl.<BR></CODE></p> -<FONT face="Times New Roman">An example of the generated code can be found </FONT><A -href="Code/GeneratedExec/Hello_Receiver_comp_exec.cpp"><FONT -face="Times New Roman">here</FONT></A><FONT face="Times New Roman">. -An example of the implemented executor can be found -</FONT><A href="Code/ImplementedExec/Hello_Receiver_comp_exec.cpp"><FONT -face="Times New Roman">here</FONT></A><FONT face="Times New Roman"> -.<BR>Be aware that running this command, +An example of the generated code can be found<A href="Code/GeneratedExec/Hello_Receiver_comp_exec.cpp">here</A>. +An example of the implemented executor can be found <A href="Code/ImplementedExec/Hello_Receiver_comp_exec.cpp">here</A>.<BR> +Be aware that running this command, will overwrite the already implemented exec code in the Hello_asm/Receiver_comp directory. A copy of the implemented executor can be found <A href="Code/ImplementedExec/Hello_Receiver_comp_exec.cpp">here</A>.</FONT></P> <P><BR><BR></P><TABLE BORDER=0 CELLPADDING =2 CELLSPACING =2 width ="100%" > - <TR> - <TD> - <P ALIGN=left><A href="02_idl.html">Previous</A></P></TD> - <TD> - <P ALIGN=center><IMG border=0 name=graphics2 align=bottom src="images/images.png" width="4%" height="5%" ></P></TD> - <TD> - <P ALIGN=right><A href="04_ami4ccm.html">Next</A></P></TD></TR></TABLE> +<TR> + <TD ALIGN=left><A href="02_idl.html">Previous</A></TD> + <TD ALIGN=center><IMG border=0 name=graphics2 align=bottom src="images/images.png" width="4%" height="5%" ></TD> + <TD ALIGN=right><A href="04_ami4ccm.html">Next</A></TD></TR></TABLE> <P><BR><BR></P></FONT></CODE> </BODY> </HTML> diff --git a/CIAO/connectors/ami4ccm/tutorials/Hello/Tutorial/04_ami4ccm.html b/CIAO/connectors/ami4ccm/tutorials/Hello/Tutorial/04_ami4ccm.html index 83277fa4726..b6a7d3117fd 100644 --- a/CIAO/connectors/ami4ccm/tutorials/Hello/Tutorial/04_ami4ccm.html +++ b/CIAO/connectors/ami4ccm/tutorials/Hello/Tutorial/04_ami4ccm.html @@ -1,48 +1,38 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<!--//$Id$ --> <HTML> <HEAD> <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252"> <TITLE>AMICCM Tutorial Hello - Implementation exec</TITLE> - <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.2 (Win32)"> - <META NAME="CREATED" CONTENT="0;0"> - <META NAME="CHANGEDBY" CONTENT="Marijke Hengstmengel"> - <META NAME="CHANGED" CONTENT="20100625;14523700"> - <META NAME="CHANGEDBY" CONTENT="Marijke Hengstmengel"> - <!--//$Id$ --> - <STYLE TYPE="text/css"> - <!-- - H2.cjk { font-family: "SimSun" } - --> - </STYLE> </HEAD> -<BODY LANG="nl-NL" DIR="ltr"> +<BODY> <TABLE WIDTH="100%" BORDER=0 CELLPADDING=2 CELLSPACING=2 STYLE="PAGE-BREAK-BEFORE: always"> - <TR> - <TD> - <P ALIGN=left><A href="03_executors.html">Previous</A></P></TD> - <TD> - <P ALIGN=center><IMG border=0 name=graphics1 align=bottom src="images/images.png" width="4%" height="5%" ></P></TD> - <TD> - <P ALIGN=right><A href="05_compilation.html">Next</A></P></TD></TR></TABLE> + <TR> + <TD ALIGN=left><A href="03_executors.html">Previous</A></TD> + <TD ALIGN=center><IMG border=0 name=graphics1 align=bottom src="images/images.png" width="4%" height="5%" ></TD> + <TD ALIGN=right><A href="05_compilation.html">Next</A></TD> +</TR></TABLE> <HR> <H1>Implementation executors</H1> <H2 CLASS="western">AMI4CCM basics</H2> <UL> - <LI><P>The writer has basically only to write 3 idl files, first the + <LI><P>The writer has basically only to write 3 idl files, first the one that defines the common interface between the Sender and Receiver , second the interface for the Sender and third the interface for the Receiver. In this tutorial are that the IDL files Hello_MyFoo_obj.idl, Hello_Sender_comp.idl and the - Hello_Receiver_comp.idl . <BR>Naturally, it is possible that there are more IDL-files - to be used, as in this example the Hello_Common_defn.idl file for the common - definitions.</P> - <LI><P>The Receiver component ('server') has no idea which - component (AMI connector or Sender) uses his interface.</P> - <LI><P>The Connector, the AMI-Component, will be generated by - the IDL compiler by implying ami4ccm.idl</P> + Hello_Receiver_comp.idl.<BR> + Naturally, it is possible that there are more IDL-files + to be used, as in this example the Hello_Common_defn.idl file for the common + definitions.</P></LI> + <LI><P>The Receiver component ('server') has no idea which + component (AMI connector or Sender) uses his interface.</P></LI> + <LI><P>The Connector, the AMI-Component, will be generated by + the IDL compiler by implying ami4ccm.idl</P></LI> <LI><P>In the Sender executor the handling of the AMI callbacks and also the asynchronous and synchronous invocations must be - coded.</P></LI></UL> + coded.</P></LI> +</UL> <H2 CLASS="western">Example</H2> <P>The Sender component of this Hello tutorial invokes some asynchronous methods and some synchronous methods. For asynchronous invocations, @@ -54,83 +44,59 @@ the MyFoo_obj interface (which the Receiver provides).</P> <P STYLE="MARGIN-BOTTOM: 0cm">The receiver just implements the interface provided by the application programmer. The Receiver should have no idea which component (in this case Sender or AMI) uses his interface!</P> -<P STYLE="MARGIN-BOTTOM: 0cm"><BR></P> -<P STYLE="MARGIN-BOTTOM: 0cm"><FONT SIZE=4><B>Sender_comp_exec.cpp</B></FONT></P> -<P STYLE="MARGIN-BOTTOM: 0cm; FONT-WEIGHT: normal"><FONT SIZE=3>In de ccm_activate method, first retrieve the -receptacles:</FONT></P> -<P LANG="" STYLE="MARGIN-BOTTOM: 0cm; FONT-WEIGHT: normal"> -<FONT SIZE=3>Asynchronous:</FONT></P> -<P STYLE="MARGIN-BOTTOM: 0cm; MARGIN-LEFT: 1cm; MARGIN-RIGHT: 0px" dir=ltr> -<FONT SIZE=2><SPAN LANG=""><SPAN STYLE="FONT-WEIGHT: normal">::Hello::AMI4CCM_MyFoo_obj_var -asynch_foo</SPAN></SPAN></FONT><FONT SIZE=2><SPAN LANG=""><B> =</B></SPAN></FONT><FONT SIZE=2><SPAN LANG=""> </SPAN></FONT><FONT COLOR="#0000ff"><FONT SIZE=2><SPAN LANG="">this</SPAN></FONT></FONT><FONT COLOR="#000000"><FONT SIZE=2><SPAN LANG="">->context_->get_connection_sendc_run_my_foo();</SPAN></FONT></FONT></P> -<P STYLE="MARGIN-BOTTOM: 0cm"><FONT SIZE=3><FONT COLOR="#000000"><SPAN LANG="">Synchronous:</SPAN></FONT></FONT></P> -<P STYLE="MARGIN-BOTTOM: 0cm; MARGIN-LEFT: 1cm"><FONT COLOR="#000000"> -<FONT SIZE=2><SPAN LANG="">::Hello::MyFoo_obj_var synch_foo -=</SPAN></FONT></FONT><FONT SIZE=2><SPAN LANG=""> </SPAN></FONT><FONT COLOR="#0000ff"><FONT SIZE=2><SPAN LANG="">this</SPAN></FONT></FONT><FONT COLOR="#000000"><FONT SIZE=2><SPAN LANG="">->context_->get_connection_run_my_foo -();</SPAN></FONT></FONT></P> -<P STYLE="MARGIN-BOTTOM: 0cm"><BR></P> -<P STYLE="MARGIN-BOTTOM: 0cm"><FONT SIZE=3><FONT COLOR="#000000"><SPAN LANG="">After retrieving the receptacles, make the desired -asynchronus and synchronous invocations.</SPAN></FONT></FONT></P> -<P STYLE="MARGIN-BOTTOM: 0cm"><FONT SIZE=3><FONT COLOR="#000000"><SPAN LANG="">The asynchronous methods have the prefix sendc_. The first -argument is the Reply handler.</SPAN></FONT></FONT></P> -<P STYLE="MARGIN-BOTTOM: 0cm; MARGIN-LEFT: 1cm"><FONT COLOR="#000000"><FONT SIZE=2><SPAN LANG="">my_foo_ami_->sendc_foo -(</SPAN></FONT></FONT><FONT COLOR="#0000ff"><FONT SIZE=2><SPAN LANG="">new</SPAN></FONT></FONT><FONT COLOR="#000000"><FONT SIZE=2><SPAN LANG=""> MyFoo_obj_callback_exec_i (), </SPAN></FONT></FONT><FONT COLOR="#a31515"><FONT SIZE=2><SPAN LANG="">"Do something -asynchronous"</SPAN></FONT></FONT><FONT COLOR="#000000"><FONT SIZE=2><SPAN LANG="">);</SPAN></FONT></FONT></P> -<P STYLE="MARGIN-BOTTOM: 0cm"><FONT SIZE=3><FONT COLOR="#000000"><SPAN LANG="">The same synchronous method: </SPAN></FONT></FONT></P> -<P STYLE="MARGIN-BOTTOM: 0cm; MARGIN-LEFT: 1cm"><FONT COLOR="#000000"> -<FONT SIZE=2><SPAN LANG="">CORBA::Long result = my_foo_ami_->foo -(</SPAN></FONT></FONT><FONT COLOR="#a31515"><FONT SIZE=2><SPAN LANG="">"Do something -synchronous"</SPAN></FONT></FONT><FONT COLOR="#000000"><FONT SIZE=2><SPAN LANG="">, -out_str.out());</SPAN></FONT></FONT></P> -<P STYLE="MARGIN-BOTTOM: 0cm"><BR></P> -<P STYLE="MARGIN-BOTTOM: 0cm"><FONT SIZE=3><FONT COLOR="#000000"><SPAN LANG="">For the asynchronus methods the implied Reply Handler -interface for each method must be coded.</SPAN></FONT></FONT></P> -<P STYLE="MARGIN-BOTTOM: 0cm"><FONT SIZE=3><FONT COLOR="#000000"><SPAN LANG="">Example foo callback:</SPAN></FONT></FONT></P> -<P LANG="" STYLE="MARGIN-BOTTOM: 0cm"><FONT COLOR="#0000ff"><FONT SIZE=2>void<BR></FONT></FONT><FONT COLOR="#000000"> -<SPAN LANG=""><FONT SIZE=2>MyFoo_obj_callback_exec_i::foo (::CORBA::Long -ami_return_val,</FONT></FONT></SPAN><FONT COLOR="#000000"><FONT SIZE=2><SPAN LANG=""> </SPAN></FONT></FONT><FONT COLOR="#0000ff"><FONT SIZE=2><SPAN LANG="">const</SPAN></FONT></FONT><FONT COLOR="#000000"><FONT SIZE=2><SPAN LANG=""> </SPAN></FONT></FONT><FONT COLOR="#0000ff"><FONT SIZE=2><SPAN LANG="">char</SPAN></FONT></FONT><FONT COLOR="#000000"><FONT SIZE=2><SPAN LANG=""> * answer)<BR></SPAN></FONT></FONT><FONT COLOR="#000000"> <FONT SIZE=2>{<BR></FONT></FONT><FONT COLOR="#008000"><FONT SIZE=2><SPAN LANG=""><FONT color=#0000ff> </FONT>/* -Your code here. */<BR></SPAN></FONT></FONT><FONT COLOR="#000000"> -<FONT SIZE=2><FONT -color=#0000ff> </FONT>ACE_DEBUG -((LM_DEBUG,<BR></FONT></FONT><FONT COLOR="#000000"> - <FONT SIZE=2><SPAN LANG=""><FONT -color=#0000ff> </FONT>ACE_TEXT(</SPAN></FONT></FONT><FONT COLOR="#a31515"><FONT SIZE=2><SPAN LANG="">"Sender:\tMyFoo AMI Callback from -foo:"</SPAN></FONT></FONT><FONT COLOR="#000000"><FONT SIZE=2><SPAN LANG="">)<BR></SPAN></FONT></FONT><FONT COLOR="#000000"> - <FONT SIZE=2><SPAN LANG=""><FONT -color=#0000ff> </FONT>ACE_TEXT(</SPAN></FONT></FONT><FONT COLOR="#a31515"><FONT SIZE=2><SPAN LANG="">"result <%u> answer -<%C>\n"</SPAN></FONT></FONT><FONT COLOR="#000000"><FONT SIZE=2><SPAN LANG="">),<BR></SPAN></FONT></FONT><FONT COLOR="#000000"> - <FONT SIZE=2><FONT -color=#0000ff> </FONT>ami_return_val, -answer));<BR></FONT></FONT><FONT COLOR="#000000"> <FONT SIZE=2>}</FONT></FONT></P> -<P LANG="" STYLE="MARGIN-BOTTOM: 0cm"><FONT COLOR="#0000ff"><FONT SIZE=2><SPAN LANG="">void<BR></SPAN></FONT></FONT><FONT COLOR="#000000"> -<FONT SIZE=2>MyFoo_obj_callback_exec_i::foo_excep ( -::CCM_AMI::ExceptionHolder * excep_holder)<BR></FONT></FONT><FONT COLOR="#000000"> <FONT SIZE=2>{<BR></FONT></FONT><FONT COLOR="#008000"><FONT SIZE=2><SPAN LANG=""><FONT -color=#0000ff> </FONT>/* Your code here. -*/<BR></SPAN></FONT></FONT><FONT COLOR="#000000"> <FONT SIZE=2><SPAN LANG="">}</SPAN></FONT></FONT></P> -<P STYLE="MARGIN-BOTTOM: 0cm"><FONT SIZE=4><B>Receiver_comp_exec.cpp</B></FONT></P> -<P STYLE="MARGIN-BOTTOM: 0cm; FONT-WEIGHT: normal"><FONT SIZE=4 STYLE="FONT-SIZE: 16pt">I<FONT SIZE=3>n this file the interface methods must be -programmed.</FONT></FONT></P> -<P STYLE="MARGIN-BOTTOM: 0cm; FONT-WEIGHT: normal"><FONT SIZE=3>Example foo method:</FONT></P> -<P STYLE="MARGIN-BOTTOM: 0cm"> <FONT SIZE=2><SPAN STYLE="FONT-WEIGHT: normal"><SPAN LANG="">::CORBA::Long -</SPAN></SPAN></FONT><FONT SIZE=2><SPAN LANG=""> -MyFoo_obj_exec_i::foo (</SPAN></FONT><FONT COLOR="#0000ff"><FONT SIZE=2><SPAN LANG="">const</SPAN></FONT></FONT><FONT COLOR="#000000"><FONT SIZE=2><SPAN LANG=""> </SPAN></FONT></FONT><FONT COLOR="#0000ff"><FONT SIZE=2><SPAN LANG="">char</SPAN></FONT></FONT><FONT COLOR="#000000"><FONT SIZE=2><SPAN LANG=""> * in_str, ::CORBA::String_out -answer)<BR></SPAN></FONT></FONT><FONT COLOR="#000000"> <FONT SIZE=2>{<BR></FONT></FONT><FONT COLOR="#008000"><FONT SIZE=2><SPAN LANG=""><FONT color=#0000ff> </FONT>/* Your code -here. */<BR></SPAN></FONT></FONT><FONT COLOR="#000000"> - <FONT SIZE=2><SPAN LANG=""><FONT -color=#0000ff> </FONT>answer = CORBA::string_dup -(</SPAN></FONT></FONT><FONT COLOR="#a31515"><FONT SIZE=2><SPAN LANG="">"This is my answer : -Hi"</SPAN></FONT></FONT><FONT COLOR="#000000"><FONT SIZE=2><SPAN LANG="">);<BR></SPAN></FONT></FONT><FONT COLOR="#0000ff"><FONT SIZE=2><SPAN LANG=""> return</SPAN></FONT></FONT><FONT COLOR="#000000"><FONT SIZE=2><SPAN LANG=""> ACE_OS::rand () % -100;<BR></SPAN></FONT></FONT><FONT COLOR="#000000"> -<FONT SIZE=2><SPAN LANG="">}</SPAN></FONT></FONT></P> -<P STYLE="MARGIN-BOTTOM: 0cm"><BR></P> +<p><B><u>Sender_comp_exec.cpp</u></B><br><br> +In de ccm_activate method, first retrieve the +receptacles:<br> +Asynchronous:<br><CODE>::Hello::AMI4CCM_MyFoo_obj_var asynch_foo<B> =</B><FONT COLOR="#0000ff">this</FONT>->context_-> +get_connection_sendc_run_my_foo();</CODE><br> +Synchronous:<br> +<CODE>::Hello::MyFoo_obj_var synch_foo = <FONT COLOR="#0000ff">this</FONT>->context_->get_connection_run_my_foo ();</CODE> +</P> +<P>After retrieving the receptacles, make the desired +asynchronus and synchronous invocations.<br> +The asynchronous methods have the prefix sendc_. The first +argument is the Reply handler.<br> +<CODE>my_foo_ami_->sendc_foo (<FONT COLOR="blue">new</FONT> MyFoo_obj_callback_exec_i (), <FONT COLOR="red">"Do something +asynchronous"</FONT>);</CODE><br> +The same synchronous method:<br> +<CODE>CORBA::Long result = my_foo_ami_->foo(<FONT COLOR="red">"Do something synchronous"</FONT>, out_str.out());</P> + +<P>For the asynchronus methods the implied Reply Handler +interface for each method must be coded.</P> +<P>Example foo callback:<br> +<CODE><FONT COLOR="#0000ff">void<BR></FONT> +MyFoo_obj_callback_exec_i::foo (::CORBA::Long +ami_return_val, <FONT COLOR="blue">const char</FONT> * answer)<BR> +{<BR> +<FONT COLOR="green"> /*Your code here. */<BR></FONT> +</FONT><FONT COLOR="#000000"> + ACE_DEBUG +((LM_DEBUG,<BR> + ACE_TEXT(<FONT COLOR="red">"Sender:\tMyFoo AMI Callback from +foo:"</FONT>);<BR> ACE_TEXT(<FONT COLOR="red">"result <%u> answer +<%C>\n"</FONT>),<BR> ami_return_val,answer));<BR> +}<br><br> +<FONT COLOR="blue">void<BR></FONT> +MyFoo_obj_callback_exec_i::foo_excep (::CCM_AMI::ExceptionHolder * excep_holder)<BR> +{<BR> +<FONT COLOR="green"> /* Your code here. */</FONT><BR> +}</CODE></P> + +<P><B><u>Receiver_comp_exec.cpp</u></B></P> +<P> In this file the interface methods must be programmed.<br><br> +Example foo method:<br> +<CODE>::CORBA::Long MyFoo_obj_exec_i::foo (<FONT COLOR="#0000ff">const char</FONT> * in_str, ::CORBA::String_out answer)<BR> +{<BR> <FONT color="green">/* Your code here. */</FONT><BR> + answer = CORBA::string_dup (<FONT COLOR="red">"This is my answer : Hi"</FONT>);<BR> + return ACE_OS::rand () % 100;<BR> +}</CODE> +</P> + <TABLE WIDTH="100%" BORDER=0 CELLPADDING=2 CELLSPACING=2> - <TR> - <TD> - <P ALIGN=left><A href="03_executors.html">Previous</A></P></TD> - <TD> - <P ALIGN=center><IMG border=0 name=graphics2 align=bottom src="images/images.png" width="4%" height="5%" ></P></TD> - <TD> - <P ALIGN=right><A href="05_compilation.html">Next</A></P></TD></TR></TABLE> +<TR> + <TD ALIGN=left><A href="03_executors.html">Previous</A></TD> + <TD ALIGN=center><IMG border=0 name=graphics2 align=bottom src="images/images.png" width="4%" height="5%" ></TD> + <TD ALIGN=right><A href="05_compilation.html">Next</A></TD></TR></TABLE> <P><BR><BR></P> </BODY> </HTML> diff --git a/CIAO/connectors/ami4ccm/tutorials/Hello/Tutorial/05_compilation.html b/CIAO/connectors/ami4ccm/tutorials/Hello/Tutorial/05_compilation.html index 24148490fb0..9c444ec2da3 100644 --- a/CIAO/connectors/ami4ccm/tutorials/Hello/Tutorial/05_compilation.html +++ b/CIAO/connectors/ami4ccm/tutorials/Hello/Tutorial/05_compilation.html @@ -1,73 +1,51 @@ +<!--//$Id$ --> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252"> <TITLE>AMI4CCM Tutorial Hello - Compilation and deployment</TITLE> - <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.2 (Win32)"> - <META NAME="CREATED" CONTENT="0;0"> - <META NAME="CHANGEDBY" CONTENT="Marijke Hengstmengel"> - <META NAME="CHANGED" CONTENT="20100625;14580400"> - <META NAME="CHANGEDBY" CONTENT="Marijke Hengstmengel"> - <META NAME="CHANGEDBY" CONTENT="Marijke Hengstmengel"> - <META NAME="CHANGEDBY" CONTENT="Marijke Hengstmengel"> - <!--//$Id$ --> - <STYLE TYPE="text/css"> - <!-- - H2.cjk { font-family: "SimSun" } - H3.cjk { font-family: "SimSun" } - H4.cjk { font-family: "SimSun" } - CODE.cjk { font-family: "NSimSun", monospace } - --> - </STYLE> </HEAD> -<BODY LANG="nl-NL" DIR="ltr"> -<TABLE WIDTH="100%" BORDER=0 CELLPADDING=2 CELLSPACING=2 STYLE="PAGE-BREAK-BEFORE: always"> - <TR> - <TD> - <P ALIGN=left><A href="04_ami4ccm.html">Previous</A></P></TD> - <TD> - <P ALIGN=center><IMG border=0 name=graphics1 align=bottom src="images/images.png" width="4%" height="5%" ></P></TD> - <TD></TD></TR></TABLE> -<HR> -<H1>Compilation and deployment</H1> -<H2 CLASS="western" STYLE="PAGE-BREAK-AFTER: avoid">Compilation</H2> -<P STYLE="MARGIN-BOTTOM: 0cm">Once all the code has been -written, compilation of the code would be the next step. MPC is used in order to -create the Makefiles and projects files. All MPC files that are needed for this -tutorial are in the same directory as the accompanying IDL or executor files. In -order to make the GNU make files or the Visual Studio project files, the -following steps should be performed : </P> -<UL> - <UL> - <LI><P STYLE="MARGIN-BOTTOM: 0cm"><FONT SIZE=3>Start a command shell and navigate to : </FONT><CODE CLASS="western"><FONT SIZE=3>%CIAO_ROOT%/connectors/ami4ccm/tutorials/Hello/Hello_asm</FONT></CODE> - </P> - <LI><P STYLE="MARGIN-BOTTOM: 0cm">Run </P> - <LI><P STYLE="MARGIN-BOTTOM: 0cm"><CODE CLASS="western"><FONT SIZE=3>perl - %ACE_ROOT%/bin/mwc.pl -type vc9</FONT></CODE> <FONT SIZE=3>to create Visual Studio 2008 project files. </FONT></P> - <LI><P STYLE="MARGIN-BOTTOM: 0cm"><CODE CLASS="western"><FONT SIZE=3>perl - %ACE_ROOT%/bin/mwc.pl -type gnuace</FONT></CODE> <FONT SIZE=3>to create the GNU make files. </FONT></P> - <LI><P STYLE="MARGIN-BOTTOM: 0cm">Now compile the code like - you're used to. </P></LI></UL></UL> -<P STYLE="MARGIN-BOTTOM: 0cm">If all went well, all -libraries are in the Hello_asm/lib directory. </P> -<H2 CLASS="western" STYLE="PAGE-BREAK-AFTER: avoid">Deployment</H2> -<P STYLE="MARGIN-BOTTOM: 0cm">Once all binaries are -compiled, they're ready to be deployed. In this tutorial we are using DAnCE to +<BODY> + <TABLE WIDTH="100%" BORDER=0 CELLPADDING=2 CELLSPACING=2 STYLE="PAGE-BREAK-BEFORE: always"> + <TR> + <TD ALIGN=left><A href="04_ami4ccm.html">Previous</A></TD> + <TD ALIGN=center><IMG border=0 align=bottom src="images/images.png" width="4%" height="5%" ></TD> + <TD></TD> + </TR> + </TABLE> + <HR> + <H1>Compilation and deployment</H1> + <H2 STYLE="PAGE-BREAK-AFTER: avoid">Compilation</H2> + <P>Once all the code has been + written, compilation of the code would be the next step.<br>MPC is used in order to + create the Makefiles and projects files. All MPC files that are needed for this + tutorial are in the same directory as the accompanying IDL or executor files.<br>In + order to make the GNU make files or the Visual Studio project files, the + following steps should be performed : + <UL> + <LI>Start a command shell and navigate to :<br> <CODE>%CIAO_ROOT%/connectors/ami4ccm/tutorials/Hello/Hello_asm</CODE> + <LI>Run<br> + <ul> + <LI><CODE>perl %ACE_ROOT%/bin/mwc.pl -type vc9</CODE> to create Visual Studio 2008 project files.</LI> + <LI><CODE>perl %ACE_ROOT%/bin/mwc.pl -type gnuace</CODE> to create the GNU make files.</LI> + </ul> + <LI>Now compile the code like you're used to.</li> + </UL> + <P>If all went well, all libraries are in the Hello_asm/lib directory.</P> + + <H2>Deployment</H2> + <P>Once all binaries are compiled, they're ready to be deployed.<br> In this tutorial we are using DAnCE to deploy our system. DAnCE starts a system in two phases : </P> -<OL> - <OL> - <LI><P STYLE="MARGIN-BOTTOM: 0cm">configuration_complete - </P> - <LI><P STYLE="MARGIN-BOTTOM: 0cm">ccm_activate -</P></LI></OL></OL> -<P STYLE="MARGIN-BOTTOM: 0cm">DAnCE shuts down a system -again in two phases : </P> -<OL> - <OL> - <LI><P STYLE="MARGIN-BOTTOM: 0cm">passivate </P> - <LI><P STYLE="MARGIN-BOTTOM: 0cm">ccm_remove -</P></LI></OL></OL> -<P STYLE="MARGIN-BOTTOM: 0cm">Each component should have + <OL> + <LI>configuration_complete</li> + <LI>ccm_activate </LI> + </OL> + DAnCE shuts down a system again in two phases : + <OL> + <LI>passivate</LI> + <LI>ccm_remove</LI> + </OL> + <P>Each component should have these four methods implemented. The business logic implemented in each step depends on you implementation. There're several processes taking care of the total deployment process. See the DAnCE documentation for more information about @@ -76,30 +54,31 @@ and shutdown a system with the aid of a deployment plan. A deployment plan describes which artifacts must run on which nodes and which components are connected to eachother via which interface (more on this later). All connections between components are made before 'configuration_complete' is called. </P> -<P STYLE="MARGIN-BOTTOM: 0cm"><BR></P> -<P STYLE="MARGIN-BOTTOM: 0cm">The deployment plan will be +<P>The deployment plan will be generated by the modelling tools but we take a brief look at the most important items of a deployment plan. A deployment plan is a XML based file which is devided into the following (main) sections: </P> -<UL> - <UL> - <LI><P STYLE="MARGIN-BOTTOM: 0cm">Implementations </P> - <LI><P STYLE="MARGIN-BOTTOM: 0cm">Entry points </P> - <LI><P STYLE="MARGIN-BOTTOM: 0cm">Instances </P> - <LI><P STYLE="MARGIN-BOTTOM: 0cm">Connections </P> - <LI><P STYLE="MARGIN-BOTTOM: 0cm">Artifacts </P></LI></UL></UL> -<P STYLE="MARGIN-BOTTOM: 0cm"><I><B>All deployment code fragments mentioned in the rest of this -tutorial are *NO* exports of any modelling tool.</B> </I></P> -<H3 CLASS="western" STYLE="PAGE-BREAK-AFTER: avoid">Implementations and Entry Points</H3> -<P STYLE="MARGIN-BOTTOM: 0cm">This defines which executor and servant + <UL> + <LI>Implementations</LI> + <LI>Entry points </LI> + <LI>Instances </LI> + <LI>Connections </LI> + <LI>Artifacts</LI> + </UL> +<P ><I><B>All deployment code fragments mentioned in the rest of this +tutorial are *NO* exports of any modelling tool.</B></I></P> + +<H3 STYLE="PAGE-BREAK-AFTER: avoid">Implementations and Entry Points</H3> +<P>This defines which executor and servant artifacts (binaries) should be used. Implementations also defines which entry points in the binaries should be used. In this example there are neeede 3 implementation sections, for the Sender Receiver and AMI connector. <A href="Code/Deployment/descriptors/implementation.cdp">This</A> file shows the implementation section of the AMI connector. Beware that artifacts and entry points are exact otherwise deployment will fail.</P> -<H3 CLASS="western" STYLE="PAGE-BREAK-AFTER: avoid">Instances</H3> -<P STYLE="MARGIN-BOTTOM: 0cm">Instances define which artifacts run on + +<H3STYLE="PAGE-BREAK-AFTER: avoid">Instances</H3> +<P>Instances define which artifacts run on which node. Every fysical artifact in the system results in one instance. The <node> section refers to the fysical node on which this instance will be deployed. An instance always refers to an @@ -107,116 +86,129 @@ implementation. It's possible that more than one instance refers to the same implementation. The instance section also provide the initial values of all attributes defined on the component. <A href="Code/Deployment/descriptors/instance.cdp">This</A> file shows the instance section of the Sender, Receiver and AMI -connector. <U><B>The instance of the AMI connector +connector.<U><B>The instance of the AMI connector uses the same node as the Sender! </B></U></P> -<H3 CLASS="western" STYLE="PAGE-BREAK-AFTER: avoid">Connections</H3> -<P STYLE="MARGIN-BOTTOM: 0cm">A connection section defines + +<H3 STYLE="PAGE-BREAK-AFTER: avoid">Connections</H3> +<P>A connection section defines which components are connected together. The connection is 'local' since a connector and a component are always running in the same process. Now that we have got all the data we need to know to make a connection for the asynchronous methods between the Sender and AMI connector (1) and between the AMI connector and the receiver (2). For the synchronous methods we need a connection between the Sender and the receiver. (3)</P> -<H4 CLASS="western">(1) </H4> -<P STYLE="MARGIN-BOTTOM: 0cm"><FONT SIZE=2><connection><FONT >//unique name -of the connection</FONT> <BR> <name>run_asynch_foo_connection</name><BR></FONT><FONT SIZE=2> <deployRequirement><BR> <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name><BR> <resourceType>Local_Interface</resourceType><BR> </deployRequirement><BR></FONT> -<FONT SIZE=2> <internalEndpoint><FONT COLOR="#008000">//First endpoint -(the Sender component)<BR></FONT><FONT SIZE=2><FONT COLOR="#008000">// PortName is defined as “sendc_” + name of -port defined in Hello_Sender_comp.idl</FONT> <BR></FONT><FONT SIZE=2> <portName>sendc_run_my_foo</portName><BR></FONT><FONT SIZE=2> <provider>false</provider><BR></FONT><FONT SIZE=2> <kind>SimplexReceptacle</kind><BR></FONT><FONT SIZE=2><FONT > </FONT><instance -xmi:idref="Hello.ComponentImplementations.HelloImplementation.Hello.Sender" -/> <FONT COLOR="#008000">//The reference to the sender -instance. <BR></FONT><FONT SIZE=2> </internalEndpoint><BR></FONT> -<FONT SIZE=2><FONT > <</FONT>internalEndpoint><FONT COLOR="#008000">//Second -endpoint (the AMI connector component);<BR></FONT><FONT SIZE=2><FONT > </FONT><portName>ami4ccm_port_ami4ccm_provides</portName> -<FONT COLOR="#008000">//PortName alsways the same <BR></FONT><FONT SIZE=2> <provider>true</provider><BR></FONT><FONT SIZE=2> <kind>Facet</kind><BR></FONT><FONT SIZE=2><FONT COLOR="#008000"><FONT -color=#000000> </FONT></FONT><instance -xmi:idref="Hello.ComponentImplementations.HelloImplementation.Hello.AMI" -/> <FONT color=#008000>//The reference to the connector -instance< -/FONT> -<BR></FONT><FONT SIZE=2> </internalEndpoint><BR></FONT><FONT SIZE=2></connection></FONT></P> -<H4 CLASS="western">(2) </H4> -<P STYLE="MARGIN-BOTTOM: 0cm"><FONT SIZE=2><connection><BR></FONT><FONT SIZE=2> <name>do_foo_connection</name><FONT -color=#008000>//unique name of the connection</FONT><BR></FONT><FONT SIZE=2> <internalEndpoint><FONT -color=#008000>//First endpoint (the Receiver component)</FONT><BR></FONT><FONT SIZE=2> <portName>do_my_foo</portName><FONT -color=#008000>// PortName is defined as name of port -defined in Hello_Receiver_comp.idl</FONT> - <BR></FONT><FONT SIZE=2> <provider>true</provider><BR> <kind>Facet</kind><BR></FONT><FONT SIZE=2> <instance -xmi:idref="Hello.ComponentImplementations.HelloImplementation.Hello.Receiver" -/><BR></FONT><FONT SIZE=2> </internalEndpoint><BR></FONT><FONT SIZE=2> <internalEndpoint><FONT -color=#008000>//Second endpoint (the AMI component)</FONT><BR></FONT><FONT SIZE=2> <portName>ami4ccm_port_ami4ccm_uses</portName><FONT -color=#008000>// PortName alsways the same </FONT><BR></FONT><FONT SIZE=2> <provider>false</provider><BR></FONT><FONT SIZE=2> <kind>SimplexReceptacle</kind><BR></FONT><FONT SIZE=2> <instance -xmi:idref="Hello.ComponentImplementations.HelloImplementation.Hello.AMI" -/><BR></FONT><FONT SIZE=2> </internalEndpoint><BR></connection></FONT></P> -<P STYLE="MARGIN-BOTTOM: 0cm"><STRONG>(3)</STRONG></P> -<P STYLE="MARGIN-BOTTOM: 0cm"><FONT SIZE=2><connection><BR></FONT><FONT SIZE=2> <name>synch_foo_connection</name><BR></FONT><FONT SIZE=2> <internalEndpoint><BR></FONT><FONT SIZE=2> <portName>do_my_foo</portName> -<FONT color=#008000>// PortName is defined as name of port -defined in Hello_Receiver_comp.idl</FONT> -<BR></FONT><FONT SIZE=2> <provider>true</provider> -<FONT color=#008000>// The receiver provides this -port</FONT> <BR></FONT><FONT SIZE=2> <kind>Facet</kind><BR></FONT><FONT SIZE=2> <instance -xmi:idref="Hello.ComponentImplementations.HelloImplementation.Hello.Receiver" -/><BR></FONT><FONT SIZE=2> </internalEndpoint><BR> </FONT><FONT SIZE=2><internalEndpoint><BR></FONT><FONT SIZE=2> <portName>run_my_foo</portName> -<FONT color=#008000>// PortName is defined as name of port -defined in Hello_Sender_comp.idl</FONT><BR></FONT><FONT SIZE=2> <provider>false</provider> -<FONT color=#008000>// The sender uses this port</FONT> - <BR></FONT><FONT SIZE=2> <kind>SimplexReceptacle</kind><BR></FONT><FONT SIZE=2> <instance -xmi:idref="Hello.ComponentImplementations.HelloImplementation.Hello.Sender" -/><BR></FONT><FONT SIZE=2> </internalEndpoint><BR></connection></FONT></P> -<P STYLE="MARGIN-BOTTOM: 0cm"><BR></P> -<P STYLE="MARGIN-BOTTOM: 0cm"><FONT size=3>Take a look at </FONT> <A href="Code/Deployment/descriptors/connections.cdp"><FONT -size=3>this</FONT></A><FONT size=3> file to + +<H4>(1) </H4> +<P><connection><br> +<font color="grey">//unique name of the connection</FONT><BR> + <name>run_asynch_foo_connection</name><BR> + <deployRequirement><BR> + <name>edu.dre.vanderbilt.DAnCE.ConnectionType</name><BR> + <resourceType>Local_Interface</resourceType><BR> + </deployRequirement><BR> + <internalEndpoint><FONT COLOR="grey">//First endpoint (the Sender component)</FONT><br> +<FONT COLOR="grey">// PortName is defined as “sendc_” + name of port defined in Hello_Sender_comp.idl</FONT><BR> + <portName>sendc_run_my_foo</portName><BR> + <provider>false</provider><BR> + <kind>SimplexReceptacle</kind><BR> + <instance xmi:idref="Hello.ComponentImplementations.HelloImplementation.Hello.Sender" +/> <FONT COLOR="grey">//The reference to the sender instance.</FONT><BR> + </internalEndpoint><BR> + <internalEndpoint><FONT COLOR="grey">//Second endpoint (the AMI connector component);<BR></FONT> + </FONT><portName>ami4ccm_port_ami4ccm_provides</portName> +<FONT COLOR="grey">//PortName alsways the same <BR></FONT> + <provider>true</provider><BR> + <kind>Facet</kind><BR> + <instance xmi:idref="Hello.ComponentImplementations.HelloImplementation.Hello.AMI" +/> <FONT color="grey">//The reference to the connector instance<BR></FONT> + </internalEndpoint><BR> +</connection> +</P> + +<H4>(2) </H4> +<P><connection><BR> + <name>do_foo_connection</name><font color="grey">//unique name of the connection</FONT><BR> + <internalEndpoint><FONT color="grey">//First endpoint (the Receiver component)</FONT><BR> + <portName>do_my_foo</portName><FONT color="grey>// PortName is defined as name of port +defined in Hello_Receiver_comp.idl</FONT><BR> + <provider>true</provider><BR> + <kind>Facet</kind><BR> + <instance xmi:idref="Hello.ComponentImplementations.HelloImplementation.Hello.Receiver" /><BR> + </internalEndpoint><BR> + <internalEndpoint><FONT color="grey">//Second endpoint (the AMI component)</FONT><BR> + <portName>ami4ccm_port_ami4ccm_uses</portName><FONT color="grey">// PortName alsways the same </FONT><BR> + <provider>false</provider><BR> + <kind>SimplexReceptacle</kind><BR> + <instance xmi:idref="Hello.ComponentImplementations.HelloImplementation.Hello.AMI" /><BR> + </internalEndpoint><BR> +</connection> +</P> + +<H4>(3)</H4> +<P><connection><BR> + <name>synch_foo_connection</name><BR> + <internalEndpoint><BR> + <portName>do_my_foo</portName><FONT color="grey">// PortName is defined as name of port +defined in Hello_Receiver_comp.idl</FONT><BR> + <provider>true</provider><FONT color=""grey">// The receiver provides this port</FONT><BR> + <kind>Facet</kind><BR> + <instance xmi:idref="Hello.ComponentImplementations.HelloImplementation.Hello.Receiver" /><BR> + </internalEndpoint><BR> + <internalEndpoint><BR> + <portName>run_my_foo</portName><FONT color="grey">// PortName is defined as name of port +defined in Hello_Sender_comp.idl</FONT><BR> + <provider>false</provider><FONT color="grey">// The sender uses this port</FONT><BR> + <kind>SimplexReceptacle</kind><BR> + <instance xmi:idref="Hello.ComponentImplementations.HelloImplementation.Hello.Sender" /><BR> + </internalEndpoint><BR> +</connection> +</P> + +<P>Take a look at <A href="Code/Deployment/descriptors/connections.cdp">this</A> file to see which connection should be made by DAnCE in order to run the Hello tutorial -properly. </FONT></P> -<P STYLE="MARGIN-BOTTOM: 0cm"><FONT size=3>When the deployment tools (in this case DAnCE) deploys this +properly.</P> + +<P>When the deployment tools (in this case DAnCE) deploys this system, it'll connect all defined connectors before the system is started (i.e. -before configuration_complete is called on a component). </FONT></P> -<H3 CLASS="western">Coding connections</H3> -<P STYLE="MARGIN-BOTTOM: 0cm"><FONT size=3>Every component has got a context. The context is set by +before configuration_complete is called on a component).</P> + +<H3 >Coding connections</H3> +<P>Every component has got a context. The context is set by DAnCE and is the 'gateway' to all other component your component is connected to. The context caches all these connections so that the user doesn't need to -cache those in his/her component. </FONT></P> -<P STYLE="MARGIN-BOTTOM: 0cm"><FONT size=3><SPAN STYLE="TEXT-DECORATION: none"><B>Sender: </B></SPAN>The following code retrieves the -connection to the AMI connector interface from the context: </FONT></P> -<P STYLE="MARGIN-BOTTOM: 0cm"><FONT SIZE=2>::Hello::AMI4CCM_MyFoo_obj_var asynch_foo = </FONT><FONT COLOR="#0000ff"><FONT SIZE=2>this</FONT></FONT><FONT COLOR="#000000"><FONT SIZE=2>->context_->get_connection_sendc_run_my_foo();</FONT></FONT></P> -<P STYLE="MARGIN-BOTTOM: 0cm"><FONT -size=3>The following code retrieves the connection to the Receiver -interface from the context:</FONT></P> -<P STYLE="MARGIN-BOTTOM: 0cm"><FONT COLOR="#000000"><FONT SIZE=2>::Hello::MyFoo_obj_var -synch_foo = </FONT></FONT><FONT COLOR="#0000ff"><FONT SIZE=2>this</FONT></FONT><FONT COLOR="#000000"><FONT SIZE=2>->context_->get_connection_run_my_foo -();</FONT></FONT></P> -<P STYLE="MARGIN-BOTTOM: 0cm"><FONT size=3><SPAN STYLE="TEXT-DECORATION: none"><B>Receiver: </B></SPAN>The Receiver provide one facet for the -AMI connector and for the sender. </FONT></P> -<P STYLE="MARGIN-BOTTOM: 0cm"><CODE CLASS="western"><FONT SIZE=2 face="Times New Roman">::Hello::CCM_MyFoo_obj_ptr<BR></FONT></CODE> -<FONT SIZE=2>Receiver_exec_i::get_do_my_foo (</FONT><FONT COLOR="#0000ff"><FONT SIZE=2>void</FONT></FONT> -<FONT COLOR="#000000"><FONT SIZE=2>)<BR></FONT></FONT><FONT COLOR="#000000"><FONT SIZE=2>{<BR></FONT></FONT> -<FONT COLOR="#0000ff"><FONT SIZE=2> return</FONT></FONT> -<FONT COLOR="#000000"></FONT><FONT COLOR="#0000ff"> -<FONT SIZE=2>new</FONT></FONT><FONT COLOR="#000000"> </FONT> -<FONT COLOR="#000000"><FONT SIZE=2>MyFoo_exec_i ();<BR></FONT></FONT> -<FONT COLOR="#000000"><FONT SIZE=2>}</FONT></FONT></P> -<H3 CLASS="western" STYLE="PAGE-BREAK-AFTER: avoid"><CODE CLASS="western"><FONT -face="Times New Roman">Artifacts</FONT></CODE></H3> -<P STYLE="MARGIN-BOTTOM: 0cm"><CODE CLASS="western"><FONT > <FONT size=3 -face="Times New Roman">Artifacts sections contains the -names of the binaries. See </FONT> - <A href="Code/Deployment/descriptors/artifacts.cdp"><FONT size=3 -face="Times New Roman">this</FONT></A><FONT size=3 face="Times New Roman"> files for an overview of all -artifacts in the Hello tutorial. </FONT></FONT></CODE></P> -<H3 CLASS="western" STYLE="PAGE-BREAK-AFTER: avoid"><CODE CLASS="western"><FONT face="Times New Roman">Complete plan</FONT></CODE></H3> -<P STYLE="MARGIN-BOTTOM: 0cm"><CODE CLASS="western"><FONT ><A href="Code/Deployment/descriptors/Plan.cdp"><FONT size=3 -face="Times New Roman">This</FONT></A><FONT size=3 face="Times New Roman"> file shows the complete deployment -plan. </FONT></FONT></CODE></P> +cache those in his/her component.</P> +<P><B><U>Sender:</B></U><br>The following code retrieves the +connection to the AMI connector interface from the context:<br> +<CODE>::Hello::AMI4CCM_MyFoo_obj_var asynch_foo = this->context_->get_connection_sendc_run_my_foo();</CODE> +<br><BR> +The following code retrieves the connection to the Receiver +interface from the context:<br> +<CODE>::Hello::MyFoo_obj_var synch_foo = this->context_->get_connection_run_my_foo ();</CODE> +</p> +<P><B><U>Receiver: </B></U><br> +The Receiver provide one facet for the AMI connector and for the sender.<br> +<CODE>::Hello::CCM_MyFoo_obj_ptr<BR> +Receiver_exec_i::get_do_my_foo (void)<BR> +{<BR> return new MyFoo_exec_i ();<BR> +}</P> + +<H3>Artifacts</H3> +<P>Artifacts sections contains the names of the binaries. See <A href="Code/Deployment/descriptors/artifacts.cdp"> +this</A> files for an overview of all artifacts in the Hello tutorial.</P> + +<H3>Complete plan</H3> +<P <A href="Code/Deployment/descriptors/Plan.cdp">This</A> file shows the complete deployment +plan.</P> + <P STYLE="MARGIN-BOTTOM: 0cm"><BR></P> <HR> <P><BR><BR></P> <TABLE WIDTH="100%" BORDER=0 CELLPADDING=2 CELLSPACING=2> - <TR> - <TD> - <P ALIGN=left><A href="04_ami4ccm.html">Previous</A></P></TD> - <TD> - <P ALIGN=center><IMG border=0 name=graphics2 align=bottom src="images/images.png" width="4%" height="5%" ></P></TD> - <TD></TD></TR></TABLE> -<H2 CLASS="western"><BR><BR></H2></FONT></FONT></FONT></FONT></FONT> + <TR> + <TD ALIGN=left> + <A href="04_ami4ccm.html">Previous</A></TD> + <TD ALIGN=center> + <IMG border=0 align=bottom src="images/images.png" width="4%" height="5%" ></TD> + <TD></TD></TR></TABLE> </BODY> </HTML> |