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
005package edu.wpi.first.networktables;
006
007import edu.wpi.first.util.sendable.SendableBuilder;
008
009public interface NTSendableBuilder extends SendableBuilder {
010  /**
011   * Set the function that should be called to update the network table for things other than
012   * properties. Note this function is not passed the network table object; instead it should use
013   * the entry handles returned by getEntry().
014   *
015   * @param func function
016   */
017  void setUpdateTable(Runnable func);
018
019  /**
020   * Add a property without getters or setters. This can be used to get entry handles for the
021   * function called by setUpdateTable().
022   *
023   * @param key property name
024   * @return Network table topic
025   */
026  Topic getTopic(String key);
027
028  /**
029   * Get the network table.
030   *
031   * @return The network table
032   */
033  NetworkTable getTable();
034
035  @Override
036  default BackendKind getBackendKind() {
037    return BackendKind.kNetworkTables;
038  }
039}