Search in sources :

Example 1 with TimingProperties

use of org.osate.aadl2.contrib.timing.TimingProperties in project osate2 by osate.

the class GetProperties method getExecutionTimeInMS.

public static double getExecutionTimeInMS(final NamedElement ne) {
    Property period = lookupPropertyDefinition(ne, TimingProperties._NAME, TimingProperties.EXECUTION_TIME);
    UnitLiteral milliSecond = findUnitLiteral(period, AadlProject.MS_LITERAL);
    return PropertyUtils.getScaledNumberValue(ne, period, milliSecond, 0.0);
}
Also used : UnitLiteral(org.osate.aadl2.UnitLiteral) BasicProperty(org.osate.aadl2.BasicProperty) Property(org.osate.aadl2.Property)

Example 2 with TimingProperties

use of org.osate.aadl2.contrib.timing.TimingProperties in project osate2 by osate.

the class GetProperties method getDeadlineinSec.

public static double getDeadlineinSec(final NamedElement ne) {
    Property deadline = lookupPropertyDefinition(ne, TimingProperties._NAME, TimingProperties.DEADLINE);
    UnitLiteral second = findUnitLiteral(deadline, AadlProject.SEC_LITERAL);
    return PropertyUtils.getScaledNumberValue(ne, deadline, second, 0.0);
}
Also used : UnitLiteral(org.osate.aadl2.UnitLiteral) BasicProperty(org.osate.aadl2.BasicProperty) Property(org.osate.aadl2.Property)

Example 3 with TimingProperties

use of org.osate.aadl2.contrib.timing.TimingProperties in project osate2 by osate.

the class GetProperties method getDeadlineinMilliSec.

public static double getDeadlineinMilliSec(final NamedElement ne) {
    Property deadline = lookupPropertyDefinition(ne, TimingProperties._NAME, TimingProperties.DEADLINE);
    UnitLiteral milliSecond = findUnitLiteral(deadline, AadlProject.MS_LITERAL);
    return PropertyUtils.getScaledNumberValue(ne, deadline, milliSecond, 0.0);
}
Also used : UnitLiteral(org.osate.aadl2.UnitLiteral) BasicProperty(org.osate.aadl2.BasicProperty) Property(org.osate.aadl2.Property)

Example 4 with TimingProperties

use of org.osate.aadl2.contrib.timing.TimingProperties in project osate2 by osate.

the class GetProperties method getMinimumComputeExecutionTimeinSec.

/**
 * get execution time as specified in sec - the lower bound not adjusted for
 * different processor speeds
 *
 * @param ne
 *            thread component instance
 * @return specified time or 0.0
 */
public static double getMinimumComputeExecutionTimeinSec(final NamedElement ne) {
    Property computeExecutionTime = lookupPropertyDefinition(ne, TimingProperties._NAME, TimingProperties.COMPUTE_EXECUTION_TIME);
    UnitLiteral second = findUnitLiteral(computeExecutionTime, AadlProject.SEC_LITERAL);
    double time = PropertyUtils.getScaledRangeMinimum(ne, computeExecutionTime, second, 0.0);
    return time;
}
Also used : UnitLiteral(org.osate.aadl2.UnitLiteral) BasicProperty(org.osate.aadl2.BasicProperty) Property(org.osate.aadl2.Property)

Example 5 with TimingProperties

use of org.osate.aadl2.contrib.timing.TimingProperties in project osate2 by osate.

the class GetProperties method getDeadlineinMicroSec.

public static double getDeadlineinMicroSec(final NamedElement ne) {
    Property deadline = lookupPropertyDefinition(ne, TimingProperties._NAME, TimingProperties.DEADLINE);
    UnitLiteral microSecond = findUnitLiteral(deadline, AadlProject.US_LITERAL);
    return PropertyUtils.getScaledNumberValue(ne, deadline, microSecond, 0.0);
}
Also used : UnitLiteral(org.osate.aadl2.UnitLiteral) BasicProperty(org.osate.aadl2.BasicProperty) Property(org.osate.aadl2.Property)

Aggregations

BasicProperty (org.osate.aadl2.BasicProperty)20 Property (org.osate.aadl2.Property)20 UnitLiteral (org.osate.aadl2.UnitLiteral)20 ComponentInstance (org.osate.aadl2.instance.ComponentInstance)10 ComponentCategory (org.osate.aadl2.ComponentCategory)6 TimingProperties (org.osate.aadl2.contrib.timing.TimingProperties)6 SystemInstance (org.osate.aadl2.instance.SystemInstance)4 List (java.util.List)3 Element (org.osate.aadl2.Element)3 NamedElement (org.osate.aadl2.NamedElement)3 TimeUnits (org.osate.aadl2.contrib.aadlproject.TimeUnits)3 FeatureInstance (org.osate.aadl2.instance.FeatureInstance)3 ForAllElement (org.osate.aadl2.modelsupport.modeltraversal.ForAllElement)3 Collectors (java.util.stream.Collectors)2 EList (org.eclipse.emf.common.util.EList)2 ComponentClassifier (org.osate.aadl2.ComponentClassifier)2 ConnectionInstance (org.osate.aadl2.instance.ConnectionInstance)2 LatencyContributorComponent (org.osate.analysis.flows.model.LatencyContributorComponent)2 ErrorReport (org.osate.codegen.checker.report.ErrorReport)2 PropertyUtils (org.osate.pluginsupport.properties.PropertyUtils)2