001/*----------------------------------------------------------------------------*/ 002/* Copyright (c) 2008-2018 FIRST. All Rights Reserved. */ 003/* Open Source Software - may be modified and shared by FRC teams. The code */ 004/* must be accompanied by the FIRST BSD license file in the root directory of */ 005/* the project. */ 006/*----------------------------------------------------------------------------*/ 007 008package edu.wpi.first.wpilibj.livewindow; 009 010import edu.wpi.first.wpilibj.smartdashboard.SendableBuilder; 011import edu.wpi.first.wpilibj.Sendable; 012 013/** 014 * Live Window Sendable is a special type of object sendable to the live window. 015 * @deprecated Use Sendable directly instead 016 */ 017@Deprecated 018public interface LiveWindowSendable extends Sendable { 019 /** 020 * Update the table for this sendable object with the latest values. 021 */ 022 void updateTable(); 023 024 /** 025 * Start having this sendable object automatically respond to value changes reflect the value on 026 * the table. 027 */ 028 void startLiveWindowMode(); 029 030 /** 031 * Stop having this sendable object automatically respond to value changes. 032 */ 033 void stopLiveWindowMode(); 034 035 @Override 036 default String getName() { 037 return ""; 038 } 039 040 @Override 041 default void setName(String name) { 042 } 043 044 @Override 045 default String getSubsystem() { 046 return ""; 047 } 048 049 @Override 050 default void setSubsystem(String subsystem) { 051 } 052 053 @Override 054 default void initSendable(SendableBuilder builder) { 055 builder.setUpdateTable(this::updateTable); 056 } 057}