2.1. EC-Simulator Architecture
The EC-Simulator library is implemented in C++ and can be easily ported to any embedded OS platforms using an appropriate C++ compiler. The API functions are C language interfaces, thus the stack can be used in ANSI-C as well as in C++ environments.
There are two different architecture editions as described below. The architectures contain the following:
EC-Simulator Stack Core: In the core module cyclic (process data update) and acyclic (mailbox) EtherCAT® commands are sent and received. Among others there exist some state machines to handle for example the mailbox protocols.
Configuration Layer: The EC-Simulator stack is configured using an XML file whose format is fixed in the EtherCAT® specification ETG.2100 (ENI) with extended information (EXI). The EC-Simulator contains an OS independent XML parser.
Real-time Ethernet Driver Layer: This layer exchanges Ethernet frames between the MainDevice and the Simulator. If hard real-time requirements exist, this layer has to be optimized for the network adapter card in use.
OS Layer: All OS dependent system calls are encapsulated in a small OS layer. Most functions are that easy that they can be implemented using simple C macros.