Previous | Next |
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.
Below a 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:
#pragma ciao lem "Hello_MyFoo_objE.idl"
#pragma ciao lem "Hello_MyFoo_objAE.idl"
#pragma ciao ami4ccm interface "Hello::MyFoo_obj"
#pragma ciao ami4ccm idl "Hello_MyFoo_objA.idl"
Also this IDL contains the interface between Sender and Receiver
interface MyFoo_obj
{
long foo (in string in_str,
out string answer)
raises
(InternalError);
void hello (out long answer)
raises (InternalError);
attribute short rw_attrib
getraises (InternalError)
setraises
(InternalError);
readonly attribute short
ro_attrib
raises (InternalError);
};
The Hello_Sender_comp.idl
file in the Sender_comp/src directory defines the asynchronous and
synchronous connections.
For synchronous invocations, the Sender component uses the
MyFoo_obj interface (which the Receiver provides):
component Sender
{
// For synchronous invocation
uses MyFoo run_my_foo;
};
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:
#pragma ciao ami4ccm receptacle "Hello::Sender_comp::run_my_foo"
The Hello_Receiver_comp.idl file in the Receiver_comp/src directory indicates the port the receiver provide.
component Receiver
{
//Provides
provides MyFoo_obj do_my_foo;
};
The receiver isn't aware of the calls that were invoked by the sender were asynchronous
or synchronous.
Previous | Next |