KasperskyOS Community Edition 1.0

Contents

EDL

Each entity in KasperskyOS must be described in the Entity Definition Language (EDL), in a separate file named <entity name>.edl.

The name of an EDL file must match the name of the entity that it describes.

An EDL file contains the following sections – the order is important:

  1. Name of the entity. Required section beginning with the reserved word entity, which is followed by the entity name.

    The entity name must begin with an uppercase letter and must not contain an underscore (_).

  2. Security interface used by the entity. This section is optional. It must be added only if the entity uses a security interface. It is declared with the reserved word security, which should be followed by the full name of the interface.
  3. List of implementations of interfaces that are provided by the entity. This is optional, and is described in the interfaces section. Each interface implementation is specified with a separate string in the following format:

    interfaces {

    <interface implementation name>:<interface name>

    }

    An entity can contain several implementations of one interface. All implemented interfaces must be described in the IDL language in IDL files.

    The interface implementation name must not contain an underscore (_).

  4. List of instances of components included in the entity. This is optional, and is described in the components section. Each component instance is specified with a separate string in the following format:

    components {

    <component instance name>:<component name>

    }

    For each specified component, a separate file named <component name>.cdl needs to be created, containing a description of the component in the CDL language. Multiple instances of the same component can be added to an entity, and each instance can have a separate state (see the example of UartDriver entity below).

    The component instance name must not contain an underscore (_).

The interfaces and components sections are optional and are added only for server entities. Implementations of interfaces declared in the interfaces section and implementations that are included in components from the components section can be used by client entities.

EDL supports single-line comments and multi-line C++-style comments:

/* This is a comment

And this, too */

// Another comment

Examples of EDL files

At its simplest, the entity does not use a security interface and does not provide functionality to other entities, like the hello entity from the hello example. An EDL description for such an entity contains only the reserved word entity and the entity name.

Hello.edl

// Entity name: Hello

entity Hello

In the following example, the EFoo entity contains a single interface implementation and does not use a security interface.

Efoo.edl

// Entity name: Efoo

entity Efoo

// The entity contains a named implementation of the IFool interface. Implementation name: foo.

interfaces {

foo : IFoo

}

In the following example, the UartDriver entity contains two instances of the UartComp component: one for each UART device.

The UartDriver entity does not use a security interface.

UartDriver.edl

// Entity name: UartDriver

entity UartDriver

// uart0 and uart1 are the names of instances of the UartComp component

// that are responsible for two different devices

components {

uart0: UartComp

uart1: UartComp

}

Page top
[Topic edl]