com.qualcomm.robotcore.hardware

## Class LegacyModulePortDeviceImpl

- java.lang.Object
- - com.qualcomm.robotcore.hardware.LegacyModulePortDeviceImpl

- All Implemented Interfaces:
    LegacyModulePortDevice

      public abstract class LegacyModulePortDeviceImpl
      extends java.lang.Object
      implements LegacyModulePortDevice

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected LegacyModule` | `module`
    `protected int` | `physicalPort`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `LegacyModulePortDeviceImpl(LegacyModule module, int physicalPort)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `finishConstruction()`
    `LegacyModule` | `getLegacyModule()` Returns the legacy module associated with this device.
    `int` | `getPort()` Returns the port on the associated legacy module that this device occupies.
    `protected void` | `moduleNowArmedOrPretending()` intended as a subclass hook
    `protected void` | `moduleNowDisarmed()` intended as a subclass hook
    `void` | `onModuleStateChange(RobotArmingStateNotifier module, RobotUsbModule.ARMINGSTATE state)`

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

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

- - ### Field Detail

    - #### module

          protected final LegacyModule module

    - #### physicalPort

          protected final int physicalPort

  - ### Constructor Detail

    - #### LegacyModulePortDeviceImpl

          protected LegacyModulePortDeviceImpl(LegacyModule module,
                                               int physicalPort)

  - ### Method Detail

    - #### finishConstruction

          protected void finishConstruction()

    - #### moduleNowArmedOrPretending

          protected void moduleNowArmedOrPretending()

      intended as a subclass hook

    - #### moduleNowDisarmed

          protected void moduleNowDisarmed()

      intended as a subclass hook

    - #### onModuleStateChange

          public void onModuleStateChange(RobotArmingStateNotifier module,
                                          RobotUsbModule.ARMINGSTATE state)

    - #### getLegacyModule

          public LegacyModule getLegacyModule()

      Description copied from interface: `LegacyModulePortDevice`
      Returns the legacy module associated with this device.
      Specified by:
        `getLegacyModule` in interface `LegacyModulePortDevice`
      Returns:
        the legacy module associated with this device

    - #### getPort

          public int getPort()

      Description copied from interface: `LegacyModulePortDevice`
      Returns the port on the associated legacy module that this device occupies.
      Specified by:
        `getPort` in interface `LegacyModulePortDevice`
      Returns:
        the port on the associated legacy module that this device occupies