Homepage Demos Overview Downloads Tutorials Reference
Credits
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages | Search

CameraBehavior Class Reference

#include <CameraBehavior.h>

Inheritance diagram for CameraBehavior:

Inheritance graph
[legend]
List of all members.

Detailed Description

Will take images and write to log file.

Press the head button to take a picture, back button to write to memory stick. This isn't necessarily up to date, but is included as sample code. We should have a way to save pictures to memstick instead of relying solely on having wireless to transmit them over.

Definition at line 19 of file CameraBehavior.h.

Public Member Functions

 CameraBehavior ()
 just sets up the variables

virtual ~CameraBehavior ()
 calls DoStop() if isActive()

virtual void DoStart ()
 Register for events and creates and adds two motion commands - a walker and a tail wag.

virtual void DoStop ()
 Removes its two motion commands.

virtual void processEvent (const EventBase &e)
 Handles event processing.

virtual std::string getName () const
 returns name of behavior


Static Public Member Functions

virtual 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

double RAD (double x)
 converts x degrees to radians


Protected Attributes

const EventBase camera_click
 event mask for taking a picture (head button)

const EventBase sensor_update
 event mask for sensor update

MotionManager::MC_ID headpointer_id
 MC_ID for head pointer.

MotionManager::MC_ID tailwag_id
 MC_ID for tail wag.

MotionManager::MC_ID led_id
 MC_ID for leds.


Constructor & Destructor Documentation

CameraBehavior::CameraBehavior  )  [inline]
 

just sets up the variables

Definition at line 23 of file CameraBehavior.h.

References camera_click, ERS210Info::HeadFrButOffset, headpointer_id, led_id, sensor_update, tailwag_id, and SensorSourceID::UpdatedSID.

virtual CameraBehavior::~CameraBehavior  )  [inline, virtual]
 

calls DoStop() if isActive()

Definition at line 35 of file CameraBehavior.h.

References DoStop(), and BehaviorBase::isActive().


Member Function Documentation

virtual void CameraBehavior::DoStart  )  [inline, virtual]
 

Register for events and creates and adds two motion commands - a walker and a tail wag.

Reimplemented from BehaviorBase.

Definition at line 38 of file CameraBehavior.h.

References EventRouter::addListener(), MotionManager::addMotion(), camera_click, BehaviorBase::DoStart(), erouter, headpointer_id, MotionManager::invalid_MC_ID, led_id, motman, ERS210Info::PanOffset, processEvent(), sensor_update, ERS210Info::TailOffset, tailwag_id, and ERS210Info::TiltOffset.

virtual void CameraBehavior::DoStop  )  [inline, virtual]
 

Removes its two motion commands.

Reimplemented from BehaviorBase.

Definition at line 58 of file CameraBehavior.h.

References BehaviorBase::DoStop(), erouter, EventRouter::forgetListener(), headpointer_id, MotionManager::invalid_MC_ID, led_id, motman, ERS210Info::PanOffset, MotionManager::removeMotion(), ERS210Info::TailOffset, tailwag_id, and ERS210Info::TiltOffset.

virtual std::string CameraBehavior::getClassDescription  )  [inline, static, virtual]
 

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 111 of file CameraBehavior.h.

virtual std::string CameraBehavior::getName  )  const [inline, virtual]
 

returns name of behavior

Implements BehaviorBase.

Definition at line 110 of file CameraBehavior.h.

virtual void CameraBehavior::processEvent const EventBase e  )  [inline, virtual]
 

Handles event processing.

After every sensor update, set head in direction of tail

Reimplemented from BehaviorBase.

Definition at line 86 of file CameraBehavior.h.

References camera_click, EventBase::equalOrLongerThan(), ERS210Info::FaceLEDMask, ERS210Info::HeadOffset, headpointer_id, led_id, MMAccessor< MC_t >::mc(), ERS210Info::outputRanges, WorldState::outputs, ERS210Info::PanOffset, RAD(), sensor_update, state, ERS210Info::TailOffset, and ERS210Info::TiltOffset.

double CameraBehavior::RAD double  x  )  [inline, protected]
 

converts x degrees to radians

Definition at line 113 of file CameraBehavior.h.


Member Data Documentation

const EventBase CameraBehavior::camera_click [protected]
 

event mask for taking a picture (head button)

Definition at line 115 of file CameraBehavior.h.

MotionManager::MC_ID CameraBehavior::headpointer_id [protected]
 

MC_ID for head pointer.

Definition at line 117 of file CameraBehavior.h.

MotionManager::MC_ID CameraBehavior::led_id [protected]
 

MC_ID for leds.

Definition at line 119 of file CameraBehavior.h.

const EventBase CameraBehavior::sensor_update [protected]
 

event mask for sensor update

Definition at line 116 of file CameraBehavior.h.

MotionManager::MC_ID CameraBehavior::tailwag_id [protected]
 

MC_ID for tail wag.

Definition at line 118 of file CameraBehavior.h.


The documentation for this class was generated from the following file:
Tekkotsu v1.4
Generated Sat Jul 19 00:08:51 2003 by Doxygen 1.3.2