#include <ArNetPacket.h>
Inheritance diagram for ArNetPacket:
Public Types | |
enum | { SIZE_OF_LENGTH = 2, MAX_LENGTH = 32000, HEADER_LENGTH = 6, FOOTER_LENGTH = 2, MAX_DATA_LENGTH = MAX_LENGTH - HEADER_LENGTH - FOOTER_LENGTH - SIZE_OF_LENGTH } |
enum | PacketSource { TCP, UDP } |
an enum for where the packet came from More... | |
Public Member Functions | |
ArNetPacket (const ArNetPacket &other) | |
Copy constructor. | |
ArNetPacket (ArTypes::UByte2 bufferSize=ArNetPacket::MAX_LENGTH+5) | |
Constructor. | |
virtual double | bufToDouble (void) |
Gets a double from the packet buffer. | |
ArTypes::Byte2 | calcCheckSum (void) |
returns the checksum, probably used only internally | |
virtual void | doubleToBuf (double val) |
Puts a double into the packet buffer. | |
virtual void | duplicatePacket (ArNetPacket *packet) |
virtual void | empty (void) |
virtual void | finalizePacket (void) |
bool | getAddedFooter (void) |
Iternal function that sets if we already added the footer(for forwarding). | |
const char * | getArbitraryString (void) |
ArTypes::UByte2 | getCommand (void) |
Gets the command this packet is. | |
PacketSource | getPacketSource (void) |
ArNetPacket & | operator= (const ArNetPacket &other) |
Assignment operator. | |
virtual void | resetRead (void) |
void | setAddedFooter (bool addedFooter) |
Iternal function that sets if we already added the footer(for forwarding). | |
void | setArbitraryString (const char *string) |
void | setCommand (ArTypes::UByte2 command) |
Sets the command this packet is. | |
void | setPacketSource (PacketSource source) |
bool | verifyCheckSum (void) |
returns true if the checksum matches what it should be | |
virtual | ~ArNetPacket () |
Destructor. | |
Protected Attributes | |
bool | myAddedFooter |
std::string | myArbitraryString |
ArTypes::UByte2 | myCommand |
PacketSource | myPacketSource |
anonymous enum |