IntegerArraySubscriber
- class ntcore.IntegerArraySubscriber
Bases:
Subscriber
NetworkTables IntegerArray subscriber.
- close() None
Destroys the subscriber
- get(*args, **kwargs)
Overloaded function.
get(self: ntcore._ntcore.IntegerArraySubscriber) -> list[int]
Get the last published value. If no value has been published, returns the stored default value.
- Returns:
value
get(self: ntcore._ntcore.IntegerArraySubscriber, defaultValue: List[typing.SupportsInt]) -> list[int]
Get the last published value. If no value has been published, returns the passed defaultValue.
- Parameters:
defaultValue – default value to return if no value has been published
- Returns:
value
- getAtomic(*args, **kwargs)
Overloaded function.
getAtomic(self: ntcore._ntcore.IntegerArraySubscriber) -> ntcore._ntcore.TimestampedIntegerArray
Get the last published value along with its timestamp If no value has been published, returns the stored default value and a timestamp of 0.
- Returns:
timestamped value
getAtomic(self: ntcore._ntcore.IntegerArraySubscriber, defaultValue: List[typing.SupportsInt]) -> ntcore._ntcore.TimestampedIntegerArray
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:
defaultValue – default value to return if no value has been published
- Returns:
timestamped value
- getTopic() ntcore._ntcore.IntegerArrayTopic
Get the corresponding topic.
- Returns:
Topic
- readQueue() list[ntcore._ntcore.TimestampedIntegerArray]
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.
- Returns:
Array of timestamped values; empty array if no new changes have been published since the previous call.