OnHistoryTime
OnHistoryTime picture event
Declaration
ENTRY OnHistoryTime(IN TIME _newTime)
; actions
END OnHistoryTime Parameters
_newTime | Time of the picture. |
Description
The picture event is being generated by a change of the picture time in the History mode. There are the following examples:
the first entry into script after the picture was switched to History mode (OnHistoryBegin); data from archive exist there, time is set on begin of interval or it is set according to request from script that was sent after the history had been activated
change of history time
deactivating the History mode in the picture
The value of the parameter _newTime will be invalid for the third example (deactivating the History mode).
Example
BOOL _blnHistory ; variable that specifies whether the History mode is or is not activated
TIME _historyTime ; current history time, if exists
ENTRY OnHistoryTime(IN TIME _newTime)
IF _newTime\VLD THEN
IF ! _blnHistory THEN
; activating the History mode
_blnHistory := @TRUE
ENDIF
; history time
_historyTime := _newTime
ELSE ; deactivating the History mode
_blnHistory := @FALSE
ENDIF
END OnHistoryTime
BEGIN
_blnHistory := @FALSE
ENDIF