Installation guide
3: Interfacing to DLI/TSI and Protocol Software
DC 900-1325I 45
Figure 3–1: Connection between SRA and DLI configuration file
4021
●
●
●
●
●
●
●
●
●
●
●
●
/* SRA C Source Code File Name: sra.c */
main
{
if ( dlInit ("sradcfg.bin", (char *)work_array, callback1 ) == ERROR )
{
printf("main: dlInit failed with error (%d).\n", dlerrno);
op_state = TERMINATE;
}
if ( dlOpen ("icp0port0", callback2 ) == ERROR )
{
printf("main: dlOpen failed with error (%d).\n", dlerrno);
op_state = SESSION_UNAVAILABLE;
}
}
●
●
●
// SRA DLI Configuration File (text version) Name: sradcfg
main
{
}
// First Session Definition Section - ICP 0, Port 0
icp0port0 // Session Name
{
BoardNo = 0; // ICP board number
PortNo = 0; // ICP port number
}
// Second Session Definition Section - ICP 0, Port 1
icp0port1 // Session Name
{
BoardNo = 0; // ICP board number
PortNo = 1; // ICP port number
}