Search in sources :

Example 1 with UnitLiteral

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);
}
Also used : UnitLiteral(org.osate.aadl2.UnitLiteral) Property(org.osate.aadl2.Property)

Aggregations

Property (org.osate.aadl2.Property)1 UnitLiteral (org.osate.aadl2.UnitLiteral)1