WPILibC++ 2024.3.2
|
Functions | |
NT_Bool | NT_SetIntegerArray (NT_Handle pubentry, int64_t time, const int64_t *value, size_t len) |
Publish a new value. More... | |
NT_Bool | NT_SetDefaultIntegerArray (NT_Handle pubentry, const int64_t *defaultValue, size_t defaultValueLen) |
Publish a default value. More... | |
int64_t * | NT_GetIntegerArray (NT_Handle subentry, const int64_t *defaultValue, size_t defaultValueLen, size_t *len) |
Get the last published value. More... | |
void | NT_GetAtomicIntegerArray (NT_Handle subentry, const int64_t *defaultValue, size_t defaultValueLen, struct NT_TimestampedIntegerArray *value) |
Get the last published value along with its timestamp. More... | |
void | NT_DisposeTimestampedIntegerArray (struct NT_TimestampedIntegerArray *value) |
Disposes a timestamped value (as returned by NT_GetAtomicIntegerArray). More... | |
struct NT_TimestampedIntegerArray * | NT_ReadQueueIntegerArray (NT_Handle subentry, size_t *len) |
Get an array of all value changes since the last call to ReadQueue. More... | |
void | NT_FreeQueueIntegerArray (struct NT_TimestampedIntegerArray *arr, size_t len) |
Frees a timestamped array of values (as returned by NT_ReadQueueIntegerArray). More... | |
void NT_DisposeTimestampedIntegerArray | ( | struct NT_TimestampedIntegerArray * | value | ) |
Disposes a timestamped value (as returned by NT_GetAtomicIntegerArray).
value | timestamped value |
void NT_FreeQueueIntegerArray | ( | struct NT_TimestampedIntegerArray * | arr, |
size_t | len | ||
) |
Frees a timestamped array of values (as returned by NT_ReadQueueIntegerArray).
arr | array |
len | length of array |
void NT_GetAtomicIntegerArray | ( | NT_Handle | subentry, |
const int64_t * | defaultValue, | ||
size_t | defaultValueLen, | ||
struct NT_TimestampedIntegerArray * | 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 |
defaultValueLen | length of default value |
value | timestamped value (output) |
int64_t * NT_GetIntegerArray | ( | NT_Handle | subentry, |
const int64_t * | defaultValue, | ||
size_t | defaultValueLen, | ||
size_t * | len | ||
) |
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 |
defaultValueLen | length of default value |
len | length of returned value (output) |
struct NT_TimestampedIntegerArray * NT_ReadQueueIntegerArray | ( | 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) |
NT_Bool NT_SetDefaultIntegerArray | ( | NT_Handle | pubentry, |
const int64_t * | defaultValue, | ||
size_t | defaultValueLen | ||
) |
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 |
defaultValueLen | length of default value |