Module pyinsim :: Class _CarTrackPacket
[hide private]
[frames] | no frames]

Class _CarTrackPacket

source code

UserDict.UserDict --+
                    |
                   _CarTrackPacket

Class to handle car tracking packets, MCI and NLP.

These packets need to be handled by a seperate class, as they both contain variable sized arrays.

Instance Methods [hide private]
 
__init__(self, data, insim)
Init the _CarTrackPacket
source code
 
insim(self)
Get a reference to the InSim object which created the packet.
source code
 
__createNlp(self, data, offset)
Unpack an NLP packet.
source code
 
__createMci(self, data, offset)
Unpack an MCI packet.
source code
 
pack(self)
Pack the current packet values into a binary string.
source code
 
_CarTrackPacket__createMci(self, data, offset)
Unpack an MCI packet.
source code
 
_CarTrackPacket__createNlp(self, data, offset)
Unpack an NLP packet.
source code

Inherited from UserDict.UserDict: __cmp__, __contains__, __delitem__, __getitem__, __len__, __repr__, __setitem__, clear, copy, get, has_key, items, iteritems, iterkeys, itervalues, keys, pop, popitem, setdefault, update, values

Class Methods [hide private]

Inherited from UserDict.UserDict: fromkeys

Method Details [hide private]

__init__(self, data, insim)
(Constructor)

source code 

Init the _CarTrackPacket

Args:
data - The packet data as a binary formatted string.
Overrides: UserDict.UserDict.__init__

insim(self)

source code 

Get a reference to the InSim object which created the packet.

Returns:
The InSim object.

pack(self)

source code 

Pack the current packet values into a binary string.

Returns:
A binary formatted string.