#include <ArNetPacket.h>
Inheritance diagram for ArNetPacket:

drawingsExample.cpp, drawingsExampleWithRobot.cpp, getVideoExample.cpp, and ptzCameraClientExample.cpp.
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 } |
| FOOTER_LENGTH = 2 | |
| Byset of packet data used for footer. | |
| HEADER_LENGTH = 6 | |
| Bytes of packet data used for header. | |
| MAX_DATA_LENGTH = MAX_LENGTH - HEADER_LENGTH - FOOTER_LENGTH - SIZE_OF_LENGTH | |
| Suggested maximum size for data payload (this is the total suggested packet size minus headers and footers). | |
| MAX_LENGTH = 32000 | |
| Suggested maximum total size of a packet (bytes). | |
| enum | PacketSource { TCP, UDP } |
| an enum for where the packet came from More... | |
| SIZE_OF_LENGTH = 2 | |
| Number of bytes needed to store packet length value. | |
| TCP | |
| Came in over tcp. | |
| UDP | |
| Came in over udp. | |
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 |
| ArNetPacket::ArNetPacket | ( | ArTypes::UByte2 | bufferSize = ArNetPacket::MAX_LENGTH+5 |
) |
Constructor.
| ArNetPacket::ArNetPacket | ( | const ArNetPacket & | other | ) |
Copy constructor.
| ArNetPacket::~ArNetPacket | ( | ) | [virtual] |
Destructor.
| double ArNetPacket::bufToDouble | ( | void | ) | [virtual] |
Gets a double from the packet buffer.
| ArTypes::Byte2 ArNetPacket::calcCheckSum | ( | void | ) |
returns the checksum, probably used only internally
| void ArNetPacket::doubleToBuf | ( | double | val | ) | [virtual] |
Puts a double into the packet buffer.
| void ArNetPacket::duplicatePacket | ( | ArNetPacket * | packet | ) | [virtual] |
| void ArNetPacket::empty | ( | void | ) | [virtual] |
| void ArNetPacket::finalizePacket | ( | void | ) | [virtual] |
| bool ArNetPacket::getAddedFooter | ( | void | ) | [inline] |
Iternal function that sets if we already added the footer(for forwarding).
| const char* ArNetPacket::getArbitraryString | ( | void | ) | [inline] |
| ArTypes::UByte2 ArNetPacket::getCommand | ( | void | ) |
Gets the command this packet is.
| PacketSource ArNetPacket::getPacketSource | ( | void | ) | [inline] |
| ArNetPacket & ArNetPacket::operator= | ( | const ArNetPacket & | other | ) |
Assignment operator.
| void ArNetPacket::resetRead | ( | void | ) | [virtual] |
Reimplemented from ArBasePacket.
| void ArNetPacket::setAddedFooter | ( | bool | addedFooter | ) | [inline] |
Iternal function that sets if we already added the footer(for forwarding).
| void ArNetPacket::setArbitraryString | ( | const char * | string | ) | [inline] |
| void ArNetPacket::setCommand | ( | ArTypes::UByte2 | command | ) |
Sets the command this packet is.
| void ArNetPacket::setPacketSource | ( | PacketSource | source | ) | [inline] |
| bool ArNetPacket::verifyCheckSum | ( | void | ) |
returns true if the checksum matches what it should be
bool ArNetPacket::myAddedFooter [protected] |
std::string ArNetPacket::myArbitraryString [protected] |
ArTypes::UByte2 ArNetPacket::myCommand [protected] |
PacketSource ArNetPacket::myPacketSource [protected] |
1.4.7