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>
|
| | 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.
|
A telemetry backend implementation that saves information to a CTRE hoot file on disk using the Phoenix 6 SignalLogger.
◆ 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
-
| prefix | Prefix 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
-
| prefix | Prefix to prepend to all log entry names; defaults empty |
| path | Folder path for the log files; path must exist |
◆ ~HootTelemetryBackend()
| ctre::phoenix6::HootTelemetryBackend::~HootTelemetryBackend |
( |
| ) |
|
◆ 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
-
| schemaName | Name (the string passed as the data type for topics using this schema) |
| type | Type of schema (e.g. "protobuf", "struct", etc) |
| schema | Schema 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
-
| schemaName | Name (the string passed as the data type for topics using this schema) |
| type | Type of schema (e.g. "protobuf", "struct", etc) |
| schema | Schema 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
-
- 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
-
| schemaName | Name (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
-
The documentation for this class was generated from the following file: