CTRE Phoenix 6 C++ 26.70.0-alpha-2
Loading...
Searching...
No Matches
ctre::phoenix6::HootTelemetryBackend Class Referencefinal

A telemetry backend implementation that saves information to a CTRE hoot file on disk using the Phoenix 6 SignalLogger. More...

#include <ctre/phoenix6/HootTelemetryBackend.hpp>

Inheritance diagram for ctre::phoenix6::HootTelemetryBackend:

Public Member Functions

 HootTelemetryBackend (std::string prefix="")
 Creates a new hoot telemetry backend.
 HootTelemetryBackend (std::string prefix, char const *path)
 Creates a new hoot telemetry backend with the target file path.
 ~HootTelemetryBackend ()
std::shared_ptr< wpi::telemetry::TelemetryEntry > GetEntry (std::string_view path) override
 Create an entry for the given path.
void RemoveEntry (std::string_view path) override
 Removes an entry for the given path.
bool HasSchema (std::string_view schemaName) const override
 Returns whether there is a data schema already registered with the given name.
void AddSchema (std::string_view schemaName, std::string_view type, std::span< uint8_t const > schema) override
 Registers a data schema.
void AddSchema (std::string_view schemaName, std::string_view type, std::string_view schema) override
 Registers a data schema.

Detailed Description

A telemetry backend implementation that saves information to a CTRE hoot file on disk using the Phoenix 6 SignalLogger.

Constructor & Destructor Documentation

◆ HootTelemetryBackend() [1/2]

ctre::phoenix6::HootTelemetryBackend::HootTelemetryBackend ( std::string prefix = "")

Creates a new hoot telemetry backend.

This immediately starts the SignalLogger and automatically stops it once all instances are destroyed.

This will use the default path documented in SignalLogger::SetPath.

Parameters
prefixPrefix to prepend to all log entry names; defaults empty

◆ HootTelemetryBackend() [2/2]

ctre::phoenix6::HootTelemetryBackend::HootTelemetryBackend ( std::string prefix,
char const * path )

Creates a new hoot telemetry backend with the target file path.

This immediately starts the SignalLogger and automatically stops it once all instances are destroyed.

Parameters
prefixPrefix to prepend to all log entry names; defaults empty
pathFolder path for the log files; path must exist

◆ ~HootTelemetryBackend()

ctre::phoenix6::HootTelemetryBackend::~HootTelemetryBackend ( )

Member Function Documentation

◆ AddSchema() [1/2]

void ctre::phoenix6::HootTelemetryBackend::AddSchema ( std::string_view schemaName,
std::string_view type,
std::span< uint8_t const > schema )
override

Registers a data schema.

Data schemas provide information for how a certain data type string can be decoded. The type string of a data schema indicates the type of the schema itself (e.g. "protobuf" for protobuf schemas, "struct" for struct schemas, etc). Duplicate calls to this function with the same name are silently ignored.

Parameters
schemaNameName (the string passed as the data type for topics using this schema)
typeType of schema (e.g. "protobuf", "struct", etc)
schemaSchema data

◆ AddSchema() [2/2]

void ctre::phoenix6::HootTelemetryBackend::AddSchema ( std::string_view schemaName,
std::string_view type,
std::string_view schema )
override

Registers a data schema.

Data schemas provide information for how a certain data type string can be decoded. The type string of a data schema indicates the type of the schema itself (e.g. "protobuf" for protobuf schemas, "struct" for struct schemas, etc). Duplicate calls to this function with the same name are silently ignored.

Parameters
schemaNameName (the string passed as the data type for topics using this schema)
typeType of schema (e.g. "protobuf", "struct", etc)
schemaSchema data

◆ GetEntry()

std::shared_ptr< wpi::telemetry::TelemetryEntry > ctre::phoenix6::HootTelemetryBackend::GetEntry ( std::string_view path)
override

Create an entry for the given path.

Parameters
pathfull name
Returns
telemetry entry

◆ HasSchema()

bool ctre::phoenix6::HootTelemetryBackend::HasSchema ( std::string_view schemaName) const
override

Returns whether there is a data schema already registered with the given name.

This does NOT perform a check as to whether the schema has already been published by another node on the network.

Parameters
schemaNameName (the string passed as the data type for topics using this schema)
Returns
True if schema already registered

◆ RemoveEntry()

void ctre::phoenix6::HootTelemetryBackend::RemoveEntry ( std::string_view path)
override

Removes an entry for the given path.

Parameters
pathnormalized full name

The documentation for this class was generated from the following file: