DH_WritePoint, DH_WriteExistingPoint, DH_WriteExistingPoints
DH_WritePoint, DH_WriteExistingPoint, DH_WriteExistingPoints — write points to the Cascade DataHub.
Syntax
#include <cogent.h>
ST_STATUS DH_WritePoint( | IP_hTASK | myself, |
| | PT_pCPOINT | ppoint, |
| | IP_hMSG | hmsg, |
| | ER_hLIST | elist); |
ST_STATUS DH_WriteExistingPoint( | IP_hTASK | myself, |
| | PT_pCPOINT | ppoint, |
| | IP_hMSG | hmsg, |
| | ER_hLIST | elist); |
ST_STATUS DH_WriteExistingPoints( | IP_hTASK | myself, |
| | PT_pCPOINT | ppoints, |
| | int | npoints, |
| | IP_hMSG | hmsg, |
| | ER_hLIST | elist); |
Arguments
- myself
- The
task handle associated with this task. This should always be the
return value from IP_NserveInit
- ppoint
- A
pointer to a Cascade DataHub point structure. All 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.
- ppoints
- A
pointer to an array of DataHub points. Each of the points in
the array must already exist in the DataHub.
- npoints
- The number of points in the array of
points.
- hmsg
- 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.
- elist
- A
return value containing error information. This is unimplemented in this
version, and should be NULL.
Returns
ST_OK on
success, ST_ERROR on failure, or some other
value of ST_STATUS.
Description
This function writes a point into the DataHub. If the named point
does not exist then DH_WritePoint will create
it on the DataHub and DH_WriteExistingPoint
will return the error ST_NO_POINT.
DH_WriteExistingPoints writes values to an array
of existing points. It reduces processing time by sending as many
points as possible in one message.