DR_ApPointBufAddress

Cogent API and Utilities: Version 4.1
Prev |  | Next

# `DR_ApPointBufAddress`

`DR_ApPointBufAddress` -- deletes a point's image buffer address.

## Syntax

``int DR_ApPointBufAddress`(char * pnt_name, int * card_id, int * buf_id, unsigned short * offset, unsigned short * bit, char ** error);`

## Arguments

`pnt_name`

  A string containing the name of the required point.

`card_id`

  If not `NULL` and the point is defined, returns the number of the card providing access to the point data.

`buf_id`

  If not `NULL` and the point is defined, returns the ID of the buffer containing the point data.

`offset`

  If not `NULL` and the point is defined, returns the byte offset into the buffer for the point data.

`bit`

  If not `NULL`, the point is defined, and the point is of digital (bit) type, returns the bit value of the word corresponding to the point data.

`error`

  The address of a string pointer. In case of error (non-zero return), the string pointer is set to the corresponding error description string. The error string is contained in a static buffer and remains valid only until the next API call. The parameter may be `NULL` if no error string is required.

## Returns

The integer value `0` if the function is successful, otherwise one of the following error codes:

        DR_ERR_PNT_NOT_FOUND
        DR_API_IPC_ERRORS
        DR_API_STATUS_ERRORS

## Description

This function determines the image buffer address associated with the named point.

## Example

        int             card, buffer;
        unsigned short  offset, bit;
        char            *name = "counter";
        char            *error_str;

        if (result = DR_ApPointBufAddress (name, &card, &buffer,
                                           &offset, &bit, &error_str))
                printf ("     Error@PointBufAddress (%d, %s)\n",
                        result, error_str);
        else
        {
                printf ("     Maps to: card %d, buffer %d, offset: %d",
                        card, buffer, offset);
                printf (", bit: %d\n", bit);
        }

Prev | Home | Next
`DR_ApListPoints` | Up | `DR_ApReadBlock`

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