| Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
PilotNode.ccGo to the documentation of this file.00001 #include "Motion/WalkMC.h" 00002 #ifdef TGT_HAS_WALK 00003 00004 #include "Crew/Pilot.h" 00005 #include "Events/PilotEvent.h" 00006 00007 #include "PilotNode.h" 00008 00009 void PilotNode::preStart() { 00010 const PilotRequest *p = tryExtractSignal<PilotRequest>(event); 00011 if ( p ) 00012 pilotreq = *p; 00013 cancelFlag = false; 00014 VisualRoutinesStateNode::preStart(); 00015 } 00016 00017 void PilotNode::postStart() { 00018 VisualRoutinesStateNode::postStart(); 00019 if ( !cancelFlag ) { 00020 erouter->addListener(this, EventBase::pilotEGID, (size_t)this, EventBase::statusETID); 00021 pilot->executeRequest(this,pilotreq); 00022 } 00023 } 00024 00025 void PilotNode::stop() { 00026 pilot->pilotPop(); // in case the request was still executing when we exited 00027 VisualRoutinesStateNode::stop(); 00028 } 00029 00030 void PilotNode::doEvent() { 00031 postStateCompletion(); 00032 } 00033 00034 void PilotNode::cancelThisRequest() { 00035 cancelFlag = true; 00036 postStateFailure(); 00037 } 00038 00039 #endif |
|
Tekkotsu v5.1CVS |
Generated Fri Mar 16 05:26:46 2012 by Doxygen 1.6.3 |