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