

DEFINITION MODULE EVENT;

FROM SYSTEM   	IMPORT ADDRESS;

TYPE
   EventType;


   EventNotice;


   CondProc = PROCEDURE (ADDRESS) : BOOLEAN;


PROCEDURE Create
   ( VAR E : EventType;
     P     : PROC;
     Name  : ARRAY OF CHAR
   );


PROCEDURE Schedule
   ( E : EventType;
     D : LONGREAL;
     Par : ADDRESS
   );


PROCEDURE ScheduleNext
   ( E : EventType;
     Par : ADDRESS
   );


PROCEDURE Cancel
   ( E : EventType;
     Par : ADDRESS
   );


PROCEDURE Attrib () : ADDRESS;


PROCEDURE ScheduleNotice
   ( E : EventType;
     D : LONGREAL;
     Par : ADDRESS;
     VAR N : EventNotice
   );


PROCEDURE ScheduleNoticeNext
   ( E : EventType;
     Par : ADDRESS;
     VAR N : EventNotice
   );


PROCEDURE ScheduleNoticeBefore
   ( E : EventType;
     Par : ADDRESS;
     VAR N : EventNotice;
     N1    : EventNotice
   );


PROCEDURE ScheduleNoticeAfter
   ( E : EventType;
     Par : ADDRESS;
     VAR N : EventNotice;
     N1    : EventNotice
   );


PROCEDURE FindNoticeSuchThat
   ( E : EventType;
     Cond : CondProc
   ) : EventNotice;


PROCEDURE CancelNotice
   ( VAR N : EventNotice
   );


PROCEDURE NoticeType
   ( N : EventNotice
   ) : EventType;


PROCEDURE NoticeAttrib
   ( N : EventNotice
   ) : ADDRESS;


PROCEDURE NoticeTime
   ( N : EventNotice
   ) : LONGREAL;


PROCEDURE PrintEventList;


PROCEDURE EmptyEventList;


PROCEDURE SimLoop;


PROCEDURE DeleteType
   ( VAR E : EventType
   );


END EVENT.
