public class AmaltheaServices
extends Object
The methods are called from several generated model objects.
| Modifier and Type | Field and Description |
|---|---|
static List<TimeUnit> |
TIME_UNIT_LIST |
| Constructor and Description |
|---|
AmaltheaServices() |
| Modifier and Type | Method and Description |
|---|---|
static Time |
addTime(Time t1,
Time t2) |
static Time |
adjustTimeUnit(Time time)
This method takes a time (in value and unit) and adjusts the TimeUnit
so that the value is as small as possible, without losing precision
e.g. 1000us is converted to 1ms
|
static int |
compareDataRates(DataRate r1,
DataRate r2)
This method is used to compare DataRate objects on the basis of their values
(obtained in bit per second after applying the conversion based on DataRateUnit)
|
static int |
compareTimes(Time t1,
Time t2)
This method is used to compare Time objects on the basis of their values
(obtained in pico seconds after applying the conversion based on TimeUnit)
|
static BigInteger |
convertToBit(DataSize size) |
static BigInteger |
convertToBitPerSecond(DataRate rate) |
static BigDecimal |
convertToHertz(Frequency frequency) |
static BigDecimal |
convertToMicroVolt(Voltage voltage) |
static BigInteger |
convertToPicoSeconds(Time time)
This method is used to convert the value of Time/TimeObject element's value
to BigInteger in Pico Seconds
|
static double |
divideTime(Time t1,
Time t2) |
static EList<HwModule> |
getAllModules(HwStructure struct) |
static double |
getAverageOfTruncatedNormalDistribution(Number a,
Number b,
double mean,
double sd)
Computes the average (mean) of the truncated normal distribution
See Truncated normal distribution (Wikipedia)
|
static Time |
getAverageOfTruncatedNormalDistribution(Time a,
Time b,
Time mean,
Time sd)
Computes the average (mean) of the truncated normal distribution
See Truncated normal distribution (Wikipedia)
|
static <T extends EObject> |
getContainerOfType(EObject object,
Class<T> type) |
static EList<HwPort> |
getInnerPorts(HwStructure struct) |
static EList<QualifiedPort> |
getInnerPorts(ISystem system) |
static Time |
multiply(Time t1,
double value) |
static Time |
multiply(Time t1,
long value) |
static Time |
subtractTime(Time t1,
Time t2) |
public static <T extends EObject> T getContainerOfType(EObject object,
Class<T> type)
public static BigInteger convertToBit(DataSize size)
public static BigInteger convertToBitPerSecond(DataRate rate)
public static BigInteger convertToPicoSeconds(Time time)
time - Time objectpublic static BigDecimal convertToHertz(Frequency frequency)
public static BigDecimal convertToMicroVolt(Voltage voltage)
public static int compareTimes(Time t1,
Time t2)
t1 - Time objectt2 - Time objectpublic static Time adjustTimeUnit(Time time)
time - public static Time addTime(Time t1,
Time t2)
public static Time subtractTime(Time t1,
Time t2)
public static double divideTime(Time t1,
Time t2)
public static Time multiply(Time t1,
long value)
public static Time multiply(Time t1,
double value)
public static Time getAverageOfTruncatedNormalDistribution(Time a,
Time b,
Time mean,
Time sd)
a - lower bound (null = not truncated from below)b - upper bound (null = not truncated from above)mean - mean or expectation of the (unlimited) distributionsd - standard deviationpublic static double getAverageOfTruncatedNormalDistribution(Number a,
Number b,
double mean,
double sd)
a - lower bound (null = not truncated from below)b - upper bound (null = not truncated from above)mean - mean or expectation of the (unlimited) distributionsd - standard deviationpublic static int compareDataRates(DataRate r1,
DataRate r2)
r1 - DataRate objectr2 - DataRate objectpublic static EList<QualifiedPort> getInnerPorts(ISystem system)
public static EList<HwPort> getInnerPorts(HwStructure struct)
public static EList<HwModule> getAllModules(HwStructure struct)