From 8e62a338294299e2a562d23a579c7bcf43c37d7d Mon Sep 17 00:00:00 2001 From: Chris Hondl Date: Wed, 1 May 2024 07:25:00 -0700 Subject: [PATCH 1/2] Add link to specification --- .../docs/software/networktables/networktables-intro.rst | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/docs/software/networktables/networktables-intro.rst b/source/docs/software/networktables/networktables-intro.rst index c34ae965f8..bad4160ee0 100644 --- a/source/docs/software/networktables/networktables-intro.rst +++ b/source/docs/software/networktables/networktables-intro.rst @@ -5,7 +5,7 @@ What is NetworkTables NetworkTables can be used by programs on the robot in Java, C++, or LabVIEW, and is built into each version of WPILib. -.. note:: NetworkTables has changed substantially in 2023. For more information on migrating pre-2023 code to use the new features, see :ref:`docs/software/networktables/nt4-migration-guide:migrating from networktables 3.0 to networktables 4.0`. +.. note:: NetworkTables has changed substantially in 2023. For more information on migrating pre-2023 code to use the new features, see :ref:`docs/software/networktables/nt4-migration-guide:migrating from networktables 3.0 to networktables 4.0`. NetworkTables Concepts ---------------------- @@ -26,6 +26,8 @@ Topics have properties. Properties are initially set by the first publisher, but Publishers specify the topic's data type; while there can be multiple publishers to a single topic, they must all be publishing the same data type. This is enforced by the NetworkTables server (the first publisher "wins"). Typically single-topic subscribers also specify what data type they're expecting to receive on a topic and thus won't receive value updates of other types. +The `Network Tables Protocol Specification, Version 4.1`_ contains detailed documentation on the current wire protocol. + Retained and Persistent Topics ------------------------------ @@ -90,7 +92,7 @@ There are some default tables that are created automatically when a robot progra NetworkTables API Variants -------------------------- -There are two major variants of the NetworkTables API. The object-oriented API (C++ and Java) is recommended for robot code and general team use, and provides classes that help ensure correct use of the API. For advanced use cases such as writing object-oriented wrappers for other programming languages, there's also a C/C++ handle-based API. +There are two major variants of the NetworkTables API. The object-oriented API (C++ and Java) is recommended for robot code and general team use, and provides classes that help ensure correct use of the API. For advanced use cases such as writing object-oriented wrappers for other programming languages, there's also a C/C++ handle-based API. Lifetime Management ------------------- @@ -102,3 +104,5 @@ In Java, a common bug is to create a subscriber or publisher and not properly re In C++, publishers, subscribers, and entries are :term:`RAII`, which means they are automatically destroyed when they go out of scope. ``NetworkTableInstance`` is an exception to this; it is designed to be explicitly destroyed, so it's not necessary to maintain a global instance of it. Python is similar to Java, except that subscribers or publishers are released when they are garbage collected. + + From 45cd33900c14918cb874e4da6705acb2b14cbce9 Mon Sep 17 00:00:00 2001 From: Jason Daming Date: Wed, 1 May 2024 09:39:49 -0500 Subject: [PATCH 2/2] Cleaned up lint issues --- .../docs/software/networktables/networktables-intro.rst | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/source/docs/software/networktables/networktables-intro.rst b/source/docs/software/networktables/networktables-intro.rst index bad4160ee0..3d607daaf1 100644 --- a/source/docs/software/networktables/networktables-intro.rst +++ b/source/docs/software/networktables/networktables-intro.rst @@ -5,7 +5,7 @@ What is NetworkTables NetworkTables can be used by programs on the robot in Java, C++, or LabVIEW, and is built into each version of WPILib. -.. note:: NetworkTables has changed substantially in 2023. For more information on migrating pre-2023 code to use the new features, see :ref:`docs/software/networktables/nt4-migration-guide:migrating from networktables 3.0 to networktables 4.0`. +.. note:: NetworkTables has changed substantially in 2023. For more information on migrating pre-2023 code to use the new features, see :ref:`docs/software/networktables/nt4-migration-guide:migrating from networktables 3.0 to networktables 4.0`. NetworkTables Concepts ---------------------- @@ -26,7 +26,7 @@ Topics have properties. Properties are initially set by the first publisher, but Publishers specify the topic's data type; while there can be multiple publishers to a single topic, they must all be publishing the same data type. This is enforced by the NetworkTables server (the first publisher "wins"). Typically single-topic subscribers also specify what data type they're expecting to receive on a topic and thus won't receive value updates of other types. -The `Network Tables Protocol Specification, Version 4.1`_ contains detailed documentation on the current wire protocol. +The `Network Tables Protocol Specification `_ contains detailed documentation on the current wire protocol. Retained and Persistent Topics ------------------------------ @@ -92,7 +92,7 @@ There are some default tables that are created automatically when a robot progra NetworkTables API Variants -------------------------- -There are two major variants of the NetworkTables API. The object-oriented API (C++ and Java) is recommended for robot code and general team use, and provides classes that help ensure correct use of the API. For advanced use cases such as writing object-oriented wrappers for other programming languages, there's also a C/C++ handle-based API. +There are two major variants of the NetworkTables API. The object-oriented API (C++ and Java) is recommended for robot code and general team use, and provides classes that help ensure correct use of the API. For advanced use cases such as writing object-oriented wrappers for other programming languages, there's also a C/C++ handle-based API. Lifetime Management ------------------- @@ -104,5 +104,3 @@ In Java, a common bug is to create a subscriber or publisher and not properly re In C++, publishers, subscribers, and entries are :term:`RAII`, which means they are automatically destroyed when they go out of scope. ``NetworkTableInstance`` is an exception to this; it is designed to be explicitly destroyed, so it's not necessary to maintain a global instance of it. Python is similar to Java, except that subscribers or publishers are released when they are garbage collected. - -