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

# Modules/BehaviorControl/CommonXabsl2Symbols/HeadAndTailSymbols.cpp

Go to the documentation of this file.

    00001 /**
    00002 * @file HeadAndTailSymbols.cpp
    00003 *
    00004 * Implementation of class HeadAndTailSymbols.
    00005 *
    00006 * @author Uwe Düffert
    00007 * @author Martin Lötzsch
    00008 */
    00009
    00010 #include "HeadAndTailSymbols.h"
    00011 #include "Tools/StringFunctions.h"
    00012
    00013 HeadAndTailSymbols::HeadAndTailSymbols(const BehaviorControlInterfaces& interfaces)
    00014 : BehaviorControlInterfaces(interfaces)
    00015 {
    00016   searchForLandmarksEvoSpeed = 700;
    00017 }
    00018
    00019
    00020 void HeadAndTailSymbols::setSearchForLandmarksEvoSpeed()
    00021 {
    00022   headControlMode.durationInEvolution = (int)searchForLandmarksEvoSpeed;
    00023 }
    00024
    00025 void HeadAndTailSymbols::registerSymbols(Xabsl2Engine& engine)
    00026 {
    00027   int i;
    00028   char s[256];
    00029
    00030   // "head-control-mode"
    00031   engine.registerEnumeratedOutputSymbol("head-control-mode",(int*)&headControlMode.headControlMode);
    00032   for (i=0;i<HeadControlMode::numOfHeadControlModes;i++)
    00033   {
    00034     sprintf(s,"head-control-mode.");
    00035     getXmlString(s+strlen(s),HeadControlMode::getHeadControlModeName((HeadControlMode::HeadControlModes)i));
    00036     engine.registerEnumeratedOutputSymbolEnumElement("head-control-mode",s,i);
    00037   }
    00038
    00039   // head-speed for search-for-landmarks-evolution
    00040   engine.registerDecimalInputFunction("set-search-for-landmarks-evo-speed",this,
    00041     (double (Xabsl2FunctionProvider::*)())&HeadAndTailSymbols::setSearchForLandmarksEvoSpeed);
    00042   engine.registerDecimalInputFunctionParameter("set-search-for-landmarks-evo-speed","set-search-for-landmarks-evo-speed.speed",searchForLandmarksEvoSpeed);
    00043
    00044
    00045   // "tail-mode"
    00046   engine.registerEnumeratedOutputSymbol("tail-mode",(int*)&motionRequest.tailRequest);
    00047   for (i=0;i<TailRequest::numOfTailRequests;i++)
    00048   {
    00049     sprintf(s,"tail-mode.");
    00050     getXmlString(s+strlen(s),TailRequest::getTailRequestIDName((TailRequest::TailRequestID)i));
    00051     engine.registerEnumeratedOutputSymbolEnumElement("tail-mode",s,i);
    00052   }
    00053 }
    00054