appendPointValue

appendPointValue — appends a string to a DataHub point.

Synopsis

For C++:
ST_STATUS appendPointValue(point,  
 str); 
CDataHub& point;
LPCTSTR str;
 
ST_STATUS appendPointValue(pointname,  
 str); 
LPCTSTR pointname;
LPCTSTR str;
 
For Java and C#:
Exception appendPointValue(point,  
 str); 
DataHub point;
String str;
 
Exception appendPointValue(pointname,  
 str); 
String pointname;
String str;
 

Parameters

point

A pointer structure of type DataHubPoint. The name, seconds and nanoseconds members must be valid.

pointname

The name of the point. The point timestamp is automatically set to the current time.

str

A string to append to the current point string value.

Returns

For C++:
  • ST_OK if the command was successfully sent to the DataHub instance. Since the command is sent asynchronously, the actual success or failure of the command must be determined through the onSuccess or onError message handlers.

  • ST_NO_TASK if a connection to the DataHub instance does not exist.

  • ST_ERROR if the connection socket is unable to send the message.

Description

This method appends the specified string to the current string value of the DataHub point. If the DataHub point is not a string type (PT_TYPE_STRING), then the DataHub instance will respond with an error, and onError will be called with the following arguments:

status: ST_WRONG_TYPE
msg: "Wrong type"

If the DataHub point does not exist, then the DataHub instance will respond with an error, and onError will be called with the following arguments:

status: ST_NO_POINT
msg: "Point does not exist"

Examples

appendPointValue(_T("strPoint1"), _T("this"));
CDataHubPoint point;
point.name = "strPoint1";
setPointTimeStamp (&point);
appendPointValue(&point, _T(" and that"));

See Also

addPointValue, multiplyPointValue, dividePointValue, writePoint