class photonvision.Packet(*args, **kwargs)

Bases: pybind11_builtins.pybind11_object

A packet that holds byte-packed data to be sent over NetworkTables.

Overloaded function.

  1. __init__(self: photonvision._photonvision.Packet) -> None

Constructs an empty packet.

  1. __init__(self: photonvision._photonvision.Packet, data: List[str]) -> None

Constructs a packet with the given data.


data – The packet data.

clear() None

Clears the packet and resets the read and write positions.

getData() List[str]

Returns the packet data.


The packet data.

getDataSize() int

Returns the number of bytes in the data.


The number of bytes in the data.