examples/

directory
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 29, 2026 License: MIT

README

Examples

This directory contains standalone, runnable examples demonstrating how to use go-nt4.

Compile all examples:

go build ./examples/...

Available Examples

  • publisher: Connects to the server, announces topics using typed constants (nt4.TypeDouble, nt4.TypeBoolean, etc.), and publishes periodic values.
  • subscriber: Subscribes to topics, listens for updates on the sub.Events() channel, and reads cached snapshots with client.Latest().
  • subscriber_callback: Demonstrates processing incoming data with an application callback function inside a message loop.
  • bidirectional: Demonstrates publishing data and subscribing to other topics simultaneously using a single client connection.
  • team_robot: Demonstrates connecting directly to an FRC robot using team number addressing (nt4.NewClientBuilder().Team(2064)).

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL