com.qualcomm.ftccommon

## Interface UsbModuleAttachmentHandler

- All Known Implementing Classes:
    FtcEventLoop.DefaultUsbModuleAttachmentHandler

      public interface UsbModuleAttachmentHandler

  UsbModuleAttachmentHandler is a notification interface through which policies for dealing with the attachment and detachment can be provided.
  See Also:
    `FtcEventLoop.setUsbModuleAttachmentHandler(UsbModuleAttachmentHandler)`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `handleUsbModuleAttach(RobotUsbModule module)` One of the hardware modules in the current robot configuration (such as a Modern Robotics DC Motor Controller, a Modern Robotics Legacy Module, etc) is now newly attached to the system (or so we think).
    `void` | `handleUsbModuleDetach(RobotUsbModule module)` One of the hardware modules in the current robot configuration (such as a Modern Robotics DC Motor Controller, a Modern Robotics Legacy Module, etc) has been disconnected from the system.

- - ### Method Detail

    - #### handleUsbModuleAttach

          void handleUsbModuleAttach(RobotUsbModule module)
                              throws RobotCoreException,
                                     java.lang.InterruptedException

      One of the hardware modules in the current robot configuration (such as a Modern Robotics DC Motor Controller, a Modern Robotics Legacy Module, etc) is now newly attached to the system (or so we think). The code in this method should deal with this event by, e.g., putting the module into a correctly operating state.
      Parameters:
        `module` - the module which is newly attached
      Throws:
        `RobotCoreException`
        `java.lang.InterruptedException`

    - #### handleUsbModuleDetach

          void handleUsbModuleDetach(RobotUsbModule module)
                              throws RobotCoreException,
                                     java.lang.InterruptedException

      One of the hardware modules in the current robot configuration (such as a Modern Robotics DC Motor Controller, a Modern Robotics Legacy Module, etc) has been disconnected from the system. The code in this method should deal with this event by, e.g., putting the module in a state where it merely pretends to function.
      Parameters:
        `module` - the module which has become disconnected
      Throws:
        `RobotCoreException`
        `java.lang.InterruptedException`