12#include <initializer_list>
132 explicit DataLog(std::function<
void(std::span<const uint8_t> data)>
write,
148 std::function<
void(std::span<const uint8_t> data)>
write,
215 std::span<const uint8_t> schema, int64_t timestamp = 0);
236 std::span<const uint8_t>{
237 reinterpret_cast<const uint8_t*
>(schema.data()), schema.size()},
249 template <ProtobufSerializable T>
251 if (timestamp == 0) {
255 [
this](
auto typeString) {
return HasSchema(typeString); },
256 [
this, timestamp](
auto typeString,
auto schema) {
257 AddSchema(typeString,
"proto:FileDescriptorProto", schema, timestamp);
268 template <StructSerializable T>
270 if (timestamp == 0) {
273 ForEachStructSchema<T>([
this, timestamp](
auto typeString,
auto schema) {
274 AddSchema(typeString,
"structschema", schema, timestamp);
301 void Finish(
int entry, int64_t timestamp = 0);
319 void AppendRaw(
int entry, std::span<const uint8_t> data, int64_t timestamp);
328 void AppendRaw2(
int entry, std::span<
const std::span<const uint8_t>> data,
467 struct WriterThreadState;
469 void StartLogFile(WriterThreadState&
state);
471 void WriterThreadMain(
472 std::function<
void(std::span<const uint8_t> data)>
write);
477 uint8_t* StartRecord(uint32_t entry, uint64_t timestamp, uint32_t payloadSize,
479 uint8_t* Reserve(
size_t size);
480 void AppendImpl(std::span<const uint8_t> data);
488 bool m_doFlush{
false};
497 std::string m_extraHeader;
498 std::string m_newFilename;
500 std::vector<Buffer> m_free;
501 std::vector<Buffer> m_outgoing;
504 std::vector<uint8_t> schemaData;
509 std::string metadata;
514 std::thread m_thread;
544 explicit operator bool()
const {
return m_log !=
nullptr; }
579 int64_t timestamp = 0)
591 void Append(std::span<const uint8_t> data, int64_t timestamp = 0) {
592 m_log->AppendRaw(m_entry, data, timestamp);
616 void Append(
bool value, int64_t timestamp = 0) {
617 m_log->AppendBoolean(m_entry, value, timestamp);
641 void Append(int64_t value, int64_t timestamp = 0) {
642 m_log->AppendInteger(m_entry, value, timestamp);
657 int64_t timestamp = 0)
666 void Append(
float value, int64_t timestamp = 0) {
667 m_log->AppendFloat(m_entry, value, timestamp);
682 int64_t timestamp = 0)
691 void Append(
double value, int64_t timestamp = 0) {
692 m_log->AppendDouble(m_entry, value, timestamp);
701 static constexpr const char* kDataType =
"string";
707 int64_t timestamp = 0)
720 m_log->AppendString(m_entry, value, timestamp);
729 static constexpr const char* kDataType =
"boolean[]";
733 int64_t timestamp = 0)
746 void Append(std::span<const bool> arr, int64_t timestamp = 0) {
747 m_log->AppendBooleanArray(m_entry, arr, timestamp);
756 void Append(std::initializer_list<bool> arr, int64_t timestamp = 0) {
757 Append(std::span{arr.begin(), arr.end()}, timestamp);
766 void Append(std::span<const int> arr, int64_t timestamp = 0) {
767 m_log->AppendBooleanArray(m_entry, arr, timestamp);
776 void Append(std::initializer_list<int> arr, int64_t timestamp = 0) {
777 Append(std::span{arr.begin(), arr.end()}, timestamp);
786 void Append(std::span<const uint8_t> arr, int64_t timestamp = 0) {
787 m_log->AppendBooleanArray(m_entry, arr, timestamp);
796 static constexpr const char* kDataType =
"int64[]";
800 int64_t timestamp = 0)
812 void Append(std::span<const int64_t> arr, int64_t timestamp = 0) {
813 m_log->AppendIntegerArray(m_entry, arr, timestamp);
822 void Append(std::initializer_list<int64_t> arr, int64_t timestamp = 0) {
823 Append({arr.begin(), arr.end()}, timestamp);
832 static constexpr const char* kDataType =
"float[]";
847 void Append(std::span<const float> arr, int64_t timestamp = 0) {
848 m_log->AppendFloatArray(m_entry, arr, timestamp);
857 void Append(std::initializer_list<float> arr, int64_t timestamp = 0) {
858 Append({arr.begin(), arr.end()}, timestamp);
867 static constexpr const char* kDataType =
"double[]";
871 int64_t timestamp = 0)
883 void Append(std::span<const double> arr, int64_t timestamp = 0) {
884 m_log->AppendDoubleArray(m_entry, arr, timestamp);
893 void Append(std::initializer_list<double> arr, int64_t timestamp = 0) {
894 Append({arr.begin(), arr.end()}, timestamp);
903 static constexpr const char* kDataType =
"string[]";
907 int64_t timestamp = 0)
919 void Append(std::span<const std::string> arr, int64_t timestamp = 0) {
920 m_log->AppendStringArray(m_entry, arr, timestamp);
929 void Append(std::span<const std::string_view> arr, int64_t timestamp = 0) {
930 m_log->AppendStringArray(m_entry, arr, timestamp);
939 void Append(std::initializer_list<std::string_view> arr,
940 int64_t timestamp = 0) {
941 Append(std::span<const std::string_view>{arr.begin(), arr.end()},
949template <StructSerializable T>
958 int64_t timestamp = 0) {
960 log.AddStructSchema<T>(timestamp);
961 m_entry =
log.Start(
name, S::kTypeString, metadata, timestamp);
970 void Append(
const T& data, int64_t timestamp = 0) {
972 uint8_t buf[S::GetSize()];
974 m_log->AppendRaw(m_entry, buf, timestamp);
979 m_log->AppendRaw(m_entry, buf, timestamp);
987template <StructSerializable T>
994 int64_t timestamp = 0)
999 log.AddStructSchema<T>(timestamp);
1001 log.Start(
name, MakeStructArrayTypeString<T, std::dynamic_extent>(),
1002 metadata, timestamp);
1011 template <
typename U>
1012#if __cpp_lib_ranges >= 201911L
1013 requires std::ranges::range<U> &&
1014 std::convertible_to<std::ranges::range_value_t<U>, T>
1016 void Append(U&& data, int64_t timestamp = 0) {
1017 m_buf.Write(std::forward<U>(data), [&](
auto bytes) {
1018 m_log->AppendRaw(m_entry,
bytes, timestamp);
1028 void Append(std::span<const T> data, int64_t timestamp = 0) {
1030 data, [&](
auto bytes) { m_log->AppendRaw(m_entry,
bytes, timestamp); });
1040template <ProtobufSerializable T>
1051 log.AddProtobufSchema<T>(m_msg, timestamp);
1052 m_entry =
log.Start(
name, m_msg.GetTypeString(), metadata, timestamp);
1061 void Append(
const T& data, int64_t timestamp = 0) {
1064 std::scoped_lock lock{m_mutex};
1065 m_msg.Pack(buf, data);
1067 m_log->AppendRaw(m_entry, buf, timestamp);
1095 double period,
const char* extraHeader);
1110 void (*
write)(
void*
ptr,
const uint8_t* data,
size_t len),
void*
ptr,
1111 double period,
const char* extraHeader);
1178 const char*
type,
const char* metadata,
1200 const char* metadata, int64_t timestamp);
1212 const uint8_t* data,
size_t len, int64_t timestamp);
1223 int value, int64_t timestamp);
1234 int64_t value, int64_t timestamp);
1245 float value, int64_t timestamp);
1256 double value, int64_t timestamp);
1268 const char* value,
size_t len, int64_t timestamp);
1280 const int* arr,
size_t len,
1293 const uint8_t* arr,
size_t len,
1306 const int64_t* arr,
size_t len,
1319 const float* arr,
size_t len,
1332 const double* arr,
size_t len,
void WPI_DataLog_AppendInteger(struct WPI_DataLog *datalog, int entry, int64_t value, int64_t timestamp)
Appends an integer record to the log.
void WPI_DataLog_SetMetadata(struct WPI_DataLog *datalog, int entry, const char *metadata, int64_t timestamp)
Updates the metadata for an entry.
void WPI_DataLog_AppendBoolean(struct WPI_DataLog *datalog, int entry, int value, int64_t timestamp)
Appends a boolean record to the log.
void WPI_DataLog_AppendDoubleArray(struct WPI_DataLog *datalog, int entry, const double *arr, size_t len, int64_t timestamp)
Appends a double array record to the log.
void WPI_DataLog_Stop(struct WPI_DataLog *datalog)
Stops appending all records to the log, and closes the log file.
struct WPI_DataLog * WPI_DataLog_Create(const char *dir, const char *filename, double period, const char *extraHeader)
Construct a new Data Log.
void WPI_DataLog_AppendRaw(struct WPI_DataLog *datalog, int entry, const uint8_t *data, size_t len, int64_t timestamp)
Appends a raw record to the log.
void WPI_DataLog_Resume(struct WPI_DataLog *datalog)
Resumes appending of data records to the log.
struct WPI_DataLog * WPI_DataLog_Create_Func(void(*write)(void *ptr, const uint8_t *data, size_t len), void *ptr, double period, const char *extraHeader)
Construct a new Data Log that passes its output to the provided function rather than a file.
void WPI_DataLog_AppendBooleanArrayByte(struct WPI_DataLog *datalog, int entry, const uint8_t *arr, size_t len, int64_t timestamp)
Appends a boolean array record to the log.
void WPI_DataLog_SetFilename(struct WPI_DataLog *datalog, const char *filename)
Change log filename.
void WPI_DataLog_Pause(struct WPI_DataLog *datalog)
Pauses appending of data records to the log.
void WPI_DataLog_AppendString(struct WPI_DataLog *datalog, int entry, const char *value, size_t len, int64_t timestamp)
Appends a string record to the log.
void WPI_DataLog_Finish(struct WPI_DataLog *datalog, int entry, int64_t timestamp)
Finish an entry.
void WPI_DataLog_AppendDouble(struct WPI_DataLog *datalog, int entry, double value, int64_t timestamp)
Appends a double record to the log.
void WPI_DataLog_Release(struct WPI_DataLog *datalog)
Releases a data log object.
void WPI_DataLog_AppendBooleanArray(struct WPI_DataLog *datalog, int entry, const int *arr, size_t len, int64_t timestamp)
Appends a boolean array record to the log.
void WPI_DataLog_Flush(struct WPI_DataLog *datalog)
Explicitly flushes the log data to disk.
void WPI_DataLog_AppendStringArray(struct WPI_DataLog *datalog, int entry, const WPI_DataLog_String *arr, size_t len, int64_t timestamp)
Appends a string array record to the log.
void WPI_DataLog_AppendFloatArray(struct WPI_DataLog *datalog, int entry, const float *arr, size_t len, int64_t timestamp)
Appends a float array record to the log.
void WPI_DataLog_AppendIntegerArray(struct WPI_DataLog *datalog, int entry, const int64_t *arr, size_t len, int64_t timestamp)
Appends an integer array record to the log.
void WPI_DataLog_AppendFloat(struct WPI_DataLog *datalog, int entry, float value, int64_t timestamp)
Appends a float record to the log.
int WPI_DataLog_Start(struct WPI_DataLog *datalog, const char *name, const char *type, const char *metadata, int64_t timestamp)
Start an entry.
This file defines the DenseMap class.
This file defines the SmallVector class.
This file defines the StringMap class.
Definition: format.h:4134
Owning wrapper (ala std::unique_ptr) for google::protobuf::Message* that does not require the protobu...
Definition: Protobuf.h:158
void ForEachProtobufDescriptor(function_ref< bool(std::string_view filename)> exists, function_ref< void(std::string_view filename, std::span< const uint8_t > descriptor)> fn)
Loops over all protobuf descriptors including nested/referenced descriptors.
Definition: Protobuf.h:248
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Definition: SmallVector.h:1202
void resize_for_overwrite(size_type N)
Like resize, but T is POD, the new values won't be initialized.
Definition: SmallVector.h:647
Log array of boolean values.
Definition: DataLog.h:727
void Append(std::span< const uint8_t > arr, int64_t timestamp=0)
Appends a record to the log.
Definition: DataLog.h:786
void Append(std::initializer_list< bool > arr, int64_t timestamp=0)
Appends a record to the log.
Definition: DataLog.h:756
BooleanArrayLogEntry(DataLog &log, std::string_view name, int64_t timestamp=0)
Definition: DataLog.h:732
void Append(std::initializer_list< int > arr, int64_t timestamp=0)
Appends a record to the log.
Definition: DataLog.h:776
void Append(std::span< const int > arr, int64_t timestamp=0)
Appends a record to the log.
Definition: DataLog.h:766
void Append(std::span< const bool > arr, int64_t timestamp=0)
Appends a record to the log.
Definition: DataLog.h:746
BooleanArrayLogEntry(DataLog &log, std::string_view name, std::string_view metadata, int64_t timestamp=0)
Definition: DataLog.h:735
BooleanArrayLogEntry()=default
Log boolean values.
Definition: DataLog.h:599
BooleanLogEntry()=default
BooleanLogEntry(DataLog &log, std::string_view name, std::string_view metadata, int64_t timestamp=0)
Definition: DataLog.h:606
void Append(bool value, int64_t timestamp=0)
Appends a record to the log.
Definition: DataLog.h:616
BooleanLogEntry(DataLog &log, std::string_view name, int64_t timestamp=0)
Definition: DataLog.h:604
Log entry base class.
Definition: DataLog.h:520
DataLogEntry(DataLogEntry &&rhs)
Definition: DataLog.h:531
DataLogEntry(const DataLogEntry &)=delete
void Finish(int64_t timestamp=0)
Finishes the entry.
Definition: DataLog.h:561
DataLog * m_log
Definition: DataLog.h:564
DataLogEntry(DataLog &log, std::string_view name, std::string_view type, std::string_view metadata={}, int64_t timestamp=0)
Definition: DataLog.h:523
DataLogEntry & operator=(const DataLogEntry &)=delete
int m_entry
Definition: DataLog.h:565
DataLogEntry & operator=(DataLogEntry &&rhs)
Definition: DataLog.h:534
void SetMetadata(std::string_view metadata, int64_t timestamp=0)
Updates the metadata for the entry.
Definition: DataLog.h:552
A data log.
Definition: DataLog.h:89
void AppendBooleanArray(int entry, std::span< const bool > arr, int64_t timestamp)
Appends a boolean array record to the log.
void Stop()
Stops appending all records to the log, and closes the log file.
void AppendBooleanArray(int entry, std::span< const int > arr, int64_t timestamp)
Appends a boolean array record to the log.
void SetMetadata(int entry, std::string_view metadata, int64_t timestamp=0)
Updates the metadata for an entry.
void AppendStringArray(int entry, std::span< const std::string > arr, int64_t timestamp)
Appends a string array record to the log.
int Start(std::string_view name, std::string_view type, std::string_view metadata={}, int64_t timestamp=0)
Start an entry.
DataLog & operator=(const DataLog &)=delete
DataLog(std::string_view dir="", std::string_view filename="", double period=0.25, std::string_view extraHeader="")
Construct a new Data Log.
void Flush()
Explicitly flushes the log data to disk.
void AppendRaw(int entry, std::span< const uint8_t > data, int64_t timestamp)
Appends a raw record to the log.
void AppendIntegerArray(int entry, std::span< const int64_t > arr, int64_t timestamp)
Appends an integer array record to the log.
DataLog(const DataLog &)=delete
void AddSchema(std::string_view name, std::string_view type, std::string_view schema, int64_t timestamp=0)
Registers a data schema.
Definition: DataLog.h:232
void AppendBooleanArray(int entry, std::span< const uint8_t > arr, int64_t timestamp)
Appends a boolean array record to the log.
void AppendDouble(int entry, double value, int64_t timestamp)
Appends a double record to the log.
void AppendFloat(int entry, float value, int64_t timestamp)
Appends a float record to the log.
DataLog & operator=(const DataLog &&)=delete
void AppendFloatArray(int entry, std::span< const float > arr, int64_t timestamp)
Appends a float array record to the log.
DataLog(std::function< void(std::span< const uint8_t > data)> write, double period=0.25, std::string_view extraHeader="")
Construct a new Data Log that passes its output to the provided function rather than a file.
void AppendStringArray(int entry, std::span< const WPI_DataLog_String > arr, int64_t timestamp)
Appends a string array record to the log.
void AppendString(int entry, std::string_view value, int64_t timestamp)
Appends a string record to the log.
void AddSchema(std::string_view name, std::string_view type, std::span< const uint8_t > schema, int64_t timestamp=0)
Registers a data schema.
DataLog(wpi::Logger &msglog, std::string_view dir="", std::string_view filename="", double period=0.25, std::string_view extraHeader="")
Construct a new Data Log.
DataLog(DataLog &&)=delete
void Pause()
Pauses appending of data records to the log.
void AppendStringArray(int entry, std::span< const std::string_view > arr, int64_t timestamp)
Appends a string array record to the log.
bool HasSchema(std::string_view name) const
Returns whether there is a data schema already registered with the given name.
void SetFilename(std::string_view filename)
Change log filename.
DataLog(wpi::Logger &msglog, std::function< void(std::span< const uint8_t > data)> write, double period=0.25, std::string_view extraHeader="")
Construct a new Data Log that passes its output to the provided function rather than a file.
void AppendRaw2(int entry, std::span< const std::span< const uint8_t > > data, int64_t timestamp)
Appends a raw record to the log.
void Finish(int entry, int64_t timestamp=0)
Finish an entry.
void AppendDoubleArray(int entry, std::span< const double > arr, int64_t timestamp)
Appends a double array record to the log.
void Resume()
Resumes appending of data records to the log.
void AppendInteger(int entry, int64_t value, int64_t timestamp)
Appends an integer record to the log.
void AddProtobufSchema(ProtobufMessage< T > &msg, int64_t timestamp=0)
Registers a protobuf schema.
Definition: DataLog.h:250
void AddStructSchema(int64_t timestamp=0)
Registers a struct schema.
Definition: DataLog.h:269
void AppendBoolean(int entry, bool value, int64_t timestamp)
Appends a boolean record to the log.
Log array of double values.
Definition: DataLog.h:865
DoubleArrayLogEntry(DataLog &log, std::string_view name, int64_t timestamp=0)
Definition: DataLog.h:870
void Append(std::span< const double > arr, int64_t timestamp=0)
Appends a record to the log.
Definition: DataLog.h:883
void Append(std::initializer_list< double > arr, int64_t timestamp=0)
Appends a record to the log.
Definition: DataLog.h:893
DoubleArrayLogEntry()=default
DoubleArrayLogEntry(DataLog &log, std::string_view name, std::string_view metadata, int64_t timestamp=0)
Definition: DataLog.h:873
Log double values.
Definition: DataLog.h:674
DoubleLogEntry(DataLog &log, std::string_view name, std::string_view metadata, int64_t timestamp=0)
Definition: DataLog.h:681
void Append(double value, int64_t timestamp=0)
Appends a record to the log.
Definition: DataLog.h:691
DoubleLogEntry(DataLog &log, std::string_view name, int64_t timestamp=0)
Definition: DataLog.h:679
Log array of float values.
Definition: DataLog.h:830
FloatArrayLogEntry(DataLog &log, std::string_view name, std::string_view metadata, int64_t timestamp=0)
Definition: DataLog.h:837
void Append(std::span< const float > arr, int64_t timestamp=0)
Appends a record to the log.
Definition: DataLog.h:847
void Append(std::initializer_list< float > arr, int64_t timestamp=0)
Appends a record to the log.
Definition: DataLog.h:857
FloatArrayLogEntry(DataLog &log, std::string_view name, int64_t timestamp=0)
Definition: DataLog.h:835
FloatArrayLogEntry()=default
Log float values.
Definition: DataLog.h:649
FloatLogEntry(DataLog &log, std::string_view name, int64_t timestamp=0)
Definition: DataLog.h:654
FloatLogEntry(DataLog &log, std::string_view name, std::string_view metadata, int64_t timestamp=0)
Definition: DataLog.h:656
void Append(float value, int64_t timestamp=0)
Appends a record to the log.
Definition: DataLog.h:666
Log array of integer values.
Definition: DataLog.h:794
IntegerArrayLogEntry(DataLog &log, std::string_view name, std::string_view metadata, int64_t timestamp=0)
Definition: DataLog.h:802
void Append(std::span< const int64_t > arr, int64_t timestamp=0)
Appends a record to the log.
Definition: DataLog.h:812
IntegerArrayLogEntry(DataLog &log, std::string_view name, int64_t timestamp=0)
Definition: DataLog.h:799
void Append(std::initializer_list< int64_t > arr, int64_t timestamp=0)
Appends a record to the log.
Definition: DataLog.h:822
IntegerArrayLogEntry()=default
Log integer values.
Definition: DataLog.h:624
IntegerLogEntry()=default
IntegerLogEntry(DataLog &log, std::string_view name, std::string_view metadata, int64_t timestamp=0)
Definition: DataLog.h:631
IntegerLogEntry(DataLog &log, std::string_view name, int64_t timestamp=0)
Definition: DataLog.h:629
void Append(int64_t value, int64_t timestamp=0)
Appends a record to the log.
Definition: DataLog.h:641
Log protobuf serializable objects.
Definition: DataLog.h:1041
ProtobufLogEntry(DataLog &log, std::string_view name, int64_t timestamp=0)
Definition: DataLog.h:1046
void Append(const T &data, int64_t timestamp=0)
Appends a record to the log.
Definition: DataLog.h:1061
ProtobufLogEntry(DataLog &log, std::string_view name, std::string_view metadata, int64_t timestamp=0)
Definition: DataLog.h:1048
ProtobufLogEntry()=default
Log arbitrary byte data.
Definition: DataLog.h:571
RawLogEntry(DataLog &log, std::string_view name, std::string_view metadata, int64_t timestamp=0)
Definition: DataLog.h:578
RawLogEntry(DataLog &log, std::string_view name, std::string_view metadata, std::string_view type, int64_t timestamp=0)
Definition: DataLog.h:581
static constexpr std::string_view kDataType
Definition: DataLog.h:573
void Append(std::span< const uint8_t > data, int64_t timestamp=0)
Appends a record to the log.
Definition: DataLog.h:591
RawLogEntry(DataLog &log, std::string_view name, int64_t timestamp=0)
Definition: DataLog.h:576
Log array of string values.
Definition: DataLog.h:901
void Append(std::initializer_list< std::string_view > arr, int64_t timestamp=0)
Appends a record to the log.
Definition: DataLog.h:939
StringArrayLogEntry(DataLog &log, std::string_view name, std::string_view metadata, int64_t timestamp=0)
Definition: DataLog.h:909
void Append(std::span< const std::string > arr, int64_t timestamp=0)
Appends a record to the log.
Definition: DataLog.h:919
void Append(std::span< const std::string_view > arr, int64_t timestamp=0)
Appends a record to the log.
Definition: DataLog.h:929
StringArrayLogEntry()=default
StringArrayLogEntry(DataLog &log, std::string_view name, int64_t timestamp=0)
Definition: DataLog.h:906
Log string values.
Definition: DataLog.h:699
StringLogEntry(DataLog &log, std::string_view name, std::string_view metadata, int64_t timestamp=0)
Definition: DataLog.h:706
void Append(std::string_view value, int64_t timestamp=0)
Appends a record to the log.
Definition: DataLog.h:719
StringLogEntry(DataLog &log, std::string_view name, std::string_view metadata, std::string_view type, int64_t timestamp=0)
Definition: DataLog.h:709
StringLogEntry(DataLog &log, std::string_view name, int64_t timestamp=0)
Definition: DataLog.h:704
Log raw struct serializable array of objects.
Definition: DataLog.h:988
void Append(std::span< const T > data, int64_t timestamp=0)
Appends a record to the log.
Definition: DataLog.h:1028
StructArrayLogEntry()=default
StructArrayLogEntry(DataLog &log, std::string_view name, std::string_view metadata, int64_t timestamp=0)
Definition: DataLog.h:996
StructArrayLogEntry(DataLog &log, std::string_view name, int64_t timestamp=0)
Definition: DataLog.h:993
void Append(U &&data, int64_t timestamp=0)
Appends a record to the log.
Definition: DataLog.h:1016
Log raw struct serializable objects.
Definition: DataLog.h:950
StructLogEntry(DataLog &log, std::string_view name, int64_t timestamp=0)
Definition: DataLog.h:955
StructLogEntry(DataLog &log, std::string_view name, std::string_view metadata, int64_t timestamp=0)
Definition: DataLog.h:957
void Append(const T &data, int64_t timestamp=0)
Appends a record to the log.
Definition: DataLog.h:970
basic_string_view< char > string_view
Definition: core.h:501
dimensionless::scalar_t log(const ScalarUnit x) noexcept
Compute natural logarithm.
Definition: math.h:349
auto write(OutputIt out, const std::tm &time, const std::locale &loc, char format, char modifier=0) -> OutputIt
Definition: chrono.h:419
constexpr auto count() -> size_t
Definition: core.h:1203
state
Definition: core.h:2271
type
Definition: core.h:556
constexpr const char * name(const T &)
ControlRecordType
Definition: DataLog.h:54
@ kControlFinish
Definition: DataLog.h:56
@ kControlStart
Definition: DataLog.h:55
@ kControlSetMetadata
Definition: DataLog.h:57
Definition: ntcore_cpp.h:31
Definition: ntcore_cpp.h:26
constexpr bool is_constexpr(Lambda)
Definition: type_traits.h:81
uint64_t Now()
Return a value representing the current time in microseconds.
A datalog string (for use with string array).
Definition: DataLog.h:36
size_t len
Length.
Definition: DataLog.h:41
const char * str
Contents.
Definition: DataLog.h:38
Protobuf serialization template.
Definition: Protobuf.h:37
Struct serialization template.
Definition: Struct.h:37
::std::condition_variable condition_variable
Definition: condition_variable.h:16
::std::mutex mutex
Definition: mutex.h:17