#include <cogent.h>
ST_STATUS DH_ParsePointMsg(
PT_pCPOINT ppoint, char* name, IP_hMSG hmsg, ER_hLIST elist )
;
A pointer to a point structure which will be filled in by this function. The name element of the structure is not filled in, but is placed in the name argument instead.
All other fields are valid, and will be treated by the write, but in the first call on a point the address field must be zero. It will be filled in automatically. This address will be valid so long as the point exists in the DataHub, and if, in subsequent DH_* functions, the address is provided for this point, the function will run slightly faster.
A pointer to a buffer which will be filled in with the point's name by this function.
A handle to a previously allocated message structure (using IP_MsgCreate) providing enough buffer space to handle the inter-process communication associated with the DataHub transaction.
A return value containing error information. This is unimplemented in this version, and should be NULL.
ST_OK on success, ST_ERROR on failure, or some other value of ST_STATUS. ST_ERROR means the buffer did not contain a valid point specification.
This function parses the return value from DH_ReadPoint, DH_RegisterPoint, or a message received through an asynchronous message (exception) from the DataHub, and places the result in the provided point structure.
The name of the point is not modified in the point structure, as there is no clear manner in which the name should be handled. This leaves it up to the programmer to perform the memory allocation and deallocation of the point name storage as required. This function will only treat a single point specification in the message, ignoring all points after the first.
Copyright © 1995-2010 by Cogent Real-Time Systems, Inc. All rights reserved.