use of org.osate.aadl2.properties.PropertyNotPresentException in project osate2 by osate.
the class TimingProperties method getLoadDeadline.
public static Optional<IntegerWithUnits<TimeUnits>> getLoadDeadline(NamedElement lookupContext, Optional<Mode> mode) {
Property property = getLoadDeadline_Property(lookupContext);
try {
PropertyExpression value = CodeGenUtil.lookupProperty(property, lookupContext, mode);
PropertyExpression resolved = CodeGenUtil.resolveNamedValue(value, lookupContext, mode);
return Optional.of(new IntegerWithUnits<>(resolved, TimeUnits.class));
} catch (PropertyNotPresentException e) {
return Optional.empty();
}
}
use of org.osate.aadl2.properties.PropertyNotPresentException in project osate2 by osate.
the class TimingProperties method getClockJitter.
public static Optional<IntegerWithUnits<TimeUnits>> getClockJitter(NamedElement lookupContext, Optional<Mode> mode) {
Property property = getClockJitter_Property(lookupContext);
try {
PropertyExpression value = CodeGenUtil.lookupProperty(property, lookupContext, mode);
PropertyExpression resolved = CodeGenUtil.resolveNamedValue(value, lookupContext, mode);
return Optional.of(new IntegerWithUnits<>(resolved, TimeUnits.class));
} catch (PropertyNotPresentException e) {
return Optional.empty();
}
}
use of org.osate.aadl2.properties.PropertyNotPresentException in project osate2 by osate.
the class TimingProperties method getStartupDeadline.
public static Optional<IntegerWithUnits<TimeUnits>> getStartupDeadline(NamedElement lookupContext, Optional<Mode> mode) {
Property property = getStartupDeadline_Property(lookupContext);
try {
PropertyExpression value = CodeGenUtil.lookupProperty(property, lookupContext, mode);
PropertyExpression resolved = CodeGenUtil.resolveNamedValue(value, lookupContext, mode);
return Optional.of(new IntegerWithUnits<>(resolved, TimeUnits.class));
} catch (PropertyNotPresentException e) {
return Optional.empty();
}
}
use of org.osate.aadl2.properties.PropertyNotPresentException in project osate2 by osate.
the class TimingProperties method getClientSubprogramExecutionTime.
public static Optional<IntegerRangeWithUnits<TimeUnits>> getClientSubprogramExecutionTime(NamedElement lookupContext, Optional<Mode> mode) {
Property property = getClientSubprogramExecutionTime_Property(lookupContext);
try {
PropertyExpression value = CodeGenUtil.lookupProperty(property, lookupContext, mode);
PropertyExpression resolved = CodeGenUtil.resolveNamedValue(value, lookupContext, mode);
return Optional.of(new IntegerRangeWithUnits<>(resolved, TimeUnits.class, lookupContext, mode));
} catch (PropertyNotPresentException e) {
return Optional.empty();
}
}
use of org.osate.aadl2.properties.PropertyNotPresentException in project osate2 by osate.
the class TimingProperties method getStartupExecutionTime.
public static Optional<IntegerRangeWithUnits<TimeUnits>> getStartupExecutionTime(NamedElement lookupContext, Optional<Mode> mode) {
Property property = getStartupExecutionTime_Property(lookupContext);
try {
PropertyExpression value = CodeGenUtil.lookupProperty(property, lookupContext, mode);
PropertyExpression resolved = CodeGenUtil.resolveNamedValue(value, lookupContext, mode);
return Optional.of(new IntegerRangeWithUnits<>(resolved, TimeUnits.class, lookupContext, mode));
} catch (PropertyNotPresentException e) {
return Optional.empty();
}
}
Aggregations