Enki::AsebaMarxbot Class Reference

The aseba-enabled version of the marXbot robot. More...

#include <AsebaMarxbot.h>

Inheritance diagram for Enki::AsebaMarxbot:
Inheritance graph
[legend]

List of all members.

Classes

struct  BaseVariables
struct  DistanceSensorVariables
struct  Event
struct  Module
struct  MotorVariables
struct  ProximitySensorVariables

Public Member Functions

 AsebaMarxbot ()
 Constructor, connect to a host and register VMs.
virtual void connectionClosed (Dashel::Stream *stream, bool abnormal)
virtual void connectionCreated (Dashel::Stream *stream)
virtual void controlStep (double dt)
 In addition to DifferentialWheeled::step(), update aseba variables and initiate periodic events.
virtual void incomingData (Dashel::Stream *stream)
virtual ~AsebaMarxbot ()
 Destructor, unregister VMs.

Public Attributes

std::vector< Module * > modules
Dashel::Streamstream

Static Public Attributes

static int marxbotNumber = 0

Private Attributes

Module distanceSensors
DistanceSensorVariables distanceSensorVariables
Module leftMotor
MotorVariables leftMotorVariables
Module proximitySensors
ProximitySensorVariables proximitySensorVariables
Module rightMotor
MotorVariables rightMotorVariables

Detailed Description

The aseba-enabled version of the marXbot robot.

This robot provides a full simulation of event-based architecture as present on the real marXbot, using aseba. This robot provides a tcp server connection on port ASEBA_DEFAULT_PORT (currently 33333), or higher if other AsebaMarxbot already use it. This allows the connection of Aseba Studio to this robot. The feature is provided by inheriting from a Network server

Definition at line 53 of file AsebaMarxbot.h.


Constructor & Destructor Documentation

Enki::AsebaMarxbot::AsebaMarxbot (  ) 

Constructor, connect to a host and register VMs.

Definition at line 208 of file AsebaMarxbot.cpp.

Enki::AsebaMarxbot::~AsebaMarxbot (  )  [virtual]

Destructor, unregister VMs.

Definition at line 262 of file AsebaMarxbot.cpp.


Member Function Documentation

void Enki::AsebaMarxbot::connectionClosed ( Dashel::Stream ,
bool   
) [virtual]

Called when target closes connection. The only valid method to call on the stream is getTargetName(), input/output operations are forbidden. You must not call closeStream(stream) from within this method for the same stream as the one passed as parameter. Subclass can implement this method. Called with the stream lock held.

Parameters:
stream stream to the target.
abnormal whether the connection was closed during step (abnormal == false) or when an operation was performed (abnormal == true)

Reimplemented from Dashel::Hub.

Definition at line 365 of file AsebaMarxbot.cpp.

void Enki::AsebaMarxbot::connectionCreated ( Dashel::Stream  )  [virtual]

Called when any data connection is created. It is not called when a listening connection (eg tcpin:) is created. If the stream is closed during this method, an exception occurs: the caller is responsible to handle it. The stream is already inserted in the stream list when this function is called. Subclass can implement this method. Called with the stream lock held.

Parameters:
stream stream to the target

Reimplemented from Dashel::Hub.

Definition at line 337 of file AsebaMarxbot.cpp.

void Enki::AsebaMarxbot::controlStep ( double  dt  )  [virtual]

In addition to DifferentialWheeled::step(), update aseba variables and initiate periodic events.

Definition at line 271 of file AsebaMarxbot.cpp.

void Enki::AsebaMarxbot::incomingData ( Dashel::Stream  )  [virtual]

Called when data is available for reading on the stream. If the stream is closed during this method, an exception occurs: Hub stops the execution of this method and calls connectionClosed(); objects dynamically allocated must thus be handled with auto_ptr. If step() is used, subclass must implement this method and call read at least once. Called with the stream lock held.

Parameters:
stream stream to the target

Reimplemented from Dashel::Hub.

Definition at line 352 of file AsebaMarxbot.cpp.


Member Data Documentation

Definition at line 135 of file AsebaMarxbot.h.

Definition at line 130 of file AsebaMarxbot.h.

Definition at line 132 of file AsebaMarxbot.h.

Definition at line 127 of file AsebaMarxbot.h.

Definition at line 140 of file AsebaMarxbot.h.

Definition at line 139 of file AsebaMarxbot.h.

Definition at line 134 of file AsebaMarxbot.h.

Definition at line 129 of file AsebaMarxbot.h.

Definition at line 133 of file AsebaMarxbot.h.

Definition at line 128 of file AsebaMarxbot.h.

Definition at line 156 of file AsebaMarxbot.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


asebaros
Author(s): $author
autogenerated on Mon Sep 5 08:42:17 2011