public class ResourceModel
extends java.lang.Object
Resource Model characterize a partitioned resource that guarantees allocations of �� time units every �� time units. If we can abstract component as a single task with execution time �� and period ��, we can transform it to a resource model with ( �� , �� )
Modifier and Type | Field and Description |
---|---|
int |
cpus |
static int |
DPRM |
static int |
EQV |
EqvPrmModel |
eqvRes |
int |
exec2 |
IntPRM |
initRes |
static int |
MPR |
java.lang.String |
notes |
int |
period2 |
static int |
PRM |
int |
type |
Constructor and Description |
---|
ResourceModel(double period,
double bandwidth,
double deadline)
Resource Model Constructor, set period, bandwidth, and deadline
|
Modifier and Type | Method and Description |
---|---|
double |
computeLowerSBF(double time) |
double |
computeLSBF(double time)
It compute Lower Supply Bound Function of resource model (for schedulability test)
|
double |
computeSBF_Arinc(double time) |
int |
computeSBF_DPRM(int t) |
double |
computeSBF(double time)
It compute Supply Bound Function of resource model
|
double |
getBandwidth()
Return bandwidth of resource model
|
double |
getDeadline()
Return deadline of resource model
|
double |
getPeriod()
Return period of resource model
|
java.lang.String |
getResult()
It write debug message to string by calling toString()
|
void |
print()
It write debug message to command line
|
void |
printDPRM()
It write debug message to command line
|
void |
printFile(java.io.PrintStream out)
It write debug message to file
|
void |
setEqvRes(EqvPrmModel eqvRes) |
void |
setInitRes(IntPRM initRes) |
java.lang.String |
toString()
It write debug message to string
|
public int period2
public int exec2
public int cpus
public int type
public java.lang.String notes
public static final int PRM
public static final int DPRM
public static final int MPR
public static final int EQV
public IntPRM initRes
public EqvPrmModel eqvRes
public ResourceModel(double period, double bandwidth, double deadline)
period
- period of resource modelbandwidth
- bandwidth of resource modeldeadline
- deadline of resource modelpublic void setInitRes(IntPRM initRes)
public void setEqvRes(EqvPrmModel eqvRes)
public double getPeriod()
public double getBandwidth()
public double getDeadline()
public double computeSBF(double time)
time
- given timepublic double computeLowerSBF(double time)
public double computeLSBF(double time)
time
- given timepublic void printDPRM()
public void print()
public void printFile(java.io.PrintStream out)
out
- file's outputsteampublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getResult()
public double computeSBF_Arinc(double time)
public int computeSBF_DPRM(int t)