Пример #1
0
    def __init__(self, encoding):
        xreply, ad = minx.decode(encoding, minx.XData('BYTE', 1, 'type'),
                                 minx.XData('PAD', 1, 'pad0'),
                                 minx.XData('CARD16', 1, 'sequence_number'),
                                 minx.XData('CARD32', 1, 'length'),
                                 minx.XData('CARD32', 1, 'flags'),
                                 minx.XData('CARD32', 1, 'n'),
                                 minx.XData('CARD32', 1, 'pad4'),
                                 minx.XData('CARD32', 1, 'pad5'),
                                 minx.XData('CARD32', 1, 'pad6'),
                                 minx.XData('CARD32', 1, 'pad7'))

        for n, v in xreply.iteritems():
            setattr(self, n, v)

        rs, ad = minx.decode(ad, minx.XData('STRING8', self.n, 'data'))
        self.data = str(rs['data'])
Пример #2
0
    def __init__(self, encoding):
        xreply, ad = minx.decode(encoding, minx.XData('BYTE', 1, 'type'),
                                 minx.XData('BYTE', 1, 'padb1'),
                                 minx.XData('CARD16', 1, 'sequence_number'),
                                 minx.XData('CARD32', 1, 'length'),
                                 minx.XData('CARD32', 1, 'flags'),
                                 minx.XData('CARD32', 1, 'n'),
                                 minx.XData('CARD32', 1, 'padl4'),
                                 minx.XData('CARD32', 1, 'padl5'),
                                 minx.XData('CARD32', 1, 'padl6'),
                                 minx.XData('CARD32', 1, 'padl7'))

        for n, v in xreply.iteritems():
            setattr(self, n, v)

        rs, ad = minx.decode(ad, minx.XData('STRING8', self.n, 'string'))
        self.string = str(rs['string'])
Пример #3
0
    def __init__(self, encoding):
        xreply, ad = minx.decode(encoding, minx.XData('BYTE', 1, 'type'),
                                 minx.XData('BYTE', 1, 'pad0'),
                                 minx.XData('CARD16', 1, 'sequence_number'),
                                 minx.XData('CARD32', 1, 'length'),
                                 minx.XData('CARD32', 1, 'flags'),
                                 minx.XData('CARD32', 1, 'n'),
                                 minx.XData('CARD32', 1, 'pad4'),
                                 minx.XData('CARD32', 1, 'pad5'),
                                 minx.XData('CARD32', 1, 'pad6'),
                                 minx.XData('CARD32', 1, 'pad7'))

        for n, v in xreply.iteritems():
            setattr(self, n, v)

        rs, ad = minx.decode(ad, minx.XData('STRING8', self.n, 'string'))
        self.string = str(rs['string'])
        if self.string is not None and self.string.endswith('\0'):
            self.string = self.string[:-1]
Пример #4
0
    def __init__(self, encoding):
        xreply, ad = minx.decode(
            encoding,
            minx.XData("BYTE", 1, "type"),
            minx.XData("BYTE", 1, "padb1"),
            minx.XData("CARD16", 1, "sequence_number"),
            minx.XData("CARD32", 1, "length"),
            minx.XData("CARD32", 1, "flags"),
            minx.XData("CARD32", 1, "n"),
            minx.XData("CARD32", 1, "padl4"),
            minx.XData("CARD32", 1, "padl5"),
            minx.XData("CARD32", 1, "padl6"),
            minx.XData("CARD32", 1, "padl7"),
        )

        for n, v in xreply.iteritems():
            setattr(self, n, v)

        rs, ad = minx.decode(ad, minx.XData("STRING8", self.n, "string"))
        self.string = str(rs["string"])
Пример #5
0
    def __init__(self, encoding):
        xreply, ad = minx.decode(
            encoding,
            minx.XData("BYTE", 1, "type"),
            minx.XData("PAD", 1, "pad0"),
            minx.XData("CARD16", 1, "sequence_number"),
            minx.XData("CARD32", 1, "length"),
            minx.XData("CARD32", 1, "flags"),
            minx.XData("CARD32", 1, "n"),
            minx.XData("CARD32", 1, "pad4"),
            minx.XData("CARD32", 1, "pad5"),
            minx.XData("CARD32", 1, "pad6"),
            minx.XData("CARD32", 1, "pad7"),
        )

        for n, v in xreply.iteritems():
            setattr(self, n, v)

        rs, ad = minx.decode(ad, minx.XData("STRING8", self.n, "data"))
        self.data = str(rs["data"])
Пример #6
0
    def __init__(self, encoding):
        xreply, ad = minx.decode(encoding, minx.XData('BYTE', 1, 'type'),
                                 minx.XData('BYTE', 1, 'pad0'),
                                 minx.XData('CARD16', 1, 'sequence_number'),
                                 minx.XData('CARD32', 1, 'length'),
                                 minx.XData('CARD32', 1, 'flags'),
                                 minx.XData('INT32', 1, 'attr_type'),
                                 minx.XData('INT32', 1, 'min'),
                                 minx.XData('INT32', 1, 'max'),
                                 minx.XData('CARD32', 1, 'bits'),
                                 minx.XData('CARD32', 1, 'perms'))

        for n, v in xreply.iteritems():
            setattr(self, n, v)
Пример #7
0
    def __init__(self, encoding):
        xreply, ad = minx.decode(encoding, minx.XData('BYTE', 1, 'type'),
                                 minx.XData('BYTE', 1, 'pad0'),
                                 minx.XData('CARD16', 1, 'sequence_number'),
                                 minx.XData('CARD32', 1, 'length'),
                                 minx.XData('CARD32', 1, 'flags'),
                                 minx.XData('CARD32', 1, 'pad3'),
                                 minx.XData('CARD32', 1, 'pad4'),
                                 minx.XData('CARD32', 1, 'pad5'),
                                 minx.XData('CARD32', 1, 'pad6'),
                                 minx.XData('CARD32', 1, 'pad7'))

        for n, v in xreply.iteritems():
            setattr(self, n, v)
Пример #8
0
    def __init__(self, encoding):
        xreply, ad = minx.decode(encoding, minx.XData('BYTE', 1, 'type'),
                                 minx.XData('PAD', 1, 'padb1'),
                                 minx.XData('CARD16', 1, 'sequence_number'),
                                 minx.XData('CARD32', 1, 'length'),
                                 minx.XData('CARD32', 1, 'count'),
                                 minx.XData('CARD32', 1, 'padl4'),
                                 minx.XData('CARD32', 1, 'padl5'),
                                 minx.XData('CARD32', 1, 'padl6'),
                                 minx.XData('CARD32', 1, 'padl7'),
                                 minx.XData('CARD32', 1, 'padl8'))

        for n, v in xreply.iteritems():
            setattr(self, n, v)
Пример #9
0
    def __init__(self, encoding):
        xreply, ad = minx.decode(
            encoding,
            minx.XData("BYTE", 1, "type"),
            minx.XData("BYTE", 1, "pad0"),
            minx.XData("CARD16", 1, "sequence_number"),
            minx.XData("CARD32", 1, "length"),
            minx.XData("CARD32", 1, "flags"),
            minx.XData("INT32", 1, "attr_type"),
            minx.XData("INT32", 1, "min"),
            minx.XData("INT32", 1, "max"),
            minx.XData("CARD32", 1, "bits"),
            minx.XData("CARD32", 1, "perms"),
        )

        for n, v in xreply.iteritems():
            setattr(self, n, v)
Пример #10
0
    def __init__(self, encoding):
        xreply, ad = minx.decode(
            encoding,
            minx.XData("BYTE", 1, "type"),
            minx.XData("BYTE", 1, "pad0"),
            minx.XData("CARD16", 1, "sequence_number"),
            minx.XData("CARD32", 1, "length"),
            minx.XData("CARD32", 1, "flags"),
            minx.XData("CARD32", 1, "pad3"),
            minx.XData("CARD32", 1, "pad4"),
            minx.XData("CARD32", 1, "pad5"),
            minx.XData("CARD32", 1, "pad6"),
            minx.XData("CARD32", 1, "pad7"),
        )

        for n, v in xreply.iteritems():
            setattr(self, n, v)
Пример #11
0
    def __init__(self, encoding):
        xreply, ad = minx.decode(
            encoding,
            minx.XData("BYTE", 1, "type"),
            minx.XData("PAD", 1, "padb1"),
            minx.XData("CARD16", 1, "sequence_number"),
            minx.XData("CARD32", 1, "length"),
            minx.XData("CARD32", 1, "count"),
            minx.XData("CARD32", 1, "padl4"),
            minx.XData("CARD32", 1, "padl5"),
            minx.XData("CARD32", 1, "padl6"),
            minx.XData("CARD32", 1, "padl7"),
            minx.XData("CARD32", 1, "padl8"),
        )

        for n, v in xreply.iteritems():
            setattr(self, n, v)