Package frc.robot.subsystems.swervedrive2.swervelib.parser.json

## Class DeviceJson

- java.lang.Object
- - frc.robot.subsystems.swervedrive2.swervelib.parser.json.DeviceJson

-     public class DeviceJson
      extends Object

  Device JSON parsed class. Used to access the JSON data.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `String` | `canbus` | The CAN bus name which the device resides on if using CAN.
    `int` | `id` | The CAN ID or pin ID of the device.
    `String` | `type` | The device type, e.g.

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DeviceJson()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `SwerveAbsoluteEncoder` | `createEncoder()` | Create a `SwerveAbsoluteEncoder` from the current configuration.
    `SwerveIMU` | `createIMU()` | Create a `SwerveIMU` from the given configuration.
    `SwerveAbsoluteEncoder` | `createIntegratedEncoder​(SwerveMotor motor)` | Create a `SwerveAbsoluteEncoder` from the data port on the motor controller.
    `SwerveMotor` | `createMotor​(boolean isDriveMotor)` | Create a `SwerveMotor` from the given configuration.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### type

          public String type

      The device type, e.g. pigeon/pigeon2/sparkmax/talonfx/navx

    - #### id

          public int id

      The CAN ID or pin ID of the device.

    - #### canbus

          public String canbus

      The CAN bus name which the device resides on if using CAN.

  - ### Constructor Detail

    - #### DeviceJson

          public DeviceJson()

  - ### Method Detail

    - #### createEncoder

          public SwerveAbsoluteEncoder createEncoder()

      Create a `SwerveAbsoluteEncoder` from the current configuration.
      Returns:
        `SwerveAbsoluteEncoder` given.

    - #### createIMU

          public SwerveIMU createIMU()

      Create a `SwerveIMU` from the given configuration.
      Returns:
        `SwerveIMU` given.

    - #### createMotor

          public SwerveMotor createMotor​(boolean isDriveMotor)

      Create a `SwerveMotor` from the given configuration.
      Parameters:
        `isDriveMotor` - If the motor being generated is a drive motor.
      Returns:
        `SwerveMotor` given.

    - #### createIntegratedEncoder

          public SwerveAbsoluteEncoder createIntegratedEncoder​(SwerveMotor motor)

      Create a `SwerveAbsoluteEncoder` from the data port on the motor controller.
      Parameters:
        `motor` - The motor to create the absolute encoder from.
      Returns:
        `SwerveAbsoluteEncoder` from the motor controller.