multimedia.generation
Class OnOffHeterogeneousAggregatedFlowGeneration

java.lang.Object
  |
  +--multimedia.generation.GenericGeneration
        |
        +--multimedia.generation.OnOffHeterogeneousAggregatedFlowGeneration
All Implemented Interfaces:
AudioCodecExample, multimedia.codec.AudioCodecRTPIP, MyUnitDefinitions

public class OnOffHeterogeneousAggregatedFlowGeneration
extends GenericGeneration
implements AudioCodecExample


Field Summary
 
Fields inherited from class multimedia.generation.GenericGeneration
fileName
 
Fields inherited from interface multimedia.codec.AudioCodecExample
G711, G723_1, G726, G728, G729
 
Fields inherited from interface utils.definitions.MyUnitDefinitions
BYTES, GIGABYTES, KILOBYTES, MEGABYTES
 
Constructor Summary
OnOffHeterogeneousAggregatedFlowGeneration()
           
OnOffHeterogeneousAggregatedFlowGeneration(int tpsSimul, OnOffHeterogeneousAggregatedFlowModel ooha, int serverPort)
          OnOffHeterogeneousAggregatedFlowGeneration
OnOffHeterogeneousAggregatedFlowGeneration(int tpsSimul, OnOffHeterogeneousAggregatedFlowModel ooha, int serverPort, java.lang.String fichierReq, boolean graphic)
          To specify in addition a scenario file name and if you use a GUI
OnOffHeterogeneousAggregatedFlowGeneration(int tpsSimul, OnOffHeterogeneousAggregatedFlowModel ooha, java.lang.String fichierReq, java.lang.String serverName, int[] serverPort, boolean graphic)
          To specify a specific port number for each flow type
 
Method Summary
 void aggregatedScenarioGeneration()
          To generate an aggregated scenario from an OnOffHeterogeneousAggregatedFlowGeneration object And a scenario file per flow type => + nbDifferentFlow scenarii
 void aggregatedScenarioGeneration(int serverPort)
          To generate an aggregated scenario with statistics informations from an OnOffHeterogeneousAggregatedFlowGeneration object And an informative scenario file per flow type => + nbDifferentFlow scenarii
 double flowScenariiGeneration()
          To determine scenarii of each source type which could be used by the generator Create a file format as follow:
Inter-packet time /t packet size
 double flowStatisticsGeneration()
          To compute scenario of each source type with some informations It generates as much scenario as it's necessary Create a file format as follow:
day date : servername
modelName IAmoy : tpsIP_codec numero de port : number packet size :size bytes
date: t + testTime s, IA : interpacketIime : 0.000000 s
 java.lang.String getDocumentNames()
          Returns a String which discribes the different flows as: model name or document name(if it exists) (source number)
 int getFlowTypeNumber()
          Returns the number of flow defined for the test
 OnOffHeterogeneousAggregatedFlowModel getModel()
           
 int getPort(int idx)
          Returns the port value which corresponds to the specified flow
 java.lang.String getResultFileName(int idx)
          Method getResultFileName
 double getTheoriticalAggregatedFlowRate()
          Returns throughput of aggregatedFlow in kb/s
 double getTheoriticalTransmittedDataAmount()
          Returns theoritical transmitted data amount during the generation phase in MB
 void initializedSortedMap()
           
static void main(java.lang.String[] args)
          Methode: Main pour tester la classe
 double meanRate()
          To compute mean of generated packet number per second <=> theoretical throughput mean = sum( meani ) where i=1..nbDifferentFlow
 void scenarioGeneration(java.lang.String fileName)
          To compute an aggregated scenario from generation of each scenario WARNING: This create only one file Create a file format as follow:
Inter-packet time(in ms) /t size
 void setFlowTypeNumber(int nbDifferentFlow)
           
 void setModel(OnOffHeterogeneousAggregatedFlowModel model)
           
 void setPortNumber(int idx, int serverPort)
          To set the port value for each flow if idx=-1 it means that all values will be the same : serverPort
 void statisticsGeneration()
          To compute final scenario (with some informations) which is the aggregation of each scenarii pre-calculated WARNING: This create only one file Create a file format as follow:
day date : servername
characteristic of the flow \t theoritical throughput : value
date (in seconds) \t Inter-Packet Time(in milliseconds) \t numero de port

date : date s /t IA : Inter-packet time ms /t packet size : size Bytes
 java.lang.String toString()
          Returns a description: "Aggregation of " + nbDifferentFlow + " On-Off homogeneous sources : " + model.getTypeSrcsNumbers()
 
Methods inherited from class multimedia.generation.GenericGeneration
changeScenarioFileExtension, getDuration, getGeneratedPacketNumber, getGraphicMode, getResultFileName, getResultFilePath, getResultFileSize, getSourceNumber, getUnit, getUnit, scenarioGeneration, setDuration, setGraphicMode, setResultFileName, setSourceNumber, setUnit
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OnOffHeterogeneousAggregatedFlowGeneration

public OnOffHeterogeneousAggregatedFlowGeneration()

OnOffHeterogeneousAggregatedFlowGeneration

public OnOffHeterogeneousAggregatedFlowGeneration(int tpsSimul,
                                                  OnOffHeterogeneousAggregatedFlowModel ooha,
                                                  int serverPort)
                                           throws java.io.IOException
OnOffHeterogeneousAggregatedFlowGeneration

Parameters:
tpsSimul - test duration in minutes
ooha - define an Heterogeneous On-Off Flows Aggregation
serverPort - define the port number

OnOffHeterogeneousAggregatedFlowGeneration

public OnOffHeterogeneousAggregatedFlowGeneration(int tpsSimul,
                                                  OnOffHeterogeneousAggregatedFlowModel ooha,
                                                  int serverPort,
                                                  java.lang.String fichierReq,
                                                  boolean graphic)
                                           throws java.io.IOException
To specify in addition a scenario file name and if you use a GUI

Parameters:
tpsSimul - test duration in minutes
ooha - define an Heterogeneous On-Off Flows Aggregation
serverPort - define the port number
fichierReq - scenario file name
graphic - To choose a graphical mode or not

OnOffHeterogeneousAggregatedFlowGeneration

public OnOffHeterogeneousAggregatedFlowGeneration(int tpsSimul,
                                                  OnOffHeterogeneousAggregatedFlowModel ooha,
                                                  java.lang.String fichierReq,
                                                  java.lang.String serverName,
                                                  int[] serverPort,
                                                  boolean graphic)
                                           throws java.io.IOException
To specify a specific port number for each flow type

Parameters:
tpsSimul - test duration in minutes
ooha - define an Heterogeneous On-Off Flows Aggregation
fichierReq - define the name of result file
serverPort - define the port number
graphic - determines if it will be used in a graphic environnement
Method Detail

aggregatedScenarioGeneration

public void aggregatedScenarioGeneration()
                                  throws java.io.IOException
To generate an aggregated scenario from an OnOffHeterogeneousAggregatedFlowGeneration object And a scenario file per flow type => + nbDifferentFlow scenarii

Throws:
java.io.IOException

aggregatedScenarioGeneration

public void aggregatedScenarioGeneration(int serverPort)
                                  throws java.io.IOException
To generate an aggregated scenario with statistics informations from an OnOffHeterogeneousAggregatedFlowGeneration object And an informative scenario file per flow type => + nbDifferentFlow scenarii

Parameters:
serverPort - to specify on which port it will be played
Throws:
java.io.IOException

flowScenariiGeneration

public double flowScenariiGeneration()
                              throws java.io.IOException
To determine scenarii of each source type which could be used by the generator Create a file format as follow:
Inter-packet time /t packet size

java.io.IOException

flowStatisticsGeneration

public double flowStatisticsGeneration()
                                throws java.io.IOException
To compute scenario of each source type with some informations It generates as much scenario as it's necessary Create a file format as follow:
day date : servername
modelName IAmoy : tpsIP_codec numero de port : number packet size :size bytes
date: t + testTime s, IA : interpacketIime : 0.000000 s

Returns:
the real throughput WARNING; we don't know unit
java.io.IOException

scenarioGeneration

public void scenarioGeneration(java.lang.String fileName)
                        throws java.io.IOException
To compute an aggregated scenario from generation of each scenario WARNING: This create only one file Create a file format as follow:
Inter-packet time(in ms) /t size

java.io.IOException

statisticsGeneration

public void statisticsGeneration()
                          throws java.io.IOException
To compute final scenario (with some informations) which is the aggregation of each scenarii pre-calculated WARNING: This create only one file Create a file format as follow:
day date : servername
characteristic of the flow \t theoritical throughput : value
date (in seconds) \t Inter-Packet Time(in milliseconds) \t numero de port

date : date s /t IA : Inter-packet time ms /t packet size : size Bytes

Overrides:
statisticsGeneration in class GenericGeneration
java.io.IOException
See Also:
GenericGeneration.scenarioGeneration()

setPortNumber

public void setPortNumber(int idx,
                          int serverPort)
To set the port value for each flow if idx=-1 it means that all values will be the same : serverPort

Parameters:
idx - specify the port number
serverPort - the value

initializedSortedMap

public void initializedSortedMap()

getPort

public int getPort(int idx)
Returns the port value which corresponds to the specified flow

Parameters:
idx - specify the port number between 0 and nbDifferentFlow-1
Returns:
the port value

getModel

public OnOffHeterogeneousAggregatedFlowModel getModel()

setModel

public void setModel(OnOffHeterogeneousAggregatedFlowModel model)

meanRate

public double meanRate()
To compute mean of generated packet number per second <=> theoretical throughput mean = sum( meani ) where i=1..nbDifferentFlow

Returns:
mean rate in kb/s

getTheoriticalAggregatedFlowRate

public double getTheoriticalAggregatedFlowRate()
                                        throws java.io.IOException
Returns throughput of aggregatedFlow in kb/s

Returns:
a double : this value is tranform to obtain a throughput in kb/s
java.io.IOException

getTheoriticalTransmittedDataAmount

public double getTheoriticalTransmittedDataAmount()
                                           throws java.io.IOException
Returns theoritical transmitted data amount during the generation phase in MB

Returns:
a double : this value is tranform to obtain an amount in MB
java.io.IOException

getFlowTypeNumber

public int getFlowTypeNumber()
Returns the number of flow defined for the test

Returns:
the number of "On-Off Homogeneous" Flows

setFlowTypeNumber

public void setFlowTypeNumber(int nbDifferentFlow)

getResultFileName

public java.lang.String getResultFileName(int idx)
Method getResultFileName

Parameters:
idx - specify the file number : idx = -1 => For an aggregated scenario file, idx =0...N it's to get a specific flow scenario file
Returns:
the file path

toString

public java.lang.String toString()
Returns a description: "Aggregation of " + nbDifferentFlow + " On-Off homogeneous sources : " + model.getTypeSrcsNumbers()

Overrides:
toString in class java.lang.Object
Returns:
characteristic of the Aggregate Flow

getDocumentNames

public java.lang.String getDocumentNames()
Returns a String which discribes the different flows as: model name or document name(if it exists) (source number)

Returns:
a string = testName

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
Methode: Main pour tester la classe

java.io.IOException