# DatagramIterator

from pandac.PandaModules import DatagramIterator

Class : DatagramIterator
Description : 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.

## Inheritance:

DatagramIterator:

## Methods of DatagramIterator:

DatagramIterator (Constructor)
extractBytes
getBeFloat32
getBeFloat64
getBeInt16
getBeInt32
getBeInt64
getBeUint16
getBeUint32
getBeUint64
getBool
getCurrentIndex
getDatagram
getFixedString
getFloat32
getFloat64
getInt16
getInt32
getInt64
getInt8
getRemainingBytes
getRemainingSize
getString
getString32
getUint16
getUint32
getUint64
getUint8
getWstring
getZString
operator =
output
skipBytes
write

DatagramIterator DatagramIterator::DatagramIterator(void); Description:

extractBytes string DatagramIterator::extract_bytes(unsigned int size); Description: Extracts the indicated number of bytes in the datagram and returns them as a string.

getBeFloat32 float DatagramIterator::get_be_float32(void); Description: Extracts a 32-bit big-endian single-precision floating-point number. Since this kind of float is not necessarily portable across different architectures, special care is required.

getBeFloat64 double DatagramIterator::get_be_float64(void); Description: Extracts a 64-bit big-endian floating-point number.

getBeInt16 short int DatagramIterator::get_be_int16(void); Description: Extracts a signed 16-bit big-endian integer.

getBeInt32 int DatagramIterator::get_be_int32(void); Description: Extracts a signed 32-bit big-endian integer.

getBeInt64 long int DatagramIterator::get_be_int64(void); Description: Extracts a signed 64-bit big-endian integer.

getBeUint16 unsigned short int DatagramIterator::get_be_uint16(void); Description: Extracts an unsigned 16-bit big-endian integer.

getBeUint32 unsigned int DatagramIterator::get_be_uint32(void); Description: Extracts an unsigned 32-bit big-endian integer.

getBeUint64 unsigned long int DatagramIterator::get_be_uint64(void); Description: Extracts an unsigned 64-bit big-endian integer.

getBool bool DatagramIterator::get_bool(void); Various ways to get data and increment the iterator... Cut-and-paste-orama Description: Extracts a boolean value.

getCurrentIndex unsigned int DatagramIterator::get_current_index(void) const; Description: Returns the current position within the datagram of the next piece of data to extract.

getDatagram Datagram const &DatagramIterator::get_datagram(void) const; Description: Return the datagram of this iterator.

getFixedString string DatagramIterator::get_fixed_string(unsigned int size); Description: Extracts a fixed-length string. However, if a zero byte occurs within the string, it marks the end of the string.

getFloat32 float DatagramIterator::get_float32(void); Description: Extracts a 32-bit single-precision floating-point number. Since this kind of float is not necessarily portable across different architectures, special care is required.

getFloat64 double DatagramIterator::get_float64(void); Description: Extracts a 64-bit floating-point number.

getInt16 short int DatagramIterator::get_int16(void); Description: Extracts a signed 16-bit integer.

getInt32 int DatagramIterator::get_int32(void); Description: Extracts a signed 32-bit integer.

getInt64 long int DatagramIterator::get_int64(void); Description: Extracts a signed 64-bit integer.

getInt8 signed char DatagramIterator::get_int8(void); Description: Extracts a signed 8-bit integer.

getRemainingBytes string DatagramIterator::get_remaining_bytes(void) const; Description: Returns the remaining bytes in the datagram as a string, but does not extract them from the iterator.

getRemainingSize int DatagramIterator::get_remaining_size(void) const; Description: Return the bytes left in the datagram.

getString string DatagramIterator::get_string(void); Description: Extracts a variable-length string.

getString32 string DatagramIterator::get_string32(void); Description: Extracts a variable-length string with a 32-bit length field.

getUint16 unsigned short int DatagramIterator::get_uint16(void); Description: Extracts an unsigned 16-bit integer.

getUint32 unsigned int DatagramIterator::get_uint32(void); Description: Extracts an unsigned 32-bit integer.

getUint64 unsigned long int DatagramIterator::get_uint64(void); Description: Extracts an unsigned 64-bit integer.

getUint8 unsigned char DatagramIterator::get_uint8(void); Description: Extracts an unsigned 8-bit integer.

getWstring basic_string< wchar_t > DatagramIterator::get_wstring(void); Description: Extracts a variable-length wstring (with a 32-bit length field).

getZString string DatagramIterator::get_z_string(void); Description: Extracts a variable-length string, as a NULL-terminated string.

operator = void DatagramIterator::operator =(DatagramIterator const &copy); Description:

output void DatagramIterator::output(ostream &out) const; Description : Write a string representation of this instance to <out>.

skipBytes void DatagramIterator::skip_bytes(unsigned int size); Description: Skips over the indicated number of bytes in the datagram.

write void DatagramIterator::write(ostream &out, unsigned int indent = (0)) const; Description : Write a string representation of this instance to <out>.