DatagramIterator

from panda3d.core import DatagramIterator
class DatagramIterator

Bases: DTOOL_SUPER_BASE

A class to retrieve the individual data elements previously stored in a Datagram. Elements may be retrieved one at a time; it is up to the caller to know the correct type and order of each element.

Note that it is the responsibility of the caller to ensure that the datagram object is not destructed while this DatagramIterator is in use.

Inheritance diagram

Inheritance diagram of DatagramIterator

__init__(*args, **kwargs)
extractBytes()

C++ Interface: extract_bytes(const DatagramIterator self, int size)

/**
  • Extracts the indicated number of bytes in the datagram and returns them as

  • a string.

*/

/**
  • Extracts the indicated number of bytes in the datagram into the given

  • character buffer. Assumes that the buffer is big enough to hold the

  • requested number of bytes. Returns the number of bytes that were

  • successfully written.

*/

extract_bytes()

C++ Interface: extract_bytes(const DatagramIterator self, int size)

/**
  • Extracts the indicated number of bytes in the datagram and returns them as

  • a string.

*/

/**
  • Extracts the indicated number of bytes in the datagram into the given

  • character buffer. Assumes that the buffer is big enough to hold the

  • requested number of bytes. Returns the number of bytes that were

  • successfully written.

*/

getBeFloat32()

C++ Interface: get_be_float32(const DatagramIterator self)

/**
  • Extracts a 32-bit big-endian single-precision floating-point number.

*/

getBeFloat64()

C++ Interface: get_be_float64(const DatagramIterator self)

/**
  • Extracts a 64-bit big-endian floating-point number.

*/

getBeInt16()

C++ Interface: get_be_int16(const DatagramIterator self)

/**
  • Extracts a signed 16-bit big-endian integer.

*/

getBeInt32()

C++ Interface: get_be_int32(const DatagramIterator self)

/**
  • Extracts a signed 32-bit big-endian integer.

*/

getBeInt64()

C++ Interface: get_be_int64(const DatagramIterator self)

/**
  • Extracts a signed 64-bit big-endian integer.

*/

getBeUint16()

C++ Interface: get_be_uint16(const DatagramIterator self)

/**
  • Extracts an unsigned 16-bit big-endian integer.

*/

getBeUint32()

C++ Interface: get_be_uint32(const DatagramIterator self)

/**
  • Extracts an unsigned 32-bit big-endian integer.

*/

getBeUint64()

C++ Interface: get_be_uint64(const DatagramIterator self)

/**
  • Extracts an unsigned 64-bit big-endian integer.

*/

getBlob()

C++ Interface: get_blob(const DatagramIterator self)

/**
  • Extracts a variable-length binary blob.

*/

getBlob32()

C++ Interface: get_blob32(const DatagramIterator self)

/**
  • Extracts a variable-length binary blob with a 32-bit size field.

*/

getBool()

C++ Interface: get_bool(const DatagramIterator self)

/**
  • Extracts a boolean value.

*/

getClassType()

C++ Interface: get_class_type()

getCurrentIndex()

C++ Interface: get_current_index(DatagramIterator self)

/**
  • Returns the current position within the datagram of the next piece of data

  • to extract.

*/

getDatagram()

C++ Interface: get_datagram(DatagramIterator self)

/**
  • Return the datagram of this iterator.

*/

getFixedString()

C++ Interface: get_fixed_string(const DatagramIterator self, int size)

/**
  • Extracts a fixed-length string. However, if a zero byte occurs within the

  • string, it marks the end of the string.

*/

getFloat32()

C++ Interface: get_float32(const DatagramIterator self)

/**
  • Extracts a 32-bit single-precision floating-point number.

*/

getFloat64()

C++ Interface: get_float64(const DatagramIterator self)

/**
  • Extracts a 64-bit floating-point number.

*/

getInt16()

C++ Interface: get_int16(const DatagramIterator self)

/**
  • Extracts a signed 16-bit integer.

*/

getInt32()

C++ Interface: get_int32(const DatagramIterator self)

/**
  • Extracts a signed 32-bit integer.

*/

getInt64()

C++ Interface: get_int64(const DatagramIterator self)

/**
  • Extracts a signed 64-bit integer.

*/

getInt8()

C++ Interface: get_int8(const DatagramIterator self)

/**
  • Extracts a signed 8-bit integer.

*/

getRemainingBytes()

C++ Interface: get_remaining_bytes(DatagramIterator self)

/**
  • Returns the remaining bytes in the datagram as a string, but does not

  • extract them from the iterator.

*/

getRemainingSize()

C++ Interface: get_remaining_size(DatagramIterator self)

/**
  • Return the bytes left in the datagram.

*/

getStdfloat()

C++ Interface: get_stdfloat(const DatagramIterator self)

/**
  • Extracts either a 32-bit or a 64-bit floating-point number, according to

  • Datagram::set_stdfloat_double().

*/

getString()

C++ Interface: get_string(const DatagramIterator self)

/**
  • Extracts a variable-length string.

*/

getString32()

C++ Interface: get_string32(const DatagramIterator self)

/**
  • Extracts a variable-length string with a 32-bit length field.

*/

getUint16()

C++ Interface: get_uint16(const DatagramIterator self)

/**
  • Extracts an unsigned 16-bit integer.

*/

getUint32()

C++ Interface: get_uint32(const DatagramIterator self)

/**
  • Extracts an unsigned 32-bit integer.

*/

getUint64()

C++ Interface: get_uint64(const DatagramIterator self)

/**
  • Extracts an unsigned 64-bit integer.

*/

getUint8()

C++ Interface: get_uint8(const DatagramIterator self)

/**
  • Extracts an unsigned 8-bit integer.

*/

getWstring()

C++ Interface: get_wstring(const DatagramIterator self)

/**
  • Extracts a variable-length wstring (with a 32-bit length field).

*/

getZString()

C++ Interface: get_z_string(const DatagramIterator self)

/**
  • Extracts a variable-length string, as a NULL-terminated string.

*/

get_be_float32()

C++ Interface: get_be_float32(const DatagramIterator self)

/**
  • Extracts a 32-bit big-endian single-precision floating-point number.

*/

get_be_float64()

C++ Interface: get_be_float64(const DatagramIterator self)

/**
  • Extracts a 64-bit big-endian floating-point number.

*/

get_be_int16()

C++ Interface: get_be_int16(const DatagramIterator self)

/**
  • Extracts a signed 16-bit big-endian integer.

*/

get_be_int32()

C++ Interface: get_be_int32(const DatagramIterator self)

/**
  • Extracts a signed 32-bit big-endian integer.

*/

get_be_int64()

C++ Interface: get_be_int64(const DatagramIterator self)

/**
  • Extracts a signed 64-bit big-endian integer.

*/

get_be_uint16()

C++ Interface: get_be_uint16(const DatagramIterator self)

/**
  • Extracts an unsigned 16-bit big-endian integer.

*/

get_be_uint32()

C++ Interface: get_be_uint32(const DatagramIterator self)

/**
  • Extracts an unsigned 32-bit big-endian integer.

*/

get_be_uint64()

C++ Interface: get_be_uint64(const DatagramIterator self)

/**
  • Extracts an unsigned 64-bit big-endian integer.

*/

get_blob()

C++ Interface: get_blob(const DatagramIterator self)

/**
  • Extracts a variable-length binary blob.

*/

get_blob32()

C++ Interface: get_blob32(const DatagramIterator self)

/**
  • Extracts a variable-length binary blob with a 32-bit size field.

*/

get_bool()

C++ Interface: get_bool(const DatagramIterator self)

/**
  • Extracts a boolean value.

*/

get_class_type()

C++ Interface: get_class_type()

get_current_index()

C++ Interface: get_current_index(DatagramIterator self)

/**
  • Returns the current position within the datagram of the next piece of data

  • to extract.

*/

get_datagram()

C++ Interface: get_datagram(DatagramIterator self)

/**
  • Return the datagram of this iterator.

*/

get_fixed_string()

C++ Interface: get_fixed_string(const DatagramIterator self, int size)

/**
  • Extracts a fixed-length string. However, if a zero byte occurs within the

  • string, it marks the end of the string.

*/

get_float32()

C++ Interface: get_float32(const DatagramIterator self)

/**
  • Extracts a 32-bit single-precision floating-point number.

*/

get_float64()

C++ Interface: get_float64(const DatagramIterator self)

/**
  • Extracts a 64-bit floating-point number.

*/

get_int16()

C++ Interface: get_int16(const DatagramIterator self)

/**
  • Extracts a signed 16-bit integer.

*/

get_int32()

C++ Interface: get_int32(const DatagramIterator self)

/**
  • Extracts a signed 32-bit integer.

*/

get_int64()

C++ Interface: get_int64(const DatagramIterator self)

/**
  • Extracts a signed 64-bit integer.

*/

get_int8()

C++ Interface: get_int8(const DatagramIterator self)

/**
  • Extracts a signed 8-bit integer.

*/

get_remaining_bytes()

C++ Interface: get_remaining_bytes(DatagramIterator self)

/**
  • Returns the remaining bytes in the datagram as a string, but does not

  • extract them from the iterator.

*/

get_remaining_size()

C++ Interface: get_remaining_size(DatagramIterator self)

/**
  • Return the bytes left in the datagram.

*/

get_stdfloat()

C++ Interface: get_stdfloat(const DatagramIterator self)

/**
  • Extracts either a 32-bit or a 64-bit floating-point number, according to

  • Datagram::set_stdfloat_double().

*/

get_string()

C++ Interface: get_string(const DatagramIterator self)

/**
  • Extracts a variable-length string.

*/

get_string32()

C++ Interface: get_string32(const DatagramIterator self)

/**
  • Extracts a variable-length string with a 32-bit length field.

*/

get_uint16()

C++ Interface: get_uint16(const DatagramIterator self)

/**
  • Extracts an unsigned 16-bit integer.

*/

get_uint32()

C++ Interface: get_uint32(const DatagramIterator self)

/**
  • Extracts an unsigned 32-bit integer.

*/

get_uint64()

C++ Interface: get_uint64(const DatagramIterator self)

/**
  • Extracts an unsigned 64-bit integer.

*/

get_uint8()

C++ Interface: get_uint8(const DatagramIterator self)

/**
  • Extracts an unsigned 8-bit integer.

*/

get_wstring()

C++ Interface: get_wstring(const DatagramIterator self)

/**
  • Extracts a variable-length wstring (with a 32-bit length field).

*/

get_z_string()

C++ Interface: get_z_string(const DatagramIterator self)

/**
  • Extracts a variable-length string, as a NULL-terminated string.

*/

output()

C++ Interface: output(DatagramIterator self, ostream out)

/**
  • Write a string representation of this instance to <out>.

*/

peekInt16()

C++ Interface: peek_int16(const DatagramIterator self)

/**
  • Extracts a signed 16-bit integer without advancing the iterator.

*/

peekUint16()

C++ Interface: peek_uint16(const DatagramIterator self)

/**
  • Extracts an unsigned 16-bit integer without advancing the iterator.

*/

peek_int16()

C++ Interface: peek_int16(const DatagramIterator self)

/**
  • Extracts a signed 16-bit integer without advancing the iterator.

*/

peek_uint16()

C++ Interface: peek_uint16(const DatagramIterator self)

/**
  • Extracts an unsigned 16-bit integer without advancing the iterator.

*/

skipBytes()

C++ Interface: skip_bytes(const DatagramIterator self, int size)

/**
  • Skips over the indicated number of bytes in the datagram.

*/

skip_bytes()

C++ Interface: skip_bytes(const DatagramIterator self, int size)

/**
  • Skips over the indicated number of bytes in the datagram.

*/

write()

C++ Interface: write(DatagramIterator self, ostream out, int indent)

/**
  • Write a string representation of this instance to <out>.

*/