ProjectInterface Namespace Reference
Detailed Description
A collection of the global variables which should be set by a project to use the Tekkotsu framework.
You don't necessarily need to define all of these, but if you want to use the built in demo behaviors, you may need to set some values in here appropriately so that the demos can adapt to your project's configuration.
Any references should be instantiated in your own project files (since you can't reassign a reference)
Any pointers are instantiated in ProjectInterface.cc and initialized to NULL. You can reassign them as you see fit.
Currently, all required members are references (so they can't be set to NULL and you'll get errors if you leave them out) and all optional settings are pointers so you can ignore them if you want.
|
Vision Setup |
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
|
FilterBankGenerator * | defRawCameraGenerator = 0 |
| pointer to generator
|
FilterBankGenerator * | defInterleavedYUVGenerator = 0 |
| pointer to generator
|
JPEGGenerator * | defColorJPEGGenerator = 0 |
| pointer to generator
|
JPEGGenerator * | defGrayscaleJPEGGenerator = 0 |
| pointer to generator
|
SegmentedColorGenerator * | defSegmentedColorGenerator = 0 |
| pointer to generator
|
RLEGenerator * | defRLEGenerator = 0 |
| pointer to generator
|
RegionGenerator * | defRegionGenerator = 0 |
| pointer to generator
|
Vision SIDs |
Default source IDs for the various generators; These are given default values, but you can reassign them if you like.
|
unsigned int | visRawCameraSID = 0 |
| source id for event
|
unsigned int | visInterleaveSID = 0 |
| source id for event
|
unsigned int | visColorJPEGSID = 0 |
| source id for event
|
unsigned int | visGrayscaleJPEGSID = 1 |
| source id for event
|
unsigned int | visSegmentSID = 0 |
| source id for event
|
unsigned int | visRLESID = 0 |
| source id for event
|
unsigned int | visRegionSID = 0 |
| source id for event
|
unsigned int | visPinkBallSID = 0 |
| source id for event
|
unsigned int | visBlueBallSID = 1 |
| source id for event
|
unsigned int | visHandSID = 2 |
| source id for event
|
Layer Resolutions |
Allows you to request a particular layer abstractly - this isn't used by the framework, just a suggestion for clarity
|
unsigned int | doubleLayer = 5 |
| ERS-2xx: 352*288; ERS-7 416*320 (requires non-trivial computation).
|
unsigned int | fullLayer = 4 |
| ERS-2xx: 176*144; ERS-7 208*160.
|
unsigned int | halfLayer = 3 |
| ERS-2xx: 88*72; ERS-7 104*80.
|
unsigned int | quarterLayer = 2 |
| ERS-2xx: 44*36; ERS-7 52*40.
|
unsigned int | eighthLayer = 1 |
| ERS-2xx: 22*18; ERS-7 26*20 (simply a bigger interleave referencing quarterLayer).
|
unsigned int | sixteenthLayer = 0 |
| ERS-2xx: 11*9; ERS-7 13*10 (simply a bigger interleave referencing quarterLayer).
|
Functions |
bool | displayException (const char *file, int line, const char *message, const std::exception *ex) |
| Displays information about an exception on serr, provides a default value for uncaughtException.
|
BehaviorBase & | startupBehavior () |
| REQUIRED: you must define a behavior which will be started when the boot is complete.
|
Variables |
bool(* | uncaughtException )(const char *file, int line, const char *message, const std::exception *ex) = &displayException |
| The exception handler for exceptions which have fallen through to base Tekkotsu functions.
|
Function Documentation
bool ProjectInterface::displayException |
( |
const char * |
file, |
|
|
int |
line, |
|
|
const char * |
message, |
|
|
const std::exception * |
ex |
|
) |
|
|
|
Displays information about an exception on serr, provides a default value for uncaughtException.
You can call this directly from your own code any time you would like an exception error message. - Parameters:
-
| file | The file where the exception was caught (usually just pass __FILE__), or NULL |
| line | The line number where the exception was caught (usually just pass __LINE__), if file is NULL, line is ignored |
| message | An addition message, or NULL |
| ex | The exception which was caught, or NULL if it is was not a std::exception subclass |
- Returns:
- true, indicating the exception was handled adequately
Definition at line 7 of file ProjectInterface.cc. |
|
REQUIRED: you must define a behavior which will be started when the boot is complete.
This is similar in idea to the Linux init process - it should do some basic initialization and then launch any other behavior you would like to run at boot. To avoid static initialization ordering issues, this is a function which will be called after environment setup is complete, which should then return a behavior to use as the startup behavior. This behavior should not be reference counted, and probably makes most sense to implement as a static local variable of the function. (Each call should return the same behavior) |
Variable Documentation
|
ERS-2xx: 22*18; ERS-7 26*20 (simply a bigger interleave referencing quarterLayer).
Definition at line 57 of file ProjectInterface.cc. |
|
ERS-2xx: 11*9; ERS-7 13*10 (simply a bigger interleave referencing quarterLayer).
Definition at line 58 of file ProjectInterface.cc. |
|
The exception handler for exceptions which have fallen through to base Tekkotsu functions.
You can override this to install your own handler by assigning a new function. This defaults to displayException(), which does not call abort() (which would otherwise be the default if the exception fell through). - Parameters:
-
| file | The file where the exception was caught (usually just pass __FILE__), or NULL |
| line | The line number where the exception was caught (usually just pass __LINE__), if file is NULL, line is ignored |
| message | An addition message, or NULL |
| ex | The exception which was caught, or NULL if it is was not a std::exception subclass |
- Returns:
- true if the exception was handled, false if the exception should be rethrown
Definition at line 25 of file ProjectInterface.cc.
Referenced by Wireless::BindCont(), Wireless::CloseCont(), Wireless::ConnectCont(), EventRouter::doSendEvent(), Wireless::ListenCont(), EventRouter::processTimers(), Wireless::ReceiveCont(), and Wireless::SendCont(). |
|