LabWindows/CVI

Table of Contents
  • LabWindows/CVI Fundamentals
  • Creating Applications
  • Distributing Applications
  • Library Reference
  • Programmer Reference
  • Hardware Information

CNSReadScalar

int CNSReadScalar (CNSEndpoint endpointID, int timeout, void *value);

Purpose

Reads a single scalar data item from a network stream. You can call this function from the reader endpoint only.

Parameters

Input
Name Type Description
endpointID CNSEndpoint The handle of a network stream endpoint. You can obtain this handle using the CNSNewScalarEndpoint 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
value void The reference to the scalar. If the data type is a string, you must call CNSFreeMemory to free it.

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

Examples

Refer to the following examples that use the CNSReadScalar function:

  • networkstreams\cnsGUI.cws

    Open example
  • networkstreams\cnsSimple.cws

    Open example

Log in to get a better experience