|
|||||||||
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
This is the root class for all Siena gauges. It creates a default Siena gauge bus, and has default implementations for managing deletion and creation of the gauges.
Field Summary | |
protected GaugeReportingBus |
gaugeBus
The bus to report to. |
protected StringPairVector |
mappings
The mappings of this gauge. |
java.lang.String |
myManagerID
The ID of the gauge manager controlling this gauge. |
protected StringPairVector |
setupParams
The parameters used to setup this gauge. |
Constructor Summary | |
SienaGauge(GaugeID gaugeID,
java.lang.String creatorID,
StringPairVector setupParams,
StringPairVector mappings)
Creates new SienaGauge. |
|
SienaGauge(java.lang.String modelName,
java.lang.String modelType,
java.lang.String gaugeName,
java.lang.String gaugeType,
java.lang.String creatorID)
Creates new SienaGauge. |
Method Summary | |
abstract boolean |
configure(StringPairVector configParams)
The method called when configuring a gauge. |
void |
finalizeCreation(java.lang.String gaugeMgrID,
boolean successful)
Finalizes the creation of the gauge. |
void |
finalizeDeletion(java.lang.String gaugeMgrID)
Implements the deletion process for gauges. |
GaugeID |
getGaugeID()
Each gauge implementation must have an ID |
void |
processDelete(java.lang.String gaugeMgrID)
Processes a delete message from the gauge manager. |
abstract boolean |
queryAllValues(GaugeValueVector values)
Returns all the gauge values that the gauge reports. |
abstract boolean |
queryState(StringPairVector setupParams,
StringPairVector configParams,
StringPairVector mappings)
The method called to query the state of the gauge |
abstract java.lang.String |
queryValue(java.lang.String valueName)
Called when a gauge is queried for a value. |
void |
setGaugeID(GaugeID gid)
Sets the gauge ID for this gauge. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected GaugeReportingBus gaugeBus
public java.lang.String myManagerID
protected StringPairVector setupParams
protected StringPairVector mappings
Constructor Detail |
public SienaGauge(java.lang.String modelName, java.lang.String modelType, java.lang.String gaugeName, java.lang.String gaugeType, java.lang.String creatorID)
gaugeType
- The type of the gauge to be created.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 gaugecreatorID
- The gauge manager that created the gaugesetupParams
- The setup parameters used to create the gaugemappings
- The mappings for values to high-level propertiesMethod Detail |
public void processDelete(java.lang.String gaugeMgrID)
gaugeMgrID
- The ID of the gauge manager requesting deletion.public void finalizeDeletion(java.lang.String gaugeMgrID)
gaugeMgrID
- The ID of the gauge manager requesting deletion.public void finalizeCreation(java.lang.String gaugeMgrID, boolean successful)
gaugeMgrID
- The ID of the gauge manager that attempted to create the gauge.successful
- Whether the creation was successful.public abstract boolean configure(StringPairVector configParams)
configure
in interface GaugeControl
configParams
- The configuration parameters for the gauge as (name, value) pairs.public GaugeID getGaugeID()
getGaugeID
in interface GaugeControl
public void setGaugeID(GaugeID gid)
gid
- The ID of the gauge.public abstract boolean queryAllValues(GaugeValueVector values)
queryAllValues
in interface GaugeControl
values
- This is filled with all the values as a (valueName, propertyName, value) tuplepublic abstract boolean queryState(StringPairVector setupParams, StringPairVector configParams, StringPairVector mappings)
queryState
in interface GaugeControl
setupParams
- Will be filled with the parameters with which the gauge was setup, as (name, value) pairs.configParams
- Will be filled with the current configuration of the gauge, as (name, value) pairsmappings
- Will be filled with the mappings for the gauge, as (name, propertyName) pairs.public abstract java.lang.String queryValue(java.lang.String valueName)
queryValue
in interface GaugeControl
valueName
- The name of the value to be queried.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |