WPILibC++ 2024.3.2
IntegerArray Functions

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_TimestampedIntegerArrayNT_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...
 

Detailed Description

Function Documentation

◆ NT_DisposeTimestampedIntegerArray()

void NT_DisposeTimestampedIntegerArray ( struct NT_TimestampedIntegerArray value)

Disposes a timestamped value (as returned by NT_GetAtomicIntegerArray).

Parameters
valuetimestamped value

◆ NT_FreeQueueIntegerArray()

void NT_FreeQueueIntegerArray ( struct NT_TimestampedIntegerArray arr,
size_t  len 
)

Frees a timestamped array of values (as returned by NT_ReadQueueIntegerArray).

Parameters
arrarray
lenlength of array

◆ NT_GetAtomicIntegerArray()

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.

Parameters
subentrysubscriber or entry handle
defaultValuedefault value to return if no value has been published
defaultValueLenlength of default value
valuetimestamped value (output)

◆ NT_GetIntegerArray()

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.

Parameters
subentrysubscriber or entry handle
defaultValuedefault value to return if no value has been published
defaultValueLenlength of default value
lenlength of returned value (output)
Returns
value

◆ NT_ReadQueueIntegerArray()

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.

Note
The "poll storage" subscribe option can be used to set the queue depth.
Parameters
subentrysubscriber or entry handle
lenlength of returned array (output)
Returns
Array of timestamped values; NULL if no new changes have been published since the previous call.

◆ NT_SetDefaultIntegerArray()

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.

Parameters
pubentrypublisher or entry handle
defaultValuedefault value
defaultValueLenlength of default value

◆ NT_SetIntegerArray()

NT_Bool NT_SetIntegerArray ( NT_Handle  pubentry,
int64_t  time,
const int64_t *  value,
size_t  len 
)

Publish a new value.

Parameters
pubentrypublisher or entry handle
timetimestamp; 0 indicates current NT time should be used
valuevalue to publish
lenlength of value