Generated methods and types

When building a solution, the NK compiler uses the EDL, CDL and IDL descriptions to generate a set of special methods and types that simplify the creation, forwarding, receipt and processing of IPC messages.

Let us look at the static description of the server entity from the echo example. This description consists of three files: server.edl, ping.cdl and ping.idl:

server.edl

/* Server entity description */

entity server

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

ping_comp: ping

ping.cdl

/* Ping component description */

component ping

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

ping_impl: ping.IPing

ping.idl

/* Ping package description */

package ping

interface IPing {

Ping(in UInt32 value, out UInt32 result);

}

These files will be used to generate the files named server.edl.h, server.edl.c, ping.cdl.h, ping.cdl.c, ping.idl.h and ping.idl.c, which contain the following methods and types:

Methods and types that are common to the client and server

Methods and types used only on the client

Methods and types used only on the server

Page top