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
007/** NetworkTables timestamped object. */
008public final class TimestampedObject<T> {
009  /**
010   * Create a timestamped value.
011   *
012   * @param timestamp timestamp in local time base
013   * @param serverTime timestamp in server time base
014   * @param value value
015   */
016  public TimestampedObject(long timestamp, long serverTime, T value) {
017    this.timestamp = timestamp;
018    this.serverTime = serverTime;
019    this.value = value;
020  }
021
022  /** Timestamp in local time base. */
023  @SuppressWarnings("MemberName")
024  public final long timestamp;
025
026  /** Timestamp in server time base. May be 0 or 1 for locally set values. */
027  @SuppressWarnings("MemberName")
028  public final long serverTime;
029
030  /** Value. */
031  @SuppressWarnings("MemberName")
032  public final T value;
033}