Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| " 2013 FRC Java API "
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.wpi.first.wpilibj
Class Module

    java.lang.Object
      edu.wpi.first.wpilibj.SensorBase
          edu.wpi.first.wpilibj.Module

Direct Known Subclasses:
  AnalogModule, DigitalModule

    public class Module

extends SensorBase

Base class for AnalogModule and DigitalModule.

Author:
  dtjones

Field Summary
`protected int` | `m_moduleNumber` The module number of the module
`protected static Module[]` | `m_modules` An array holding the object representing each module
`protected ModulePresence.ModuleType` | `m_moduleType`

Fields inherited from class edu.wpi.first.wpilibj.SensorBase
`kAnalogChannels, kAnalogModules, kDigitalChannels, kPwmChannels, kRelayChannels, kSolenoidChannels, kSolenoidModules, kSystemClockTicksPerMicrosecond`

Constructor Summary
`protected` | `Module(ModulePresence.ModuleType moduleType, int moduleNumber)` Constructor.

Method Summary
`static Module` | `getModule(ModulePresence.ModuleType moduleType, int moduleNumber)` Static module singleton factory.
`int` | `getModuleNumber()` Gets the module number associated with a module.
`ModulePresence.ModuleType` | `getModuleType()` Gets the module type associated with a module.

Methods inherited from class edu.wpi.first.wpilibj.SensorBase
`checkAnalogChannel, checkAnalogModule, checkDigitalChannel, checkDigitalModule, checkPWMChannel, checkPWMModule, checkRelayChannel, checkRelayModule, checkSolenoidChannel, checkSolenoidModule, free, getDefaultAnalogModule, getDefaultDigitalModule, getDefaultSolenoidModule, setDefaultAnalogModule, setDefaultDigitalModule, setDefaultSolenoidModule`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### m_modules

    protected static Module[] m_modules

  An array holding the object representing each module

### m_moduleNumber

    protected int m_moduleNumber

  The module number of the module

### m_moduleType

    protected ModulePresence.ModuleType m_moduleType

Constructor Detail

### Module

    protected Module(ModulePresence.ModuleType moduleType,
                     int moduleNumber)

  Constructor.

  Parameters:
    `moduleNumber` - The number of this module (1 or 2).

Method Detail

### getModuleNumber

    public int getModuleNumber()

  Gets the module number associated with a module.

  Returns:
    The module's number.

### getModuleType

    public ModulePresence.ModuleType getModuleType()

  Gets the module type associated with a module.

  Returns:
    The module's type.

### getModule

    public static Module getModule(ModulePresence.ModuleType moduleType,
                                   int moduleNumber)

  Static module singleton factory.

  Parameters:
    `moduleType` - The type of the module represented.
    `moduleNumber` - The module index within the module type.
  Returns:
    the module

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| " 2013 FRC Java API "
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

"
For updated information see the Java FRC site
"