Examples of DmxItem


Examples of org.openhab.binding.dmx.internal.config.DmxItem

    String config = (bindingConfig == null) ? "" : bindingConfig
        .replaceAll(" ", "").toUpperCase();
    logger.trace("Binding item: {} with configuration {}", item.getName(),
        config);

    DmxItem itemBinding = null;
    if (item instanceof ColorItem) {
      itemBinding = new DmxColorItem(item.getName(), config, this);
    } else if (item instanceof DimmerItem) {
      itemBinding = new DmxDimmerItem(item.getName(), config, this);
    } else if (item instanceof SwitchItem) {
      itemBinding = new DmxSwitchItem(item.getName(), config, this);
    } else {
      throw new BindingConfigParseException("Unsupported item type "
          + item.getClass().getSimpleName());
    }

    if (itemBinding.isStatusListener()) {

      final DmxStatusUpdateListener dmxStatusListener = itemBinding;
      final String itemName = item.getName();

      logger.trace("Registering status listener for item {} ",
View Full Code Here

Examples of org.openhab.binding.dmx.internal.config.DmxItem

      logger.warn("No DMX Service available.");
      return;
    }

    // get the item's corresponding dmx binding
    DmxItem itemBinding = null;
    for (DmxBindingProvider provider : providers) {
      if (provider.providesBindingFor(itemName)) {
        itemBinding = provider.getBindingConfig(itemName);
        break;
      }
    }

    if (itemBinding == null) {
      return;
    }

    dmxService.suspend(true);
    itemBinding.processCommand(dmxService, command);
    dmxService.suspend(false);

  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.