AdsConnection

The TcAdsWebService.AdsConnection object handles the asynchronous or synchronous AJAX communication with the TcAdsWebService by wrapping the TcAdsWebService.Client object.

 TcAdsWebService.AdsConnection(
    netid, 
    port, 
    service_url [optional], 
    service_user [optional], 
    service_password [optional]
  );

Parameters

netid

Type: String
NetID of the target AMS Router.

port

Type: Number
Port of the target AMS Router.

service_url [optional]

Type: String
The url of the TcAdsWebService.

service_user [optional]

Type: String
The username which should be used to access the TcAdsWebService.
Set to undefined or null for anonymous access or access with session credentials.

service_password [optional]

Type: String
The password which should be used to access the TcAdsWebService.
Set to undefined or null for anonymous access or access with session credentials.

Functions

Name

Description

readwrite

Writes data to an ADS device and then reads data from this device in a synchronous way.

readwriteAsync

Writes data to an ADS device and then reads data from this device in an asynchronous way.

readState

Reads the ADS status and the device status from an ADS server in a synchronous way.

readStateAsync

Reads the ADS status and the device status from an ADS server in an asynchronous way.

writeControl

Changes the ADS status and the device status of an ADS server  in a synchronous way.

writeControlAsync

Changes the ADS status and the device status of an ADS server  in an asynchronous way.

write

Writes data to an ADS device  in a synchronous way.

writeAsync

Writes data to an ADS device  in an asynchronous way.

read

Reads data from an ADS device  in a synchronous way.

readAsync

Reads data from an ADS device  in an asynchronous way.

getTypeString

Returns an object identifier string

Properties

Name

Description

service_url

The url of the TcAdsWebService.
Dont change its value. This property is used in the underlying TcAdsWebService.Client object. You have to create a new TcAdsWebService.AdsConnection object instance to change this property.

service_user

The username which should be used to access the TcAdsWebService.
Dont change its value. This property is used in the underlying TcAdsWebService.Client object. You have to create a new TcAdsWebService.AdsConnection object instance to change this property.

service_password

The password which should be used to access the TcAdsWebService.
Dont change its value. This property is used in the underlying TcAdsWebService.Client object. You have to create a new TcAdsWebService.AdsConnection object instance to change this property.

timeout

The timeout for ajax request against the TcAdsWebService.
Default Value: 2000

timeoutCallback

A pointer to a javascript function which is called on a timeout of an ajax request.
Default Value: undefined

client

The underlying TcAdsWebService.Client object.
Dont change its value. Create a new TcAdsWebService.AdsConnection object to change its value.

netid

The NetID of the target AMS Router.

port

The port of the target AMS Router.