Пример #1
0
  private final void switchOutputChannel(final ChannelState state) {
    final DigitalModule module = this.driver.getDigitalModuleWithID(this.moduleId);

    if (module != null) {
      try {
        module.switchOutputChannel(this.channelNumber, state);
      } catch (IOException e) {
        e.printStackTrace();
      }
    }
  }
Пример #2
0
  private final ChannelState getChannelState() {
    final DigitalModule module = this.driver.getDigitalModuleWithID(this.moduleId);

    if (module != null) {
      try {
        return module.getOutputChannelState(this.channelNumber);
      } catch (IOException e) {
        e.printStackTrace();
      }
    }

    return ChannelState.OFF;
  }