use of org.openhab.binding.dmx.DmxBindingProvider in project openhab1-addons by openhab.
the class DmxBinding method receiveCommand.
/**
* {@inheritDoc}
*/
@Override
public void receiveCommand(String itemName, Command command) {
if (dmxService == null) {
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);
}
Aggregations