readStateAsync

Reads the ADS status and the device status from an ADS server.

 readState(
    pCallback, 
    userState, 
  );

Parameters

pCallback

Type: Function pointer
The callback function for asynchronous AJAX requests.
Function pointer signature: function( TcAdsWebService.Response, userState)

If successfull, the TcAdsWebService.DataReader object of the TcAdsWebService.Response.reader property contains the state values as 2 Byte WORD values in the order AdsState, DeviceState. 

userState

Type: Every
User data which will be passed through.

Returns

This function will return nothing. An TcAdsWebService.Response object is returned by calling the callback function which was set by use of the pCallback parameter.
If successfull, the TcAdsWebService.DataReader object of the TcAdsWebService.Response.reader property contains the state values as 2 Byte WORD values in the order AdsState, DeviceState.