CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/pypi-pynetworktables

tessl install tessl/pypi-pynetworktables@2021.0.0

A pure Python implementation of NetworkTables, used for robot communications in the FIRST Robotics Competition.

Agent Success

Agent success rate when using this tile

75%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.01x

Baseline

Agent success rate without this tile

74%

task.mdevals/scenario-2/

In-Memory NetworkTables Diagnostic Harness

Build a small diagnostic harness that exercises NetworkTables entirely in-memory for testing, with an option to surface verbose diagnostics to the caller. The harness should expose simple read/write helpers for a specified table path and keep a retrievable log when verbose mode is on.

Capabilities

Start in-memory session

  • Creating a diagnostic session starts NetworkTables without opening sockets and returns an object ready for table access. @test

Table read/write

  • Writing multiple key/value pairs to a table path stores the data and the same values can be read back immediately. @test
  • Clearing the session removes all previously written entries so later reads return an empty mapping. @test

Verbose diagnostics

  • When verbose diagnostics are enabled, each write appends a human-readable message to an in-memory log that can be retrieved by the caller. @test

Implementation

@generates

API

class DiagnosticSession:
    def __init__(self, verbose: bool = False): ...
    def put_entries(self, table: str, values: dict) -> None: ...
    def get_entries(self, table: str) -> dict: ...
    def clear(self) -> None: ...
    def get_diagnostics(self) -> list[str]: ...
    def shutdown(self) -> None: ...

Dependencies { .dependencies }

pynetworktables { .dependency }

Provides in-memory test mode and verbose diagnostics for NetworkTables.

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/pynetworktables@2021.0.x
tile.json