#include <cogent.h>
int DR_ApInitIPC(char* taskname, char* admin_name );
The integer value 0 (DR_API_OK) if the IPC system initialized successfully, otherwise the following error may be reported:
DR_API_ERROR
This function opens the connection to the driver. If the Cascade NameServer (nserve) is available, then it is used to locate the driver by name, otherwise the QNX nameloc service is used. Send and reply message buffers are created with a default size of 2048 bytes. Subsequent IPC messages greater than 2048 bytes in length will be truncated.
char *taskname = "dr_test";
char *admin_name = "/dr/cif";
if (argc > 1)
{
taskname = argv[1];
if (argc > 2)
admin_name = argv[2];
}
if (!DR_ApInitIPC (taskname, admin_name))
{
printf ("Successfully connected %s to %s\n\n",
taskname, admin_name);
}
else
printf ("Failed to connect %s to %s\n", argv[0], argv[1]);Copyright © 1995-2006 by Cogent Real-Time Systems, Inc. All rights reserved.