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