:param packet.Packet|None pkt: the packet instance containing this field instance. This parameter must not be # noqa: E501 None if the x parameter is. :param int|None x: the positive or null value to be added. If None, the value is computed from pkt. # noqa: E501
(self, pkt, x)
| 600 | return super(FieldUVarLenField, self).addfield(pkt, s, val) |
| 601 | |
| 602 | def i2m(self, pkt, x): |
| 603 | # type: (Optional[packet.Packet], Optional[int]) -> str |
| 604 | """ |
| 605 | :param packet.Packet|None pkt: the packet instance containing this field instance. This parameter must not be # noqa: E501 |
| 606 | None if the x parameter is. |
| 607 | :param int|None x: the positive or null value to be added. If None, the value is computed from pkt. # noqa: E501 |
| 608 | :return: str |
| 609 | :raises: AssertionError |
| 610 | """ |
| 611 | if x is None: |
| 612 | assert isinstance(pkt, packet.Packet), \ |
| 613 | 'EINVAL: pkt: Packet expected when x is None; received {}'.format(type(pkt)) # noqa: E501 |
| 614 | x = self._compute_value(pkt) |
| 615 | return super(FieldUVarLenField, self).i2m(pkt, x) |
| 616 | |
| 617 | def _compute_value(self, pkt): |
| 618 | # type: (packet.Packet) -> int |
nothing calls this directly
no test coverage detected