CWDataSocket

NI DataSocket

CWDataSocket

CWDataSocket is a component that can connect to various data sources for reading data or data targets for writing data. Sources and targets may be local (on the current machine) or on other machines in the office or over the Internet. CWDataSocket holds stores data in CWData objects, which you can access with the CWDataSocket.Data property.

Properties

AccessModeSpecifies the type of read or write connection the DataSocket makes when connecting to the data source or target.
ActualURLSpecifies the actual URL of the current source or target to which DataSocket is connected.
AutoConnectIndicates if the DataSocket connects to a data item as soon as the program is run.
DataSpecifies the current value and attributes that the CWDataSocket has received from the data source or that have been set locally.
DataUpdatedIndicates if values or attributes on the CWDataSocket have been set since they were last read.
LastErrorSpecifies the last error code used in an OnStatusUpdated event.
LastMessageSpecifies the last message used in an OnStatusUpdated event.
StatusSpecifies the current status of the data connection.
StatusUpdatedIndicates if the status has changed or an error has occurred.
URLSpecifies the location expressed as a URL of the data source or target to which the CWDataSocket is connecting.

Methods

AboutBoxDisplays the About Box for the control.
ConnectConnects the CWDataSocket to a data source or target.
ConnectToConnects the CWDataSocket to a data source or target.
DisconnectDisconnects the CWDataSocket from the data item to which it is currently connected.
SelectURLEnables interactive browsing and selection of data items, on DataSocket, OPC servers, Fieldpoint devices, Lookout objects, and of files so that users can easily create data URLs, rather than constructing the URLs themselves, or it displays a simple text box in which users can enter HTTP and FTP URLs.
UpdateCauses the CWDataSocket to read from a data source or write to a data target.

Events

OnDataUpdatedGenerates when the CWDataSocket value is updated.
OnStatusUpdatedGenerates when the status of the connection changes.

See Also

CWData