Search in sources :

Example 26 with TimingProperties

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

the class GetProperties method getPeriodinMicroSec.

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

Example 27 with TimingProperties

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

the class GetProperties method getMinimumComputeExecutionTimeinMs.

/**
 * get execution time as specified in ms - the lower bound not adjusted for
 * different processor speeds
 *
 * @param ne
 *            thread component instance
 * @return specified time or 0.0
 */
public static double getMinimumComputeExecutionTimeinMs(final NamedElement ne) {
    Property computeExecutionTime = lookupPropertyDefinition(ne, TimingProperties._NAME, TimingProperties.COMPUTE_EXECUTION_TIME);
    UnitLiteral second = findUnitLiteral(computeExecutionTime, AadlProject.MS_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 28 with TimingProperties

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

the class GetProperties method getMaximumComputeExecutionTimeinSec.

/**
 * get execution time as specified in sec - the upper bound not adjusted for
 * different processor speeds
 *
 * @param ne
 *            thread component instance
 * @return specified time or 0.0
 */
public static double getMaximumComputeExecutionTimeinSec(final NamedElement ne) {
    Property computeExecutionTime = lookupPropertyDefinition(ne, TimingProperties._NAME, TimingProperties.COMPUTE_EXECUTION_TIME);
    UnitLiteral second = findUnitLiteral(computeExecutionTime, AadlProject.SEC_LITERAL);
    double time = PropertyUtils.getScaledRangeMaximum(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 29 with TimingProperties

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

the class GetProperties method getPeriodinNS.

public static double getPeriodinNS(final NamedElement ne) {
    Property period = lookupPropertyDefinition(ne, TimingProperties._NAME, TimingProperties.PERIOD);
    UnitLiteral microSecond = findUnitLiteral(period, AadlProject.NS_LITERAL);
    return PropertyUtils.getScaledNumberValue(ne, period, 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