Homepage
Demos
Overview
Downloads
Tutorials
Reference
Credits

ProjectInterface.h

Go to the documentation of this file.
00001 //-*-c++-*-
00002 #ifndef INCLUDED_ProjectInterface_h_
00003 #define INCLUDED_ProjectInterface_h_
00004 
00005 class BehaviorBase;
00006 class FilterBankGenerator;
00007 class SegmentedColorGenerator;
00008 class RLEGenerator;
00009 class RegionGenerator;
00010 class JPEGGenerator;
00011 
00012 //! A collection of the global variables which should be set by a project to use the Tekkotsu framework
00013 /*! You don't necessarily need to define all of these, but if you want
00014  *  to use the built in demo behaviors, you may need to set some
00015  *  values in here appropriately so that the demos can adapt to your
00016  *  project's configuration.
00017  *  
00018  *  Any references should be instantiated in your own project files
00019  *  (since you can't reassign a reference)
00020  *
00021  *  Any pointers are instantiated in ProjectInterface.cc and
00022  *  initialized to NULL. You can reassign them as you see fit.
00023  *
00024  *  Currently, all required members are references (so they can't be
00025  *  set to NULL and you'll get errors if you leave them out) and all
00026  *  optional settings are pointers so you can ignore them if you want.
00027  */
00028 namespace ProjectInterface {
00029   
00030   //! REQUIRED: you must define a behavior which will be started when the boot is complete
00031   /*! This is similar in idea to the Linux init process - it should do
00032    *  some basic initialization and then launch any other behavior you
00033    *  would like to run at boot.
00034    *  To avoid static initialization ordering issues, this is a function
00035    *  which will be called after environment setup is complete, which
00036    *  should then return a behavior to use as the startup behavior.
00037    *  This behavior should not be reference counted, and probably makes
00038    *  most sense to implement as a static local variable of the function.
00039    *  (Each call should return the same behavior) */
00040   BehaviorBase& startupBehavior();
00041 
00042   //! A collection of the various stages of vision processing.  None of these are absolutely required, but are needed to run included demo behaviors and TekkotsuMon modules
00043   /*! @name Vision Setup */
00044   //! pointer to generator
00045   extern FilterBankGenerator * defRawCameraGenerator;
00046   extern FilterBankGenerator * defInterleavedYUVGenerator;
00047   extern JPEGGenerator * defColorJPEGGenerator;
00048   extern JPEGGenerator * defGrayscaleJPEGGenerator;
00049   extern SegmentedColorGenerator * defSegmentedColorGenerator;
00050   extern RLEGenerator * defRLEGenerator;
00051   extern RegionGenerator * defRegionGenerator;
00052   //@}
00053 
00054   //! Default source IDs for the various generators; These are given default values, but you can reassign them if you like.
00055   /*! @name Vision SIDs */
00056   //! source id for event
00057   extern unsigned int visRawCameraSID;
00058   extern unsigned int visInterleaveSID;
00059   extern unsigned int visColorJPEGSID;
00060   extern unsigned int visGrayscaleJPEGSID;
00061   extern unsigned int visSegmentSID;
00062   extern unsigned int visRLESID;
00063   extern unsigned int visRegionSID;
00064   extern unsigned int visPinkBallSID;
00065   extern unsigned int visBlueBallSID;
00066   extern unsigned int visHandSID;
00067   //@}
00068 
00069   //! Allows you to request a particular layer abstractly - this isn't used by the framework, just a suggestion for clarity
00070   /*! @name Layer Resolutions */
00071   extern unsigned int doubleLayer;   //!< ERS-2xx: 352*288; ERS-7 416*320 (requires non-trivial computation)
00072   extern unsigned int fullLayer;     //!< ERS-2xx: 176*144; ERS-7 208*160
00073   extern unsigned int halfLayer;     //!< ERS-2xx: 88*72; ERS-7 104*80
00074   extern unsigned int quarterLayer;  //!< ERS-2xx: 44*36; ERS-7 52*40
00075   extern unsigned int eighthLayer;   //!< ERS-2xx: 22*18; ERS-7 26*20 (simply a bigger interleave referencing quarterLayer)
00076   extern unsigned int sixteenthLayer;//!< ERS-2xx: 11*9; ERS-7 13*10 (simply a bigger interleave referencing quarterLayer)
00077   //@}
00078 }
00079 
00080 /*! @file
00081  * @brief Defines ProjectInterface namespace - a collection of the global variables which should be set by a project to use the Tekkotsu framework
00082  * @author ejt (Creator)
00083  *
00084  * $Author: ejt $
00085  * $Name: tekkotsu-2_4 $
00086  * $Revision: 1.7 $
00087  * $State: Exp $
00088  * $Date: 2005/06/01 05:47:49 $
00089  */
00090 
00091 #endif

Tekkotsu v2.4
Generated Wed Aug 10 11:04:39 2005 by Doxygen 1.4.4