dividePointValue
CDataHubConnector:
dividePointValue — divides the value of the named point by the specified
value.
ST_STATUS dividePointValue( | point, | |
value); |
CDataHubPoint& point;double value;ST_STATUS dividePointValue( | pointname, | |
value); |
LPCTSTR pointname;double value;Exception dividePointValue( | point, | |
value); |
DataHubPoint point;double value;Exception dividePointValue( | pointname, | |
value); |
String pointname;double value;pointA
DataHubPoint object. The name,
seconds and nanoseconds members must be valid.
pointnameThe name of the point. The point timestamp is automatically set to the current time.
valueThe value by which to divide the current point value.
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.
This method divides the current value of the DataHub point by the specified value. If the DataHub point is not of a numeric type, then 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" |
dividePointValue(_T("intPoint1"), 1.0);CDataHubPoint point; point.name = "realPoint2"; setPointTimeStamp (&point); dividePointValue(&point, 1.234);
appendPointValue,
addPointValue,
multiplyPointValue,
writePoint