use of org.osate.aadl2.contrib.aadlproject.TimeUnits in project osate2 by osate.
the class TimingProperties method getFinalizeExecutionTime.
public static Optional<IntegerRangeWithUnits<TimeUnits>> getFinalizeExecutionTime(NamedElement lookupContext, Optional<Mode> mode) {
Property property = getFinalizeExecutionTime_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.contrib.aadlproject.TimeUnits in project osate2 by osate.
the class TimingProperties method getFirstDispatchTime.
public static Optional<IntegerWithUnits<TimeUnits>> getFirstDispatchTime(NamedElement lookupContext, Optional<Mode> mode) {
Property property = getFirstDispatchTime_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.contrib.aadlproject.TimeUnits in project osate2 by osate.
the class TimingProperties method getComputeDeadline.
public static Optional<IntegerWithUnits<TimeUnits>> getComputeDeadline(NamedElement lookupContext, Optional<Mode> mode) {
Property property = getComputeDeadline_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.contrib.aadlproject.TimeUnits in project osate2 by osate.
the class TimingProperties method getDeadline.
public static Optional<IntegerWithUnits<TimeUnits>> getDeadline(NamedElement lookupContext, Optional<Mode> mode) {
Property property = getDeadline_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.contrib.aadlproject.TimeUnits in project osate2 by osate.
the class TimingProperties method getFinalizeDeadline.
public static Optional<IntegerWithUnits<TimeUnits>> getFinalizeDeadline(NamedElement lookupContext, Optional<Mode> mode) {
Property property = getFinalizeDeadline_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();
}
}
Aggregations