mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[wpiutil] Add C API for DataLog (#5509)
This commit is contained in:
@@ -588,6 +588,27 @@ void NT_SetNow(int64_t timestamp) {
|
||||
nt::SetNow(timestamp);
|
||||
}
|
||||
|
||||
NT_DataLogger NT_StartEntryDataLog(NT_Inst inst, struct WPI_DataLog* log,
|
||||
const char* prefix, const char* logPrefix) {
|
||||
return nt::StartEntryDataLog(inst, *reinterpret_cast<wpi::log::DataLog*>(log),
|
||||
prefix, logPrefix);
|
||||
}
|
||||
|
||||
void NT_StopEntryDataLog(NT_DataLogger logger) {
|
||||
nt::StopEntryDataLog(logger);
|
||||
}
|
||||
|
||||
NT_ConnectionDataLogger NT_StartConnectionDataLog(NT_Inst inst,
|
||||
struct WPI_DataLog* log,
|
||||
const char* name) {
|
||||
return nt::StartConnectionDataLog(
|
||||
inst, *reinterpret_cast<wpi::log::DataLog*>(log), name);
|
||||
}
|
||||
|
||||
void NT_StopConnectionDataLog(NT_ConnectionDataLogger logger) {
|
||||
nt::StopConnectionDataLog(logger);
|
||||
}
|
||||
|
||||
NT_Listener NT_AddLogger(NT_Inst inst, unsigned int min_level,
|
||||
unsigned int max_level, void* data,
|
||||
NT_ListenerCallback func) {
|
||||
|
||||
Reference in New Issue
Block a user