DR_ApConnectIPC
DR_ApConnectIPC — connects to Cogent products via IPC.
Syntax
#include <cogent.h>
int DR_ApConnectIPC( | char* | taskname, |
| | IP_hTASK | my_task, |
| | IP_hMSG | send_msg, |
| | IP_hMSG | reply_msg, |
| | char* | admin_name); |
Arguments
- taskname
- The name of the user's application; it can be
any unique name in the system's namespace.
- my_task
- The task structure required to establish
inter-process communication (IPC) with another Cogent product.
If NULL is specified, then this function will create the
required internal task structure. The process of creating the
task structure will automatically publish the taskname to the
Cascade NameServer (nserve) if it is
running.
- send_msg, reply_msg
- The message structures required to send and
receive IPC messages to another Cogent product. If
NULL is specified, then this function
will create the required internal structures with a maximum
buffer size of 2048 bytes. Messages greater than 2048 bytes
in length will be truncated.
- admin_name
- Taskname or PID of the driver (see drcif_ad, dr5136dn, or dr5136pfb in the respective
Cogent Driver manuals).
Returns
The integer value
0 (DR_API_OK) if the
IPC system initialized successfully, otherwise the following
error may be reported:
DR_API_ERROR
Description
This function permits users
familiar with the Cogent library to connect to the driver using
already defined task and/or message buffers. This is the
underlying function in DR_ApInitIPC, which
simply calls this function with NULL task and
message buffer parameters.