Lines Matching full:pack

55 unpackers in each protocol (see {pack,unpack}_wirestat below).
95 Protocol instances have a pack() method that encodes a set of
96 arguments into a packet. To know what to encode, pack() must
104 >>> pkt = dotu.pack(fcall='Tversion', args=args)
130 >>> pkt = dotu.pack(fcall='Tversion', args=args)
136 >>> pkt2 = dotu.pack(fcall=td.Tversion, args=args)
141 the appropriate PFOD. In this case pack() finds the type from
145 >>> pkt2 = dotu.pack(rrd.Tversion(tag=99, msize=1000))
169 pkt = protocol.plain.pack(fcall='Rerror',
173 pkt = proto.pack(fcall='Rversion', args={'tag': tag, 'msize': msize})
189 proto.pack, the pack_from will detect this "missing" value and
269 Of course, since you can *pack*, you can also *unpack*. It's
365 To pack a stat object when producing data for reading a directory,
446 # pkt = proto.pack(fcall=protocol.td.Tversion,
450 # pkt = proto.pack(fcall=protocol.td.Twrite,
453 # pkt = proto.pack(fcall=protocol.td.Twrite,
456 # pkt = proto.pack(fcall=protocol.td.Twrite,
466 # foo = proto.pack(data)
493 def pack(self, auto_vars, conditions, data, rodata): member in _PackInfo
495 Pack data. Insert automatic and/or counted variables
531 return self.seq.pack(data, conditions)
565 func.__doc__ = 'pack from {0}'.format(name)
617 def pack(self, *args, **kwargs): member in _P9Proto
618 "pack up a pfod or fcall-and-arguments"
629 raise TypeError('pack() with no fcall requires 1 argument')
632 raise TypeError('pack() got an unexpected keyword argument '
634 return self._pack_from(data, True, 'pack', None)
636 # Called as pack(fcall=whatever, data={...}).
643 raise TypeError('pack() got unexpected arguments '
647 raise TypeError('pack() got an unexpected keyword argument '
650 raise TypeError('pack() with fcall and data '
655 raise TypeError('pack(): {0} is not a valid '
659 return self._pack_from(data, False, 'pack', None)
662 "pack from pfod data, using its type to determine fcall"
667 Internal pack(): called from both invokers (self.Tversion,
668 self.Rwalk, etc.) and from pack and pack_from methods.
671 else. Some calls to pack() build a PFOD and hence pass in
679 assert caller in ('pack', 'pack_from') and packinfo is None
680 # Indirect call from pack_from(), or from pack() after
681 # pack() built a PFOD. We make sure this kind of PFOD
688 # Pack the data
689 pkt = packinfo.pack(self.auto_vars, self.conditions, data, rodata)
704 pkt = _9p_data.header_pack_seq.pack(data, empty)
758 Pack a stat object to appear as data returned by read()
761 data = td.stat_seq.pack(statobj, self.conditions)
762 return td.wirestat_seq.pack({'size': len(data), 'data': data}, {})
789 Dirents (dot-L only) are easy to pack, but we provide
793 return td.dirent_seq.pack(dirent, self.conditions)
1823 seq = sequencer.Sequencer('Header-pack')
1831 print('Header-pack:', file=sys.stderr)