Packet

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

Bases: 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[int]) -> None

Constructs a packet with the given data.

Parameters:

data – The packet data.

clear() None

Clears the packet and resets the read and write positions.

getData() List[int]

Returns the packet data.

Returns:

The packet data.

getDataSize() int

Returns the number of bytes in the data.

Returns:

The number of bytes in the data.