CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-pynetworktables

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

75

1.01x
Overview
Eval results
Files

task.mdevals/scenario-8/

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.

Install with Tessl CLI

npx tessl i tessl/pypi-pynetworktables

tile.json