4. Software Integration

For the integration of the EC-Monitor, the EcMonitorDemo can be seen as an application framework, serve as a template and be expanded accordingly.

4.1. Application framework and example application

The example application will handle the following tasks:

  • EC-Monitor initialization

  • Process Data acquisition with EC-DAQ

  • Periodic diagnosis task

  • Periodic Job Task in polling mode

  • Thread with periodic tasks and application thread already implemented

  • Logging. The output messages of the demo application will be printed on the console as well as in some files.

  • “Out of the box” solution for different operating systems: Windows, Linux …

4.1.1. File reference

The EcMonitorDemo application consists of the following files:

EcDemoMain.cpp

Entrypoint for the different operating systems

EcDemoPlatform.h

Operating system specific settings (task priorities, timer settings)

EcDemoApp.cpp

Initialize, start and terminate EC-Monitor

EcDemoApp.h

Application specific settings for EcDemoApp

EcDemoParms.cpp

Parsing of command line parameters

EcDemoParms.h

Basic configuration parameters

EcSelectLinkLayer.cpp

Common Functions which abstract the command line parsing into Link Layer parameters

EcNotification.cpp

Slave monitoring and error detection (function emNotify() )

EcSlaveInfo.cpp

Slave information services

EcLogging.cpp

Message logging functions

EcTimer.cpp

Start and monitor timeouts

4.1.2. EC-Monitor lifecycle

Basically the operation of the EC-Monitor is wrapped between the functions

and

4.2. EC-Monitor Source Code

In a source code delivery the EC-Monitor sources are divided into 4 parts:

  • SDK Header files

  • Link layer files (multiple Link Layers may be shipped)

  • Link OS layer files (only valid for the Link Layers)

  • EC-Monitor files (configuration, core and interface layer)

  • OS layer files

The EC-Monitor can be ported to several different operating systems and CPU architectures with different compilers and development environments. Typically no supported build environment files like IDE projects are shipped with the source code.

To build the EC-Monitor the appropriate build environment for the target operating system has to be used. If an integrated development environment (IDE) exists (Visual Studio, Eclipse, etc.) several projects containing all necessary files are needed to build the artefacts. If no integrated development environment is available makefiles and dependency rules may have to be created which contain the necessary EC-Monitor source and header files.

For most platforms three separate independent binaries will have to be generated:

  1. Link Layer Binary. The Link Layer binary will be dynamically bound to the application at runtime.

  2. EC-Monitor Library

  3. Remote API Server Library

4.2.2. EC-Monitor Binaries

The following files have to be included into an IDE project or makefile:

  • EC-Monitor files

  • OS layer files

  • For all platforms a static library has to be created. This library will have to be linked together with the application.

4.2.3. Remote API Server Binaries:

The following files have to be included into an IDE project or makefile:

  • Remote API server files.

  • For all platforms a static library has to be created. This library will have to be linked together with the application.

See also

Operating Systems (OS) for required tool chain settings