Class WPILOGWriter
java.lang.Object
org.littletonrobotics.junction.wpilog.WPILOGWriter
- All Implemented Interfaces:
LogDataReceiver
Records log values to a WPILOG file.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe behavior to use when sending the log file to AdvantageScope after the robot program exits in simulation. -
Field Summary
Fields inherited from interface org.littletonrobotics.junction.LogDataReceiver
timestampKey -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new WPILOGWriter for writing to a ".wpilog" file.WPILOGWriter(String path) Create a new WPILOGWriter for writing to a ".wpilog" file.WPILOGWriter(String path, WPILOGWriter.AdvantageScopeOpenBehavior openBehavior) Create a new WPILOGWriter for writing to a ".wpilog" file.WPILOGWriter(WPILOGWriter.AdvantageScopeOpenBehavior openBehavior) Create a new WPILOGWriter for writing to a ".wpilog" file. -
Method Summary
-
Constructor Details
-
WPILOGWriter
Create a new WPILOGWriter for writing to a ".wpilog" file.- Parameters:
path- Path to log file or folder. If only a folder is provided, the filename will be generated based on the current time and match number (if applicable).openBehavior- Whether to automatically open the log file in AdvantageScope. SeeAdvantageScopeOpenBehaviorfor details.
-
WPILOGWriter
Create a new WPILOGWriter for writing to a ".wpilog" file.- Parameters:
path- Path to log file or folder. If only a folder is provided, the filename will be generated based on the current time and match number (if applicable).
-
WPILOGWriter
Create a new WPILOGWriter for writing to a ".wpilog" file.The logs will be saved to "/U/logs" on the RIO and "logs" in sim. The filename will be generated based on the current time and match number (if applicable).
- Parameters:
openBehavior- Whether to automatically open the log file in AdvantageScope. SeeAdvantageScopeOpenBehaviorfor details.
-
WPILOGWriter
public WPILOGWriter()Create a new WPILOGWriter for writing to a ".wpilog" file.The logs will be saved to "/U/logs" on the RIO and "logs" in sim. The filename will be generated based on the current time and match number (if applicable).
-
-
Method Details
-
start
public void start()Description copied from interface:LogDataReceiverCalled before the logging system begins reporting data. This should be used to connect to files, find network devices, start threads, etc.- Specified by:
startin interfaceLogDataReceiver
-
end
public void end()Description copied from interface:LogDataReceiverCalled when the code shuts down cleanly. Note that this will NOT be called when the robot is powered off.- Specified by:
endin interfaceLogDataReceiver
-
putTable
Description copied from interface:LogDataReceiverCalled every loop cycle when a new table is complete. This data can be processed immediately or queued for later.- Specified by:
putTablein interfaceLogDataReceiver- Parameters:
table- A copy of the data to save.
-