|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.cmu.cs.able.gaugeInfrastructure.Siena.SienaGauge
Field Summary | |
protected boolean |
doReporting
Indicates whether the reporting thread should report values. |
protected GaugeReportingBus |
gaugeBus
The bus to report to. |
protected java.lang.String |
gaugeType
The type of the gauge (should be overridden by extending gauges) |
protected java.util.Hashtable |
mappings
The mappings of values to properties. |
protected java.lang.String |
myManagerID
The ID of the gauge manager controlling this gauge. |
protected StringPairVector |
setupParams
The parameters used to setup the gauge. |
protected int |
sleepTime
How long (milliseconds) to sleep before reporting another value. |
Constructor Summary | |
SienaGauge(GaugeID gaugeID,
java.lang.String creatorID,
StringPairVector setupParams,
StringPairVector mappings)
Creates a new gauge if all information is known. |
|
SienaGauge(java.lang.String modelName,
java.lang.String modelType,
java.lang.String gaugeName,
java.lang.String creatorID)
Creates new SienaGauge |
Method Summary | |
boolean |
configure(StringPairVector configParams)
Configures the gauge. |
void |
finalizeCreation(java.lang.String gaugeMgrID,
boolean successful)
|
protected void |
finalizeDeletion(java.lang.String gaugeMgrID)
|
GaugeID |
getGaugeID()
Returns the gauge ID of this gauge. |
void |
processDelete(java.lang.String gaugeMgrID)
Processes a delete message from the gauge manager. |
boolean |
queryAllValues(GaugeValueVector values)
Returns all the values that this gauge reports. |
boolean |
queryState(StringPairVector setupParams,
StringPairVector configParams,
StringPairVector mappings)
Returns the state of this gauge. |
java.lang.String |
queryValue(java.lang.String valueName)
Returns the value of a particular value name |
void |
reportNewValue()
Reports a new value. |
void |
run()
This is the reporting thread. |
void |
setGaugeID(GaugeID id)
Sets the GaugeID of this gauge. |
void |
start()
Creates and starts the reporting thread. |
void |
stop()
Stops gauge reporting. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected GaugeReportingBus gaugeBus
protected java.lang.String gaugeType
protected java.lang.String myManagerID
protected boolean doReporting
protected int sleepTime
protected StringPairVector setupParams
protected java.util.Hashtable mappings
Constructor Detail |
public SienaGauge(java.lang.String modelName, java.lang.String modelType, java.lang.String gaugeName, java.lang.String creatorID)
modelName
- The name of the model that the gauge is attached to.modelType
- The type of the model that the gauge is attached to.gaugeName
- The name of the new gauge.creatorID
- The gauge manager that created the gauge.public SienaGauge(GaugeID gaugeID, java.lang.String creatorID, StringPairVector setupParams, StringPairVector mappings)
gaugeID
- The ID of the new gauge.creatorID
- The ID of the gauge manager creating the gauge.setupParams
- The parameters with which to setup the gauge.mappings
- The value->property mappings within the model the gauge is attached to.Method Detail |
public void start()
public void run()
run
in interface java.lang.Runnable
public void stop()
public GaugeID getGaugeID()
getGaugeID
in interface GaugeControl
public void setGaugeID(GaugeID id)
public void reportNewValue()
public boolean configure(StringPairVector configParams)
configure
in interface GaugeControl
configParams
- The configuration parameters for this gauge.public boolean queryAllValues(GaugeValueVector values)
queryAllValues
in interface GaugeControl
values
- public boolean queryState(StringPairVector setupParams, StringPairVector configParams, StringPairVector mappings)
queryState
in interface GaugeControl
setupParams
- configParams
- mappings
- public java.lang.String queryValue(java.lang.String valueName)
queryValue
in interface GaugeControl
valueName
- public void processDelete(java.lang.String gaugeMgrID)
gaugeMgrID
- The ID of the gauge manager requesting deletion.protected void finalizeDeletion(java.lang.String gaugeMgrID)
public void finalizeCreation(java.lang.String gaugeMgrID, boolean successful)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |