Add comprehensive documentation for custom struct and protobuf serialization#3110
Open
jasondaming wants to merge 2 commits intowpilibsuite:mainfrom
Open
Add comprehensive documentation for custom struct and protobuf serialization#3110jasondaming wants to merge 2 commits intowpilibsuite:mainfrom
jasondaming wants to merge 2 commits intowpilibsuite:mainfrom
Conversation
…ization Create new documentation page with canonical examples showing teams how to implement custom struct and protobuf serializers for their own data types. Changes: - Add new custom-serialization.rst with complete examples for both Java and C++ - Include step-by-step guide for implementing struct serialization - Include guide for implementing protobuf serialization - Show how to use custom serializers with NetworkTables, DataLog, and Epilogue - Update networktables-intro.rst to link to custom serialization docs - Update telemetry.rst to document struct/protobuf support with link to custom serialization - Update robot-telemetry-with-annotations.rst to link to custom serialization guide - Add custom-serialization to NetworkTables index The new documentation addresses the need for canonical examples that teams can follow without having to reference WPILib source code directly. Fixes wpilibsuite#2820 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Member
|
Missing Python examples for struct (protobuf not supported). Point claude at https://robotpy.readthedocs.io/projects/robotpy/en/stable/wpiutil.wpistruct/functions.html#wpiutil.wpistruct.make_wpistruct and https://github.com/robotpy/mostrobotpy/blob/main/subprojects/robotpy-wpiutil/tests/test_struct.py for how to make custom python structs. |
Added comprehensive Python examples showing how to use the @make_wpistruct decorator with dataclasses for custom struct serialization. Includes: - Basic struct definition with make_wpistruct decorator - NetworkTables integration examples - DataLog usage examples - Epilogue automatic logging examples - Note that protobuf is not supported in Python Addresses virtuald's review comment on PR wpilibsuite#3110 requesting Python struct examples with references to robotpy documentation and test examples.
virtuald
reviewed
Oct 8, 2025
| state_logger.append(state) | ||
| ``` | ||
|
|
||
| ## Using Custom Serialization with Epilogue |
Member
There was a problem hiding this comment.
I think this entire section is Java-only. It certainly doesn't make sense for python?
virtuald
reviewed
Oct 8, 2025
Member
virtuald
left a comment
There was a problem hiding this comment.
The python sections seem sensible.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Creates comprehensive documentation with canonical examples for implementing custom struct and protobuf serializers. This addresses the issue where teams currently need to reference WPILib source code to understand how to create their own serializers.
Changes
New Documentation
Updated Files
Examples Provided
The documentation includes:
Fixes #2820