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 org.wpilib.vision.camera;
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  public int dev;
032
033  /** Path to device if available (e.g. '/dev/video0' on Linux). */
034  public String path;
035
036  /** Vendor/model name of the camera as provided by the USB driver. */
037  public String name;
038
039  /** Other path aliases to device (e.g. '/dev/v4l/by-id/...' etc on Linux). */
040  public String[] otherPaths;
041
042  /** USB vendor id. */
043  public int vendorId;
044
045  /** USB product id. */
046  public int productId;
047}