Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Enki::AliceCommunication Class Reference
[Interaction classes]

#include <AliceCommunication.h>

Inheritance diagram for Enki::AliceCommunication:

Enki::LocalInteraction List of all members.

Detailed Description

Communication module for the Alice.

In the real alice, the communication is done via the infrared sensors. Here it is a different interaction


Public Member Functions

 AliceCommunication (double r, Robot *owner)
 Constructor; r is the robot's bounding circle radius.
void init ()
 Init routine run before the interaction.
void objectStep (double dt, PhysicalObject *po, World *w)
 The actual interaction.
void addSensor (An::Vector pos, double ray)
 Add a new sensor at position pos of radius ray.
void setTransmitValue (unsigned val)
 The value to transmit.
void setTransmit (bool enabled)
 Turn transmission on or off.
bool wasCommunication (void)
 Returns true if a communication signal was received.
bool wasCommunicationSent (void)
 Returns true if a communication signal was sent.
unsigned getSensorId (void)
 Returns the Id.
unsigned char getSensorValue (void)
 Returns the received SensorValue.

Protected Member Functions

void computeRealSensors (void)
 Compute the real position of sensors, update realSensors.

Protected Attributes

std::vector< std::pair< An::Vector,
double > > 
sensors
 The position of sensors through which the Alices communicate.
std::vector< An::Vector > realSensors
 The actual position of sensors, transformed by robot position and orientation.
bool updatedRealSensors
 True if the realSensors reflect the actual real position of the robot.
bool enabled
 Is communication active.
unsigned transmitValue
 Value to transmit through communication.
bool wasReceived
 Was communication active last step.
unsigned receivedSensor
 Sensor through which we received value.
unsigned receivedValue
 Value received through communication.
double smallestDistance2
 the smallest squared distance between two robots


The documentation for this class was generated from the following files:
Generated on Mon Oct 24 17:33:58 2005 for Enki by  doxygen 1.4.2