WireWare native: WireWare GetDatapointValueLength
From FactorityWiki
Contents |
Summary
Retrieves the contents and the current length of a datapoint.
WIREWARE_RESULT WireWare_GetDatapointValueLength (
| WIREWARE_DATAPOINT_HANDLE | handle | // handle for datapoint | |
| void* | data | // pointer to buffer for contents | |
| int* | length | // pointer to memory location for current length | |
| WIREWARE_TIMEOUT | maxAge | // max age of cached data in ms | |
| WIREWARE_TIMEOUT | timeout | // timeout in ms |
);
Parameters
| handle |
Specifies the handle for the datapoint.
|
| data |
Specifies a memory location, which receives the contents of the datapoint. The find out the required buffer size, use the function WireWare_GetDatapointMaximumLength.
|
| length |
Specifies a memory location, which receives the current length of the datapoint.
|
| maxAge |
Specifies the maximum age of the returned value in ms. If the value in the local data cache is older than the given time in ms, the WireWare subsystem retrieves the current value from the machine or device.
|
| timeout |
Specifies the maximum allowed execution time (in ms) for this function.
|
Result
If the function succeeds, the return value is WIREWARE_ERROR_NONE. Otherwise it returns an appropriate error code.
If the function returns WIREWARE_ERROR_HANDLE_MEANINGLESS, the connection dropped and has to be closed.
Explanation
This function retrieves the contents and the current length of the datapoint, which is referred to by the handle.
The function takes care, that the returned value is not older than maxAge in ms.
See also
WireWare_OpenDatapoint, WireWare_OpenDatapointBulk, WireWare_CloseDatapoint, WireWare_GetDatapointLength, WireWare_GetDatapointMaximumLength, WireWare_GetDatapointValue
