Drag[en]gine Script Module DragonScript Script API  1.0
NetworkMessage Class Reference

Network message. More...

Inheritance diagram for NetworkMessage:

Public Member Functions

Constructors
NetworkMessage new ()
 Create network message. More...
 
Management
int getDataLength ()
 Llength of the message data. More...
 
void setDataLength (int dataLength)
 Set length of the message data. More...
 
void clear ()
 Clear message data. More...
 
int getPosition ()
 Read/write position in bytes from the beginning of the message. More...
 
void setPosition (int position)
 Set read/write position relative to the beginning of the message. More...
 
void rewind ()
 Set read/write position to the beginning of the message. More...
 
bool endOfMessage ()
 Read/write position is at end of message. More...
 
Read
bool readBool ()
 Read boolean as UINT8. More...
 
int readInt (int format)
 Read integer of the given format. Allowed are INT* and UINT*. More...
 
float readFloat (int format)
 Read float of the given format. Allowed are FLOAT*. More...
 
String readString ()
 Read null-terminated string. More...
 
Point readPoint (int format)
 Read 2-component point of the given format for each component. More...
 
Point3 readPoint3 (int format)
 Read 3-component point of the given format for each component. More...
 
Vector readVector (int format)
 Read 3-component vector of the given format for each component. More...
 
Quaternion readQuaternion (int format)
 Read 4-component quaternion of the given format for each component. More...
 
Color readColor3 (int format)
 Read 3-component color of the given format for each component. More...
 
Color readColor4 (int format)
 Read 4-component color of the given format for each component. More...
 
UniqueID readUniqueID ()
 Read unique id. More...
 
Write
void writeBool (bool value)
 Write boolean as UINT8. More...
 
void writeInt (int value, int format)
 Write integer of the given format. Allowed are INT* and UINT*. More...
 
void writeFloat (float value, int format)
 Write float of the given format. Allowed are FLOAT*. More...
 
void writeString (String value)
 Write null-terminated string. More...
 
void writePoint (Point value, int format)
 Write 2-component point of the given format for each component. More...
 
void writePoint3 (Point3 value, int format)
 Write 3-component point of the given format for each component. More...
 
void writeVector (Vector value, int format)
 Write 3-component vector of the given format for each component. More...
 
void writeQuaternion (Quaternion value, int format)
 Write 4-component quaternion of the given format for each component. More...
 
void writeColor3 (Color value, int format)
 Write 3-component color of the given format for each component. More...
 
void writeColor4 (Color value, int format)
 Write 4-component color of the given format for each component. More...
 
void writeUniqueID (UniqueID value)
 Write unique id. More...
 

Static Public Attributes

Formats
static final int SINT8 = 0
 Signed 8-bit integer. More...
 
static final int UINT8 = 1
 Unsigned 8-bit integer. More...
 
static final int SINT16 = 2
 Signed 16-bit integer. More...
 
static final int UINT16 = 3
 Unsigned 16-bit integer. More...
 
static final int SINT32 = 4
 Signed 32-bit integer. More...
 
static final int UINT32 = 5
 Unsigned 32-bit integer. More...
 
static final int FLOAT16 = 6
 16-bit floating point. More...
 
static final int FLOAT32 = 7
 32-bit floating point. More...
 
static final int FLOAT64 = 8
 64-bit floating point. More...
 

Detailed Description

Network message.

This is a native class.

Author
Roland Pl├╝ss
Version
1.0
Date
2015

Member Function Documentation

§ clear()

void clear ( )

Clear message data.

§ endOfMessage()

bool endOfMessage ( )

Read/write position is at end of message.

§ getDataLength()

int getDataLength ( )

Llength of the message data.

§ getPosition()

int getPosition ( )

Read/write position in bytes from the beginning of the message.

§ new()

NetworkMessage new ( )

Create network message.

§ readBool()

bool readBool ( )

Read boolean as UINT8.

§ readColor3()

Color readColor3 ( int  format)

Read 3-component color of the given format for each component.

Allowed are UINT8, UINT16, FLOAT*.

§ readColor4()

Color readColor4 ( int  format)

Read 4-component color of the given format for each component.

Allowed are UINT8, UINT16, FLOAT*.

§ readFloat()

float readFloat ( int  format)

Read float of the given format. Allowed are FLOAT*.

§ readInt()

int readInt ( int  format)

Read integer of the given format. Allowed are INT* and UINT*.

§ readPoint()

Point readPoint ( int  format)

Read 2-component point of the given format for each component.

Allowed are INT* and UINT*.

§ readPoint3()

Point3 readPoint3 ( int  format)

Read 3-component point of the given format for each component.

Allowed are INT* and UINT*.

§ readQuaternion()

Quaternion readQuaternion ( int  format)

Read 4-component quaternion of the given format for each component.

Allowed are FLOAT*.

§ readString()

String readString ( )

Read null-terminated string.

§ readUniqueID()

UniqueID readUniqueID ( )

Read unique id.

§ readVector()

Vector readVector ( int  format)

Read 3-component vector of the given format for each component.

Allowed are FLOAT*.

§ rewind()

void rewind ( )

Set read/write position to the beginning of the message.

§ setDataLength()

void setDataLength ( int  dataLength)

Set length of the message data.

§ setPosition()

void setPosition ( int  position)

Set read/write position relative to the beginning of the message.

§ writeBool()

void writeBool ( bool  value)

Write boolean as UINT8.

§ writeColor3()

void writeColor3 ( Color  value,
int  format 
)

Write 3-component color of the given format for each component.

Allowed are UINT8, UINT16, FLOAT*.

§ writeColor4()

void writeColor4 ( Color  value,
int  format 
)

Write 4-component color of the given format for each component.

Allowed are UINT8, UINT16, FLOAT*.

§ writeFloat()

void writeFloat ( float  value,
int  format 
)

Write float of the given format. Allowed are FLOAT*.

§ writeInt()

void writeInt ( int  value,
int  format 
)

Write integer of the given format. Allowed are INT* and UINT*.

§ writePoint()

void writePoint ( Point  value,
int  format 
)

Write 2-component point of the given format for each component.

Allowed are INT* and UINT*.

§ writePoint3()

void writePoint3 ( Point3  value,
int  format 
)

Write 3-component point of the given format for each component.

Allowed are INT* and UINT*.

§ writeQuaternion()

void writeQuaternion ( Quaternion  value,
int  format 
)

Write 4-component quaternion of the given format for each component.

Allowed are FLOAT*.

§ writeString()

void writeString ( String  value)

Write null-terminated string.

§ writeUniqueID()

void writeUniqueID ( UniqueID  value)

Write unique id.

§ writeVector()

void writeVector ( Vector  value,
int  format 
)

Write 3-component vector of the given format for each component.

Allowed are FLOAT*.

Member Data Documentation

§ FLOAT16

final int FLOAT16 = 6
static

16-bit floating point.

§ FLOAT32

final int FLOAT32 = 7
static

32-bit floating point.

§ FLOAT64

final int FLOAT64 = 8
static

64-bit floating point.

§ SINT16

final int SINT16 = 2
static

Signed 16-bit integer.

§ SINT32

final int SINT32 = 4
static

Signed 32-bit integer.

§ SINT8

final int SINT8 = 0
static

Signed 8-bit integer.

§ UINT16

final int UINT16 = 3
static

Unsigned 16-bit integer.

§ UINT32

final int UINT32 = 5
static

Unsigned 32-bit integer.

§ UINT8

final int UINT8 = 1
static

Unsigned 8-bit integer.


The documentation for this class was generated from the following file: