Getting started
Copyright IXXAT Automation GmbH
36
IEM Manual, 1.5
2.3.11.1.4 Initial configuration
In our demo, the
APP_PrepareInitCfg()
-function is used to execute the ini-
tial configuration, which has to be done separately for each protocol. After-
wards, the
function must be called to launch the pro-
tocol stack on the IEM and thus open the communication channel. Please
note, that this does not start the cyclic communication.
...
/* Prepare the protocol specific configuration */
e_ret = APP_PrepareInitCfg(APP_dw_Protocol,b_resetMode);
if (e_ret != COM_k_OK)
{
DBG_PRINTF(("Error %d in APP_PrepareInitCfg\n", e_ret));
return e_ret;
}
// open channel via BCC and init CCI
e_ret = EMI_cmdChannelOpen(APP_d_BrdRef, TRUE);
if (e_ret != COM_k_OK)
{
DBG_PRINTF(("Error %d in EMI_Channel_Open\n", e_ret));
return e_ret;
}...
Figure 2-13: Initial configuration and channel open
2.3.11.1.5 Creation of variables
After opening the communication channel, the parameters of the communica-
tion (objects, etc.) can be configured. This is prepared in the demo application
in
the
APP_ChannelConfigureSpecific
()
and
AP-
Pdemo_ChannelConfigureGeneric()
functions.
...
/* Perform protocol specific channel configurations */
e_ret = APP_ChannelConfigureSpecific(APP_dw_Protocol);
if (e_ret != COM_k_OK)
{
DBG_PRINTF(("Error %d in APP_ChannelConfigureSpecific\n", e_ret));
return e_ret;
}
/* Perform generic channel configurations */
e_ret = APPdemo_ChannelConfigureGeneric();
if (e_ret != COM_k_OK)
{
DBG_PRINTF(("Error %d in APP_ChannelConfigureGeneric\n", e_ret));
return e_ret;
}...
Figure 2-14: Channel configure