:param packet.Packet|None pkt: the packet instance containing this field instance; probably unused # noqa: E501 :param int x: unused; must be equal to default value :return: int; default value :raises: AssertionError
(self, pkt, x)
| 143 | return r |
| 144 | |
| 145 | def i2m(self, pkt, x): |
| 146 | # type: (Optional[packet.Packet], int) -> int |
| 147 | """ |
| 148 | :param packet.Packet|None pkt: the packet instance containing this field instance; probably unused # noqa: E501 |
| 149 | :param int x: unused; must be equal to default value |
| 150 | :return: int; default value |
| 151 | :raises: AssertionError |
| 152 | """ |
| 153 | assert x == self._magic, \ |
| 154 | 'EINVAL: x: This field is magic. Do not attempt to modify it. Expected value: {}'.format(self._magic) # noqa: E501 |
| 155 | return super(HPackMagicBitField, self).i2m(pkt, self._magic) |
| 156 | |
| 157 | def any2i(self, pkt, x): |
| 158 | # type: (Optional[packet.Packet], int) -> int |