Connect

Declaration

S7RClientSSjToken Connect(String url, String userid, String password) throws S7RClientSSjException.

Purpose

This method attempts to create a connection to a Substation ES using the url. It will throw a S7RClientSSjException if connection cannot be made. If the call is successful, then a token is returned. This token should be used on all other methods so that the appropriate connection is used.
Note: In ActiveMatrix BusinessWorks, this token should be passed between activities so they work with the appropriate connection.

Parameters

Parameter Description
url A string indicating the ip and port number to use (example: test.myname.com: 2222 or 192.168.1.1:2222).
userid A string user Id value to be sent to Substation ES to identify the client (max length is 9 characters).
password A string password value to be sent to Substation ES. The data is mangled when sent to Substation ES. This field along with "userid" field is used to validate a user by Substation ES (max length is 8 characters).

Return

An S7RClientSSjToken which must be used with subsequent methods to identify a connection.

Errors

  • S7RClientSSjException: If there is a problem with connection a S7RClientSSjException is thrown.

Example

S7RClientSSj conn = new S7RClientSSj();
S7RClientSSjToken token = conn.Connect(url, userid, password);