NetworkTables class for interacting with NetworkTables over a WebSocket connection.

Hierarchy

  • NetworkTables

Constructors

Properties

_client: PubSubClient

The PubSubClient instance used to establish and manage the connection to the robot.

port: number
uri: string

The URI of the server.

_instances: Map<string, NetworkTables> = ...

The instance of the NetworkTables class.

Accessors

Methods

  • Adds a listener for robot connection status updates.

    Parameters

    • callback: ((_) => void)

      The callback to call when the connection status changes.

        • (_): void
        • Parameters

          • _: boolean

          Returns void

    • Optional immediateNotify: boolean

      Whether to immediately notify the callback of the current connection status.

    Returns (() => boolean)

    A function to remove the listener.

      • (): boolean
      • Returns boolean

  • DEPRECATED: Creates a new NetworkTables instance if it does not exist.

    Parameters

    • team: number

      The team number of the robot.

    • port: number = 5810

      The port to connect to the robot on. Defaults to 5810.

    Returns NetworkTables

    The NetworkTables instance.

    Deprecated

    Use NetworkTables#getInstanceByTeam instead.

    Throws

    Error if the team number is not provided.

  • DEPRECATED: Creates a new NetworkTables instance if it does not exist.

    Parameters

    • uri: string

      The URI of the robot.

    • port: number = 5810

      The port to connect to the robot on. Defaults to 5810.

    Returns NetworkTables

    The NetworkTables instance.

    Deprecated

    Use NetworkTables#getInstanceByURI instead.

    Throws

    Error if the URI is not provided.

Generated using TypeDoc