PyDatagram

Inheritance:

Methods of PyDatagram:

Methods of Datagram:

Methods of TypedObject:

addOldServerHeader
def addOldServerHeader(self, channel, sender, code)

Undocumented function.

addServerHeader
def addServerHeader(self, channel, sender, code)

Undocumented function.

putArg
def putArg(self, arg, subatomicType, divisor=1)

Undocumented function.

addBeFloat32
void Datagram::add_be_float32(float value);

Description: Adds a 32-bit single-precision big-endian floating-point number to the datagram. Since this kind of float is not necessarily portable across different architectures, special care is required.

addBeFloat64
void Datagram::add_be_float64(double value);

Description: Adds a 64-bit big-endian floating-point number to the datagram.

addBeInt16
void Datagram::add_be_int16(short int value);

These functions pack numbers big-endian, in case that's desired.
Description: Adds a signed 16-bit big-endian integer to the datagram.

addBeInt32
void Datagram::add_be_int32(int value);

These functions pack numbers big-endian, in case that's desired.
Description: Adds a signed 32-bit big-endian integer to the datagram.

addBeInt64
void Datagram::add_be_int64(__int64 value);

Description: Adds a signed 64-bit big-endian integer to the datagram.

addBeUint16
void Datagram::add_be_uint16(unsigned short int value);

Description: Adds an unsigned 16-bit big-endian integer to the datagram.

addBeUint32
void Datagram::add_be_uint32(unsigned int value);

Description: Adds an unsigned 32-bit big-endian integer to the datagram.

addBeUint64
void Datagram::add_be_uint64(unsigned __int64 value);

Description: Adds an unsigned 64-bit big-endian integer to the datagram.

addBool
void Datagram::add_bool(bool value);

Description: Adds a boolean value to the datagram.

addFixedString
void Datagram::add_fixed_string(string const &str, unsigned int size);

Description: Adds a fixed-length string to the datagram. If the string given is less than the requested size, this will pad the string out with zeroes; if it is greater than the requested size, this will silently truncate the string.

addFloat32
void Datagram::add_float32(float value);

Description: Adds a 32-bit single-precision floating-point number to the datagram. Since this kind of float is not necessarily portable across different architectures, special care is required.

addFloat64
void Datagram::add_float64(double value);

Description: Adds a 64-bit floating-point number to the datagram.

addInt16
void Datagram::add_int16(short int value);

The default numeric packing is little-endian.
Description: Adds a signed 16-bit integer to the datagram.

addInt32
void Datagram::add_int32(int value);

The default numeric packing is little-endian.
Description: Adds a signed 32-bit integer to the datagram.

addInt64
void Datagram::add_int64(__int64 value);

Description: Adds a signed 64-bit integer to the datagram.

addInt8
void Datagram::add_int8(signed char value);

Description: Adds a signed 8-bit integer to the datagram.

addString
void Datagram::add_string(string const &str);

Description: Adds a variable-length string to the datagram. This actually adds a count followed by n bytes.

addString32
void Datagram::add_string32(string const &str);

Description: Adds a variable-length string to the datagram, using a 32-bit length field to allow very long strings.

addUint16
void Datagram::add_uint16(unsigned short int value);

Description: Adds an unsigned 16-bit integer to the datagram.

addUint32
void Datagram::add_uint32(unsigned int value);

Description: Adds an unsigned 32-bit integer to the datagram.

addUint64
void Datagram::add_uint64(unsigned __int64 value);

Description: Adds an unsigned 64-bit integer to the datagram.

addUint8
void Datagram::add_uint8(unsigned char value);

Description: Adds an unsigned 8-bit integer to the datagram.

addZString
void Datagram::add_z_string(string str);

Description: Adds a variable-length string to the datagram, as a NULL-terminated string.

appendData
void Datagram::append_data(void const *data, unsigned int size);

Description: Appends some more raw data to the end of the datagram.

clear
virtual void Datagram::clear(void);

Description: Resets the datagram to empty, in preparation for building up a new datagram.

dumpHex
void Datagram::dump_hex(ostream &out) const;

Description: Writes a representation of the entire datagram contents, as a sequence of hex (and ASCII) values.

getClassType
static TypeHandle Datagram::get_class_type(void);

Undocumented function.

getData
void const *Datagram::get_data(void) const;

Description: Returns a pointer to the beginning of the datagram's data.

getLength
unsigned int Datagram::get_length(void) const;

Description: Returns the number of bytes in the datagram.

getMessage
string Datagram::get_message(void) const;

Description: Returns the datagram's data as a string.

operator !=
bool Datagram::operator !=(Datagram const &other) const;

Description:

operator <
bool Datagram::operator <(Datagram const &other) const;

Description:

operator =
void Datagram::operator =(Datagram const &copy);

Description:

operator ==
bool Datagram::operator ==(Datagram const &other) const;

Description:

output
void Datagram::output(ostream &out) const;

Description : Write a string representation of this instance to <out>.

padBytes
void Datagram::pad_bytes(unsigned int size);

Description: Adds the indicated number of zero bytes to the datagram.

write
void Datagram::write(ostream &out, unsigned int indent = (0)) const;

Description : Write a string representation of this instance to <out>.

getBestParentFromSet
int TypedObject::get_best_parent_from_Set(set< int > const &) const;

Description: Returns true if the current object is the indicated type exactly.

getClassType
static TypeHandle TypedObject::get_class_type(void);

Undocumented function.

getType
virtual TypeHandle TypedObject::get_type(void) const = 0;

Derived classes should override this function to return get_class_type().

getTypeIndex
int TypedObject::get_type_index(void) const;

Description: Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. This is equivalent to get_type().get_index().

isExactType
bool TypedObject::is_exact_type(TypeHandle handle) const;

Description: Returns true if the current object is the indicated type exactly.

isOfType
bool TypedObject::is_of_type(TypeHandle handle) const;

Description: Returns true if the current object is or derives from the indicated type.