| @@ 78-95 (lines=18) @@ | ||
| 75 | return self._packed |
|
| 76 | ||
| 77 | ||
| 78 | class GenericSRId(object): |
|
| 79 | TLV = 99998 |
|
| 80 | ||
| 81 | def __init__(self, code, rep): |
|
| 82 | self.rep = rep |
|
| 83 | self.code = code |
|
| 84 | ||
| 85 | def __repr__(self): |
|
| 86 | return "Attribute with code [ %s ] not implemented" % (self.code) |
|
| 87 | ||
| 88 | @classmethod |
|
| 89 | def unpack(cls, scode, data): |
|
| 90 | length = len(data) |
|
| 91 | info = binascii.b2a_uu(data[:length]) |
|
| 92 | return cls(code=scode, rep=info) |
|
| 93 | ||
| 94 | def json(self, compact=None): |
|
| 95 | return '"attribute-not-implemented": "%s"' % (self.code) |
|
| 96 | ||
| @@ 75-92 (lines=18) @@ | ||
| 72 | return ', '.join(str(d) for d in self.ls_attrs) |
|
| 73 | ||
| 74 | ||
| 75 | class GenericLSID(object): |
|
| 76 | TLV = 99999 |
|
| 77 | ||
| 78 | def __init__(self, code, rep): |
|
| 79 | self.rep = rep |
|
| 80 | self.code = code |
|
| 81 | ||
| 82 | def __repr__(self): |
|
| 83 | return "Attribute with code [ %s ] not implemented" % (self.code) |
|
| 84 | ||
| 85 | @classmethod |
|
| 86 | def unpack(cls, scode, data): |
|
| 87 | length = len(data) |
|
| 88 | info = binascii.b2a_uu(data[:length]) |
|
| 89 | return cls(code=scode, rep=info) |
|
| 90 | ||
| 91 | def json(self, compact=None): |
|
| 92 | return '"attribute-not-implemented": "%s"' % (self.code) |
|
| 93 | ||
| 94 | ||
| 95 | class LsGenericFlags(object): |
|