Module bzTools
[frames] | no frames]

Module bzTools

source code

This module contains miscealeanous facilities used by BZoo component.

Classes
  bzDisplay
This object is a facility to display message in a multiline form.
Functions
string.
getDateTime()
Returns the current date and time.
source code
 
dump_data(data)
Displays a list of bytes contained in data using hexa format.
source code
3*3 matrix
eul2mat(eul)
Converts euler angles into a 3*3 rotation matrix.
source code
3*1 Vector.
mat2eul(mat)
Converts a 3*3 rotation matrix into a euler angle vector.
source code
socket.socket.
IRCConnect(pseudo, network, channel, port)
Opens a connection to IRC server.
source code
Function Details

getDateTime()

source code 
Returns the current date and time.
Returns: string.
a formated string of current date and time.

dump_data(data)

source code 

Displays a list of bytes contained in data using hexa format.

This fonction is typically called when wanting to debug protocol.
Parameters:
  • data (Byte array.) - The data to be displayed.

eul2mat(eul)

source code 

Converts euler angles into a 3*3 rotation matrix.

This fonction is used to lower size of packet sent between client and server.
Parameters:
  • eul (3*1 vector.) - The euler angle vector.
Returns: 3*3 matrix
the corresponding rotation matrix

mat2eul(mat)

source code 
Converts a 3*3 rotation matrix into a euler angle vector.
Parameters:
  • mat (3*3 Matrix) - The matrix to convert.
Returns: 3*1 Vector.
euler angles [RotX, RotY, RotZ] corresponding to 3*3 matrix.

IRCConnect(pseudo, network, channel, port)

source code 
Opens a connection to IRC server.
Parameters:
  • pseudo (string.) - the pseudo to use for session.
  • network (string) - The name of the network to connect to.
  • channel (string) - The name of the channel to connect to.
  • port (integer) - the port number to open connection on.
Returns: socket.socket.
the opened socket with the IRC server or None if connection failed.