DR_ApConnectIPC

Cogent API and Utilities: Version 4.1
Prev |  | Next

# `DR_ApConnectIPC`

`DR_ApConnectIPC` -- connects to Cogent products via IPC.

## Syntax

``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 Driver Startup and Configuration File and Command Specifications in the Device Driver for Hilscher Fieldbus Cards manual).

## 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.

Prev | Home | Next
`DR_ApCommand` | Up | `DR_ApDescribeBuffer`

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.