00001
00002 #ifndef INCLUDED_GrasperEvent_h_
00003 #define INCLUDED_GrasperEvent_h_
00004
00005 #include <iostream>
00006
00007 #include "EventBase.h"
00008 #include "Crew/GrasperRequest.h"
00009
00010
00011 class GrasperEvent : public EventBase {
00012 public:
00013
00014 bool success;
00015 std::vector<GrasperRequest::NodeValue_t> path;
00016 Point suggestedRobotLocation;
00017 Point suggestedLookAtPoint;
00018 GrasperRequest::GrasperRequestType_t requestType;
00019 GrasperRequest::GrasperErrorType_t errorType;
00020
00021 virtual bool getSuccess() const { return success; }
00022 virtual GrasperRequest::GrasperRequestType_t getRequestType() const { return requestType; }
00023 virtual GrasperRequest::GrasperErrorType_t getErrorType() const { return errorType; }
00024
00025
00026 GrasperEvent() : EventBase(), success(false), path(), suggestedRobotLocation(), suggestedLookAtPoint(), requestType(), errorType() {}
00027
00028 GrasperEvent(bool _success, EventGeneratorID_t gid, size_t sid, EventTypeID_t tid, unsigned int dur=0)
00029 : EventBase(gid,sid,tid,dur), success(_success), path(), suggestedRobotLocation(), suggestedLookAtPoint(), requestType(), errorType() {}
00030 GrasperEvent(bool _success, EventGeneratorID_t gid, size_t sid, EventTypeID_t tid, unsigned int dur, const std::string& n, float mag)
00031 : EventBase(gid,sid,tid,dur,n,mag), success(_success), path(), suggestedRobotLocation(), suggestedLookAtPoint(), requestType(), errorType() {}
00032
00033 GrasperEvent(bool _success, GrasperRequest::GrasperRequestType_t grqt, EventGeneratorID_t gid, size_t sid, EventTypeID_t tid, unsigned int dur=0)
00034 : EventBase(gid,sid,tid,dur), success(_success), path(), suggestedRobotLocation(), suggestedLookAtPoint(), requestType(grqt), errorType() {}
00035
00036
00037
00038
00039 GrasperEvent(bool _success, GrasperRequest::GrasperRequestType_t grqt, GrasperRequest::GrasperErrorType_t grst, size_t sid)
00040 : EventBase(EventBase::grasperEGID,sid,EventBase::statusETID,0), success(_success), path(), suggestedRobotLocation(), suggestedLookAtPoint(), requestType(grqt), errorType(grst) {}
00041
00042 virtual EventBase* clone() const { return new GrasperEvent(*this); }
00043
00044 GrasperEvent(const GrasperEvent &other) :
00045 success(other.success), path(other.path),
00046 suggestedRobotLocation(other.suggestedRobotLocation),
00047 suggestedLookAtPoint(other.suggestedLookAtPoint),
00048 requestType(other.requestType),
00049 errorType(other.errorType) {}
00050
00051 private:
00052 GrasperEvent& operator=(const GrasperEvent&);
00053
00054 };
00055
00056
00057
00058
00059
00060
00061
00062
00063 #endif