use of org.osate.aadl2.UnitLiteral in project alisa-examples by osate.
the class ModelVerifications method getVoltage.
public static double getVoltage(final FeatureInstance fi) {
Property voltage = GetProperties.lookupPropertyDefinition(fi, "Physical", "Voltage");
UnitLiteral volts = GetProperties.findUnitLiteral(voltage, "V");
return PropertyUtils.getScaledNumberValue(fi, voltage, volts, 0.0);
}
Aggregations