ANDL

The ANDL is a domain specific language (DSL) that aims to simplify the generation of simulation configuration files for the frameworks CoRE4INET, FiCo4OMNeT and SignalsAndGateways. As a plugin for the Eclipse IDE there are benefits like autocompletion, syntax highlighting, validation, autoformatting, renaming and scoping. Currently the ANDL Supports:

  • Time-Triggered Ethernet (AS6802) with automatic schedule generation for time-triggered Frames
  • IEEE 802.1 Audio Video Bridging
  • IEEE 802.1Q / Time Sensitive Networking
  • CAN
  • Heterogeneous Gateways (CAN, IEEE 802.1Q, AS6802)

 

Installation

The ANDL is an OMNeT++ Plugin. Install the Plugin in your OMNeT++ IDE:

  • Open your IDE (e.g. OMNeT++/OMNEST/Eclipse) and select: "Help -> Install New Software"
  • Press the Button "Add..."
  • Insert a name for the new repository in "Name", e.g. "CoRE"
  • Insert the URL of our update page in "Location": http://sim.core-rg.de/updates/
  • Select your new repository in "Work with...", this will take a while (showing "pending"). Be patient!
  • Select the feature "Abstract Network Description Language" and press "Next"
  • The wizard will guide you through the installation...

 

Basics

Create new project:

Create a new Project (File->New->Project). Choose a name.

Create andl file:

Right click on the src folder and select new->other->General->File. The filename must end with ``.andl''. When Eclipse asks to add the Xtext Nature to the project select yes.

Configure network:

The network configuration takes place in the empty andl file. Autocompletion (Ctrl+Space) is a great tool to support the process. It shows all possibilities that can be placed the current context in the editing area.

Generate simulation files:

If the Process did not start automatically after saving the build process must be started (Ctrl+B) (right click on .andl file->Generate Network). After the build process is finished the simulation files can be found in the simulations folder of the project.

Autoformatting:

To initate the Autoformatting press Ctrl+Shift+F.

 

Language

The language contains three main sections. These are types, settings, and network. The first two are optional. The last one is the mandatory network description.

types

Major elements of the network can instantiate a type to reduce the parameter redundancy in the network description part. This major elements are ethernetLink, canLink, node, switch, gateway and message.

settings

The optional settings part configures simulation file generation related parameters. For example the behavior of the automatic time-triggered scheduler. The following code shows how to deactivate the scheduling of time-triggered messages for the simulation configuration.

network

This is the mandatory part of the ANDL. It contains of 3 mandatory subsections. They are devices, connections and communication. The first one is used to describe the network participants. The second one sets the connection between them. In the last section all messages are defined that should traverse the network. The next example shows the start of the network component. The network name in this example is specified as smallNetwork.

devices

Network participants are configured in the devices section. The syntax is similar to the types component. A device can extend a device type. In the following example there are two canLink (canbus1, canbus2), one ethernetLink (ethcable1), one switch (switch1), two gateways (gateway1, gateway2) and two nodes (canNode1, canNode2) defined. The semicolons can be replaced with an !''{}!'' block for the definition of additional parameters.

connections

The elements in the devices section can be used now to build the network infrastructure. Each connection is a member of a segment. Segments are later used to define the different message representations. For Ethernet connections there are two network participants connected via one ethernetLink. For CAN connections each participant is plugged to a bus using a canLink. The connections example shows two segments (backbone and canbus) for the individual connections. A special feature for ethernetLink is the !''new!'' keyword. It enables the possibility to instance a new ethernetLink with a defined type. This reduces the configuration effort instead of defining each cable in the devices section.

communication

Communication is defined using messages. Each message can extend a message type and has parameters such as sender, receivers or messages size. Additionaly a message has a mapping section. In this section the representation in different parts of the networks is defined. There is no necessary order of the mapping entires. At the moment mappings can be made for segments and gateways. In the following example there are three messages (canmsg1, canmsg2 and canmsg3). All have a period and extend a parameterized message type. For canmsg1 the mapping says that the message is represented through the CAN id 1 in the canbus segment. In the backbone segment the message is represented by a best-effort Ethernet frame. Additionally the involved gateways are gateway1 and gateway2.

At last the network section must be closed. Now the and file is ready for the generation process.