WPILibC++ 2025.2.1
Loading...
Searching...
No Matches
Protobuf.h File Reference
#include <stdint.h>
#include <concepts>
#include <optional>
#include <span>
#include <string>
#include <string_view>
#include <utility>
#include <vector>
#include "pb.h"
#include "pb_decode.h"
#include "pb_encode.h"
#include "wpi/array.h"
#include "wpi/function_ref.h"

Go to the source code of this file.

Classes

struct  wpi::Protobuf< T >
 Protobuf serialization template. More...
 
class  wpi::ProtoInputStream< T >
 Class for wrapping a nanopb istream. More...
 
class  wpi::ProtoOutputStream< T >
 Class for wrapping a nanopb ostream. More...
 
class  wpi::ProtobufMessage< T >
 Ease of use wrapper to make nanopb streams more opaque to the user. More...
 

Namespaces

namespace  wpi
 Foonathan namespace.
 
namespace  wpi::detail
 These are wrappers over isa* function that allow them to be used in generic algorithms such as wpi:all_of, wpi::none_of, etc.
 

Concepts

concept  wpi::ProtobufSerializable
 Specifies that a type is capable of protobuf serialization and deserialization.
 
concept  wpi::MutableProtobufSerializable
 Specifies that a type is capable of in-place protobuf deserialization.
 

Typedefs

using wpi::detail::SmallVectorType = wpi::SmallVectorImpl<uint8_t>
 
using wpi::detail::StdVectorType = std::vector<uint8_t>
 

Functions

bool wpi::detail::WriteFromSmallVector (pb_ostream_t *stream, const pb_byte_t *buf, size_t count)
 
bool wpi::detail::WriteFromStdVector (pb_ostream_t *stream, const pb_byte_t *buf, size_t count)
 
bool wpi::detail::WriteSubmessage (pb_ostream_t *stream, const pb_msgdesc_t *desc, const void *msg)
 
std::string wpi::detail::GetTypeString (const pb_msgdesc_t *msg)
 
void wpi::detail::ForEachProtobufDescriptor (const pb_msgdesc_t *msg, function_ref< bool(std::string_view filename)> wants, function_ref< void(std::string_view filename, std::span< const uint8_t > descriptor)> fn)