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);
}
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;
}
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;
}
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);
}
Aggregations