WEBfactory 2010

Signal States operations

Abstract

Check out this article and learn more details about the WEBfactory 2010 Client SDK signal states operations and the involved paramters.

SetSignalState
Method Definition
void SetSignalState(string serverName, string signalName, WFSignalState state);
void SetSignalState(string serverName, string signalName, WFSignalState state, 
	OnResultDelegate resultDelegate);
void SeSignalState(string serverName, string signalName, WFSignalState state, 
	string user, string password);
void SetSignalState(string serverName, string signalName, WFSignalState state, 
	string user, string password, OnResultDelegate resultDelegate);
void SetSignalState(string serverName, string signalName, WFSignalState state,
	object inactiveValue);
void SetSignalState(string serverName, string signalName, WFSignalState state, 
	object inactiveValue, OnResultDelegate resultDelegate);
void SeSignalState(string serverName, string signalName, WFSignalState state, 
	object inactiveValue, string user, string password);
void SeSignalState(string serverName, string signalName, WFSignalState state, 
	object inactiveValue, string user, string password, bool isDomainUser);
void SetSignalState(string serverName, string signalName, WFSignalState state, 
	object inactiveValue, string user, string password, OnResultDelegate resultDelegate);
void SetSignalState(string serverName, string signalName, WFSignalState state, 
	object inactiveValue, string user, string password, bool isDomainUser, OnResultDelegate resultDelegate);
Calling Parameters
  • serverName Host name of WEBfactory server

  • signalName Name of a WEBfactory signal

  • state Signal state

  • inactiveValue Value used for that signal while the signal is inactive

  • user User name

  • password User password

  • isDomainUser User is in domain

  • resultDelegate Delegate to function handling the result

Description

This method changes the state of a signal.

The parameter state is of type WFSignalState:

public enum WFSignalState 
{ 
    Active,
    Inactive
};

The delegate OnResultDelegate is defined as:

	void OnResultDelegate(Exception error, int[] results);

The error (type Exception) is a Silverlight error indicator for asynchronous operations. WEBfactory bypasses this exception to SDK users to make it easier to find communication errors.

Each value of the integer array results may have one of the following values:

  • 0: Success

  • -4095: User login failed (Login)

  • -4094: No user logged in (Write)

  • -4093: Insufficient user authorizations (Write)

  • -4092: User already logged on (Login)

  • -4091: Invalid user password (Login)

  • -4090: Max user count reached (Login)

  • -4089: Unspecified server error (Login, Write)

  • -4088: Signal is write protected (Write)

SetSignalStates
Method Definition
void SetSignalStates(string serverName, string[] signalNames, WFSignalState[] states);
void SetSignalStates (string serverName, string[] signalNames, WFSignalState[] states, 
  OnResultDelegate resultDelegate);
void SetSignalStates (string serverName, string[] signalNames, WFSignalState[] states, 
  string user, string password);
void SetSignalStates (string serverName, string[] signalNames, WFSignalState[] states, 
  string user, string password, bool isDomainUser);
void SetSignalStates (string serverName, string[] signalNames, WFSignalState[] states, 
  string user, string password, OnResultDelegate resultDelegate);
void SetSignalStates (string serverName, string[] signalNames, WFSignalState[] states, 
  string user, string password, bool isDomainUser, OnResultDelegate resultDelegate);
void SetSignalStates(string serverName, string[] signalNames, WFSignalState[] states,
  object[] inactiveValues);
void SetSignalStates (string serverName, string[] signalNames, WFSignalState[] states, 
  object[] inactiveValues, OnResultDelegate resultDelegate);
void SetSignalStates (string serverName, string[] signalNames, WFSignalState[] states, 
  object[] inactiveValues, string user, string password);
void SetSignalStates (string serverName, string[] signalNames, WFSignalState[] states, 
  object[] inactiveValues, string user, string password, bool isDomainUser);
void SetSignalStates (string serverName, string[] signalNames, WFSignalState[] states, 
  object[] inactiveValues, string user, string password, OnResultDelegate resultDelegate);

void SetSignalStates (string serverName, string[] signalNames, WFSignalState[] states, 
  object[] inactiveValues, string user, string password, bool isDomainUser,
  OnResultDelegate resultDelegate);
Calling Parameters
  • serverName Host name of WEBfactory server

  • signalNames Array of names of WEBfactory signals

  • states Array of states

  • inactiveValues Values used for those signals that are inactive

  • user User name

  • password User password

  • isDomainUser User is in domain

  • resultDelegate Delegate to function handling the result

Description

This method changes the states of multiple signals.

The parameter state is of type WFSignalState:

public enum WFSignalState 
{ 
    Active,
    Inactive
};

The delegate OnResultDelegate is defined as:

	void OnResultDelegate(Exception error, int[] results);

The error (type Exception) is a Silverlight error indicator for asynchronous operations. WEBfactory bypasses this exception to SDK users to make it easier to find communication errors.

Each value of the integer array results may have one of the following values:

  • 0: Success

  • -4095: User login failed (Login)

  • -4094: No user logged in (Write)

  • -4093: Insufficient user authorizations (Write)

  • -4092: User already logged on (Login)

  • -4091: Invalid user password (Login)

  • -4090: Max user count reached (Login)

  • -4089: Unspecified server error (Login, Write)

  • -4088: Signal is write protected (Write)