Table 20defines the ReadEventDetailsstructure. This parameter is only valid for Objectsthat have the EventNotifier Attributeset to TRUE (see OPC 10000-3). Two of the three parameters, numValuesPerNode, startTime, and endTimeshall be specified.

Table 20– ReadEventDetails






Specifies the details used to perform an Eventhistory read.



The maximum number of values returned for any Node over the time range. If only one time is specified, the time range shall extend to return this number of values. The default value of 0 indicates that there is no maximum.



Beginning of period to read. The default value of DateTime.MinValueindicates that the startTimeis Unspecified.



End of period to read. The default value of DateTime.MinValueindicates that the endTime is Unspecified.



A filter used by the Server to determine which HistoricalEventNodeshould be included. This parameter shall be specified and at least one EventFieldis required. The EventFilterparameter type is an Extensible parameter type. It is defined and used in the same manner as defined for monitored data items which are specified in OPC 10000-4. This filter also specifies the EventFieldsthat are to be returned as part of the request.

The ReadEventDetailsstructure is used to read the Eventsfrom the history database for the specified time domain for one or more HistoricalEventNodes. The Eventsare filtered based on the filter structure provided. This filter includes the EventFieldsthat are to be returned. For a complete description of filter refer to OPC 10000-4.

The startTimeand endTimeare used to filter on the Time field for Events.

The time domain of the request is defined by startTime, endTime, and numValuesPerNode; at least two of these shall be specified. If endTimeis less than startTime, or endTimeand numValuesPerNodealone are specified then the data will be returned in reverse order with later/newer data provided first as if time were flowing backward. If all three are specified then the call shall return up to numValuesPerNode results going from startTimeto endTime, in either ascending or descending order depending on the relative values of startTimeand endTime. If numValuesPerNode is 0 then all of the values in the range are returned. The default value is used to indicate when startTime, endTimeor numValuesPerNodeare not specified.

It is specifically allowed for the startTimeand the endTimeto be identical. This allows the Clientto request the Eventat a single instance in time. When the startTimeand endTimeare identical then time is presumed to be flowing forward. If no data exists at the time specified then the Servershall return the Good_NoData StatusCode.

If a startTime, endTimeand numValuesPerNodeare all provided, and if more than numValuesPerNode Eventsexist within that time range for a given Node, then only numValuesPerNode Eventsper Nodeare returned along with a ContinuationPoint. When a ContinuationPointis returned, a Clientwanting the next numValuesPerNodevalues should call HistoryReadagain with the continuationPoint set.

If the request takes a long time to process then the Servercan return partial results with a ContinuationPoint. This might be done if the request is going to take more time than the Clienttimeout hint. It may take longer than the Clienttimeout hint to retrieve any results. In this case the Servermay return zero results with a ContinuationPointthat allows the Serverto resume the calculation on the next Client HistoryReadcall.

For an interval in which no data exists, the corresponding StatusCodeshall be Good_NoData.

The filter parameteris used to determine which historical Eventsand their corresponding fields are returned. It is possible that the fields of an EventTypeare available for real time updating, but not available from the historian. In this case a StatusCodevalue will be returned for any Eventfield that cannot be returned. The value of the StatusCodeshall be Bad_NoData.

If the requested TimestampsToReturnis not supported for a Nodethen the operation shall return the Bad_TimestampNotSupported StatusCode. When reading Eventsthis only applies to Eventfields that are of type DataValue.