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

BanditMachine::WaitNode Class Reference

#include <BanditMachine.h>

Inheritance diagram for BanditMachine::WaitNode:

Inheritance graph
[legend]
List of all members.

Detailed Description

Waits to see if a reward is received, lights up LEDs to let the user know.

Definition at line 154 of file BanditMachine.h.

Public Member Functions

 WaitNode (const char *n, StateNode *p, karmedbanditExp3_1 &bandito)
 constructor

virtual ~WaitNode ()
 destructor

virtual void DoStart ()
 Transitions should call this when you are entering the state, so it can enable its transitions.

virtual void DoStop ()
 Transitions should call this when you are leaving the state, so it can disable its transitions.

virtual void processEvent (const EventBase &event)
 Doesn't do anything, supplied here so you don't have to (since events will probably be going to Transition's, not here).


Protected Attributes

karmedbanditExp3_1b
 the class implimenting a k-armed bandit algorithm to pass the reward back to

bool reward
 true if a reward was received

MotionManager::MC_ID leds_id
 MC_ID of a LedMC.


Constructor & Destructor Documentation

BanditMachine::WaitNode::WaitNode const char *  n,
StateNode p,
karmedbanditExp3_1 bandito
[inline]
 

constructor

Definition at line 161 of file BanditMachine.h.

References MotionManager::addMotion(), b, leds_id, motman, and reward.

virtual BanditMachine::WaitNode::~WaitNode  )  [inline, virtual]
 

destructor

Definition at line 167 of file BanditMachine.h.

References leds_id, motman, and MotionManager::removeMotion().


Member Function Documentation

virtual void BanditMachine::WaitNode::DoStart  )  [inline, virtual]
 

Transitions should call this when you are entering the state, so it can enable its transitions.

Reimplemented from StateNode.

Definition at line 170 of file BanditMachine.h.

References EventRouter::addListener(), EventRouter::addTimer(), ERS210Info::BotLLEDMask, ERS210Info::BotRLEDMask, StateNode::DoStart(), erouter, leds_id, and EventBase::visionEGID.

virtual void BanditMachine::WaitNode::DoStop  )  [inline, virtual]
 

Transitions should call this when you are leaving the state, so it can disable its transitions.

Reimplemented from StateNode.

Definition at line 177 of file BanditMachine.h.

References b, StateNode::DoStop(), erouter, EventRouter::forgetListener(), reward, and karmedbanditExp3_1::reward().

virtual void BanditMachine::WaitNode::processEvent const EventBase event  )  [inline, virtual]
 

Doesn't do anything, supplied here so you don't have to (since events will probably be going to Transition's, not here).

Reimplemented from StateNode.

Definition at line 184 of file BanditMachine.h.

References erouter, EventRouter::forgetListener(), EventBase::getGeneratorID(), leds_id, ERS210Info::MidLLEDMask, ERS210Info::MidRLEDMask, SoundManager::PlayFile(), reward, sndman, and EventBase::timerEGID.


Member Data Documentation

karmedbanditExp3_1& BanditMachine::WaitNode::b [protected]
 

the class implimenting a k-armed bandit algorithm to pass the reward back to

Definition at line 196 of file BanditMachine.h.

MotionManager::MC_ID BanditMachine::WaitNode::leds_id [protected]
 

MC_ID of a LedMC.

Definition at line 198 of file BanditMachine.h.

bool BanditMachine::WaitNode::reward [protected]
 

true if a reward was received

Definition at line 197 of file BanditMachine.h.


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