CNSReadArray
int CNSReadArray (CNSEndpoint endpointID, int timeout, void *array, size_t *numElements);
Purpose
Reads one array data item from the reader endpoint of a network stream that transmits array data. You can call this function only from the reader endpoint.
You must free memory using CNSFreeMemory when you finish using the array.
Parameters
Input | ||
Name | Type | Description |
endpointID | CNSEndpoint | The handle of a network stream endpoint. You can obtain this handle using the CNSNewArrayEndpoint function. |
timeout | int | The time, in milliseconds, that this function waits for the data to be available in the buffer. The default value is CNSWaitForever, which means this endpoint waits indefinitely. If the timeout expires, this function returns an error. |
Output | ||
Name | Type | Description |
array | void | The array of scalar elements that this function reads from the stream. This function returns an empty array if an error occurs. Call CNSFreeMemory to free the array. |
numElements | size_t | The size of the array you read from the network stream. |
Return Value
Name | Type | Description |
error | int | An error code returned by a Network Streams Library function. |
Additional Information
Library: Network Streams Library
Include file: cvinetstreams.h
LabWindows/CVI compatibility: LabWindows/CVI 2013 and later