Packet

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.

Parameters

data – The packet data.

clear() None

Clears the packet and resets the read and write positions.

getData() List[str]

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.