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.cameraserver; 006 007/** CameraServer shared functions. */ 008public interface CameraServerShared { 009 /** 010 * get the main thread id func. 011 * 012 * @return the robotMainThreadId 013 */ 014 Long getRobotMainThreadId(); 015 016 /** 017 * Report an error to the driver station. 018 * 019 * @param error the error to set 020 */ 021 void reportDriverStationError(String error); 022 023 /** 024 * Report usage. 025 * 026 * @param resource the resource name 027 * @param data arbitrary string data 028 */ 029 void reportUsage(String resource, String data); 030 031 /** 032 * Get if running on a roboRIO. 033 * 034 * @return true if on roboRIO 035 */ 036 default boolean isRoboRIO() { 037 return false; 038 } 039}