#region Copyright (c) 2011-2023 Technosoftware GmbH. All rights reserved //----------------------------------------------------------------------------- // Copyright (c) 2011-2023 Technosoftware GmbH. All rights reserved // Web: https://www.technosoftware.com // // The source code in this file is covered under a dual-license scenario: // - Owner of a purchased license: SCLA 1.0 // - GPL V3: everybody else // // SCLA license terms accompanied with this source code. // See SCLA 1.0: https://technosoftware.com/license/Source_Code_License_Agreement.pdf // // GNU General Public License as published by the Free Software Foundation; // version 3 of the License are accompanied with this source code. // See https://technosoftware.com/license/GPLv3License.txt // // This source code is distributed in the hope that it will be useful, but // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY // or FITNESS FOR A PARTICULAR PURPOSE. //----------------------------------------------------------------------------- #endregion Copyright (c) 2011-2023 Technosoftware GmbH. All rights reserved #region Using Directives #endregion namespace Technosoftware.DaAeHdaClient.Ae { /// /// Defines functionality that is common to all OPC Alarms and Events servers. /// public interface ITsCAeServer : IOpcServer { /// /// Returns the current server status. /// /// The current server status. OpcServerStatus GetServerStatus(); /// /// Creates a new event subscription. /// /// The initial state for the subscription. /// The new subscription object. ITsCAeSubscription CreateSubscription(TsCAeSubscriptionState state); /// /// Returns the event filters supported by the server. /// /// A bit mask of all event filters supported by the server. int QueryAvailableFilters(); /// /// Returns the event categories supported by the server for the specified event types. /// /// A bit mask for the event types of interest. /// A collection of event categories. TsCAeCategory[] QueryEventCategories(int eventType); /// /// Returns the condition names supported by the server for the specified event categories. /// /// A bit mask for the event categories of interest. /// A list of condition names. string[] QueryConditionNames(int eventCategory); /// /// Returns the sub-condition names supported by the server for the specified event condition. /// /// The name of the condition. /// A list of sub-condition names. string[] QuerySubConditionNames(string conditionName); /// /// Returns the condition names supported by the server for the specified event source. /// /// The name of the event source. /// A list of condition names. string[] QueryConditionNames(string sourceName); /// /// Returns the event attributes supported by the server for the specified event categories. /// /// The event category of interest. /// A collection of event attributes. TsCAeAttribute[] QueryEventAttributes(int eventCategory); /// /// Returns the DA item ids for a set of attribute ids belonging to events which meet the specified filter criteria. /// /// The event source of interest. /// The id of the event category for the events of interest. /// The name of a condition within the event category. /// The name of a sub-condition within a multi-state condition. /// The ids of the attributes to return item ids for. /// A list of item urls for each specified attribute. TsCAeItemUrl[] TranslateToItemIDs( string sourceName, int eventCategory, string conditionName, string subConditionName, int[] attributeIDs); /// /// Returns the current state information for the condition instance corresponding to the source and condition name. /// /// The source name /// A condition name for the source. /// The list of attributes to return with the condition state. /// The current state of the connection. TsCAeCondition GetConditionState( string sourceName, string conditionName, int[] attributeIDs); /// /// Places the specified process areas into the enabled state. /// /// A list of fully qualified area names. /// The results of the operation for each area. OpcResult[] EnableConditionByArea(string[] areas); /// /// Places the specified process areas into the disabled state. /// /// A list of fully qualified area names. /// The results of the operation for each area. OpcResult[] DisableConditionByArea(string[] areas); /// /// Places the specified process areas into the enabled state. /// /// A list of fully qualified source names. /// The results of the operation for each area. OpcResult[] EnableConditionBySource(string[] sources); /// /// Places the specified process areas into the disabled state. /// /// A list of fully qualified source names. /// The results of the operation for each area. OpcResult[] DisableConditionBySource(string[] sources); /// /// Returns the enabled state for the specified process areas. /// /// A list of fully qualified area names. TsCAeEnabledStateResult[] GetEnableStateByArea(string[] areas); /// /// Returns the enabled state for the specified event sources. /// /// A list of fully qualified source names. TsCAeEnabledStateResult[] GetEnableStateBySource(string[] sources); /// /// Used to acknowledge one or more conditions in the event server. /// /// The identifier for who is acknowledging the condition. /// A comment associated with the acknowledgment. /// The conditions being acknowledged. /// A list of result id indictaing whether each condition was successfully acknowledged. OpcResult[] AcknowledgeCondition( string acknowledgerID, string comment, TsCAeEventAcknowledgement[] conditions); /// /// Browses for all children of the specified area that meet the filter criteria. /// /// The full-qualified id for the area. /// The type of children to return. /// The expression used to filter the names of children returned. /// The set of elements that meet the filter criteria. TsCAeBrowseElement[] Browse( string areaID, TsCAeBrowseType browseType, string browseFilter); /// /// Browses for all children of the specified area that meet the filter criteria. /// /// The full-qualified id for the area. /// The type of children to return. /// The expression used to filter the names of children returned. /// The maximum number of elements to return. /// The object used to continue the browse if the number nodes exceeds the maximum specified. /// The set of elements that meet the filter criteria. TsCAeBrowseElement[] Browse( string areaID, TsCAeBrowseType browseType, string browseFilter, int maxElements, out IOpcBrowsePosition position); /// /// Continues browsing the server's address space at the specified position. /// /// The maximum number of elements to return. /// The position object used to continue a browse operation. /// The set of elements that meet the filter criteria. TsCAeBrowseElement[] BrowseNext(int maxElements, ref IOpcBrowsePosition position); } }