//File: DAISAESubscription.idl #ifndef _DAIS_AESUBSCRIPTION_IDL #define _DAIS_AESUBSCRIPTION_IDL #pragma prefix "omg.org" #include module DAIS { module AlarmsAndEvents { module Subscription { struct State { boolean active; unsigned long buffer_time; unsigned long max_size; }; struct OPCSourceFilter { ServerItemIdentifications areas; ServerItemIdentifications soures; }; typedef short SourceFilterType; const SourceFilterType OPC_SOURCE_FILTER_TYPE = 1; const SourceFilterType XPATH_SOURCE_FILTER_TYPE = 2; union SourceFilter switch(SourceFilterType) { case OPC_SOURCE_FILTER_TYPE : OPCSourceFilter opc_source_filters; case XPATH_SOURCE_FILTER_TYPE : string xpath_source_filter; }; typedef short ReasonFilterType; const ReasonFilterType OPC_REASON_FILTER_TYPE = 1; const ReasonFilterType XPATH_REASON_FILTER_TYPE = 2; union ReasonFilter switch(ReasonFilterType) { case OPC_REASON_FILTER_TYPE : ServerItemIdentifications opc_reason_filters; case XPATH_REASON_FILTER_TYPE : string xpath_reason_filter; }; struct FilterSpec { ReasonFilter reasons; unsigned long low_severity; unsigned long high_severity; SourceFilter sources; TypeIDs types; }; struct PropSelection { ResourceID reason; PropertyIDs properties; }; typedef sequence PropSelections; enum ReadDirection { READ_FORWARDS, READ_BAKWARDS }; typedef unsigned long CancelID; interface Manager { exception BusyDueToRefresh{string reason;}; exception HistoryNotImplemented{string reason;}; exception InvalidStateSpecified{string reason;}; attribute IO::Callback callback; void set_filter ( in FilterSpec filer_spec ) raises (BusyDueToRefresh); FilterSpec get_filter (); void select_returned_properties ( in PropSelections prop_selections ); PropSelections get_returned_properties ( in ResourceIDs reasons ); CancelID refresh () raises (BusyDueToRefresh); CancelID async_read_history ( in DateTime start_time, in unsigned long number_of_events, in ReadDirection direction, in unsigned long transaction_id ) raises (HistoryNotImplemented); void cancel ( in CancelID cancel_id ); State get_state (); State set_state ( in State subscription_spec ) raises (InvalidStateSpecified); Manager clone (); void destroy (); }; typedef unsigned long Filter; const Filter FILTER_BY_MAIN_REASON = 0x0001; const Filter FILTER_BY_REASON = 0x0002; const Filter FILTER_BY_SEVERITY = 0x0004; const Filter FILTER_BY_AREA = 0x0008; const Filter FILTER_BY_SOURCE = 0x0010; const Filter FILTER_WITH_XPATH = 0x0020; const Filter FILTER_BY_SOURCE_TYPE = 0x0040; interface Home { exception InvalidStateSpecified{string reason;}; Filter query_available_filters (); Manager create_subscription ( in State subscription_spec, out State revised_subscr_spec ) raises (InvalidStateSpecified); }; };};}; #endif // _DAIS_AESUBSCRIPTION_IDL