Each entity in KasperskyOS must be described in the Entity Definition Language (EDL), in a separate file named <entity name>.edl
. We continually work to lower the barrier to entry into the technology. Therefore, the EDL language has an extremely simple syntax.
An EDL file contains the following sections—the order is important:
entity
, which is followed by the entity name.security
. We will look at security interfaces later.<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 uart_driver
entity below).
Strictly speaking, in the EDL file of the entity, the entity class name (EIID) is specified instead of the entity name. However, the KasperskyOS Education Kit has a limitation on starting entities: you can start no more than one entity of each class. Therefore, in practice, the name of each entity simply corresponds to its EIID.
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 uart_driver
entity contains two instances of the uart_comp
component: one for each UART device.
The uart_driver
entity does not use a security interface.
uart_driver.edl
// Entity name: uart_driver
entity uart_driver
// uart0 and uart1 are the names of instances of the uart_comp component
// that are responsible for two different devices
uart0: uart_comp
uart1: uart_comp