newval = new BooleanValue(Double.valueOf(p) > 0 ? true
: false);
} catch (NumberFormatException e)
{
debugErr(e);
throw new RemoteSimulationException("Faild to setvalue from: "
+ name, e);
}
}
break;
case NumericValue:
newval = NumericValue.valueOf(Double.parseDouble(p), null);
break;
case String:
case Unknown:
System.err.println("Unknown value type to set");
return false;
}
if (newval == null)
{
throw new RemoteSimulationException("Error in setValue with variable: "
+ name
+ " properly a type mismatch. Requested input type was: "
+ inputType);
}
updateValueQueueRequest.put(new ValueUpdateRequest(val, newval));
} catch (ValueException e)
{
debugErr(e);
throw new RemoteSimulationException("Faild to setvalue from: "
+ name, e);
} catch (InterruptedException e)
{
e.printStackTrace();
throw new RemoteSimulationException("Internal error in setValue with name: "
+ name, e);
}
} else
{
throw new RemoteSimulationException("Faild to find variable in setValue with name: "
+ name);
}
return true;
}