WPILibC++ 2027.0.0-alpha-4
Loading...
Searching...
No Matches
wpi::sysid::SysIdRoutineLog Class Reference

Utility for logging data from a SysId test routine. More...

#include <wpi/sysid/SysIdRoutineLog.hpp>

Inheritance diagram for wpi::sysid::SysIdRoutineLog:
wpi::cmd::sysid::SysIdRoutine

Classes

class  MotorLog
 Logs data from a single motor during a SysIdRoutine. More...

Public Member Functions

 SysIdRoutineLog (std::string_view logName)
 Create a new logging utility for a SysId test routine.
void RecordState (State state)
 Records the current state of the SysId test routine.
MotorLog Motor (std::string_view motorName)
 Log data from a motor during a SysId routine.

Static Public Member Functions

static std::string StateEnumToString (State state)

Detailed Description

Utility for logging data from a SysId test routine.

Each complete routine (quasistatic and dynamic, forward and reverse) should have its own SysIdRoutineLog instance, with a unique log name.

Constructor & Destructor Documentation

◆ SysIdRoutineLog()

wpi::sysid::SysIdRoutineLog::SysIdRoutineLog ( std::string_view logName)
explicit

Create a new logging utility for a SysId test routine.

Parameters
logNameThe name for the test routine in the log. Should be unique between complete test routines (quasistatic and dynamic, forward and reverse). The current state of this test (e.g. "quasistatic-forward") will appear in WPILog under the "sysid-test-state-logName" entry.

Member Function Documentation

◆ Motor()

MotorLog wpi::sysid::SysIdRoutineLog::Motor ( std::string_view motorName)

Log data from a motor during a SysId routine.

Parameters
motorNameThe name of the motor.
Returns
Handle with chainable callbacks to log individual data fields.

◆ RecordState()

void wpi::sysid::SysIdRoutineLog::RecordState ( State state)

Records the current state of the SysId test routine.

Should be called once per iteration during tests with the type of the current test, and once upon test end with state none.

Parameters
stateThe current state of the SysId test routine.

◆ StateEnumToString()

std::string wpi::sysid::SysIdRoutineLog::StateEnumToString ( State state)
static

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