multimedia.generation
Class MGInfAggregatedFlowGeneration

java.lang.Object
  |
  +--multimedia.generation.GenericGeneration
        |
        +--multimedia.generation.MGInfAggregatedFlowGeneration
All Implemented Interfaces:
AudioCodecExample, multimedia.codec.AudioCodecRTPIP, multimedia.MovieExample, MyUnitDefinitions, RandomGenerator, multimedia.codec.VideoCodecEurope, VideoCodecExample, VideoExample
Direct Known Subclasses:
MGInfComplexAggregatedFlowGeneration

public class MGInfAggregatedFlowGeneration
extends GenericGeneration
implements RandomGenerator, AudioCodecExample, VideoExample, VideoCodecExample


Field Summary
 
Fields inherited from class multimedia.generation.GenericGeneration
fileName
 
Fields inherited from interface statistic.RandomGenerator
random
 
Fields inherited from interface multimedia.codec.AudioCodecExample
G711, G723_1, G726, G728, G729
 
Fields inherited from interface multimedia.VideoExample
BeanHigh, BeanLow, BeanMedium, coeffDistbh, coeffDistbm, coeffDistjph, coeffDistjpm, coeffFuncbh, coeffFuncbl, coeffFuncbm, coeffFuncjph, coeffFuncjpl, coeffFuncjpm, dbh, dbm, djph, djpm, dPacketSize, dSlot, gdbh, gdbm, gdjph, gdjpm, gfbh, gfjpl, gftbh, gftbl, gftbm, gftjph, gftjpl, gftjpm, JurassicParkHigh, JurassicParkLow, JurassicParkMedium, mginfbh, mginfbl, mginfbm, mginfjph, mginfjpl, mginfjpm
 
Fields inherited from interface multimedia.codec.VideoCodecExample
H261, MJPEG, MPEG, MPEG4
 
Fields inherited from interface utils.definitions.MyUnitDefinitions
BYTES, GIGABYTES, KILOBYTES, MEGABYTES
 
Constructor Summary
MGInfAggregatedFlowGeneration()
           
MGInfAggregatedFlowGeneration(MGInfAggregatedFlowModel model, VideoCodec[] codecs, int[] flowsDuration, int[] startingTime, short[] units, java.lang.String fileName, boolean graphic)
           
MGInfAggregatedFlowGeneration(VideoDefinition[] vds, int[] weights, int[] startingTime, short[] units, java.lang.String fileName, boolean graphic)
          Defined to used VideoDefinition like JurassicParkLow,...
MGInfAggregatedFlowGeneration(VideoDefinition[] vds, int[] weights, short unit, java.lang.String fileName, boolean graphic)
          Defines to be used by MGInfComplexAggregatedFlowGeneration as super constructor
 
Method Summary
 void aggregatedScenarioGeneration()
          To generate an aggregated scenario from an MGInfAggregatedFlowGeneration object And a scenario file per flow type => + nbDifferentFlow scenarii
 void aggregatedStatisticsGeneration()
          To generate an aggregated scenario with statistics informations from an MGInfAggregatedFlowGeneration object And an informative scenario file per flow type => + nbDifferentFlow scenarii
 MGInfGeneration[] createSingleFlowGenerator()
          Method createSingleFlowGenerator : To create MGInfGeneration object from model,flowsDuration,codecs...
 int[] dataPerSlotDistribution()
          Sums all data amount of sources slot per slot
 int[][] dataPerSlotPerFlowType()
          Method dataPerSlotPerFlowType : This method permit to compute data per slot distribution for one type of source After we transform the result according to unit and number of source of this type => ex: if unit: kiloBytes -> Bytes and if there is 5 sources of this type data[i] = data[i]*5
 double flowScenariiGeneration()
           
 double flowStatisticsiGeneration()
          Returns theoritical throughput of the aggregated flow => =sum( w1*throughputi) where i =1...ndDifferentFlow
Create nbDifferentFlow scenario files
 java.lang.String getDocumentNames()
          Returns a String which discribes the different flows as: model name or document name(if it exists) (source number)
 int[] getFlowsPacketSize()
           
 int[] getFlowsTypeDuration()
           
 int getFlowTypeNumber()
           
 MGInfAggregatedFlowModel getModel()
           
 double getTheoriticalAggregatedFlowRate()
          Returns throughput of aggregatedFlow in kb/s
 double getTheoriticalTransmittedDataAmount()
          Returns theoritical transmitted data amount during the generation phase in MB
 int getTheoriticalTransmittedDataAmountBis()
          Returns theoritical transmitted data amount during the generation phase (in MBytes)
 int getTheoriticalTransmittedDataAmountTest(int[] slot)
           
static void main(java.lang.String[] args)
          Methode: Main pour tester la classe
 void parametersInitialization()
          This permit to initialized some parameters!!!
 void setDurations()
           
 void setFlowsTypeCodec(VideoCodec[] codecs)
           
 void setFlowsTypeDuration(int[] durations)
           
 void setFlowsTypeSlotDuration(double[] durations)
           
 void setFlowTypeNumber(int nbDifferentFlow)
           
 void setModel(MGInfAggregatedFlowModel mafm)
           
 void setPacketSize()
           
 void setSingleFlowCreator()
           
 void setSlotDuration(double duration)
           
 void setSlotsDuration()
          To set the duration of a slot for each source type
 void setSlotsNumber()
          To set the number of slots of each source type
 void setSourceNumber()
           
 void setSourceStartingTime(int[] startingTime)
           
 void setUnits(short[] units)
           
 int simulationDurationComputation()
          Method simulationDurationComputation : To compute the duration of the aggregated flow according to "starting time" scenario
 int sourceTypeChoice()
          To determine which source type send packets at one moment We define this method because flows have different characteristics notably packet size
 
Methods inherited from class multimedia.generation.GenericGeneration
changeScenarioFileExtension, getDuration, getGeneratedPacketNumber, getGraphicMode, getResultFileName, getResultFilePath, getResultFileSize, getSourceNumber, getUnit, getUnit, scenarioGeneration, setDuration, setGraphicMode, setResultFileName, setSourceNumber, setUnit, statisticsGeneration
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MGInfAggregatedFlowGeneration

public MGInfAggregatedFlowGeneration()

MGInfAggregatedFlowGeneration

public MGInfAggregatedFlowGeneration(MGInfAggregatedFlowModel model,
                                     VideoCodec[] codecs,
                                     int[] flowsDuration,
                                     int[] startingTime,
                                     short[] units,
                                     java.lang.String fileName,
                                     boolean graphic)
                              throws java.io.IOException
Parameters:
model -
codecs - a table of VideoCodec => length : nbDifferentFlow
flowsDuration - a table of int => length : nbDifferentFlow
startingTime - a table of int => length : flowsNumber
units - a table of short => length : nbDifferentFlow
fileName - Scenario file name
graphic -
Throws:
java.io.IOException

MGInfAggregatedFlowGeneration

public MGInfAggregatedFlowGeneration(VideoDefinition[] vds,
                                     int[] weights,
                                     short unit,
                                     java.lang.String fileName,
                                     boolean graphic)
                              throws java.io.IOException
Defines to be used by MGInfComplexAggregatedFlowGeneration as super constructor

Parameters:
vds -
weights -
unit -
fileName - Scenario file name
graphic -
Throws:
java.io.IOException

MGInfAggregatedFlowGeneration

public MGInfAggregatedFlowGeneration(VideoDefinition[] vds,
                                     int[] weights,
                                     int[] startingTime,
                                     short[] units,
                                     java.lang.String fileName,
                                     boolean graphic)
                              throws java.io.IOException
Defined to used VideoDefinition like JurassicParkLow,...

Parameters:
vds - a table of VideoDefinition => length : nbDifferentFlow
weights - a table of int => length : nbDifferentFlow
startingTime - a table of int => length : flowsNumber
units - a table of short => length : nbDifferentFlow
fileName - Scenario file name
graphic -
Throws:
java.io.IOException
Method Detail

parametersInitialization

public void parametersInitialization()
                              throws java.io.IOException
This permit to initialized some parameters!!!

Throws:
java.io.IOException

setSlotsNumber

public void setSlotsNumber()
To set the number of slots of each source type


setSlotsDuration

public void setSlotsDuration()
To set the duration of a slot for each source type


createSingleFlowGenerator

public MGInfGeneration[] createSingleFlowGenerator()
                                            throws java.io.IOException
Method createSingleFlowGenerator : To create MGInfGeneration object from model,flowsDuration,codecs... We could use MGInfGeneration.dataPerSlotDistributionTransformation, MGInfGeneration.dataPerSlotDistributionComputation methods

Returns:
MGInfGeneration[] : as many MGInfGeneration object as nbDifferentFlow
Throws:
java.io.IOException

simulationDurationComputation

public int simulationDurationComputation()
Method simulationDurationComputation : To compute the duration of the aggregated flow according to "starting time" scenario

Returns:
the simultation duration in ms

dataPerSlotPerFlowType

public int[][] dataPerSlotPerFlowType()
                               throws java.io.IOException
Method dataPerSlotPerFlowType : This method permit to compute data per slot distribution for one type of source After we transform the result according to unit and number of source of this type => ex: if unit: kiloBytes -> Bytes and if there is 5 sources of this type data[i] = data[i]*5

Returns:
a new time slots vector which represents the amount of data which has to be generated for this type of souce (i.e this flow)
size : [ nbDifferentFlow ] x [ slotsNumberI ]
Throws:
java.io.IOException

dataPerSlotDistribution

public int[] dataPerSlotDistribution()
                              throws java.io.IOException
Sums all data amount of sources slot per slot

Returns:
an array of int : size N
java.io.IOException

getFlowsPacketSize

public int[] getFlowsPacketSize()

aggregatedScenarioGeneration

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

Throws:
java.io.IOException

aggregatedStatisticsGeneration

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

Throws:
java.io.IOException

flowScenariiGeneration

public double flowScenariiGeneration()
                              throws java.io.IOException
java.io.IOException

flowStatisticsiGeneration

public double flowStatisticsiGeneration()
                                 throws java.io.IOException
Returns theoritical throughput of the aggregated flow => =sum( w1*throughputi) where i =1...ndDifferentFlow
Create nbDifferentFlow scenario files

Returns:
throughput
Throws:
java.io.IOException

sourceTypeChoice

public int sourceTypeChoice()
To determine which source type send packets at one moment We define this method because flows have different characteristics notably packet size

Returns:
int : a sourceType number ( between 1 and flowsNumber(=> number of different sources) )

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

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

getTheoriticalTransmittedDataAmountBis

public int getTheoriticalTransmittedDataAmountBis()
                                           throws java.io.IOException
Returns theoritical transmitted data amount during the generation phase (in MBytes)

Returns:
a data amount in MBytes
Throws:
java.io.IOException

getTheoriticalTransmittedDataAmountTest

public int getTheoriticalTransmittedDataAmountTest(int[] slot)
                                            throws java.io.IOException
java.io.IOException

getModel

public MGInfAggregatedFlowModel getModel()

getFlowsTypeDuration

public int[] getFlowsTypeDuration()

setModel

public void setModel(MGInfAggregatedFlowModel mafm)

setSlotDuration

public void setSlotDuration(double duration)

setFlowTypeNumber

public void setFlowTypeNumber(int nbDifferentFlow)

getFlowTypeNumber

public int getFlowTypeNumber()

setFlowsTypeDuration

public void setFlowsTypeDuration(int[] durations)

setFlowsTypeCodec

public void setFlowsTypeCodec(VideoCodec[] codecs)

setFlowsTypeSlotDuration

public void setFlowsTypeSlotDuration(double[] durations)
                              throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException

setSourceNumber

public void setSourceNumber()

setSourceStartingTime

public void setSourceStartingTime(int[] startingTime)
                           throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException

setUnits

public void setUnits(short[] units)

setPacketSize

public void setPacketSize()

setDurations

public void setDurations()

setSingleFlowCreator

public void setSingleFlowCreator()
                          throws java.io.IOException
java.io.IOException

main

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

java.io.IOException