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

ArRobotPacket Class Reference

#include <ArRobotPacket.h>

Inheritance diagram for ArRobotPacket:

ArBasePacket List of all members.

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.

Examples:

auxSerialExample.cpp.

Definition at line 41 of file ArRobotPacket.h.

Public Member Functions

 ArRobotPacket (unsigned char sync1=0xfa, unsigned char sync2=0xfb)
 Constructor.
ArTypes::Byte2 calcCheckSum (void)
 returns the checksum, probably used only internally
virtual void finalizePacket (void)
ArTypes::UByte getID (void)
 returns the ID of the packet
ArTime getTimeReceived (void)
 Gets the time the packet was received at.
void setID (ArTypes::UByte id)
 Sets the ID of the packet.
void setTimeReceived (ArTime timeReceived)
 Sets the time the packet was received at.
bool verifyCheckSum (void)
 returns true if the checksum matches what it should be
virtual ~ArRobotPacket ()
 Destructor.

Protected Attributes

unsigned char mySync1
unsigned char mySync2
ArTime myTimeReceived


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

Definition at line 37 of file ArRobotPacket.cpp.


The documentation for this class was generated from the following files:
Generated on Tue Feb 20 10:51:45 2007 for Aria by  doxygen 1.4.0