Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages | Examples

ArIrrfDevice Class Reference

#include <ArIrrfDevice.h>

Inheritance diagram for ArIrrfDevice:

ArRangeDevice List of all members.

Detailed Description

A class for connecting to a PB-9 and managing the resulting data.

This class is for use with a PB9 IR rangefinder. It has the packethandler necessary to process the packets, and will put the data into ArRangeBuffers for use with obstacle avoidance, etc.

The PB9 is still under development, and only works on an H8 controller running AROS.


Public Member Functions

 ArIrrfDevice (size_t currentBufferSize=91, size_t cumulativeBufferSize=273, const char *name="irrf")
 Constructor.
bool packetHandler (ArRobotPacket *packet)
 The packet handler for use when connecting to an H8 micro-controller.
void setCumulativeMaxRange (double r)
 Maximum range for a reading to be added to the cumulative buffer (mm).
virtual void setRobot (ArRobot *)
virtual ~ArIrrfDevice ()
 Destructor.

Protected Member Functions

void processReadings (void)

Protected Attributes

double myCumulativeMaxRange
double myFilterFarDist
double myFilterNearDist
std::map< int, ArSensorReading * > myIrrfReadings
ArTime myLastReading
ArRetFunctor1C< bool, ArIrrfDevice,
ArRobotPacket * > 
myPacketHandler


Member Function Documentation

bool ArIrrfDevice::packetHandler ArRobotPacket packet  ) 
 

The packet handler for use when connecting to an H8 micro-controller.

This is the packet handler for the PB9 data, which is sent via the micro controller, to the client. This will read the data from the packets, and then call processReadings to filter add the data to the current and cumulative buffers.


The documentation for this class was generated from the following files:
Generated on Thu Jan 7 10:34:41 2010 for Aria by  doxygen 1.4.2