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.cscore;
006
007/** USB camera information. */
008public class UsbCameraInfo {
009  /**
010   * Create a new set of UsbCameraInfo.
011   *
012   * @param dev Device number (e.g. N in '/dev/videoN' on Linux)
013   * @param path Path to device if available (e.g. '/dev/video0' on Linux)
014   * @param name Vendor/model name of the camera as provided by the USB driver
015   * @param otherPaths Other path aliases to device
016   * @param vendorId USB vendor id
017   * @param productId USB product id
018   */
019  @SuppressWarnings("PMD.ArrayIsStoredDirectly")
020  public UsbCameraInfo(
021      int dev, String path, String name, String[] otherPaths, int vendorId, int productId) {
022    this.dev = dev;
023    this.path = path;
024    this.name = name;
025    this.otherPaths = otherPaths;
026    this.vendorId = vendorId;
027    this.productId = productId;
028  }
029
030  /** Device number (e.g. N in '/dev/videoN' on Linux). */
031  @SuppressWarnings("MemberName")
032  public int dev;
033
034  /** Path to device if available (e.g. '/dev/video0' on Linux). */
035  @SuppressWarnings("MemberName")
036  public String path;
037
038  /** Vendor/model name of the camera as provided by the USB driver. */
039  @SuppressWarnings("MemberName")
040  public String name;
041
042  /** Other path aliases to device (e.g. '/dev/v4l/by-id/...' etc on Linux). */
043  @SuppressWarnings("MemberName")
044  public String[] otherPaths;
045
046  /** USB vendor id. */
047  @SuppressWarnings("MemberName")
048  public int vendorId;
049
050  /** USB product id. */
051  @SuppressWarnings("MemberName")
052  public int productId;
053}