edu.cmu.cs.able.gauges.Siena
Class SienaBandwidthGauge

java.lang.Object
  |
  +--edu.cmu.cs.able.gaugeInfrastructure.Siena.SienaGauge
        |
        +--edu.cmu.cs.able.gauges.Siena.SienaBandwidthGauge
All Implemented Interfaces:
edu.cmu.cs.able.gaugeInfrastructure.GaugeControl

public class SienaBandwidthGauge
extends edu.cmu.cs.able.gaugeInfrastructure.Siena.SienaGauge

This class implements a BandwidthGauge, and uses RemosProbes to determine the current bandwidth. It is assumed that a RemosProbe is listening on the siena bus. The gauge type for this gauge is:
BandwidthGauge = [
  type = edu.cmu.cs.able.gauges.Siena.SienaBandwidthGauge
  setup = [IP_addr1 : String = "localhost"; IP_addr2 = "localhost"; Frequency : long = 100]
  config = [Frequency : long = 100]
  values = [bandwidth : float]


Field Summary
protected  java.lang.String gaugeType
          The type of the BandwidthGauge (edu.cmu.cs.able.gauges.Siena.SienaBandwidthGauge)
protected static java.lang.String probeBus
           
 
Fields inherited from class edu.cmu.cs.able.gaugeInfrastructure.Siena.SienaGauge
gaugeBus, mappings, myManagerID, setupParams
 
Constructor Summary
SienaBandwidthGauge(edu.cmu.cs.able.gaugeInfrastructure.util.GaugeID gaugeID, java.lang.String creatorID, edu.cmu.cs.able.gaugeInfrastructure.util.StringPairVector setupParams, edu.cmu.cs.able.gaugeInfrastructure.util.StringPairVector mappings)
          Creates new SienaBandwidthGauge
 
Method Summary
 boolean configure(edu.cmu.cs.able.gaugeInfrastructure.util.StringPairVector configParams)
          Configures the gauge.
static void main(java.lang.String[] args)
          A command-line interface to start the gauge.
 boolean queryAllValues(edu.cmu.cs.able.gaugeInfrastructure.util.GaugeValueVector values)
          Returns all the values that this gauge reports.
 boolean queryState(edu.cmu.cs.able.gaugeInfrastructure.util.StringPairVector setupParams, edu.cmu.cs.able.gaugeInfrastructure.util.StringPairVector configParams, edu.cmu.cs.able.gaugeInfrastructure.util.StringPairVector mappings)
          Returns the state of this gauge.
 java.lang.String queryValue(java.lang.String valueName)
          Returns the value of a particular value name
 
Methods inherited from class edu.cmu.cs.able.gaugeInfrastructure.Siena.SienaGauge
finalizeCreation, finalizeDeletion, getGaugeID, processDelete, setGaugeID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

gaugeType

protected java.lang.String gaugeType
The type of the BandwidthGauge (edu.cmu.cs.able.gauges.Siena.SienaBandwidthGauge)

probeBus

protected static java.lang.String probeBus
Constructor Detail

SienaBandwidthGauge

public SienaBandwidthGauge(edu.cmu.cs.able.gaugeInfrastructure.util.GaugeID gaugeID,
                           java.lang.String creatorID,
                           edu.cmu.cs.able.gaugeInfrastructure.util.StringPairVector setupParams,
                           edu.cmu.cs.able.gaugeInfrastructure.util.StringPairVector mappings)
Creates new SienaBandwidthGauge
Parameters:
gaugeID - The ID of the gauge to create.
creatorID - The ID of the gauge manager that is creating the gauge.
setupParams - The value of the setup params, with items for IP_addr1, IP_addr2, and Frequency.
mappings - The definition of the mapping between the bandwidth value and a model.
Method Detail

configure

public boolean configure(edu.cmu.cs.able.gaugeInfrastructure.util.StringPairVector configParams)
Configures the gauge.
Overrides:
configure in class edu.cmu.cs.able.gaugeInfrastructure.Siena.SienaGauge
Parameters:
configParams - The configuration parameters for this gauge.
Returns:
 

queryAllValues

public boolean queryAllValues(edu.cmu.cs.able.gaugeInfrastructure.util.GaugeValueVector values)
Returns all the values that this gauge reports.
Overrides:
queryAllValues in class edu.cmu.cs.able.gaugeInfrastructure.Siena.SienaGauge
Parameters:
values - Filled with an entry for bandwidth, with the value of the currentBW.
Returns:
 

queryState

public boolean queryState(edu.cmu.cs.able.gaugeInfrastructure.util.StringPairVector setupParams,
                          edu.cmu.cs.able.gaugeInfrastructure.util.StringPairVector configParams,
                          edu.cmu.cs.able.gaugeInfrastructure.util.StringPairVector mappings)
Returns the state of this gauge.
Overrides:
queryState in class edu.cmu.cs.able.gaugeInfrastructure.Siena.SienaGauge
Parameters:
setupParams - The parameters that the gauge was setup with.
configParams - The current configuration of the gauge.
mappings - The current mappings of the gauge.
Returns:
 

queryValue

public java.lang.String queryValue(java.lang.String valueName)
Returns the value of a particular value name
Overrides:
queryValue in class edu.cmu.cs.able.gaugeInfrastructure.Siena.SienaGauge
Parameters:
valueName - The name of the value to return.
Returns:
The gauge value

main

public static void main(java.lang.String[] args)
A command-line interface to start the gauge.
Parameters:
args - -gt gauge type
-gn gauge name
-mt model type
-mn model name
[-setup name=value]
[-mappings name=property]
-creator creator ID
-senp siena port
[-debug]