#include <cogent.h>
int DR_ApPointBufAddress(
char* pnt_name, int* card_id, int* buf_id, unsigned short* offset, unsigned short* bit, char** error )
;
A string containing the name of the required point.
If not NULL and the point is defined, returns the number of the card providing access to the point data.
If not NULL and the point is defined, returns the ID of the buffer containing the point data.
If not NULL and the point is defined, returns the byte offset into the buffer for the point data.
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.
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.
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
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); }
Copyright © 1995-2010 by Cogent Real-Time Systems, Inc. All rights reserved.