Esempio n. 1
0
 private PLCBusBindingConfig tryGetConfigFor(String itemName) {
   for (PLCBusBindingProvider provider : this.providers) {
     PLCBusBindingConfig config = provider.getConfigFor(itemName);
     if (config != null) {
       return config;
     }
   }
   return null;
 }
Esempio n. 2
0
  public void deactivate(ComponentContext componentContext) {
    for (PLCBusBindingProvider provider : providers) {
      provider.removeBindingChangeListener(this);
    }
    providers.clear();

    if (serialPort != null) {
      try {
        serialPort.close();
      } catch (SerialPortException e) {
        logger.error(e.getMessage());
      }
    }
  }