Homepage | Demos | Overview | Downloads | Tutorials | Reference | Credits |
#include <CameraBehavior.h>
Inheritance diagram for CameraBehavior:
Press the head button to take a picture, back button to write to memory stick.
The reason for this is to provide sample code for accessing vision data, and also simply because we should have a way to save pictures to memstick instead of relying solely on having wireless to transmit them over.
Image format is chosen by current config settings for the Config::vision_config::rawcam_compression and Config::vision_config::rawcam_channel. However, the double resolution layer is always saved instead of whatever the current config skip value indicates.
Definition at line 22 of file CameraBehavior.h.
Public Member Functions | |
CameraBehavior () | |
constructor, just sets up the variables | |
virtual void | DoStart () |
Register for events. | |
virtual void | DoStop () |
Removes its two motion commands. | |
virtual void | processEvent (const EventBase &e) |
Handles event processing - determines which generator to save from and writes to current file. | |
virtual std::string | getName () const |
returns name of behavior | |
Static Public Member Functions | |
std::string | getClassDescription () |
Gives a short description of what this class of behaviors does... you should override this (but don't have to). | |
Protected Member Functions | |
FILE * | openNextFile (const std::string &ext) |
opens the next file to be saved to (with ext extension on the file name) | |
std::string | getNextName (const std::string &ext) |
returns the path and name of the next file to be saved to (with ext extension on the file name) | |
void | initIndex () |
scans the /ms/data directory for image files and assigns the next unused index to index | |
Protected Attributes | |
EventBase | camera_click |
event mask for taking a picture (head button) | |
unsigned int | index |
the index to use for the next image saved |
|
constructor, just sets up the variables
Definition at line 25 of file CameraBehavior.h. |
|
Register for events.
Reimplemented from BehaviorBase. Definition at line 21 of file CameraBehavior.cc. |
|
Removes its two motion commands.
Reimplemented from BehaviorBase. Definition at line 35 of file CameraBehavior.cc. |
|
Gives a short description of what this class of behaviors does... you should override this (but don't have to).
Reimplemented from BehaviorBase. Definition at line 39 of file CameraBehavior.h. |
|
returns name of behavior
Implements BehaviorBase. Definition at line 38 of file CameraBehavior.h. |
|
returns the path and name of the next file to be saved to (with ext extension on the file name)
Definition at line 134 of file CameraBehavior.cc. Referenced by openNextFile(). |
|
scans the /ms/data directory for image files and assigns the next unused index to index
Definition at line 142 of file CameraBehavior.cc. Referenced by DoStart(). |
|
opens the next file to be saved to (with ext extension on the file name)
Definition at line 121 of file CameraBehavior.cc. Referenced by processEvent(). |
|
Handles event processing - determines which generator to save from and writes to current file. The format used depends on the current config settings. If JPEG is the current choice, then a JPEG file will be written. Otherwise, RawCameraGenerator::SaveFile() will be called. write actual image data write actual image data Reimplemented from BehaviorBase. Definition at line 47 of file CameraBehavior.cc. |
|
event mask for taking a picture (head button)
Definition at line 50 of file CameraBehavior.h. Referenced by CameraBehavior(), DoStart(), and processEvent(). |
|
the index to use for the next image saved
Definition at line 51 of file CameraBehavior.h. Referenced by CameraBehavior(), getNextName(), and initIndex(). |
Tekkotsu v2.0 |
Generated Wed Jan 21 03:23:05 2004 by Doxygen 1.3.4 |