Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
PilotNode.hGo to the documentation of this file.00001 //-*-c++-*- 00002 #ifndef INCLUDED_PilotNode_h_ 00003 #define INCLUDED_PilotNode_h_ 00004 00005 #include "Crew/PilotRequest.h" 00006 #include "Behaviors/StateNode.h" 00007 00008 using namespace DualCoding; 00009 00010 //! Creates a PilotRequest @a pilotreq that the user can modify in their doStart() function, then executes the request when doStart() returns 00011 class PilotNode : public StateNode { 00012 public: 00013 //! Constructor 00014 PilotNode(PilotTypes::RequestType_t requestType = PilotTypes::noRequest) : 00015 StateNode(), pilotreq(requestType), cancelFlag(false) {} 00016 00017 //! Constructor 00018 PilotNode(std::string const &name, PilotTypes::RequestType_t requestType = PilotTypes::noRequest) : 00019 StateNode(name), pilotreq(requestType), cancelFlag(false) {} 00020 00021 virtual void stop(); 00022 00023 //! If called inside doStart, prevents request from being passed to Pilot, and posts a failure event 00024 virtual void cancelThisRequest(); 00025 00026 PilotRequest pilotreq; // must be public so state machine node initializers can access it 00027 00028 protected: 00029 virtual void preStart(); 00030 virtual void postStart(); 00031 virtual void doEvent(); 00032 00033 bool cancelFlag; //!< If set true in doStart, request will not be submitted to the Pilot 00034 }; 00035 00036 #endif |
DualCoding 5.1CVS |
Generated Mon May 9 04:56:27 2016 by Doxygen 1.6.3 |