summaryrefslogtreecommitdiff
path: root/CIAO/connectors/ami4ccm/tutorials/Hello/Tutorial/01_general.html
blob: 455beadb29497607dd8374952840bf8eaa939df1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
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 Hello Tutorial  - General</TITLE>
</HEAD>
<BODY>
<TABLE WIDTH="100%" BORDER=0 CELLPADDING=2 CELLSPACING=2 STYLE="PAGE-BREAK-BEFORE: always">
  <TR>
    <TD>&nbsp;</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>

<H2 CLASS="western">System</H2>
<P>The system consists of three components: </P>
<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 
via a direct connection for the synchronously invoked methods. The AMI connector 
itself will be completely generated by IDL and will handle details of executing 
the asynchronous invocation and callback to the user component. The Receiver 
(Server side) isn't aware of any AMI clients.</P>
<P><IMG border=0 name=graphics4 align=bottom src="images/system.png" width="33%" height="27%" ></P>
<P>There are different methods used in this example in 
order to show different aspects: </P>
<UL>
  <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>
    &nbsp;&nbsp;&nbsp;getraises(InternalError)<BR>
    &nbsp;&nbsp;&nbsp;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>|--<B>*_asm</B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  : Directory contains an assembly.</LI>
  <LI>&nbsp;&nbsp;&nbsp;&nbsp;|--<B>ports</B> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 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>&nbsp;&nbsp;&nbsp;&nbsp;|--<B>*_comp</B>&nbsp;&nbsp;&nbsp; : Directory contains an 
  component. </LI>
 <LI>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|--
	<B>ports</B>&nbsp;&nbsp; : Directory contains common IDL code for the component. </LI>
  <LI>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|--&nbsp;<B>src</B>&nbsp; &nbsp;&nbsp; &nbsp; : Directory contains the IDL 
  and *_exec-files for the component.</LI></UL>

<H2 >File naming convention</H2>
<P>The following convention is used: </P>
<UL>
  <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>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. </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". </LI>
</UL>
<TABLE WIDTH="100%" BORDER=0 CELLPADDING=2 CELLSPACING=2>
  <TR>
    <TD>&nbsp;</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>