001// Copyright (c) FIRST and other WPILib contributors.
002// Open Source Software; you can modify and/or share it under the terms of
003// the WPILib BSD license file in the root directory of this project.
004
005// THIS FILE WAS AUTO-GENERATED BY ./ntcore/generate_topics.py. DO NOT MODIFY
006
007package edu.wpi.first.networktables;
008
009import java.util.function.Consumer;
010
011/** NetworkTables FloatArray publisher. */
012public interface FloatArrayPublisher extends Publisher, Consumer<float[]> {
013  /**
014   * Get the corresponding topic.
015   *
016   * @return Topic
017   */
018  @Override
019  FloatArrayTopic getTopic();
020
021  /**
022   * Publish a new value using current NT time.
023   *
024   * @param value value to publish
025   */
026  default void set(float[] value) {
027    set(value, 0);
028  }
029
030
031  /**
032   * Publish a new value.
033   *
034   * @param value value to publish
035   * @param time timestamp; 0 indicates current NT time should be used
036   */
037  void set(float[] value, long time);
038
039  /**
040   * Publish a default value.
041   * On reconnect, a default value will never be used in preference to a
042   * published value.
043   *
044   * @param value value
045   */
046  void setDefault(float[] value);
047
048  @Override
049  default void accept(float[] value) {
050    set(value);
051  }
052}