Show
Ignore:
Timestamp:
08/02/08 13:12:43 (5 years ago)
Author:
getxsick
Message:

Protocol.get_raw() is now private method so renamed to _get_raw().

In umpa/packets.py you can read why we need packet container in _get_raw()
and because of it, calling Protocol.get_raw() directly is impossible now.

We need ALWAYS use Packet class to keep protocols and getting raw from them.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branch/UMPA/umpa/packets.py

    r3293 r3309  
    6464        proto_id = 0 
    6565        for proto in reversed(self.protos): 
    66             raw_proto, bit_proto = proto.get_raw(tuple(self.protos), self.bits) 
     66            # unfortunately we must pass list of prototocols to every protocol 
     67            # because some fields handle with other protocols, so they need 
     68            # an access to them 
     69            raw_proto, bit_proto = proto._get_raw(tuple(self.protos), self.bits) 
    6770            self.raw |= raw_proto << self.bits 
    6871            self.bits += bit_proto