Description files

Description of the client entity

The client entity does not implement an interface, so all you need to do is declare the entity name in its EDL description:

client.edl

/* Client entity description */

entity client

Server entity description

The description of the server entity must contain information stating that it implements the IPing interface. Using static descriptions, you need to insert the implementation of the IPing interface into the new component (for example, ping) and insert the instance of this component into the server entity.

The server entity contains an instance of the ping component:

server.edl

/* Server entity description */

entity server

/* ping_comp – named instance of the ping component. */

ping_comp: ping

The ping component contains the implementation of the IPing interface:

ping.cdl

/* Ping component description */

component ping

/* ping_impl – an implementation of the IPing interface declared in the ping package. */

ping_impl: ping.IPing

The ping package contains a declaration of the IPing interface:

ping.idl

/* Ping package description */

package ping

interface IPing {

Ping(in UInt32 value, out UInt32 result);

}

Init description

To enable the client entity to call a method of the server entity, a connection (IPC channel) must be created between them.

To do so, in the init description indicate that the client and server entities must be started and connect them:

init.yaml

entities:

- name: client

connections:

- target: server

id: server_connection

- name: server

The server entity is indicated as - target, so it will perform the server entity role, meaning it will accept requests from the client and respond to them.

The created IPC channel is named server_connection. You can obtain the handle of this channel by using the Service Locator.

Page top