Skip to main content

WEBfactory 2010

WEBfactory 2010 WCF SilverlightTools Documentation

Abstract

This article provides all the needed information to learn and understand the WCF SilverlightTools documentation.

This WCF web service handles all the SilverlightTools related operations. The following methods are available:

GetEvents(string sessionId, string clientId, string userName, bool isDomainUser, EventFilter filter, int millisecondsTimeOut)

This method follows the WEBfactory 2010 Security Protocol.

Syntax

GetEvents(string sessionId, string clientId, string userName, bool isDomainUser, EventFilter filter, int millisecondsTimeOut);

Description

Retrieves all alarm events based on the provided filter and parameters

Parameters

  • sessionId (string) - the unique ID of the session, returned by the connect() method

  • clientId (string) - the user defined unique ID of the client from which the web service is called

  • userName (string) - the name of the WEBfactory 2010 defined user in context of which the method is called

  • isDomainUser (bool) - true if the WEBfactory 2010 defined user is an Active Directory user

  • filter (EventFilter) - the filter used for retrieving the events. It contains:

    • LanguageID (Int32) - the language filter, which can filter in/out events based on the language id

    • TimePeriod (TimePeriod) - filters in/out the events occurred in the specified time period

    • EventTypes (List<EventType>) - the list of event types to be retrieved. Can be:

      • AlarmOn = 1

      • AlarmOff = 2

      • AlarmAcknowledged = 3

    • AlarmTypes(List<AlarmType>) - the list of alarm types to be retrieved

    • AlarmGroups (List<AlarmGroup>) - the list of alarm groups to be retrieved

    • MaxEvents (Int32) - the maximum number of events

  • millisecondsTimeOut (int) - the amount of time, in milliseconds, in which the authentication process is verified. If this time period is exceeded or the login failed, a fault exception will be generated.

Return Value

A list of Event objects, each containing:

  • Type (EventType) - the event type. Can be:

    • AlarmOn - the currently triggered alarms

    • AlarmOff - the alarms that are not triggered

    • AlarmAcknowledged - the alarms that are acknowledged

  • Time (DateTime) - the time of the event

  • Alarm (Alarm) - the alarm object, containing:

    • Type (AlarmType) - the alarm type

    • Group (AlarmGroup) - the alarm group

    • Signal (Signal) - the signal on which the alarm is based

    • Symbol (int32) - the alarm symbol

    • Priority (int32) - the priority of the alarm

    • Value1 to Value20 - the replacement values of the alarm

GetEventsByToken(string securityToken, EventFilter filter, int millisecondsTimeOut)

Syntax

GetEvents(string securityToken, EventFilter filter, int millisecondsTimeOut);

Description

Retrieves all alarm events based on the provided filter and security token

Parameters

  • securityToken (string) - the security token returned by the Login() method

  • filter (EventFilter) - the filter used for retrieving the events. It contains:

    • LanguageID (Int32) - the language filter, which can filter in/out events based on the language id

    • TimePeriod (TimePeriod) - filters in/out the events occurred in the specified time period

    • EventTypes (List<EventType>) - the list of event types to be retrieved. Can be:

      • AlarmOn = 1

      • AlarmOff = 2

      • AlarmAcknowledged = 3

    • AlarmTypes(List<AlarmType>) - the list of alarm types to be retrieved

    • AlarmGroups (List<AlarmGroup>) - the list of alarm groups to be retrieved

    • MaxEvents (Int32) - the maximum number of events

  • millisecondsTimeOut (int) - the amount of time, in milliseconds, in which the authentication process is verified. If this time period is exceeded or the login failed, a fault exception will be generated.

Return Value

A list of Event objects, each containing:

  • Type (EventType) - the event type. Can be:

    • AlarmOn - the currently triggered alarms

    • AlarmOff - the alarms that are not triggered

    • AlarmAcknowledged - the alarms that are acknowledged

  • Time (DateTime) - the time of the event

  • Alarm (Alarm) - the alarm object, containing:

    • Type (AlarmType) - the alarm type

    • Group (AlarmGroup) - the alarm group

    • Signal (Signal) - the signal on which the alarm is based

    • Symbol (int32) - the alarm symbol

    • Priority (int32) - the priority of the alarm

    • Value1 to Value20 - the replacement values of the alarm

GetWFEvents(string sessionId, string clientId, string userName, bool isDomainUser, WFEventFilter filter, int millisecondsTimeOut)

This method follows the WEBfactory 2010 Security Protocol.

Syntax

GetWFEvents(string sessionId, string clientId, string userName, bool isDomainUser, WFEventFilter filter, int millisecondsTimeOut);

Description

Retrieves the WEBfactory 2010 events based on the provided filter and parameters

Parameters

  • sessionId (string) - the unique ID of the session, returned by the connect() method

  • clientId (string) - the user defined unique ID of the client from which the web service is called

  • userName (string) - the name of the WEBfactory 2010 defined user in context of which the method is called

  • isDomainUser (bool) - true if the WEBfactory 2010 defined user is an Active Directory user

  • filter (WFEventFilter) - the master filter used for retrieving the WEBfactory 2010 events. Each filter or sub-filter of this master filter can be set to include all, exclude all or apply filtering for it's contents. The filter contains:

    • AlarmFilter (WFAlarmEventFilter) - the alarm filter, containing the following sub-filters:

      • AlarmTypeFilter (GenericItemListFilter<AlarmType>) - the list of alarm types to be filtered in/out

      • AlarmGroupFilter (GenericItemListFilter<AlarmGroup>) - the list of alarm groups to be filtered in/out

      • AlarmPriorityFilter (AlarmPriorityFilter) - the alarm priority range to be filtered in/out

    • ServerFilter (WFEventCategoryFilter) - the event category filter, containing the following sub filters:

      • EventResultFilter (GenericItemListFilter<WFEventResult>) - the list of event results based on which the events will be filtered in/out. Can be either Successfull or Unsuccessfull.

      • EventTypeFilter (enericItemListFilter<WFEventType>) - the list of event types based on which the events will be filtered in/out:

        • AlarmOn - the currently triggered alarms

        • AlarmOff - the alarms that are not triggered

        • AlarmAcknowledged - the alarms that are acknowledged

        • ServerStarted - the server start event

        • ServerStopped - the server stop event

        • UserLoggedIn - the user log in event

        • UserLoggedOut - the user log out event

        • UserWroteSignal - the event fired by a user writing a signal

        • AlarmActivated - the event fired when an alarm is activated

        • AlarmDeactivated - the event fired when an alarm is deactivated

        • UserCreated - the event fired when a new WEBfactory 2010 user is created

        • UserModified - the event fired when a WEBfactory 2010 user is edited

        • UserDeleted - the event fired when a WEBfactory 2010 user is deleted

        • UserPasswordChanged - the event fired when the password of a user is changed

    • UserFilter (WFUserEventFilter) - the user filter, which can filter in/out events that belong to the specified user

    • AffectedUserFilter (WFAffectedUserEventFilter) - the affected user filter, which can filter in/out the events that affect this user (for example UserCreated, UserModified, etc.)

    • LanguageID (Int32) - the language filter, which can filter in/out events based on the language id

    • TimePeriod (TimePeriod) - filters in/out the events occurred in the specified time period

    • MaxEvents (Int32) - the maximum number of events

  • millisecondsTimeOut (int) - the amount of time, in milliseconds, in which the authentication process is verified. If this time period is exceeded or the login failed, a fault exception will be generated.

Return Value

A list of WFEvent objects, each containing:

  • Type (WFEventType) - the event type. Can be:

    • AlarmOn - the currently triggered alarms

    • AlarmOff - the alarms that are not triggered

    • AlarmAcknowledged - the alarms that are acknowledged

    • ServerStarted - the server start event

    • ServerStopped - the server stop event

    • UserLoggedIn - the user log in event

    • UserLoggedOut - the user log out event

    • UserWroteSignal - the event fired by a user writing a signal

    • AlarmActivated - the event fired when an alarm is activated

    • AlarmDeactivated - the event fired when an alarm is deactivated

    • UserCreated - the event fired when a new WEBfactory 2010 user is created

    • UserModified - the event fired when a WEBfactory 2010 user is edited

    • UserDeleted - the event fired when a WEBfactory 2010 user is deleted

    • UserPasswordChanged - the event fired when the password of a user is changed

  • Time (DateTime) - the time of the event

  • SystemTime (DateTime) - the time when the server registered the event

  • Alarm (Alarm) - the alarm object, containing:

    • Type (AlarmType) - the alarm type

    • Group (AlarmGroup) - the alarm group

    • Signal (Signal) - the signal on which the alarm is based

    • Symbol (int32) - the alarm symbol

    • Priority (int32) - the priority of the alarm

    • Value1 to Value20 - the replacement values of the alarm

  • ClientMachine (string) - the name of the machine that made the request

  • Server (Server) - the object representing the server which handles the event, containing the server Name

  • Signal (Signal) - the object representing the signal which triggered the event, containing:

    • Name (string) - the PLC name of the signal

    • AliasName (string) - the friendly name of the signal

    • Description (string) - the description of the signal

    • Unit (string) - the measurement unit for the signal's value

    • Group (SignalGroup) - the signal group

  • User (User) - the object representing the user, containing the user Name

  • SignalOldValue (string) - the old value of the signal that generated the event

  • SignalNewValue (string) - the new value of the signal that generated the event

  • AlarmAcknowledgeText (string) - the acknowledgment text of the alarm event

  • ResultCode (long) - the result code of the event

  • AffectedUserName (string) - the users affected by the even, if the event is a user event

  • EventData (string) - the event data

GetWFEventsByToken(string securityToken, WFEventFilter filter, int millisecondsTimeOut)

Syntax

GetWFEventsByToken(string securityToken, WFEventFilter filter, int millisecondsTimeOut);

Description

Retrieves the WEBfactory 2010 events based on the provided filter and security token

Parameters

  • securityToken (string) - the security token returned by the Login() method

  • filter (WFEventFilter) - the master filter used for retrieving the WEBfactory 2010 events. Each filter or sub-filter of this master filter can be set to include all, exclude all or apply filtering for it's contents. The filter contains:

    • AlarmFilter (WFAlarmEventFilter) - the alarm filter, containing the following sub-filters:

      • AlarmTypeFilter (GenericItemListFilter<AlarmType>) - the list of alarm types to be filtered in/out

      • AlarmGroupFilter (GenericItemListFilter<AlarmGroup>) - the list of alarm groups to be filtered in/out

      • AlarmPriorityFilter (AlarmPriorityFilter) - the alarm priority range to be filtered in/out

    • ServerFilter (WFEventCategoryFilter) - the event category filter, containing the following sub filters:

      • EventResultFilter (GenericItemListFilter<WFEventResult>) - the list of event results based on which the events will be filtered in/out. Can be either Successfull or Unsuccessfull.

      • EventTypeFilter (enericItemListFilter<WFEventType>) - the list of event types based on which the events will be filtered in/out:

        • AlarmOn - the currently triggered alarms

        • AlarmOff - the alarms that are not triggered

        • AlarmAcknowledged - the alarms that are acknowledged

        • ServerStarted - the server start event

        • ServerStopped - the server stop event

        • UserLoggedIn - the user log in event

        • UserLoggedOut - the user log out event

        • UserWroteSignal - the event fired by a user writing a signal

        • AlarmActivated - the event fired when an alarm is activated

        • AlarmDeactivated - the event fired when an alarm is deactivated

        • UserCreated - the event fired when a new WEBfactory 2010 user is created

        • UserModified - the event fired when a WEBfactory 2010 user is edited

        • UserDeleted - the event fired when a WEBfactory 2010 user is deleted

        • UserPasswordChanged - the event fired when the password of a user is changed

    • UserFilter (WFUserEventFilter) - the user filter, which can filter in/out events that belong to the specified user

    • AffectedUserFilter (WFAffectedUserEventFilter) - the affected user filter, which can filter in/out the events that affect this user (for example UserCreated, UserModified, etc.)

    • LanguageID (Int32) - the language filter, which can filter in/out events based on the language id

    • TimePeriod (TimePeriod) - filters in/out the events occurred in the specified time period

    • MaxEvents (Int32) - the maximum number of events

  • millisecondsTimeOut (int) - the amount of time, in milliseconds, in which the authentication process is verified. If this time period is exceeded or the login failed, a fault exception will be generated.

Return Value

A list of WFEvent objects, each containing:

  • Type (WFEventType) - the event type. Can be:

    • AlarmOn - the currently triggered alarms

    • AlarmOff - the alarms that are not triggered

    • AlarmAcknowledged - the alarms that are acknowledged

    • ServerStarted - the server start event

    • ServerStopped - the server stop event

    • UserLoggedIn - the user log in event

    • UserLoggedOut - the user log out event

    • UserWroteSignal - the event fired by a user writing a signal

    • AlarmActivated - the event fired when an alarm is activated

    • AlarmDeactivated - the event fired when an alarm is deactivated

    • UserCreated - the event fired when a new WEBfactory 2010 user is created

    • UserModified - the event fired when a WEBfactory 2010 user is edited

    • UserDeleted - the event fired when a WEBfactory 2010 user is deleted

    • UserPasswordChanged - the event fired when the password of a user is changed

  • Time (DateTime) - the time of the event

  • SystemTime (DateTime) - the time when the server registered the event

  • Alarm (Alarm) - the alarm object, containing:

    • Type (AlarmType) - the alarm type

    • Group (AlarmGroup) - the alarm group

    • Signal (Signal) - the signal on which the alarm is based

    • Symbol (int32) - the alarm symbol

    • Priority (int32) - the priority of the alarm

    • Value1 to Value20 - the replacement values of the alarm

  • ClientMachine (string) - the name of the machine that made the request

  • Server (Server) - the object representing the server which handles the event, containing the server Name

  • Signal (Signal) - the object representing the signal which triggered the event, containing:

    • Name (string) - the PLC name of the signal

    • AliasName (string) - the friendly name of the signal

    • Description (string) - the description of the signal

    • Unit (string) - the measurement unit for the signal's value

    • Group (SignalGroup) - the signal group

  • User (User) - the object representing the user, containing the user Name

  • SignalOldValue (string) - the old value of the signal that generated the event

  • SignalNewValue (string) - the new value of the signal that generated the event

  • AlarmAcknowledgeText (string) - the acknowledgment text of the alarm event

  • ResultCode (long) - the result code of the event

  • AffectedUserName (string) - the users affected by the even, if the event is a user event

  • EventData (string) - the event data