DoubleArraySubscriber

class ntcore.DoubleArraySubscriber

Bases: Subscriber

NetworkTables DoubleArray subscriber.

close() None

Destroys the subscriber

get(*args, **kwargs)

Overloaded function.

  1. get(self: ntcore._ntcore.DoubleArraySubscriber) -> List[float]

Get the last published value. If no value has been published, returns the stored default value.

Returns:

value

  1. get(self: ntcore._ntcore.DoubleArraySubscriber, defaultValue: List[float]) -> List[float]

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.

  1. getAtomic(self: ntcore._ntcore.DoubleArraySubscriber) -> ntcore._ntcore.TimestampedDoubleArray

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

  1. getAtomic(self: ntcore._ntcore.DoubleArraySubscriber, defaultValue: List[float]) -> ntcore._ntcore.TimestampedDoubleArray

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

Get the corresponding topic.

Returns:

Topic

readQueue() List[ntcore._ntcore.TimestampedDoubleArray]

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.