NAME

OTCEV_Alarm - Event object to notify of a clock reaching a particular time.

SYNOPSIS


#include <OTC/dispatch/alarm.hh>

class OTCEV_Alarm : public OTC_Event
{
  public:
    ~OTCEV_Alarm();
    inline OTCEV_Alarm(int theAlarmId, long theTime);
    inline int alarm() const;
    inline long time() const;
    void* type() const;
    inline static void* typeId();
    void dump(ostream& outs) const;
    static int set(int theAgentId, long theTime);
    static void cancel(int theAlarmId);
    static void cancelAgent(int theAgentId);
    static OTC_Boolean active(int theAlarmId);
    static long period();
    static OTC_Job* pending();
};

CLASS TYPE

Concrete

DESCRIPTION

OTCEV_Alarm is a derived version of OTC_Event specifically for notifying agents that a clock has reached a particular time. The class also provides the interface for registration of interest in alarms by agents.

CONSTRUCTION

inline OTCEV_Alarm(int theAlarmId, long theTime);

QUERY

inline int alarm() const;
inline long time() const;

IDENTIFICATION

void* type() const;
inline static void* typeId();

DEBUGGING

void dump(ostream& outs) const;

SUBSCRIPTION

static int set(int theAgentId, long theTime);
static void cancel(int theAlarmId);
static void cancelAgent(int theAgentId);
static OTC_Boolean active(int theAlarmId);

SCHEDULING

static long period();
static OTC_Job* pending();

NOTES

Time is measured as the number of seconds since the epoch. In most systems the epoch is January 1, 1970. A value of 0 will never be used as an alarm ID.

SEE ALSO

OTC_Event, OTC_EVAgent

LIBRARY

OTC

AUTHOR(S)

Graham Dumpleton

COPYRIGHT

Copyright 1993 OTC LIMITED
Copyright 1994 DUMPLETON SOFTWARE CONSULTING PTY LIMITED