WPILibC++ 2023.4.3-108-ge5452e3
|
Functions | |
void | NT_DisposeValue (struct NT_Value *value) |
Frees value memory. More... | |
void | NT_InitValue (struct NT_Value *value) |
Initializes a NT_Value. More... | |
void | NT_DisposeString (struct NT_String *str) |
Frees string memory. More... | |
void | NT_InitString (struct NT_String *str) |
Initializes a NT_String. More... | |
void | NT_DisposeValueArray (struct NT_Value *arr, size_t count) |
Frees an array of NT_Values. More... | |
void | NT_DisposeConnectionInfoArray (struct NT_ConnectionInfo *arr, size_t count) |
Disposes a connection info array. More... | |
void | NT_DisposeTopicInfoArray (struct NT_TopicInfo *arr, size_t count) |
Disposes a topic info array. More... | |
void | NT_DisposeTopicInfo (struct NT_TopicInfo *info) |
Disposes a single topic info (as returned by NT_GetTopicInfo). More... | |
void | NT_DisposeEventArray (struct NT_Event *arr, size_t count) |
Disposes an event array. More... | |
void | NT_DisposeEvent (struct NT_Event *event) |
Disposes a single event. More... | |
int64_t | NT_Now (void) |
Returns monotonic current time in 1 us increments. More... | |
void | NT_SetNow (int64_t timestamp) |
Sets the current timestamp used for timestamping values that do not provide a timestamp (e.g. More... | |
void NT_DisposeConnectionInfoArray | ( | struct NT_ConnectionInfo * | arr, |
size_t | count | ||
) |
Disposes a connection info array.
arr | pointer to the array to dispose |
count | number of elements in the array |
void NT_DisposeEvent | ( | struct NT_Event * | event | ) |
Disposes a single event.
event | pointer to the event to dispose |
void NT_DisposeEventArray | ( | struct NT_Event * | arr, |
size_t | count | ||
) |
Disposes an event array.
arr | pointer to the array to dispose |
count | number of elements in the array |
void NT_DisposeString | ( | struct NT_String * | str | ) |
Frees string memory.
str | string to free |
void NT_DisposeTopicInfo | ( | struct NT_TopicInfo * | info | ) |
Disposes a single topic info (as returned by NT_GetTopicInfo).
info | pointer to the info to dispose |
void NT_DisposeTopicInfoArray | ( | struct NT_TopicInfo * | arr, |
size_t | count | ||
) |
Disposes a topic info array.
arr | pointer to the array to dispose |
count | number of elements in the array |
void NT_DisposeValue | ( | struct NT_Value * | value | ) |
Frees value memory.
value | value to free |
void NT_DisposeValueArray | ( | struct NT_Value * | arr, |
size_t | count | ||
) |
Frees an array of NT_Values.
arr | pointer to the value array to free |
count | number of elements in the array |
Note that the individual NT_Values in the array should NOT be freed before calling this. This function will free all the values individually.
void NT_InitString | ( | struct NT_String * | str | ) |
Initializes a NT_String.
Sets length to zero and pointer to null.
str | string to initialize |
void NT_InitValue | ( | struct NT_Value * | value | ) |
Initializes a NT_Value.
Sets type to NT_UNASSIGNED and clears rest of struct.
value | value to initialize |
int64_t NT_Now | ( | void | ) |
Returns monotonic current time in 1 us increments.
This is the same time base used for entry and connection timestamps. This function by default simply wraps WPI_Now(), but if NT_SetNow() is called, this function instead returns the value passed to NT_SetNow(); this can be used to reduce overhead.
void NT_SetNow | ( | int64_t | timestamp | ) |
Sets the current timestamp used for timestamping values that do not provide a timestamp (e.g.
a value of 0 is passed). For consistency, it also results in NT_Now() returning the set value. This should generally be used only if the overhead of calling WPI_Now() is a concern. If used, it should be called periodically with the value of WPI_Now().
timestamp | timestamp (1 us increments) |