Manuals >Reference >Controlling IC-CAP from Another Application
Print version of this Book (PDF file)
prevnext

Controlling IC-CAP from Another Application

Other applications written in the C or C++ programming language can control IC-CAP via a library provided by IC-CAP. The library, libiclinklibs.a, consists of 6 function calls which enable the application to launch IC-CAP and communicate with it through an IPC (Inter-Process Communication) link.

The library allows the C application to send arbitrary PEL code to IC-CAP. The PEL code is then executed within IC-CAP. The context of the PEL code is 1 level above the macros in a Model. Therefore, the only variables available to the PEL code are the top-level System Variables. To see these variables, open the System Variables window using the menu Tools > System Variables in IC-CAP's Main window.

The library libiclinklibs.a contains the following calls:

 int launch_iccap(const char *appName,
                 const char *host,
                 const char *iccapRoot,
                 const char *altPath)
int initialize_session()
int terminate_session()
int send_map(int *map, int length)
int send_PEL(const char *PELText,
             int wait,
             char **errMsg,
             LinkReturnFuncT retfunc);
int get_PEL_response(char **errMsg, LinkReturnFuncT 
                     retfunc);

prevnext