Search in sources :

Example 1 with IntegerWithUnits

use of org.osate.pluginsupport.properties.IntegerWithUnits in project osate2 by osate.

the class AadlProject method getMaxVolume.

public static IntegerWithUnits<DataVolumeUnits> getMaxVolume(EObject lookupContext) {
    PropertyConstant constant = getMaxVolume_PropertyConstant(lookupContext);
    PropertyExpression resolved = CodeGenUtil.resolveNamedValue(constant.getConstantValue());
    return new IntegerWithUnits<>(resolved, DataVolumeUnits.class);
}
Also used : IntegerWithUnits(org.osate.pluginsupport.properties.IntegerWithUnits) PropertyExpression(org.osate.aadl2.PropertyExpression) PropertyConstant(org.osate.aadl2.PropertyConstant)

Example 2 with IntegerWithUnits

use of org.osate.pluginsupport.properties.IntegerWithUnits in project osate2 by osate.

the class AadlProject method getMaxMemorySize.

public static IntegerWithUnits<SizeUnits> getMaxMemorySize(EObject lookupContext) {
    PropertyConstant constant = getMaxMemorySize_PropertyConstant(lookupContext);
    PropertyExpression resolved = CodeGenUtil.resolveNamedValue(constant.getConstantValue());
    return new IntegerWithUnits<>(resolved, SizeUnits.class);
}
Also used : IntegerWithUnits(org.osate.pluginsupport.properties.IntegerWithUnits) PropertyExpression(org.osate.aadl2.PropertyExpression) PropertyConstant(org.osate.aadl2.PropertyConstant)

Example 3 with IntegerWithUnits

use of org.osate.pluginsupport.properties.IntegerWithUnits in project osate2 by osate.

the class AadlProject method getMaxTime.

public static IntegerWithUnits<TimeUnits> getMaxTime(EObject lookupContext) {
    PropertyConstant constant = getMaxTime_PropertyConstant(lookupContext);
    PropertyExpression resolved = CodeGenUtil.resolveNamedValue(constant.getConstantValue());
    return new IntegerWithUnits<>(resolved, TimeUnits.class);
}
Also used : IntegerWithUnits(org.osate.pluginsupport.properties.IntegerWithUnits) PropertyExpression(org.osate.aadl2.PropertyExpression) PropertyConstant(org.osate.aadl2.PropertyConstant)

Aggregations

PropertyConstant (org.osate.aadl2.PropertyConstant)3 PropertyExpression (org.osate.aadl2.PropertyExpression)3 IntegerWithUnits (org.osate.pluginsupport.properties.IntegerWithUnits)3