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

# Modules/BehaviorControl/CommonXabsl2Symbols/SpecialVisionSymbols.cpp

Go to the documentation of this file.

    00001 /**
    00002 * @file SpecialVisionSymbols.cpp
    00003 *
    00004 * Implementation of class SpecialVisionSymbols.
    00005 *
    00006 * @author Matthias Jüngel
    00007 */
    00008
    00009 #include "SpecialVisionSymbols.h"
    00010
    00011 SpecialVisionSymbols::SpecialVisionSymbols(const BehaviorControlInterfaces& interfaces)
    00012 : BehaviorControlInterfaces(interfaces)
    00013 {
    00014 }
    00015
    00016
    00017 void SpecialVisionSymbols::registerSymbols(Xabsl2Engine& engine)
    00018 {
    00019   // "special-vision-request"
    00020   engine.registerEnumeratedOutputSymbol("special-vision-request",(int*)&specialVisionRequest.specialVisionRequest);
    00021   engine.registerEnumeratedOutputSymbolEnumElement("special-vision-request","none",SpecialVisionRequest::none);
    00022   engine.registerEnumeratedOutputSymbolEnumElement("special-vision-request","bar-code",SpecialVisionRequest::barCode);
    00023   engine.registerEnumeratedOutputSymbolEnumElement("special-vision-request","auto-shutter",SpecialVisionRequest::autoShutter);
    00024   engine.registerEnumeratedOutputSymbolEnumElement("special-vision-request","challenge-learn-orientation",SpecialVisionRequest::challengeLearnOrientation);
    00025   engine.registerEnumeratedOutputSymbolEnumElement("special-vision-request","challenge-find-orientation",SpecialVisionRequest::challengeFindOrientation);
    00026   engine.registerEnumeratedOutputSymbolEnumElement("special-vision-request","challenge-get-orientation",SpecialVisionRequest::challengeGetOrientation);
    00027
    00028   engine.registerDecimalInputSymbol("challenge-orientation",&(specialPercept.orientation));
    00029
    00030   // "bar-code"
    00031   engine.registerEnumeratedInputSymbol("bar-code",this,
    00032     (int (Xabsl2FunctionProvider::*)())&SpecialVisionSymbols::getBarCodeValue);
    00033   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.undefined",-1);
    00034   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.zero",0);
    00035   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.one",1);
    00036   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.two",2);
    00037   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.three",3);
    00038   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.four",4);
    00039   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.five",5);
    00040   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.six",6);
    00041   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.seven",7);
    00042   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.eight",8);
    00043   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.nine",9);
    00044   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.ten",10);
    00045   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.eleven",11);
    00046   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.twelve",12);
    00047   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.thirteen",13);
    00048   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.fourteen",14);
    00049   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.fifteen",15);
    00050   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.sixteen",16);
    00051   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.seventeen",17);
    00052   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.eighteen",18);
    00053   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.nineteen",19);
    00054   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.twenty",20);
    00055   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.twenty-one",21);
    00056   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.twenty-two",22);
    00057   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.twenty-three",23);
    00058   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.twenty-four",24);
    00059   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.twenty-five",25);
    00060   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.twenty-six",26);
    00061   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.twenty-seven",27);
    00062   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.twenty-eight",28);
    00063   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.twenty-nine",29);
    00064   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.thirty",30);
    00065   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.thirty-one",31);
    00066   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.thirty-two",32);
    00067   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.thirty-three",33);
    00068   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.thirty-four",34);
    00069   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.thirty-five",35);
    00070   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.thirty-six",36);
    00071   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.thirty-seven",37);
    00072   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.thirty-eight",38);
    00073   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.thirty-nine",39);
    00074   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.forty",40);
    00075   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.forty-one",41);
    00076   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.forty-two",42);
    00077   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.forty-three",43);
    00078   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.forty-four",44);
    00079   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.forty-five",45);
    00080   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.forty-six",46);
    00081   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.forty-seven",47);
    00082   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.forty-eight",48);
    00083   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.forty-nine",49);
    00084   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.fifty",50);
    00085   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.fifty-one",51);
    00086   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.fifty-two",52);
    00087   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.fifty-three",53);
    00088   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.fifty-four",54);
    00089   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.fifty-five",55);
    00090   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.fifty-six",56);
    00091   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.fifty-seven",57);
    00092   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.fifty-eight",58);
    00093   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.fifty-nine",59);
    00094   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.sixty",60);
    00095   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.sixty-one",61);
    00096   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.sixty-two",62);
    00097   engine.registerEnumeratedInputSymbolEnumElement("bar-code","bar-code.sixty-three",63);
    00098
    00099   // symbol
    00100   engine.registerBooleanInputSymbol("auto-shutter.ready",this,
    00101     (bool (Xabsl2FunctionProvider::*)())&SpecialVisionSymbols::getShutterSelected);
    00102 }
    00103
    00104 void SpecialVisionSymbols::update()
    00105 {
    00106 }
    00107
    00108 int SpecialVisionSymbols::getBarCodeValue()
    00109 {
    00110   return specialPercept.barCodeId;
    00111 }
    00112
    00113 bool SpecialVisionSymbols::getShutterSelected()
    00114 {
    00115   return specialPercept.shutterSelected;
    00116 }
    00117