:param packet.Packet|None pkt: the packet instance containing this field instance; probably unused # noqa: E501 :param int x: must be the machine representatino of the default value :return: int; default value :raises: AssertionError
(self, pkt, x)
| 131 | return super(HPackMagicBitField, self).i2h(pkt, self._magic) |
| 132 | |
| 133 | def m2i(self, pkt, x): |
| 134 | # type: (Optional[packet.Packet], int) -> int |
| 135 | """ |
| 136 | :param packet.Packet|None pkt: the packet instance containing this field instance; probably unused # noqa: E501 |
| 137 | :param int x: must be the machine representatino of the default value |
| 138 | :return: int; default value |
| 139 | :raises: AssertionError |
| 140 | """ |
| 141 | r = super(HPackMagicBitField, self).m2i(pkt, x) |
| 142 | assert r == self._magic, 'Invalid value parsed from m2i; error in class guessing detected!' # noqa: E501 |
| 143 | return r |
| 144 | |
| 145 | def i2m(self, pkt, x): |
| 146 | # type: (Optional[packet.Packet], int) -> int |