WPILibC++ 2024.3.2
|
Functions | |
enum NT_Type | NT_GetValueType (const struct NT_Value *value) |
Returns the type of an NT_Value struct. More... | |
NT_Bool | NT_GetValueBoolean (const struct NT_Value *value, uint64_t *last_change, NT_Bool *v_boolean) |
Returns the boolean from the NT_Value. More... | |
NT_Bool | NT_GetValueInteger (const struct NT_Value *value, uint64_t *last_change, int64_t *v_int) |
Returns the int from the NT_Value. More... | |
NT_Bool | NT_GetValueFloat (const struct NT_Value *value, uint64_t *last_change, float *v_float) |
Returns the float from the NT_Value. More... | |
NT_Bool | NT_GetValueDouble (const struct NT_Value *value, uint64_t *last_change, double *v_double) |
Returns the double from the NT_Value. More... | |
char * | NT_GetValueString (const struct NT_Value *value, uint64_t *last_change, size_t *str_len) |
Returns a copy of the string from the NT_Value. More... | |
uint8_t * | NT_GetValueRaw (const struct NT_Value *value, uint64_t *last_change, size_t *raw_len) |
Returns a copy of the raw value from the NT_Value. More... | |
NT_Bool * | NT_GetValueBooleanArray (const struct NT_Value *value, uint64_t *last_change, size_t *arr_size) |
Returns a copy of the boolean array from the NT_Value. More... | |
int64_t * | NT_GetValueIntegerArray (const struct NT_Value *value, uint64_t *last_change, size_t *arr_size) |
Returns a copy of the int array from the NT_Value. More... | |
float * | NT_GetValueFloatArray (const struct NT_Value *value, uint64_t *last_change, size_t *arr_size) |
Returns a copy of the float array from the NT_Value. More... | |
double * | NT_GetValueDoubleArray (const struct NT_Value *value, uint64_t *last_change, size_t *arr_size) |
Returns a copy of the double array from the NT_Value. More... | |
struct NT_String * | NT_GetValueStringArray (const struct NT_Value *value, uint64_t *last_change, size_t *arr_size) |
Returns a copy of the NT_String array from the NT_Value. More... | |
NT_Bool NT_GetValueBoolean | ( | const struct NT_Value * | value, |
uint64_t * | last_change, | ||
NT_Bool * | v_boolean | ||
) |
Returns the boolean from the NT_Value.
If the NT_Value is null, or is assigned to a different type, returns 0.
value | NT_Value struct to get the boolean from |
last_change | returns time in ms since the last change in the value |
v_boolean | returns the boolean assigned to the name |
NT_Bool * NT_GetValueBooleanArray | ( | const struct NT_Value * | value, |
uint64_t * | last_change, | ||
size_t * | arr_size | ||
) |
Returns a copy of the boolean array from the NT_Value.
If the NT_Value is null, or is assigned to a different type, returns null.
value | NT_Value struct to get the boolean array from |
last_change | returns time in ms since the last change in the value |
arr_size | returns the number of elements in the array |
It is the caller's responsibility to free the array once its no longer needed. The NT_FreeBooleanArray() function is useful for this purpose. The returned array is a copy of the array in the value, and must be freed separately.
NT_Bool NT_GetValueDouble | ( | const struct NT_Value * | value, |
uint64_t * | last_change, | ||
double * | v_double | ||
) |
Returns the double from the NT_Value.
If the NT_Value is null, or is assigned to a different type, returns 0.
value | NT_Value struct to get the double from |
last_change | returns time in ms since the last change in the value |
v_double | returns the double assigned to the name |
double * NT_GetValueDoubleArray | ( | const struct NT_Value * | value, |
uint64_t * | last_change, | ||
size_t * | arr_size | ||
) |
Returns a copy of the double array from the NT_Value.
If the NT_Value is null, or is assigned to a different type, returns null.
value | NT_Value struct to get the double array from |
last_change | returns time in ms since the last change in the value |
arr_size | returns the number of elements in the array |
It is the caller's responsibility to free the array once its no longer needed. The NT_FreeDoubleArray() function is useful for this purpose. The returned array is a copy of the array in the value, and must be freed separately.
Returns the float from the NT_Value.
If the NT_Value is null, or is assigned to a different type, returns 0.
value | NT_Value struct to get the float from |
last_change | returns time in ms since the last change in the value |
v_float | returns the float assigned to the name |
float * NT_GetValueFloatArray | ( | const struct NT_Value * | value, |
uint64_t * | last_change, | ||
size_t * | arr_size | ||
) |
Returns a copy of the float array from the NT_Value.
If the NT_Value is null, or is assigned to a different type, returns null.
value | NT_Value struct to get the float array from |
last_change | returns time in ms since the last change in the value |
arr_size | returns the number of elements in the array |
It is the caller's responsibility to free the array once its no longer needed. The NT_FreeFloatArray() function is useful for this purpose. The returned array is a copy of the array in the value, and must be freed separately.
NT_Bool NT_GetValueInteger | ( | const struct NT_Value * | value, |
uint64_t * | last_change, | ||
int64_t * | v_int | ||
) |
Returns the int from the NT_Value.
If the NT_Value is null, or is assigned to a different type, returns 0.
value | NT_Value struct to get the int from |
last_change | returns time in ms since the last change in the value |
v_int | returns the int assigned to the name |
int64_t * NT_GetValueIntegerArray | ( | const struct NT_Value * | value, |
uint64_t * | last_change, | ||
size_t * | arr_size | ||
) |
Returns a copy of the int array from the NT_Value.
If the NT_Value is null, or is assigned to a different type, returns null.
value | NT_Value struct to get the int array from |
last_change | returns time in ms since the last change in the value |
arr_size | returns the number of elements in the array |
It is the caller's responsibility to free the array once its no longer needed. The NT_FreeIntArray() function is useful for this purpose. The returned array is a copy of the array in the value, and must be freed separately.
uint8_t * NT_GetValueRaw | ( | const struct NT_Value * | value, |
uint64_t * | last_change, | ||
size_t * | raw_len | ||
) |
Returns a copy of the raw value from the NT_Value.
If the NT_Value is null, or is assigned to a different type, returns null.
value | NT_Value struct to get the string from |
last_change | returns time in ms since the last change in the value |
raw_len | returns the length of the string |
It is the caller's responsibility to free the raw value once its no longer needed. The NT_FreeCharArray() function is useful for this purpose. The returned string is a copy of the string in the value, and must be freed separately.
char * NT_GetValueString | ( | const struct NT_Value * | value, |
uint64_t * | last_change, | ||
size_t * | str_len | ||
) |
Returns a copy of the string from the NT_Value.
If the NT_Value is null, or is assigned to a different type, returns 0.
value | NT_Value struct to get the string from |
last_change | returns time in ms since the last change in the value |
str_len | returns the length of the string |
It is the caller's responsibility to free the string once its no longer needed. The NT_FreeCharArray() function is useful for this purpose. The returned string is a copy of the string in the value, and must be freed separately.
struct NT_String * NT_GetValueStringArray | ( | const struct NT_Value * | value, |
uint64_t * | last_change, | ||
size_t * | arr_size | ||
) |
Returns a copy of the NT_String array from the NT_Value.
If the NT_Value is null, or is assigned to a different type, returns null.
value | NT_Value struct to get the NT_String array from |
last_change | returns time in ms since the last change in the value |
arr_size | returns the number of elements in the array |
It is the caller's responsibility to free the array once its no longer needed. The NT_FreeStringArray() function is useful for this purpose. The returned array is a copy of the array in the value, and must be freed separately. Note that the individual NT_Strings should not be freed, but the entire array should be freed at once. The NT_FreeStringArray() function will free all the NT_Strings.