multimedia.generation
Class MGInfComplexAggregatedFlowGeneration

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

public class MGInfComplexAggregatedFlowGeneration
extends MGInfAggregatedFlowGeneration

Version:
0.1, 21/05/03
Author:
mladoue

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
MGInfComplexAggregatedFlowGeneration()
           
MGInfComplexAggregatedFlowGeneration(VideoDefinition[] vds, int[] weights, short unit, java.lang.String fileName, boolean graphic)
          Defined to be used by graphics.listener.MGInfAggregatedFlowGeneratorConstructor WARNING: Could be used only if all flows have the same slots number with the same duration
 
Method Summary
 MGInfGeneration[] createSingleFlowGenerator()
          Method createSingleFlowGenerator : To create MGInfGeneration object from model,flowsDuration,codecs...
 int[] dataPerSlotDistribution()
           You could use this method only if you have for all flow type the same number of slots and the same duration!!! We will sum data of each flow with a circular distribution to take into account starting time of each flow.
 int[][] 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
 java.lang.String getDocumentNames()
          Returns a String which discribes the different flows as:
model name or document name(if it exists) (source number)
static void main(java.lang.String[] args)
          Methode: Main pour tester la classe
 void setDurations()
           
 void setFlowsTypeDescription(VideoDefinition[] vds, short unit)
          To set flow duration, codec, unit of each type flow and video definition of each flow
 void setFlowsTypeDuration(VideoDefinition[] vds)
           
 void setFlowsTypeSlotDuration()
           
 void setParameters(VideoDefinition[] vds, int[] weights, short unit, java.lang.String fileName, boolean graphic)
           
 void setSlotNumber()
           
 void setSourceStartingTime()
           
 
Methods inherited from class multimedia.generation.MGInfAggregatedFlowGeneration
aggregatedScenarioGeneration, aggregatedStatisticsGeneration, flowScenariiGeneration, flowStatisticsiGeneration, getFlowsPacketSize, getFlowsTypeDuration, getFlowTypeNumber, getModel, getTheoriticalAggregatedFlowRate, getTheoriticalTransmittedDataAmount, getTheoriticalTransmittedDataAmountBis, getTheoriticalTransmittedDataAmountTest, parametersInitialization, setFlowsTypeCodec, setFlowsTypeDuration, setFlowsTypeSlotDuration, setFlowTypeNumber, setModel, setPacketSize, setSingleFlowCreator, setSlotDuration, setSlotsDuration, setSlotsNumber, setSourceNumber, setSourceStartingTime, setUnits, simulationDurationComputation, sourceTypeChoice
 
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

MGInfComplexAggregatedFlowGeneration

public MGInfComplexAggregatedFlowGeneration()

MGInfComplexAggregatedFlowGeneration

public MGInfComplexAggregatedFlowGeneration(VideoDefinition[] vds,
                                            int[] weights,
                                            short unit,
                                            java.lang.String fileName,
                                            boolean graphic)
                                     throws java.io.IOException
Defined to be used by graphics.listener.MGInfAggregatedFlowGeneratorConstructor WARNING: Could be used only if all flows have the same slots number with the same duration

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

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)

Overrides:
getDocumentNames in class MGInfAggregatedFlowGeneration
Returns:
a string = testName

dataPerSlotPerFlowType

public int[][] dataPerSlotPerFlowType()
                               throws java.io.IOException

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

Overrides:
dataPerSlotPerFlowType in class MGInfAggregatedFlowGeneration
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

You could use this method only if you have for all flow type the same number of slots and the same duration!!! We will sum data of each flow with a circular distribution to take into account starting time of each flow. That means:

Sums all data amount of sources slot per slot

Overrides:
dataPerSlotDistribution in class MGInfAggregatedFlowGeneration
Returns:
a table of int : size slotsNumber[0]
java.io.IOException

setFlowsTypeDuration

public void setFlowsTypeDuration(VideoDefinition[] vds)
                          throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException

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

Overrides:
createSingleFlowGenerator in class MGInfAggregatedFlowGeneration
Returns:
MGInfGeneration[] : as many MGInfGeneration object as nbDifferentFlow
Throws:
java.io.IOException

setFlowsTypeSlotDuration

public void setFlowsTypeSlotDuration()

setFlowsTypeDescription

public void setFlowsTypeDescription(VideoDefinition[] vds,
                                    short unit)
                             throws java.lang.IllegalArgumentException
To set flow duration, codec, unit of each type flow and video definition of each flow

Parameters:
vds -
java.lang.IllegalArgumentException

setDurations

public void setDurations()
Overrides:
setDurations in class MGInfAggregatedFlowGeneration

setSourceStartingTime

public void setSourceStartingTime()

setSlotNumber

public void setSlotNumber()
Overrides:
setSlotNumber in class MGInfAggregatedFlowGeneration

setParameters

public void setParameters(VideoDefinition[] vds,
                          int[] weights,
                          short unit,
                          java.lang.String fileName,
                          boolean graphic)
                   throws java.io.IOException
java.io.IOException

main

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

java.io.IOException