mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[wpiutil] DataLog: Add AddSchema functions to C API (#6232)
This commit is contained in:
@@ -1205,4 +1205,18 @@ void WPI_DataLog_AppendStringArray(struct WPI_DataLog* datalog, int entry,
|
||||
timestamp);
|
||||
}
|
||||
|
||||
void WPI_DataLog_AddSchemaString(struct WPI_DataLog* datalog, int entry,
|
||||
const char* name, const char* type,
|
||||
const char* schema, int64_t timestamp) {
|
||||
reinterpret_cast<DataLog*>(datalog)->AddSchema(name, type, schema, timestamp);
|
||||
}
|
||||
|
||||
void WPI_DataLog_AddSchema(struct WPI_DataLog* datalog, int entry,
|
||||
const char* name, const char* type,
|
||||
const uint8_t* schema, size_t schema_len,
|
||||
int64_t timestamp) {
|
||||
reinterpret_cast<DataLog*>(datalog)->AddSchema(
|
||||
name, type, std::span<const uint8_t>{schema, schema_len}, timestamp);
|
||||
}
|
||||
|
||||
} // extern "C"
|
||||
|
||||
Reference in New Issue
Block a user