Main Page   Class Hierarchy   Compound List   Compound Members  

ArRobotPacket Class Reference

Represents the packets sent to the robot as well as those received from it. More...

#include <ArRobotPacket.h>

Inheritance diagram for ArRobotPacket::

ArBasePacket List of all members.

Public Methods

 ArRobotPacket (unsigned char sync1=0xfa, unsigned char sync2=0xfb)
 Constructor. More...

virtual ~ArRobotPacket (void)
 Destructor.

bool verifyCheckSum (void)
 returns true if the checksum matches what it should be.

ArTypes::UByte getID (void)
 returns the ID of the packet (first byte of data).

ArTypes::Byte2 calcCheckSum (void)
 returns the checksum, probably used only internally.

virtual void finalize (void)
 Finalizes the packet in preparation for sending, must be done.

virtual void resetRead (void)
 Restart the reading process. More...

ArTime getTimeReceived (void)
 Gets the time the packet was received at.

void setTimeReceived (ArTime timeReceived)
 Sets the time the packet was received at.


Detailed Description

Represents the packets sent to the robot as well as those received from it.

This class reimplements some of the buf operations since the robot is opposeite endian from intel. Also has the getID for convenience.

You can just look at the documentation for the ArBasePacket except for the 4 new functions here, verifyCheckSum, getID, print, and calcCheckSum.


Constructor & Destructor Documentation

ArRobotPacket::ArRobotPacket unsigned char    sync1 = 0xfa,
unsigned char    sync2 = 0xfb
 

Constructor.

Parameters:
sync1  first byte of the header of this packet, this should be left as the default in nearly all cases, ie don't mess with it
sync2  second byte of the header of this packet, this should be left as the default in nearly all cases, ie don't mess with it


Member Function Documentation

void ArRobotPacket::resetRead void    [virtual]
 

Restart the reading process.

Sets the length read back to the header length so the packet can be reread using the other methods

Reimplemented from ArBasePacket.


The documentation for this class was generated from the following files:
Generated on Tue Nov 12 17:44:04 2002 for Aria by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001