#include <cogent.h>
ST_STATUS DH_ParsePointString(PT_pCPOINT ppoint, char* name, char* msgdata, char** msgend, 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.
ST_OK on success, ST_ERROR on failure, or some other value of ST_STATUS. ST_ERROR means the msgdata did not contain a valid point specification.
This function parses the return value from DH_ReadPoint and 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. The msgend argument allows the programmer to deal with more than one point definition in a single message, which is typical of DataHub exception messages. When the last point definition in the message has been parsed, then msgend will point to a zero length string (**msgend == '\0').
Copyright © 1995-2012 by Cogent Real-Time Systems, Inc. All rights reserved.