Getting started
Copyright IXXAT Automation GmbH
33
IEM Manual, 1.5
The protocol which should be processed by the application is determined by a
unique identifier which depends on the modules firmware. The application can
receive this identifier by calling
. Depending on the re-
ceived identifier we can use a simple switch clause to perform protocol specific
actions and function calls. This is heavily used during the configuration phase.
The following figure is showing the principle which is used to decouple the ap-
plication from protocol specific implementations.
GenFuncA
SpecFuncA
FuncAEtc
FuncAEip
FuncApnio
FuncAEpl
FuncASc3
FuncAMbs
APPdemoGen.c
APPdemoSpe.c
Generic part
Wrapper /
Dispatcher
Protocol specific
APPdemoPnio.c
APPdemoEip.c
APPdemoEtc.c
APPdemoEpl.c
APPdemoSc3.c
APPdemoMbs.c
Figure 2-10: Application dispatcher
2.3.11 First steps in the demo application
In the demo application, a simple client application is implemented, where 8 bit
of input data are received, mapped to 8 bit of output data and sent back to the
network.
When you open the file “
AppDemoMain.c
”, you will find the main function. All
you need to do from this function to initialize the Host software is, to call the
BSP_Init()
function, to initialize the board support package, as well as to call
GEO_InitMem()
to initialize the memory management.
To prepare and set up the communication, all necessary functions are covered
in the
DemoStartup()
-Function, the cyclic data transfer will be handled by
DemoMain()
.