001/*----------------------------------------------------------------------------*/ 002/* Copyright (c) FIRST 2017-2018. 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.networktables; 009 010/** 011 * A listener that listens to changes in values in a {@link NetworkTable} 012 */ 013@FunctionalInterface 014public interface TableEntryListener extends EntryListenerFlags { 015 /** 016 * Called when a key-value pair is changed in a {@link NetworkTable}. 017 * 018 * @param table the table the key-value pair exists in 019 * @param key the key associated with the value that changed 020 * @param entry the entry associated with the value that changed 021 * @param value the new value 022 * @param flags update flags; for example, EntryListenerFlags.kNew if the key 023 * did not previously exist in the table 024 */ 025 void valueChanged(NetworkTable table, String key, NetworkTableEntry entry, NetworkTableValue value, int flags); 026}