| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="de"> |
| <head> |
| <!-- Generated by javadoc (1.8.0_191) on Mon Jan 28 10:50:16 CET 2019 --> |
| <title>AmaltheaServices</title> |
| <meta name="date" content="2019-01-28"> |
| <link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style"> |
| </head> |
| <body> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">org.eclipse.app4mc.amalthea.model</div> |
| <h2 title="Class AmaltheaServices" class="title">Class AmaltheaServices</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li>Object</li> |
| <li> |
| <ul class="inheritance"> |
| <li>AmaltheaServices</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <br> |
| <pre>public class <span class="typeNameLabel">AmaltheaServices</span> |
| extends Object</pre> |
| <div class="block">This class provides static methods that implement operations of the Amalthea EMF model. |
| <p> |
| The methods are called from several generated model objects.</div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field.summary"> |
| <!-- --> |
| </a> |
| <h3>Field Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> |
| <caption><span>Fields</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Field and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static List<TimeUnit></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="#TIME_UNIT_LIST">TIME_UNIT_LIST</a></span></code> </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colOne" scope="col">Constructor and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="#AmaltheaServices--">AmaltheaServices</a></span>()</code> </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>static Time</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="#addTime-org.eclipse.app4mc.amalthea.model.Time-org.eclipse.app4mc.amalthea.model.Time-">addTime</a></span>(Time t1, |
| Time t2)</code> </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>static Time</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="#adjustTimeUnit-org.eclipse.app4mc.amalthea.model.Time-">adjustTimeUnit</a></span>(Time time)</code> |
| <div class="block">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</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>static int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="#compareDataRates-org.eclipse.app4mc.amalthea.model.DataRate-org.eclipse.app4mc.amalthea.model.DataRate-">compareDataRates</a></span>(DataRate r1, |
| DataRate r2)</code> |
| <div class="block">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)</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>static int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="#compareTimes-org.eclipse.app4mc.amalthea.model.Time-org.eclipse.app4mc.amalthea.model.Time-">compareTimes</a></span>(Time t1, |
| Time t2)</code> |
| <div class="block">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)</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>static BigInteger</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="#convertToBit-org.eclipse.app4mc.amalthea.model.DataSize-">convertToBit</a></span>(DataSize size)</code> </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>static BigInteger</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="#convertToBitPerSecond-org.eclipse.app4mc.amalthea.model.DataRate-">convertToBitPerSecond</a></span>(DataRate rate)</code> </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>static BigDecimal</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="#convertToHertz-org.eclipse.app4mc.amalthea.model.Frequency-">convertToHertz</a></span>(Frequency frequency)</code> </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>static BigDecimal</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="#convertToMicroVolt-org.eclipse.app4mc.amalthea.model.Voltage-">convertToMicroVolt</a></span>(Voltage voltage)</code> </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>static BigInteger</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="#convertToPicoSeconds-org.eclipse.app4mc.amalthea.model.Time-">convertToPicoSeconds</a></span>(Time time)</code> |
| <div class="block">This method is used to convert the value of Time/TimeObject element's value |
| to BigInteger in Pico Seconds</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>static double</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="#divideTime-org.eclipse.app4mc.amalthea.model.Time-org.eclipse.app4mc.amalthea.model.Time-">divideTime</a></span>(Time t1, |
| Time t2)</code> </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>static EList<HwModule></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="#getAllModules-org.eclipse.app4mc.amalthea.model.HwStructure-">getAllModules</a></span>(HwStructure struct)</code> </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>static double</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="#getAverageOfTruncatedNormalDistribution-java.lang.Number-java.lang.Number-double-double-">getAverageOfTruncatedNormalDistribution</a></span>(Number a, |
| Number b, |
| double mean, |
| double sd)</code> |
| <div class="block">Computes the average (mean) of the truncated normal distribution |
| |
| See <a |
| href="https://en.wikipedia.org/wiki/Truncated_normal_distribution" |
| target="_top">Truncated normal distribution (Wikipedia)</a></div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>static Time</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="#getAverageOfTruncatedNormalDistribution-org.eclipse.app4mc.amalthea.model.Time-org.eclipse.app4mc.amalthea.model.Time-org.eclipse.app4mc.amalthea.model.Time-org.eclipse.app4mc.amalthea.model.Time-">getAverageOfTruncatedNormalDistribution</a></span>(Time a, |
| Time b, |
| Time mean, |
| Time sd)</code> |
| <div class="block">Computes the average (mean) of the truncated normal distribution |
| |
| See <a |
| href="https://en.wikipedia.org/wiki/Truncated_normal_distribution" |
| target="_top">Truncated normal distribution (Wikipedia)</a></div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>static <T extends EObject><br>T</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="#getContainerOfType-org.eclipse.emf.ecore.EObject-java.lang.Class-">getContainerOfType</a></span>(EObject object, |
| Class<T> type)</code> </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code>static EList<HwPort></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="#getInnerPorts-org.eclipse.app4mc.amalthea.model.HwStructure-">getInnerPorts</a></span>(HwStructure struct)</code> </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code>static EList<QualifiedPort></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="#getInnerPorts-org.eclipse.app4mc.amalthea.model.ISystem-">getInnerPorts</a></span>(ISystem system)</code> </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code>static Time</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="#multiply-org.eclipse.app4mc.amalthea.model.Time-double-">multiply</a></span>(Time t1, |
| double value)</code> </td> |
| </tr> |
| <tr id="i17" class="rowColor"> |
| <td class="colFirst"><code>static Time</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="#multiply-org.eclipse.app4mc.amalthea.model.Time-long-">multiply</a></span>(Time t1, |
| long value)</code> </td> |
| </tr> |
| <tr id="i18" class="altColor"> |
| <td class="colFirst"><code>static Time</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="#subtractTime-org.eclipse.app4mc.amalthea.model.Time-org.eclipse.app4mc.amalthea.model.Time-">subtractTime</a></span>(Time t1, |
| Time t2)</code> </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class Object</h3> |
| <code>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field.detail"> |
| <!-- --> |
| </a> |
| <h3>Field Detail</h3> |
| <a name="TIME_UNIT_LIST"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>TIME_UNIT_LIST</h4> |
| <pre>public static final List<TimeUnit> TIME_UNIT_LIST</pre> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a name="AmaltheaServices--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>AmaltheaServices</h4> |
| <pre>public AmaltheaServices()</pre> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="getContainerOfType-org.eclipse.emf.ecore.EObject-java.lang.Class-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getContainerOfType</h4> |
| <pre>public static <T extends EObject> T getContainerOfType(EObject object, |
| Class<T> type)</pre> |
| </li> |
| </ul> |
| <a name="convertToBit-org.eclipse.app4mc.amalthea.model.DataSize-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>convertToBit</h4> |
| <pre>public static BigInteger convertToBit(DataSize size)</pre> |
| </li> |
| </ul> |
| <a name="convertToBitPerSecond-org.eclipse.app4mc.amalthea.model.DataRate-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>convertToBitPerSecond</h4> |
| <pre>public static BigInteger convertToBitPerSecond(DataRate rate)</pre> |
| </li> |
| </ul> |
| <a name="convertToPicoSeconds-org.eclipse.app4mc.amalthea.model.Time-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>convertToPicoSeconds</h4> |
| <pre>public static BigInteger convertToPicoSeconds(Time time)</pre> |
| <div class="block">This method is used to convert the value of Time/TimeObject element's value |
| to BigInteger in Pico Seconds</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>time</code> - Time object</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>value BigInteger in Pico Seconds</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="convertToHertz-org.eclipse.app4mc.amalthea.model.Frequency-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>convertToHertz</h4> |
| <pre>public static BigDecimal convertToHertz(Frequency frequency)</pre> |
| </li> |
| </ul> |
| <a name="convertToMicroVolt-org.eclipse.app4mc.amalthea.model.Voltage-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>convertToMicroVolt</h4> |
| <pre>public static BigDecimal convertToMicroVolt(Voltage voltage)</pre> |
| </li> |
| </ul> |
| <a name="compareTimes-org.eclipse.app4mc.amalthea.model.Time-org.eclipse.app4mc.amalthea.model.Time-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>compareTimes</h4> |
| <pre>public static int compareTimes(Time t1, |
| Time t2)</pre> |
| <div class="block">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)</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>t1</code> - Time object</dd> |
| <dd><code>t2</code> - Time object</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>-1 ,0 or 1</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="adjustTimeUnit-org.eclipse.app4mc.amalthea.model.Time-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>adjustTimeUnit</h4> |
| <pre>public static Time adjustTimeUnit(Time time)</pre> |
| <div class="block">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</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>time</code> - </dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>new Time with adjusted value and unit</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="addTime-org.eclipse.app4mc.amalthea.model.Time-org.eclipse.app4mc.amalthea.model.Time-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addTime</h4> |
| <pre>public static Time addTime(Time t1, |
| Time t2)</pre> |
| </li> |
| </ul> |
| <a name="subtractTime-org.eclipse.app4mc.amalthea.model.Time-org.eclipse.app4mc.amalthea.model.Time-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>subtractTime</h4> |
| <pre>public static Time subtractTime(Time t1, |
| Time t2)</pre> |
| </li> |
| </ul> |
| <a name="divideTime-org.eclipse.app4mc.amalthea.model.Time-org.eclipse.app4mc.amalthea.model.Time-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>divideTime</h4> |
| <pre>public static double divideTime(Time t1, |
| Time t2)</pre> |
| </li> |
| </ul> |
| <a name="multiply-org.eclipse.app4mc.amalthea.model.Time-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>multiply</h4> |
| <pre>public static Time multiply(Time t1, |
| long value)</pre> |
| </li> |
| </ul> |
| <a name="multiply-org.eclipse.app4mc.amalthea.model.Time-double-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>multiply</h4> |
| <pre>public static Time multiply(Time t1, |
| double value)</pre> |
| </li> |
| </ul> |
| <a name="getAverageOfTruncatedNormalDistribution-org.eclipse.app4mc.amalthea.model.Time-org.eclipse.app4mc.amalthea.model.Time-org.eclipse.app4mc.amalthea.model.Time-org.eclipse.app4mc.amalthea.model.Time-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getAverageOfTruncatedNormalDistribution</h4> |
| <pre>public static Time getAverageOfTruncatedNormalDistribution(Time a, |
| Time b, |
| Time mean, |
| Time sd)</pre> |
| <div class="block">Computes the average (mean) of the truncated normal distribution |
| |
| <p>See <a |
| href="https://en.wikipedia.org/wiki/Truncated_normal_distribution" |
| target="_top">Truncated normal distribution (Wikipedia)</a></p></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>a</code> - lower bound (null = not truncated from below)</dd> |
| <dd><code>b</code> - upper bound (null = not truncated from above)</dd> |
| <dd><code>mean</code> - mean or expectation of the (unlimited) distribution</dd> |
| <dd><code>sd</code> - standard deviation</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Average of the truncated distribution</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getAverageOfTruncatedNormalDistribution-java.lang.Number-java.lang.Number-double-double-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getAverageOfTruncatedNormalDistribution</h4> |
| <pre>public static double getAverageOfTruncatedNormalDistribution(Number a, |
| Number b, |
| double mean, |
| double sd)</pre> |
| <div class="block">Computes the average (mean) of the truncated normal distribution |
| |
| <p>See <a |
| href="https://en.wikipedia.org/wiki/Truncated_normal_distribution" |
| target="_top">Truncated normal distribution (Wikipedia)</a></p></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>a</code> - lower bound (null = not truncated from below)</dd> |
| <dd><code>b</code> - upper bound (null = not truncated from above)</dd> |
| <dd><code>mean</code> - mean or expectation of the (unlimited) distribution</dd> |
| <dd><code>sd</code> - standard deviation</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Average of the truncated distribution</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="compareDataRates-org.eclipse.app4mc.amalthea.model.DataRate-org.eclipse.app4mc.amalthea.model.DataRate-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>compareDataRates</h4> |
| <pre>public static int compareDataRates(DataRate r1, |
| DataRate r2)</pre> |
| <div class="block">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)</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>r1</code> - DataRate object</dd> |
| <dd><code>r2</code> - DataRate object</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>-1 ,0 or 1</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getInnerPorts-org.eclipse.app4mc.amalthea.model.ISystem-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getInnerPorts</h4> |
| <pre>public static EList<QualifiedPort> getInnerPorts(ISystem system)</pre> |
| </li> |
| </ul> |
| <a name="getInnerPorts-org.eclipse.app4mc.amalthea.model.HwStructure-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getInnerPorts</h4> |
| <pre>public static EList<HwPort> getInnerPorts(HwStructure struct)</pre> |
| </li> |
| </ul> |
| <a name="getAllModules-org.eclipse.app4mc.amalthea.model.HwStructure-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>getAllModules</h4> |
| <pre>public static EList<HwModule> getAllModules(HwStructure struct)</pre> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| </body> |
| </html> |