Sundance SMT6060-TCPIP User Manual

Page 18

Advertising
background image

Revision 0.4

Page 18 of 18

Sundance Digital Signal Processing Inc.

4790 Caughlin Parkway 233, Reno, NV 89519-0907, U.S.A.

Tel: +1 (775) 827-3103, Fax: +1 (775) 827-3664, email:

[email protected]

www.sundancedsp.com

The lib folder contains the all important sockapi.lib file that you need to link your tasks
to.

Figure 11 -SMT6060-TCPIP Directory Structure

5.2.

THE SOCKET API LIBRARY

The socket API implemented for each of the node processors requires an initialization in each task before
use. The sock_init() call is provided for this purpose. This call accepts two of the (CHAN *) arguments
which were provided by the 3L loader to the main() for the task. The function below shows an extract
from the DSP task’s code.

int main(

int argc, char *argv[], char *envp[],
CHAN * in_ports[], int ins,
CHAN *out_ports[], int outs )

{

/*
** initialize socket API

This is a major component of the Ethernet support.

This routine

will create threads and allocate message buffers to support the
"sockapi.h" functions.

*/
sockapi_init = sock_init( in_ports[0], out_ports[0]);
if( sockapi_init != 0 )

{

printf(": sockapi init failure");
thread_stop();

}

An example of a 3L Diamond configuration file is shown below. This file shows the case of two
Sundance modules used as the embedded system. The root processor is a SMT395_VP30 and the node
is the SMT363.

Advertising