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.Supplier; 010 011/** NetworkTables Raw subscriber. */ 012@SuppressWarnings("PMD.MissingOverride") 013public interface RawSubscriber extends Subscriber, Supplier<byte[]> { 014 /** 015 * Get the corresponding topic. 016 * 017 * @return Topic 018 */ 019 @Override 020 RawTopic getTopic(); 021 022 /** 023 * Get the last published value. 024 * If no value has been published, returns the stored default value. 025 * 026 * @return value 027 */ 028 byte[] get(); 029 030 /** 031 * Get the last published value. 032 * If no value has been published, returns the passed defaultValue. 033 * 034 * @param defaultValue default value to return if no value has been published 035 * @return value 036 */ 037 byte[] get(byte[] defaultValue); 038 039 /** 040 * Get the last published value along with its timestamp 041 * If no value has been published, returns the stored default value and a 042 * timestamp of 0. 043 * 044 * @return timestamped value 045 */ 046 TimestampedRaw getAtomic(); 047 048 /** 049 * Get the last published value along with its timestamp 050 * If no value has been published, returns the passed defaultValue and a 051 * timestamp of 0. 052 * 053 * @param defaultValue default value to return if no value has been published 054 * @return timestamped value 055 */ 056 TimestampedRaw getAtomic(byte[] defaultValue); 057 058 /** 059 * Get an array of all value changes since the last call to readQueue. 060 * Also provides a timestamp for each value. 061 * 062 * <p>The "poll storage" subscribe option can be used to set the queue 063 * depth. 064 * 065 * @return Array of timestamped values; empty array if no new changes have 066 * been published since the previous call. 067 */ 068 TimestampedRaw[] readQueue(); 069 070 /** 071 * Get an array of all value changes since the last call to readQueue. 072 * 073 * <p>The "poll storage" subscribe option can be used to set the queue 074 * depth. 075 * 076 * @return Array of values; empty array if no new changes have been 077 * published since the previous call. 078 */ 079 byte[][] readQueueValues(); 080}