Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Modules/BehaviorControl/CommonXabsl2Symbols/MotionRequestSymbols.cpp

Go to the documentation of this file.
00001 /** 
00002 * @file MotionRequestSymbols.cpp
00003 *
00004 * Declaration of class MotionRequestSymbols.
00005 *
00006 * @author Max Risler
00007 */
00008 
00009 #include "MotionRequestSymbols.h"
00010 #include "Tools/Math/Geometry.h"
00011 #include "Tools/StringFunctions.h"
00012 
00013 MotionRequestSymbols::MotionRequestSymbols(const BehaviorControlInterfaces& interfaces)
00014 : BehaviorControlInterfaces(interfaces)
00015 {
00016 }
00017 
00018 void MotionRequestSymbols::registerSymbols(Xabsl2Engine &engine)
00019 {
00020   char s[256];
00021   int i;
00022   
00023   
00024   // "executed-motion-request.motion-type"
00025   engine.registerEnumeratedInputSymbol("executed-motion-request.motion-type",(const int*)&(motionInfo.executedMotionRequest.motionType));
00026   for (i=0;i<MotionRequest::numOfMotion;i++)
00027   {
00028     getXmlString(s,MotionRequest::getMotionName((MotionRequest::MotionID)i));
00029     engine.registerEnumeratedInputSymbolEnumElement("executed-motion-request.motion-type",s,i);
00030   }
00031 
00032   // "executed-motion-request.walk-type"
00033   engine.registerEnumeratedInputSymbol("executed-motion-request.walk-type",(const int*)&(motionInfo.executedMotionRequest.walkRequest.walkType));
00034   for (i=0;i<WalkRequest::numOfWalkType;i++)
00035   {
00036     getXmlString(s,WalkRequest::getWalkTypeName((WalkRequest::WalkType)i));
00037     engine.registerEnumeratedInputSymbolEnumElement("executed-motion-request.walk-type",s,i);
00038   }
00039 
00040   // "executed-motion-request.special-action-type"
00041   engine.registerDecimalInputSymbol("executed-motion-request.special-action-type",this,
00042     (double (Xabsl2FunctionProvider::*)())&MotionRequestSymbols::getExecutedSpecialActionType);
00043 
00044   engine.registerDecimalInputSymbol("executed-motion-request.position-in-walk-cycle",this,
00045     (double (Xabsl2FunctionProvider::*)())&MotionRequestSymbols::getPositionInWalkCycle);
00046 }
00047 
00048 double MotionRequestSymbols::getExecutedSpecialActionType()
00049 {
00050   return (double)motionInfo.executedMotionRequest.specialActionRequest.specialActionType;
00051 }
00052 
00053 double MotionRequestSymbols::getPositionInWalkCycle()
00054 {
00055   return motionInfo.positionInWalkCycle;
00056 }
00057 
00058 /*
00059 * Change Log
00060 * 
00061 * $Log: MotionRequestSymbols.cpp,v $
00062 * Revision 1.4  2004/06/17 14:13:04  spranger
00063 * added executed-motion-request.position-in-walk-cycle
00064 *
00065 * Revision 1.3  2004/06/02 17:18:23  spranger
00066 * MotionRequest cleanup
00067 *
00068 * Revision 1.2  2004/05/26 18:56:41  loetzsch
00069 * clean up in the behavior control interfaces
00070 *
00071 * Revision 1.1.1.1  2004/05/22 17:16:59  cvsadm
00072 * created new repository GT2004_WM
00073 *
00074 * Revision 1.2  2004/03/08 00:58:56  roefer
00075 * Interfaces should be const
00076 *
00077 * Revision 1.1  2003/10/22 22:18:44  loetzsch
00078 * prepared the cloning of the GT2003BehaviorControl
00079 *
00080 * Revision 1.1  2003/10/06 13:39:28  cvsadm
00081 * Created GT2004 (M.J.)
00082 *
00083 * Revision 1.3  2003/07/07 15:02:33  cesarz
00084 * added input symbol dribble.speed-y
00085 *
00086 * Revision 1.2  2003/07/03 18:39:30  risler
00087 * do-kick option added
00088 * all kicks use do-kick
00089 *
00090 * Revision 1.1.1.1  2003/07/02 09:40:23  cvsadm
00091 * created new repository for the competitions in Padova from the 
00092 * tamara CVS (Tuesday 2:00 pm)
00093 *
00094 * removed unused solutions
00095 *
00096 * Revision 1.5  2003/05/12 00:03:29  dueffert
00097 * doxygen bugs fixed
00098 *
00099 * Revision 1.4  2003/05/08 10:20:35  dueffert
00100 * bugs fixed
00101 *
00102 * Revision 1.3  2003/05/08 00:22:29  risler
00103 * removed symbol executed-motion-request.ball-caught
00104 *
00105 * Revision 1.2  2003/05/07 17:29:10  risler
00106 * added MotionRequestSymbols
00107 *
00108 *
00109 */
00110 

Generated on Thu Sep 23 19:57:25 2004 for GT2004 by doxygen 1.3.6