#include <cogent.h>
int DH_FormatPoint(
char* command, IP_Task* myself, PT_pCPOINT ppoint, char* buf, int len, int flags )
;
The first word in the command string. It can't be NULL, but it can be blank.
The task handle associated with this task. This should always be the return value from IP_NserveInit.
A pointer to a Cascade DataHub point structure, which must contain at least name. All other fields in the point structure should be 0 if this is the first call on this point, because they will be filled in by this call. Subsequent calls on the same point do not require zeroing any fields. If one point structure is used with several point names, the address field must be zeroed each time a different name is used in a call to this function.
The buffer to be written into.
The length of buf.
One or none of these:
PT_FMT_ASCII | Constructs a humanly readable ASCII string (the default). |
PT_FMT_BINARY | Encodes data as a raw binary representation, efficient for parsing. |
PT_FMT_HEX | Encodes data as ASCII encoded hex. (This is not a valuable format since it is more difficult to parse and less space efficient than binary, and it is more difficult for humans to read than regular ASCII.) |
PT_FMT_POINT_SECURITY | Takes a security value from the point structure, not a task structure. |
This function takes a point structure and creates an ASCII representation of data for the point in the buf buffer. The data is represented as a list, in this format:
(command pointname type value conf security locked seconds nanoseconds)
The resulting buffer can be passed back to DH_ParsePointString, which would parse it back out. It infers the flag. |
Copyright © 1995-2010 by Cogent Real-Time Systems, Inc. All rights reserved.