|
DRCL J-Sim API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectdrcl.comp.Contract
drcl.inet.sensorsim.BatteryContract
This class implements the contract between the battery model and the CPU and radio models.
| Nested Class Summary | |
static class |
BatteryContract.Message
This class implements the underlying message of the contract. |
| Field Summary | |
static int |
GET_REMAINING_ENERGY
|
static BatteryContract |
INSTANCE
|
static int |
SET_CONSUMER_CURRENT
|
| Fields inherited from class drcl.comp.Contract |
Role_INITIATOR, Role_PEER, Role_REACTOR |
| Constructor Summary | |
BatteryContract()
|
|
BatteryContract(int role_)
|
|
| Method Summary | |
static java.lang.Object |
createGetRemainingEnergyRequest()
Builds the message that is used to get the remaining energy. |
static java.lang.Object |
createSetConsumerCurrentRequest(int consumer_id,
double current)
Builds the message that is used to report the consumed current. |
java.lang.Object |
getContractContent()
Returns the content of this contract (format?). |
java.lang.String |
getName()
|
static double |
getRemainingEnergy(Port out_)
Gets the remaining energy. |
static void |
setConsumerCurrent(int consumer_id,
double current,
Port out_)
Reports the current consumed by a power consumer. |
| Methods inherited from class drcl.comp.Contract |
getRole, match, setRole |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final BatteryContract INSTANCE
public static final int GET_REMAINING_ENERGY
public static final int SET_CONSUMER_CURRENT
| Constructor Detail |
public BatteryContract()
public BatteryContract(int role_)
| Method Detail |
public java.lang.String getName()
getName in class Contractpublic java.lang.Object getContractContent()
Contract
getContractContent in class Contract
public static void setConsumerCurrent(int consumer_id,
double current,
Port out_)
public static java.lang.Object createSetConsumerCurrentRequest(int consumer_id,
double current)
public static double getRemainingEnergy(Port out_)
public static java.lang.Object createGetRemainingEnergyRequest()
|
DRCL J-Sim API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||