Previous | Table of Contents | Next |
//File: DAISAEIO.idl#ifndef _DAIS_AEIO_IDL#define _DAIS_AEIO_IDL#pragma prefix "omg.org"#include <DAISAECommon.idl>
module DAIS {module AlarmsAndEvents {module IO {
typedef unsigned long ChangeSpec;const ChangeSpec CHANGE_ACTIVE_STATE = 0x0001;
const ChangeSpec CHANGE_ACK_STATE = 0x0002; const ChangeSpec CHANGE_ENABLE_STATE = 0x0004; const ChangeSpec CHANGE_QUALITY
= 0x0008; const ChangeSpec CHANGE_SEVERITY = 0x0010; const ChangeSpec CHANGE_CONDITION = 0x0020; const ChangeSpec CHANGE_MESSAGE
= 0x0040; const ChangeSpec CHANGE_ATTRIBUTE = 0x0080;
struct SimpleEvent { ResourceID source; string source_pathname; DateTime time_stamp; string message; EventFormat event_format;
ResourceID category; string category_name; unsigned long severity; PropertyValues property_values;
};
struct TrackingEvent { string actor_name; };
struct ConditionEvent { string condition_space_name; ResourceID condition_space; string condition_name; unsigned long condition_number;
boolean ack_required; DateTime active_time; EventID event_id; ChangeSpec change_specification; SourceConditionOpState source_condition_op_state;
Quality dais_quality;
};
struct Event { SimpleEvent simple_event; TrackingEvent tracking_event; ConditionEvent condition_event;
};typedef sequence<Event> Events;
interface Callback{
void on_event (in boolean refresh,in boolean last_refresh,in Events the_events
);
void on_read_complete (in Events the_events,in unsigned long transaction_id
); }; };};}; #endif // _DAIS_AEIO_IDL
ChangeSpec
A flag word having a number of flags telling what change caused the event notification.
Flag | Description | ||||
CHANGE_ACTIVE_STATE | Alarm active has changed. | ||||
CHANGE_ACK_STATE | Alarm acknowledge has changed. | ||||
CHANGE_ENABLE_STATE | Enable has changed. | ||||
CHANGE_QUALITY | The quality has changed. | ||||
CHANGE_SEVERITY | The severity has changed. | ||||
CHANGE_CONDITION | A condition has become active/inactive. | ||||
CHANGE_MESSAGE | The message has been updated. | ||||
CHANGE_ATTRIBUTE | An attribute value has changed. |
SimpleEvent
A struct holding the simple event data.
Member | Description | ||||
source | The identification of the source for which the event notification was created. | ||||
source_pathname | The full pathname of the source. | ||||
time_stamp | Time of the event occurrence - for conditions, time that the condition transitioned into the new state or condition. For example, if the event notification is for acknowledgment of a condition, this would be the time that the condition became acknowledged. | ||||
message | Event notification message describing the event. | ||||
event_format | The identification for one of the three main formats. |
categorycategory_nameseverityproperty_values |
|||||
The identification of the sub-category why the event notification was sent. | |||||
The label for the sub-category. | |||||
The severity for the event, a number between 0 and 1000. | |||||
A sequence of property values as selected by the select_returned_properties() method. |
TrackingEvent
A struct holding tracking event data.
Member | Description | ||||
actor_name | The name of the actor or operator causing the event | ||||
notification. |
ConditionEvent
A struct holding the condition event data.
Member | Description | ||||
condition_space_name | The name of the condition space that caused the event notification. | ||||
condition_space | Identification of the condition space. | ||||
condition_name | The name of the condition that caused the event notification. | ||||
condition_number | Identification of the condition. | ||||
ack_required | An indication that an alarm is generated and that an acknowledgment is required. | ||||
active_time | The time when the condition became active. | ||||
event_id | An identification of the event notification. | ||||
change_specification | Indicates to the client which properties of the condition have changed. | ||||
source_condition_op_state | The new state for the source condition. | ||||
quality | The quality. |
Event
A struct composed of the three above event structs. The simple event struct always contains valid information and which of
the tracking or condition event structs are valid is decided from the main_reason simple event member.
Member |
Description |
||||
simple_event | The simple event. | ||||
tracking_event | The tracking event. | ||||
condition_event | The condition event. |
Callback
The callback object implemented by the client and used by the server to send event notifications.
on_event()
The callback method.
Parameter | Description | ||||
refresh | Indicates if this callback is due to a refresh. | ||||
last_refresh | Indicates if this callback is the last in a sequence initiated by a refresh. | ||||
the_events | A sequence of event notifications. | ||||
return | None. |
on_read_complete()
A callback method for the async_read_history() method. After an async_read_history() call from a client the server will deliver
the historical events using this method. There is no corresponding OPC method.
Parameter |
Description |
||||
the_events | A sequence of historical events. | ||||
transaction_id | The transaction number matching the client call number. |
Event notification callbacks
Figure 5-22 Event notification callbacks interaction
Refresh callbacks
Figure 5-23 Refresh callbacks interaction