*/
@Override
protected void internalReceiveCommand(String itemName, Command command) {
if (itemName != null && !this.providers.isEmpty()) {
JointSpaceBindingProvider provider = this.providers.iterator().next();
if (provider == null) {
logger.warn("Doesn't find matching binding provider [itemName={}, command={}]", itemName, command);
return;
}
logger.debug("Received command (item='{}', state='{}', class='{}')",
new Object[] { itemName, command.toString(), command.getClass().toString() });
String tvCommandString = null;
// first check if we can translate the command directly
tvCommandString = provider.getTVCommand(itemName, command.toString());
// if not try some special notations
if (tvCommandString == null) {
if (command instanceof HSBType) {
tvCommandString = provider.getTVCommand(itemName, "HSB");
} else if (command instanceof DecimalType) {
tvCommandString = provider.getTVCommand(itemName, "DEC");
}
if (tvCommandString == null) {
tvCommandString = provider.getTVCommand(itemName, "*");
}
}
if (tvCommandString == null) {
logger.warn("Unrecognized command \"{}\"", command.toString());