sendRegistration

Declaration

void sendRegistration(S7RClientSSjToken token, ServiceType Type, String service_name) throws UnsupportedEncodingException, S7RClientSSjException.

Purpose

This method sends registration data to the Substation ES to indicate what service the client will support as a Recipe. Substation ES will process your data as indicated by its service definition.

Parameters

Parameter Description
token The S7RClientSSjToken returned by Connect method.
type The ServiceType - either ServiceType.Recipe or ServiceType.Trigger.
service_name String with value of service name (max length is 127 characters).

Return

The method does not return any value when registration is successful.

Errors

  • S7RClientSSjException: If registration cannot be done.
  • UnsupportedEncodingException: If the service name does not translate.

Example

S7RClientSSj conn = new S7RClientSSj();
S7RClientSSjToken token = conn.Connect(url, userid, password);
byte[] dataIn = conn.receiveWait(token);
if (dataIn != null) {
  conn.sendRegistration(token, ServiceType.Recipe,  
“myRecipeServiceName”);
}
conn.Disconnect(token);