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.

Examine 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

/* pingComp is a named instance of the Ping component. */

components {

pingComp: Ping

}

Ping.cdl

/* Ping component description. */

component Ping

* pingImpl is the Ping interface implementation. */

interfaces {

pingImpl: Ping

}

Ping.idl

/* Ping interface description. */

package Ping

interface {

Ping(in UInt32 value, out UInt32 result);

}

These files will be used to generate the files named Server.edl.h, Ping.cdl.h, and Ping.idl.h, 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