The following tables list the members exposed by EventSubscriptionMgt.
Name | Description | |
---|---|---|
![]() | EventSubscriptionMgt Constructor | Constructor |
Name | Description | |
---|---|---|
![]() | CancelRefresh | Cancels a refresh in progress for the event subscription. If a refresh is in progress, the server should send one final callback with the last refresh flag set and the number of events equal to zero. |
![]() | Create | Add an Event Subscription object to an Event Server. Create an OPCEventSubcription object on behalf of this client and return an interface to the Client. This object will support at least IUnknown, IOPCEventSubscriptionMgt and IConnectionPointContainer. The client can manage the state of this interface including the filter and can create subscriptions to it via ConnectionPoints as described later. The Event Subscription Object uses conventional reference counting and thus will be deleted with all interfaces to it are released. |
![]() | Dispose | Release all COM objects for this event subscription. |
![]() | GetFilter | Returns the filter currently in use for event subscriptions. |
![]() | GetKeepAlive | Returns the currently active keep-alive time for the subscription. |
![]() | GetReturnedAttributes | For each Event Category, GetReturnedAttributes retrieves the attributes which are currently specified to be returned with event notifications in the IOPCEventSink::OnEvent callback. All retrieved attributes have been specified by previous calls to SelectReturnedAttributes. |
![]() | GetState | Get the current state of the subscription. |
![]() | Refresh | Force a refresh for all active conditions and inactive, unacknowledged conditions whose event notifications match the filter of the event subscription. Clients will often need to get the current condition information from the server, particularly at client startup, for things such as a current alarm summary. The OPC Event Server supports this requirement by resending the most recent event notifications which satisfy the filter in the event subscription and which are related to active and/or unacknowledged conditions. The client can then derive the current condition status from the “refreshed” event notifications. |
![]() | SelectReturnedAttributes | For each Event Category, SelectReturnedAttributes sets the attributes to be returned with event notifications in the IOPCEventSink::OnEvent callback. This method can be called multiple times in order to specify the attributes to return for each unique event type and event category pair. For a given event type and event category pair, the attributes returned can be “cleared” by setting the AttributeIDs array length to zero. If this is called multiple times for the same event type and event category pair, then the latest call will be in effect. |
![]() | SetFilter | Sets the filtering criteria to be used for the event subscription. Events may be selected using the following criteria: • Type of event, i.e. simple, condition, or tracking. • Event categories • Lowest severity, i.e. all events with a severity greater than or equal to the specified severity. • Highest severity, i.e. all events with a severity less than or equal to the specified severity. • Process areas • Event Sources A list of values for a single criterion are logically ORed together (e.g. if two event categories arespecified, event notifications for both categories will be received). If multiple criteria are specified, they will be logically ANDed together, i.e. only those events satisfying all criteria will be selected. An example is specifying both lowest severity and highest severity will result in the selection of events with severities lying between the two values. An OPCEventSubscription object has only one filter. |
![]() | SetKeepAlive | Clients can set the keep-alive time for a subscription to cause the server to provide client callbacks on the subscription when there are no new events to report. Clients can then be assured of the health of the server and subscription without resorting to pinging the server with calls to GetStatus(). Using this facility, a client can expect a callback (data or keep-alive) within the specified keep-alive time. Servers shall reset their keep-alive timers when real data is sent (i.e. it is not acceptable to constantly send the keep-alive callback at a fixed period equal to the keep-alive time irrespective of data callbacks). |
![]() | SetState | Client can set various properties of the event subscription. Pointers to items are used so that the client can omit properties he does not want to change by passing a null pointer. |
Name | Description | |
---|---|---|
![]() | EventExceptionHandler | This user handler is called when an exception happens in the OnEvent callback handler. If the application handler uses Windows features then the handler must synchonize with the foreground threadusing Forms.Invoke(). |