DH_WritePoint, DH_WriteExistingPoint, DH_WriteExistingPoints

Cogent API and Utilities: Version 4.1
Prev |  | Next

# `DH_WritePoint`, `DH_WriteExistingPoint`, `DH_WriteExistingPoints`

`DH_WritePoint`, `DH_WriteExistingPoint`, `DH_WriteExistingPoints` -- write points to the Cascade DataHub.

## Syntax

    #include <cogdb.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.

## See Also

Communicating with the Cascade DataHub, DH_CreatePoint, DH_ReadPoint, DH_RegisterPoint

Prev | Home | Next
`DH_UnregisterPoint` | Up | Cascade Driver Functions

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.