#include <cogent.h>
int DR_ApInitIPC(
char* taskname, char* admin_name )
;
The name of the user's application. It can be any unique name in the system's namespace.
The taskname of the driver (see drcif_ad in the respective Cogent Driver manual). The driver PID can also be used.
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-2010 by Cogent Real-Time Systems, Inc. All rights reserved.