Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef __NAV_ESTOP_EVENT_HH__
00013 #define __NAV_ESTOP_EVENT_HH__
00014
00015 #include <art_nav/FSMevent.h>
00016
00017 class NavEstopEvent: FSMevent
00018 {
00019 public:
00020
00021
00022 typedef enum
00023 {
00024 Abort,
00025 Pause,
00026 Quit,
00027 Run,
00028 Suspend,
00029 None,
00030 N_events
00031 } event_t;
00032
00033
00034 const char *Name(void)
00035 {
00036 static const char *event_name[N_events] =
00037 {
00038 "Abort",
00039 "Pause",
00040 "Quit",
00041 "Run",
00042 "Suspend",
00043 "None",
00044 };
00045 return event_name[this->event];
00046 }
00047
00048 NavEstopEvent()
00049 {
00050 this->event = Pause;
00051 }
00052
00053 NavEstopEvent(event_t ievent)
00054 {
00055 this->event = ievent;
00056 }
00057
00058 ~NavEstopEvent() {};
00059
00060 event_t Value(void)
00061 {
00062 return this->event;
00063 }
00064
00065 void operator=(const NavEstopEvent::event_t &newevent)
00066 {
00067 this->event = newevent;
00068 }
00069
00070 bool operator==(const event_t &compare)
00071 {
00072 return this->event == compare;
00073 }
00074
00075 bool operator!=(const event_t &compare)
00076 {
00077 return this->event != compare;
00078 }
00079
00080 private:
00081 event_t event;
00082 };
00083
00084 #endif // __NAV_ESTOP_EVENT_HH__