Getting started
Copyright IXXAT Automation GmbH
32
IEM Manual, 1.5
COM_e_ERROR e_ret = COM_k_OK;
COM_t_BOARD_CONFIG *ps_initStruct;
...
/* set protocol specific configuration values according the proper init
structure. Please be aware of using memory access macros because the
module expects all data of the shared memory in little endian byte order */
...
/* write configuration data to asynchronous area */
e_ret = EMI_ioAcyclDataWrite((INT16)APP_td_BrdRef, ps_DevInitCfg, (INT16)0,
(INT16)sizeof(ab_initArray));
Figure 2-9: Write configuration data
2.3.8 Registering events
The host application can register certain events on the module (generic and
protocol specific) which are signalized to the host via the event queue. The
event queue can cyclically be polled by the host application. This event queue
is unidirectional; only events from the module can be processed. To react on a
certain
event,
the
proper
event
has
to
be
registered
via
first. This enables the application to assign a callback
function which will be executed.
All events are queued from the module into an “event queue” (FIFO). Hence
it’s necessary that this queue is polled cyclically from the host application by
calling
. In this context the callback function of the proper
event will be called.
2.3.9 Error handling
In addition to generic error codes, protocol specific errors are submitted, too.
The host is responsible to react on errors in an application specific way. See
chapter 6 for more detailed information.
2.3.10 Generic structure of the demo application
The demo application was designed to hide protocol specific implementations
to a high degree. Therefore a generic part of the application was implemented
and also several protocol specific parts. The files located to the generic part
are
APPdemoGenIndConf.c, APPdemoGenMain.c, APPdemoGenMain.h, AP-
PdemoGenReqResp.c and APPint.h
. The functions inside
APPdemoSpe.c
work as wrapper/dispatcher functions in this context. Every call to a generic
demo function leads, if necessary, to a call of a protocol specific function.