Skip to main content

WEBfactory 2010

Alarm States operations

Abstract

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

SetAlarmState
Method Definition
void SetAlarmState(string serverName, string alarmId, WFAlarmStates state, 
  DateTime reactivation);
void SetAlarmState(string serverName, string alarmId, WFAlarmStates state, 
  DateTime reactivation, OnResultDelegate resultDelegate);
void SetAlarmState(string serverName, string alarmId, WFAlarmStates state, 
  DateTime reactivation, string user, string password);
void SetAlarmState(string serverName, string alarmId, WFAlarmStates state, 
  DateTime reactivation, string user, string password, bool isDomainUser);
void SetAlarmState(string serverName, string alarmId, WFAlarmStates state, 
  DateTime reactivation, string user, string password, OnResultDelegate resultDelegate);
void SetAlarmState(string serverName, string alarmId, WFAlarmStates state, 
  DateTime reactivation, string user, string password, bool isDomainUser, 
  OnResultDelegate resultDelegate);
Calling Parameters
  • serverName Host name of WEBfactory 2010 server

  • alarmId Alarm ID of a WEBfactory 2010 alarm

  • state Alarm state

  • user User name

  • reactivation Time of reactivation

  • password User password

  • isDomainUser User is in domain

  • resultDelegate Delegate to function handling the result

Description

This method changes the state of an alarm.

The parameter alarmId is represented by a unique identifier. These values are defined inside WEBfactory 2010 database:

  • AlarmOn = 1,

  • AlarmOff = 2,

  • AlarmAcknowledged = 3,

  • ServerStarted = 4,

  • ServerStopped = 5,

  • UserLoggedIn = 6,

  • UserLoggedOut = 7,

  • UserWroteSignal = 8,

  • AlarmActivated = 9,

  • AlarmDeactivated = 10,

  • UserCreated = 11,

  • UserModified = 12,

  • UserDeleted = 13,

  • UserPasswordChanged = 14.

Other values can be requested from the SelectionChanged event of AlarmOnline control.

The parameter state is of type WFAlarmStates:

public enum WFAlarmStates 
{ 
    [Obsolete]
    OFF = 0,
    NotProcessedButVisible = 0,
    [Obsolete]
    ON = 1,
    ProcessedAndVisible = 1,
    NotProcessedAndNotVisible = 2,
    ProcessedButNotVisible = 3
};

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 2010 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)

SetAlarmStates
Method Definition
void SetAlarmStates(string serverName, string[] alarmIds, WFAlarmStates[] states,
  DateTime[] reactivations);
void SetAlarmStates(string serverName, string[] alarmIds, WFAlarmStates[] states, 
  DateTime[] reactivations, OnResultDelegate resultDelegate);
void SetAlarmStates(string serverName, string[] alarmIds, WFAlarmStates[] states, 
  DateTime[] reactivations, string user, string password);
void SetAlarmStates(string serverName, string[] alarmIds, WFAlarmStates[] states, 
  DateTime[] reactivations, string user, string password, bool isDomainUser);
void SetAlarmStates(string serverName, string[] alarmIds, WFAlarmStates[] states, 
  DateTime[] reactivations, string user, string password, OnResultDelegate resultDelegate);
void SetAlarmStates(string serverName, string[] alarmIds, WFAlarmStates[] states, 
  DateTime[] reactivations, string user, string password, bool isDomainUser, 
  OnResultDelegate resultDelegate);
Calling Parameters
  • serverName Host name of WEBfactory 2010 server

  • alarmIds Array of alarms ID of a WEBfactory 2010 alarm

  • states Array of states

  • user User name

  • reactivation Time of reactivation

  • password User password

  • isDomainUser User is in domain

  • resultDelegate Delegate to function handling the result

Description

This method changes the states of multiple alarms.

The parameter alarmIds is an array of unique identifiers. These values are defined inside WEBfactory 2010 database or can be requested from the SelectionChanged event of AlarmOnline control.

The parameter states is an array of type WFAlarmStates:

	public enum WFAlarmStates { OFF, ON };

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 2010 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)

AcknowledgeAllAlarms
Method Definition
void AcknowledgeAllAlarms(string serverName);

void AcknowledgeAllAlarms(string serverName, OnResultDelegate resultDelegate);

void AcknowledgeAllAlarms(string serverName, string password);

void AcknowledgeAllAlarms(string serverName, string password, OnResultDelegate resultDelegate);

void AcknowledgeAllAlarms(string serverName, string user, string password);

void AcknowledgeAllAlarms(string serverName, string user, string password, OnResultDelegate resultDelegate);

void AcknowledgeAllAlarms(string serverName, string user, string password, bool isDomainUser);

void AcknowledgeAllAlarms(string serverName, string user, string password, bool isDomainUser, OnResultDelegate resultDelegate);
Calling Parameters
  • serverName Host name of WEBfactory 2010 server

  • comment The comment with which the alarm has been acknowledged

  • user User name

  • password User password

  • isDomainUser User is in domain

  • resultDelegate Delegate to function handling the result

Description

This method sets all active alarms to acknowledged status.

serverName is necessary for multi server systems only. For a single server project it can be empty.

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 2010 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

  • -1: Error. The following parameters will represent:

    • The number of authorization Error encountered

    • The number of OPC Errors encountered

AcknowledgeAllAlarmsWithComment
Method Definition
void AcknowledgeAllAlarmsWithComment(string serverName, string comment);

void AcknowledgeAllAlarmsWithComment(string serverName, string comment, OnResultDelegate resultDelegate);

void AcknowledgeAllAlarmsWithComment(string serverName, string comment, string password);

void AcknowledgeAllAlarmsWithComment(string serverName, string comment, string password, OnResultDelegate resultDelegate);

void AcknowledgeAllAlarmsWithComment(string serverName, string comment, string user, string password);

void AcknowledgeAllAlarmsWithComment(string serverName, string comment, string user, string password, OnResultDelegate resultDelegate);

void AcknowledgeAllAlarmsWithComment(string serverName, string comment, string user, string password, bool isDomainUser);

void AcknowledgeAllAlarmsWithComment(string serverName, string comment, string user, string password, bool isDomainUser, OnResultDelegate resultDelegate);
Calling Parameters
  • serverName Host name of WEBfactory 2010 server

  • comment The comment with which the alarm has been acknowledged

  • user User name

  • password User password

  • isDomainUser User is in domain

  • resultDelegate Delegate to function handling the result

Description

This method sets all active alarms to acknowledged status.

serverName is necessary for multi server systems only. For a single server project it can be empty.

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 2010 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

  • -1: Error. The following parameters will represent:

    • The number of authorization Error encountered

    • The number of OPC Errors encountered

AcknowledgeAllGoneAlarms
Method Definition
void AcknowledgeAllGoneAlarms(string serverName, string comment);

void AcknowledgeAllGoneAlarms(string serverName, string comment, OnResultDelegate resultDelegate);

void AcknowledgeAllGoneAlarms(string serverName, string comment, string password);

void AcknowledgeAllGoneAlarms(string serverName, string comment, string password, OnResultDelegate resultDelegate);

void AcknowledgeAllGoneAlarms(string serverName, string comment, string user, string password);

void AcknowledgeAllGoneAlarms(string serverName, string comment, string user, string password, OnResultDelegate resultDelegate);

void AcknowledgeAllGoneAlarms(string serverName, string comment, string user, string password, bool isDomainUser);

void AcknowledgeAllGoneAlarms(string serverName, string comment, string user, string password, bool isDomainUser, OnResultDelegate resultDelegate);
Calling Parameters
  • serverName Host name of WEBfactory 2010 server

  • comment The comment with which the alarm has been acknowledged

  • user User name

  • password User password

  • isDomainUser User is in domain

  • resultDelegate Delegate to function handling the result

Description

This method sets all active alarms to acknowledged status.

serverName is necessary for multi server systems only. For a single server project it can be empty.

comment is necessary only if you want to acknowledge with comment, if not it must be null.

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 2010 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

  • -1: Error. The following parameters will represent:

    • The number of authorization Error encountered

    • The number of OPC Errors encountered

Acknowledge Alarms
Method Definition
void AcknowledgeAlarms(string serverName, IEnumerable<Guid> alarmIds, string comment);

void AcknowledgeAlarms(string serverName, IEnumerable<Guid> alarmIds, string comment, OnResultDelegate resultDelegate);

void AcknowledgeAlarms(string serverName, IEnumerable<Guid> alarmIds, string comment, string password);

void AcknowledgeAlarms(string serverName, IEnumerable<Guid> alarmIds, string comment, string password, OnResultDelegate resultDelegate);

void AcknowledgeAlarms(string serverName, IEnumerable<Guid> alarmIds, string comment, string user, string password);

void AcknowledgeAlarms(string serverName, IEnumerable<Guid> alarmIds, string comment, string user, string password, OnResultDelegate resultDelegate);

void AcknowledgeAlarms(string serverName, IEnumerable<Guid> alarmIds, string comment, string user, string password, bool isDomainUser);

void AcknowledgeAlarms(string serverName, IEnumerable<Guid> alarmIds, string comment, string user, string password, bool isDomainUser, OnResultDelegate resultDelegate);

void AcknowledgeAlarms(string serverName, Guid alarmId, string comment);

void AcknowledgeAlarms(string serverName, Guid alarmId, string comment, OnResultDelegate resultDelegate);

void AcknowledgeAlarms(string serverName, Guid alarmId, string comment, string password);

void AcknowledgeAlarms(string serverName, Guid alarmId, string comment, string password, OnResultDelegate resultDelegate);

void AcknowledgeAlarms(string serverName, Guid alarmId, string comment, string user, string password);

void AcknowledgeAlarms(string serverName, Guid alarmId, string comment, string user, string password, OnResultDelegate resultDelegate);

void AcknowledgeAlarms(string serverName, Guid alarmId, string comment, string user, string password, bool isDomainUser);

void AcknowledgeAlarms(string serverName, Guid alarmIds, string comment, string user, string password, bool isDomainUser, OnResultDelegate resultDelegate);
Calling Parameters
  • serverName Host name of WEBfactory 2010 server

  • alarmIds The list of alarm ids that is been acknowledged

  • alarmId The alarm id that is been acknowledged

  • comment The comment with which the alarm has been acknowledged

  • user User name

  • password User password

  • isDomainUser User is in domain

  • resultDelegate Delegate to function handling the result

Description

This method sets all given alarms to acknowledged status.

serverName is necessary for multi server systems only. For a single server project it can be empty.

comment is necessary only if you want to acknowledge with comment, if not it must be null.

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 2010 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

  • -1: Error. The following parameters will represent:

    • The number of authorization Error encountered

    • The number of OPC Errors encountered

Acknowledge all Active Alarms
Method Definition
void AcknowledgeAlarmsByGroup(string serverName, string groupName, string comment, string user, string password, bool isDomainUser, OnResultDelegate resultDelegate);
void AcknowledgeAlarmsByGroup(string serverName, string groupName, string comment);
void AcknowledgeAlarmsByGroup(string serverName, string groupName, string comment, OnResultDelegate resultDelegate);
void AcknowledgeAlarmsByGroup(string serverName, string groupName, string comment, string password);
void AcknowledgeAlarmsByGroup(string serverName, string groupName, string comment, string password, OnResultDelegate resultDelegate);
void AcknowledgeAlarmsByGroup(string serverName, string groupName, string comment, string user, string password, bool isDomainUser);
void AcknowledgeAlarmsByGroup(string serverName, string groupName, string comment, string user, string password);
void AcknowledgeAlarmsByGroup(string serverName, string groupName, string comment, string user, string password, OnResultDelegate resultDelegate);
Calling Parameters
  • serverName Host name of WEBfactory 2010 Server. Use empty string for silverlight host.

  • groupName The group of alarms that is been acknowledged

  • alarmId The alarm id that is been acknowledged

  • comment The comment with which the alarm has been acknowledged

  • user User name

  • password User password

  • isDomainUser User is in domain

  • resultDelegate Delegate to function handling the result

Description

This method sets all given active alarms to acknowledged status.

serverName is necessary for multi server systems only. For a single server project it can be empty.

comment is necessary only if you want to acknowledge with comment, if not it must be null.

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 2010 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

  • -1: Error. The following parameters will represent:

    • The number of authorization Error encountered

    • The number of OPC Errors encountered