multimedia.generation
Class AggregateOnOffFlowGeneration

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

public class AggregateOnOffFlowGeneration
extends GenericGeneration
implements AudioCodecExample


Field Summary
protected  multimedia.generation.AggregateOnOffFlowGeneration.AggregateOnOffFlows[] aof
           
protected  java.lang.String fileName
           
protected  java.io.File[] flowsFile
           
protected  java.lang.String[] fN
           
protected  int nbDifferentFlow
           
protected  OnOffHeterogeneousAggregatedFlowsModel onoffAggregation
           
protected  double realRate
           
protected  java.lang.String serverName
           
protected  int[] serverPort
           
protected  java.lang.String testName
           
protected  java.util.TreeMap[] tM
           
protected  java.util.SortedMap tS
           
protected  short unit
           
 
Fields inherited from class multimedia.generation.GenericGeneration
fichierReq, graphic, resultFile, tpsSimul
 
Fields inherited from interface multimedia.codec.AudioCodecExample
G711, G723_1, G726, G728, G729
 
Fields inherited from interface utils.definitions.MyUnitDefinitions
BYTES, GIGABYTES, KILOBYTES, MEGABYTES
 
Fields inherited from interface utils.definitions.MyFormatterDefinitions
myDebitFormatter, myIAFormatter, mySizeFormatter, myTimeFormatter
 
Constructor Summary
AggregateOnOffFlowGeneration(int tpsSimul, OnOffHeterogeneousAggregatedFlowsModel ooha, java.lang.String serverName, int serverPort)
          AggregateOnOffFlowGeneration
AggregateOnOffFlowGeneration(int tpsSimul, OnOffHeterogeneousAggregatedFlowsModel ooha, java.lang.String serverName, int serverPort, java.lang.String fichierReq, boolean graphic)
          To specify in addition a scenario file name and if you use a GUI
AggregateOnOffFlowGeneration(int tpsSimul, OnOffHeterogeneousAggregatedFlowsModel 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 AggregateOnOffFlowGeneration object And a scenario file per flow type => + nbDifferentFlow scenarii
 void aggregatedScenarioGeneration(int serverPort)
          To generate an aggregated scenario with statistics informations from an AggregateOnOffFlowGeneration 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 flowScenariiGeneration(java.lang.String serverName)
          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 getNbDifferentFlow()
          Returns the number of source defined for the test
 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
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()
          To compute an aggregated scenario from generation of each scenario Create a file format as follow:
Inter-packet time(in ms) /t size
 void scenarioGeneration(java.lang.String serverName, int portNumber)
          To compute final scenario with some informations which is the aggregation of each scenarii pre-calculated 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
protected  double scenarioGenericGeneration(boolean playable, java.lang.String serverName, int portNumber)
          Creates either a playable scenario file or an informative one.
protected  void setPortNumber(int[] serverPort)
           
 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
 java.lang.String toString()
          Method toString()
 
Methods inherited from class multimedia.generation.GenericGeneration
changeScenarioFileExtension, getDuration, getGeneratedPacketNumber, getGraphicMode, getResultFileName, getResultFileSize, getUnit, getUnit, setDuration, setGraphicMode, setResultFile, setUnit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

flowsFile

protected java.io.File[] flowsFile

onoffAggregation

protected OnOffHeterogeneousAggregatedFlowsModel onoffAggregation

fN

protected java.lang.String[] fN

tS

protected java.util.SortedMap tS

aof

protected multimedia.generation.AggregateOnOffFlowGeneration.AggregateOnOffFlows[] aof

tM

protected java.util.TreeMap[] tM

nbDifferentFlow

protected int nbDifferentFlow

realRate

protected double realRate

serverName

protected java.lang.String serverName

serverPort

protected int[] serverPort

fileName

protected java.lang.String fileName

unit

protected short unit

testName

protected java.lang.String testName
Constructor Detail

AggregateOnOffFlowGeneration

public AggregateOnOffFlowGeneration(int tpsSimul,
                                    OnOffHeterogeneousAggregatedFlowsModel ooha,
                                    java.lang.String serverName,
                                    int serverPort)
                             throws java.io.IOException
AggregateOnOffFlowGeneration

Parameters:
tpsSimul - test duration in minutes
ooha - define an Heterogeneous On-Off Flows Aggregation
serverName - define the name of the server which will play the scenario
serverPort - define the port number

AggregateOnOffFlowGeneration

public AggregateOnOffFlowGeneration(int tpsSimul,
                                    OnOffHeterogeneousAggregatedFlowsModel ooha,
                                    java.lang.String serverName,
                                    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
serverName - define the name of the server which will play the scenario
serverPort - define the port number
fichierReq - scenario file name
graphic - To choose a graphical mode or not

AggregateOnOffFlowGeneration

public AggregateOnOffFlowGeneration(int tpsSimul,
                                    OnOffHeterogeneousAggregatedFlowsModel 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
serverName - define the name of the server which will play the scenario
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 AggregateOnOffFlowGeneration 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 AggregateOnOffFlowGeneration 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

flowScenariiGeneration

public double flowScenariiGeneration(java.lang.String serverName)
                              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

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

scenarioGeneration

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

Specified by:
scenarioGeneration in class GenericGeneration
java.io.IOException

scenarioGeneration

public void scenarioGeneration(java.lang.String serverName,
                               int portNumber)
                        throws java.io.IOException
To compute final scenario with some informations which is the aggregation of each scenarii pre-calculated 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

Specified by:
scenarioGeneration in class GenericGeneration
Parameters:
serverName -
portNumber -
java.io.IOException

scenarioGenericGeneration

protected double scenarioGenericGeneration(boolean playable,
                                           java.lang.String serverName,
                                           int portNumber)
                                    throws java.io.IOException
Description copied from class: GenericGeneration
Creates either a playable scenario file or an informative one.

Specified by:
scenarioGenericGeneration in class GenericGeneration
Parameters:
playable - a boolean : true, to create a playable file
serverName - serverName gives the server name
portNumber - serverPort gives the number port
Returns:
average throughput in Bytes/s
Throws:
java.io.IOException
See Also:
GenericGeneration.scenarioGenericGeneration(boolean, java.lang.String, int)

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

setPortNumber

protected void setPortNumber(int[] serverPort)

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

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

getNbDifferentFlow

public int getNbDifferentFlow()
Returns the number of source defined for the test

Returns:
the number of On-Off Heterogeneous Flows

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()
Method toString()

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