Module bzMessage :: Class WelcomeMessage
[frames] | no frames]

Class WelcomeMessage

source code


Init message sent when connection accepted.

Message is sent periodically (at each TIC). 'hhhh%dsfffffffffhhh'

Instance Methods
 
__init__(self, realid=0, result=0, reason=0, pseudo='Guest', position=[0.0, 0.0, 0.0], orientation=[[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]], heading=[[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]], state=0, action=0, scene=0) source code
Byte Array. 'B' + '!BBBBBBB%dsfffffffff'
Encode(self, realid=0, result=0, reason=0, pseudo='Guest', position=[0.0, 0.0, 0.0], orientation=[[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]], heading=[[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]], state=0, action=0, scene=0)
Returns: the encoded data
source code
Int, [Int,Int, Int, String, Vector, Matrix, Matrix, Integer, Integer, Integer
Decode(self, data)
Returns: nb_processed_bytes, [Id, Result, Reason, Pseudo, Position, Orientation, Heading, State, Action, Scene ]
source code

Inherited from ServerMessage: __repr__

Method Details

__init__(self, realid=0, result=0, reason=0, pseudo='Guest', position=[0.0, 0.0, 0.0], orientation=[[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]], heading=[[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]], state=0, action=0, scene=0)
(Constructor)

source code 
Overrides: ServerMessage.__init__

Encode(self, realid=0, result=0, reason=0, pseudo='Guest', position=[0.0, 0.0, 0.0], orientation=[[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]], heading=[[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]], state=0, action=0, scene=0)

source code 
Parameters:
  • realid (Integer) - Id of the client
  • result (Integer) - Result of session opening
  • reason (Integer) - The reason associated with the result
  • pseudo (String) - pseudo for the session
  • position (= 3*1 Vector) - Vector [posX, posY, posZ]
  • orientation (3*3 Matrix) - [[r11, r12, r13],[r21, r22, r23],[r31, r32, r33]]
  • heading (3*3 Matrix) - [[h11, h12, h13],[h21, h22, h23],[h31, h32, h33]]
  • state (Integer) - the last state the player was in
  • action (Integer) - the Action played by the player
  • scene (Integer) - the scene in which the client was seen the last time he disconnected.
Returns: Byte Array. 'B' + '!BBBBBBB%dsfffffffff'
the encoded data

Decode(self, data)

source code 
Parameters:
  • data (Byte Array. 'B' + '!BBBBBBB%dsfffffffff') - the data to decode.
Returns: Int, [Int,Int, Int, String, Vector, Matrix, Matrix, Integer, Integer, Integer
nb_processed_bytes, [Id, Result, Reason, Pseudo, Position, Orientation, Heading, State, Action, Scene ]