*/
private void updateResource(String itemName, Type type, boolean updateOnlyOutBinding) {
if (itemName != null) {
IhcBindingProvider provider = findFirstMatchingBindingProvider(itemName);
if (provider == null) {
logger.warn(
"Doesn't find matching binding provider [itemName={}]",
itemName);
return;
}
if (updateOnlyOutBinding && provider.isOutBindingOnly(itemName) == false) {
logger.trace("Ignore in binding update for item '{}'", itemName);
return;
}
logger.debug(
"Received update/command (item='{}', state='{}', class='{}')",
new Object[] { itemName, type.toString(),
type.getClass().toString() });
if (ihc == null) {
logger.warn("Controller is not initialized, abort resource value update for item '{}'!", itemName);
return;
}
if (ihc.getConnectionState() != ConnectionState.CONNECTED) {
logger.warn("Connection to controller is not ok, abort resource value update for item '{}'!", itemName);
return;
}
try {
int resourceId = provider.getResourceId(itemName);
WSResourceValue value = ihc
.getResourceValueInformation(resourceId);
ArrayList<IhcEnumValue> enumValues = null;