RobotBrainComponent Class Reference

Inheritance diagram for RobotBrainComponent:
Inheritance graph
[legend]
Collaboration diagram for RobotBrainComponent:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 RobotBrainComponent (OptionManager &mgr, const std::string &descrName="GenericRobotBrainComponent", const std::string &tagName="GenericRobotBrainComponent")
void init (Ice::CommunicatorPtr ic, Ice::ObjectAdapterPtr adapter)
 Init: Sets up all of the Ice runtime details, and ends with a call to registerTopics.
bool registerSubscription (const std::string &MessageTopic)
 Register Subscription: Register this object as a subscriber to a specified topic.
void registerPublisher (const std::string &MessageTopic)
 Register Publisher: Register this object as a publisher of a specified topic.
bool publish (const ::std::string &MessageTopic, RobotSimEvents::EventMessagePtr msg)
 Publish: Send out a message to all subscribers.
void start2 ()
 Start2: Overload of the ModelComponent start2 - don't mess with this.
void stop1 ()
 Stop1: Overload of the ModelComponent stop1 - don't mess with this.
virtual void run ()
virtual void registerTopics ()
 and registerPublisher calls that you would like to happen automatically after init.
virtual void evolve ()
 Evolve: Gets called by run in a while(1) loop. Anything that you want to happen continuously should go in here.
virtual void updateMessage (const RobotSimEvents::EventMessagePtr &eMsg, const Ice::Current &)
 to publishes a message.
virtual void start3 ()

Protected Attributes

OModelParam< std::stringitsIceIdentity
OModelParam< std::stringitsIcestormIP
OModelParam< int > itsConnectionTimeout
int itsEvolveSleepTime

Detailed Description

Definition at line 19 of file RobotBrainComponent.H.


Constructor & Destructor Documentation

RobotBrainComponent::RobotBrainComponent ( OptionManager mgr,
const std::string descrName = "GenericRobotBrainComponent",
const std::string tagName = "GenericRobotBrainComponent" 
)

Robot Brain Component Constructor: Simply calls the ModelComponent constructor. Make sure that you include this constructor in your inherited class' initialization list Also, make sure that you use a unique tagName for each object that you want to add

Definition at line 27 of file RobotBrainComponent.C.


Member Function Documentation

virtual void RobotBrainComponent::evolve (  )  [inline, virtual]
void RobotBrainComponent::init ( Ice::CommunicatorPtr  ic,
Ice::ObjectAdapterPtr  adapter 
)

Init: Sets up all of the Ice runtime details, and ends with a call to registerTopics.

Definition at line 37 of file RobotBrainComponent.C.

Referenced by MovementControllerI::evolve().

bool RobotBrainComponent::publish ( const ::std::string MessageTopic,
RobotSimEvents::EventMessagePtr  msg 
)
void RobotBrainComponent::registerPublisher ( const std::string MessageTopic  ) 
bool RobotBrainComponent::registerSubscription ( const std::string MessageTopic  ) 
virtual void RobotBrainComponent::registerTopics (  )  [inline, virtual]
void RobotBrainComponent::run (  )  [virtual]

Run: This function gets forked into a new thread once the ModelManager is started. By default, it calls the evolve function. It will likely become non-virtual in the future, so please put all run-time functionality into evolve

Reimplemented in RetinaI.

Definition at line 103 of file RobotBrainComponent.C.

References evolve().

void RobotBrainComponent::start2 (  )  [virtual]

Start2: Overload of the ModelComponent start2 - don't mess with this.

Reimplemented from ModelComponent.

Definition at line 43 of file RobotBrainComponent.C.

References OModelParam< T >::getVal(), registerTopics(), and start3().

virtual void RobotBrainComponent::start3 (  )  [inline, virtual]

start3: Gets called immediately after start2, which is after all of the subcomponents have been started. If you have any code that needs to run only once at the beginning before the general run/evolve loop, but after the constructor, then you can put it here.

Reimplemented in BeoPilot, and BeoSonar.

Definition at line 75 of file RobotBrainComponent.H.

Referenced by start2().

void RobotBrainComponent::stop1 (  )  [virtual]

Stop1: Overload of the ModelComponent stop1 - don't mess with this.

Reimplemented from ModelComponent.

Definition at line 113 of file RobotBrainComponent.C.

References ModelComponent::tagName().

virtual void RobotBrainComponent::updateMessage ( const RobotSimEvents::EventMessagePtr &  eMsg,
const Ice::Current &   
) [inline, virtual]

The documentation for this class was generated from the following files:
Generated on Sun May 8 08:43:46 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3