#include <OTC/dispatch/action.hh> class OTCEV_Action : public OTC_Event {
public:
~OTCEV_Action();
inline OTCEV_Action(int theActionId);
inline int action() const;
void* type() const;
inline static void* typeId();
void dump(ostream& outs) const;
static int schedule(int theAgentId);
static void cancel(int theActionId);
static void cancelAgent(int theAgentId);
static OTC_Boolean active(int theActionId);
};
OTCEV_Action
is a derived version of OTC_Event
for notifying
agents that it should now perform whatever action that it has been
waiting to perform. A request to receive this event is registered
as an idle job, and will only be delivered when the dispatcher
has nothing else to do.
inline OTCEV_Action(int theActionId);
theActionId
can now be performed.
inline int action() const;
void* type() const;
inline static void* typeId();
void dump(ostream& outs) const;
outs
.
static int schedule(int theAgentId);
theAgentId
wishes to perform an action.
The identifier for the action is returned.
The agent will be notified that it can
perform the action when the scheduler
next has no other work to do, and the
agents request has come to the front of
the queue.
static void cancel(int theActionId);
theActionId
.
static void cancelAgent(int theAgentId);
theAgentId
is waiting upon.
static OTC_Boolean active(int theActionId);
OTCLIB_TRUE
if the action with
ID number theTimerId
has not yet been
performed.
0
will never be used as an action ID.
OTC_EVAgent
, OTC_Event