WPILibC++ 2024.3.2
|
Functions | |
NT_Bool | NT_SetDouble (NT_Handle pubentry, int64_t time, double value) |
Publish a new value. More... | |
NT_Bool | NT_SetDefaultDouble (NT_Handle pubentry, double defaultValue) |
Publish a default value. More... | |
double | NT_GetDouble (NT_Handle subentry, double defaultValue) |
Get the last published value. More... | |
void | NT_GetAtomicDouble (NT_Handle subentry, double defaultValue, struct NT_TimestampedDouble *value) |
Get the last published value along with its timestamp. More... | |
void | NT_DisposeTimestampedDouble (struct NT_TimestampedDouble *value) |
Disposes a timestamped value (as returned by NT_GetAtomicDouble). More... | |
struct NT_TimestampedDouble * | NT_ReadQueueDouble (NT_Handle subentry, size_t *len) |
Get an array of all value changes since the last call to ReadQueue. More... | |
void | NT_FreeQueueDouble (struct NT_TimestampedDouble *arr, size_t len) |
Frees a timestamped array of values (as returned by NT_ReadQueueDouble). More... | |
double * | NT_ReadQueueValuesDouble (NT_Handle subentry, size_t *len) |
Get an array of all value changes since the last call to ReadQueue. More... | |
void NT_DisposeTimestampedDouble | ( | struct NT_TimestampedDouble * | value | ) |
Disposes a timestamped value (as returned by NT_GetAtomicDouble).
value | timestamped value |
void NT_FreeQueueDouble | ( | struct NT_TimestampedDouble * | arr, |
size_t | len | ||
) |
Frees a timestamped array of values (as returned by NT_ReadQueueDouble).
arr | array |
len | length of array |
void NT_GetAtomicDouble | ( | NT_Handle | subentry, |
double | defaultValue, | ||
struct NT_TimestampedDouble * | value | ||
) |
Get the last published value along with its timestamp.
If no value has been published, returns the passed defaultValue and a timestamp of 0.
subentry | subscriber or entry handle |
defaultValue | default value to return if no value has been published |
value | timestamped value (output) |
double NT_GetDouble | ( | NT_Handle | subentry, |
double | defaultValue | ||
) |
Get the last published value.
If no value has been published, returns the passed defaultValue.
subentry | subscriber or entry handle |
defaultValue | default value to return if no value has been published |
struct NT_TimestampedDouble * NT_ReadQueueDouble | ( | NT_Handle | subentry, |
size_t * | len | ||
) |
Get an array of all value changes since the last call to ReadQueue.
Also provides a timestamp for each value.
subentry | subscriber or entry handle |
len | length of returned array (output) |
double * NT_ReadQueueValuesDouble | ( | NT_Handle | subentry, |
size_t * | len | ||
) |
Get an array of all value changes since the last call to ReadQueue.
subentry | subscriber or entry handle |
len | length of returned array (output) |
Publish a default value.
On reconnect, a default value will never be used in preference to a published value.
pubentry | publisher or entry handle |
defaultValue | default value |