AAO DRAMA/DRAMA2 C++ Interface
DRAMA C++11 and later interface
request.hh
Go to the documentation of this file.
1#ifndef _DRAMA2_REQUEST_INC
2#define _DRAMA2_REQUEST_INC
3
21/*
22 * History:
23 31-Jan-2014 - TJF - Original version
24
25 * The above ID is for Doxygen, this one has the format ACMM is looking for.
26 * "@(#) $Id$"
27 */
28#include "drama/task.hh"
29#include "status.h"
30namespace drama {
31
37 enum class RequestCode
38 {
46 } ;
47
48
51 class Request {
52 public:
53
54 private:
55 RequestCode _request;
56 double _delay;
57 StatusType _status;
58
59 public:
73 _request(code), _delay(0), _status(status) {}
74
84 Request(RequestCode code, double delay=0) : _request(code),
85 _delay(delay), _status(STATUS__OK) {}
90 RequestCode GetCode() const { return _request; }
95 double GetDelay() const { return _delay; }
100 StatusType GetStatus() const { return _status; }
101
102 };
103
104} // namespace drama
105
106#endif
StatusType GetStatus() const
Get the status.
Definition request.hh:127
double GetDelay() const
Get the delay.
Definition request.hh:122
Request(StatusType status, RequestCode code=RequestCode::End)
Specify a request using a RequestCode and completion status.
Definition request.hh:99
RequestCode GetCode() const
Get the request code.
Definition request.hh:117
Request(RequestCode code, double delay=0)
Specify a request using a RequestCode and delay.
Definition request.hh:111
Class used by Obey and Kick handlers to indicate rescheduling requirements.
Definition request.hh:78
void CreateRunDramaTask()
Create and run a DRAMA task, with standard exception handling.
Definition task.hh:1322
@ Message
MsgOut message from subsidiary action.
@ Exit
Loaded task exited message received.
RequestCode
Action reschedule request type.
Definition request.hh:65
@ Wait
Request that the reschedule after a delay.
@ Sleep
Request that the action go to sleep.
@ Stage
Request that the reschedule immediately.
@ End
Request that the action complete.
@ KickNoChangeReq
Indicate that a KICK is not change rescheduling
The drama namespace contains all the classes, types etc of the DRAMA 2 implementation.
Definition drama.hh:93
DRAMA 2 include file - Task class definition.