Package casa.lepton.conf
Class OppNetProperties
java.lang.Object
casa.util.conf.ConfigurationProperties
casa.lepton.conf.OppNetProperties
public class OppNetProperties
extends casa.util.conf.ConfigurationProperties
Typed properties used by the graph and loaded from a configuration file where
the property keys are those of the
PropertyKey
enumeration in
downcase characters.
In addition, this class provides the properties common to all the nodes,
loaded from the same configuration file as the graph properties (see
getOppNodeProperties()
)-
Field Summary
Fields inherited from class casa.util.conf.ConfigurationProperties
keys, properties
-
Constructor Summary
ConstructorDescriptionOppNetProperties
(String[] args) Initialize properties from command line arguments in the form key=value or conf=confFilenameOppNetProperties
(String[] args, String confFilename) Initialize properties from command line arguments in the form key=value or conf=confFilename -
Method Summary
Modifier and TypeMethodDescriptiondouble
getAccel()
Give the acceleration of the simulation.casa.util.geom.AreaCar
Give the background image or graph areaGive the name of the DGS file that defines a graph to be displayed as backgroundGive the background imageGive the connectivity profiles and their characteristicsint
Give the console port to access the network graph.Give the default status of a edge if no status is supplied when it is createdGive a writer to the DGS log of the dynamic graph produced during the simulationlong
Give the duration of the simulation (in ms).Give the default status of a edge if no status is supplied when it is createdGive the connectivitytypes and/or status for which the edges are hiddengetHost()
long
long
long
int
int
int
getInDgs()
Give the name of the DGS input file that defines the nodes mobility [and contacts]Give a reader to the file that contains an history, composed of lines in the form: "start_step end_step duration node_id", where start and end steps are in mslong
Give the time when LEPTON should start (absolute, in ms)int
Give the number of nodesGive the default status of a node if no status is supplied when it is createdgetNodes()
Give the number of nodes for each profile name.Give the ';' separated list of node_start_step,node_end_step,node_idGive the class that extendsOppNetRules
and defines the network rulesGive the node properties common to all the nodes, loaded from the same configuration file as the graph propertieslong
Give the network refresh period (in ms), ie the period between the simulation steps.long
Give the reference virtual time (in ms), i.e. the virtual time at the beginning of the simulationGive the resolution of the output imagescasa.util.geom.AreaCar
Give the simulation areaboolean
Return true to avoid superposition of images if the background is transparentGive the stylesheet that defines the appearance of the graphGive the stylesheet that defines the appearance of the graphGive the background color of the time in the frameGive the location of the block that contains the time in the frameGive the foreground color of the time in the frameGive the font of the time in the frameprotected Object
getTypedValue
(casa.util.conf.PropertyKey key) Give the directory where output images will be storedGive the prefix of the output images filenamesboolean
isManual()
Return true if the edges must be set 'manually'boolean
isShow()
Return true if the graph should be displayed during simulationboolean
Return true if the nodes mobility is read from an input DGS and the edges representing the contacts must be computed during the simulation.Methods inherited from class casa.util.conf.ConfigurationProperties
addKeys, addProperties, addProperties, addProperties, addProperties, displayAllProperties, displayDefinedProperties, expandVariables, getAreaProperty, getBooleanProperty, getClassProperty, getColorProperty, getCoordProperty, getDoubleProperty, getFileProperty, getIntProperty, getKeys, getListProperty, getLongProperty, getMapProperty, getProperty, getReaderProperty, getSetProperty, getWriterProperty, hasProperty, makeReader, propertyToString, propertyToString, setProperty
-
Field Details
-
DEFAULT_CONF_FILENAME
- See Also:
-
-
Constructor Details
-
OppNetProperties
Initialize properties from command line arguments in the form key=value or conf=confFilename- Parameters:
args
- the command line arguments
-
OppNetProperties
Initialize properties from command line arguments in the form key=value or conf=confFilename- Parameters:
args
- the command line argumentsconfFilename
-
-
-
Method Details
-
getOppNodeProperties
Give the node properties common to all the nodes, loaded from the same configuration file as the graph properties- Returns:
- the node common properties
-
getTypedValue
- Specified by:
getTypedValue
in classcasa.util.conf.ConfigurationProperties
-
getLogDirectory
-
getLeptonStartTime
public long getLeptonStartTime()Give the time when LEPTON should start (absolute, in ms)- Returns:
- the time when LEPTON should start
-
getNodesHist
Give the ';' separated list of node_start_step,node_end_step,node_id- Returns:
- nodes history
-
isManual
public boolean isManual()Return true if the edges must be set 'manually'- Returns:
- true if the edges must be set 'manually'
-
getInHist
Give a reader to the file that contains an history, composed of lines in the form: "start_step end_step duration node_id", where start and end steps are in ms- Returns:
- a reader to the history file
-
getAccel
public double getAccel()Give the acceleration of the simulation. The value 1 means realtime simulation; a value greater than 1 means faster simulation; a value less than 1 means slower; the value 0 means full speed (no wait between two steps)- Returns:
- acceleration of the simulation
-
getRefTime
public long getRefTime()Give the reference virtual time (in ms), i.e. the virtual time at the beginning of the simulation- Returns:
- the reference virtual time
-
getSimulArea
public casa.util.geom.AreaCar getSimulArea()Give the simulation area- Returns:
- the simulation area
-
getOppNetRules
Give the class that extendsOppNetRules
and defines the network rules- Returns:
- the class that extends casa.lepton.NetworkRules and defines the network rules
-
getEdgeDefaultStatus
Give the default status of a edge if no status is supplied when it is created- Returns:
- the edge default status
-
getNodeDefaultStatus
Give the default status of a node if no status is supplied when it is created- Returns:
- the node default status
-
getDefaultConnectivityType
Give the default status of a edge if no status is supplied when it is created- Returns:
- the edge default status
-
getConnectivityProfiles
Give the connectivity profiles and their characteristics- Returns:
- the connectivity profiles and their characteristics
-
getHost
-
getHubAddress
-
getHubPort
public int getHubPort() -
getHubLatency
public long getHubLatency() -
getHubPeriod
public long getHubPeriod() -
getHubBitrate
public long getHubBitrate() -
getHubVerbosity
public int getHubVerbosity() -
getHubSocketSize
public int getHubSocketSize() -
getOppNetAdapter
-
getConsolePort
public int getConsolePort()Give the console port to access the network graph. If the console port is 0, no console is opened- Returns:
- console port to access the network graph
-
getInDgs
Give the name of the DGS input file that defines the nodes mobility [and contacts]- Returns:
- DGS input filename
-
makeEdges
public boolean makeEdges()Return true if the nodes mobility is read from an input DGS and the edges representing the contacts must be computed during the simulation. Only used by theOppNetGraphDGS
class- Returns:
- true if the edges representing the contacts must be computed during the simulation
-
getNbNodes
public int getNbNodes()Give the number of nodes- Returns:
- the number of nodes
-
getNodes
Give the number of nodes for each profile name.- Returns:
- pairs (profile name, nb nodes)
-
getPeriod
public long getPeriod()Give the network refresh period (in ms), ie the period between the simulation steps. Only used by theOppNetGraphWalk
class- Returns:
- network refresh period
-
getDuration
public long getDuration()Give the duration of the simulation (in ms). If the value is -1, the duration of the simulation is unlimited. Only used by theOppNetGraphWalk
class- Returns:
- the duration of the simulation
-
getDgsWriter
Give a writer to the DGS log of the dynamic graph produced during the simulation- Returns:
- a writer to the DGS log of the simulation dynamic graph
-
isShow
public boolean isShow()Return true if the graph should be displayed during simulation- Returns:
- true if the graph should be displayed during simulation
-
getStylesheetReader
Give the stylesheet that defines the appearance of the graph- Returns:
- the stylesheet
-
getStylesheet
Give the stylesheet that defines the appearance of the graph- Returns:
- the stylesheet
-
getHiddenEdges
Give the connectivitytypes and/or status for which the edges are hidden- Returns:
- connectivity types and/or status for which the edges are hidden
-
getBackgroundGraph
Give the name of the DGS file that defines a graph to be displayed as background- Returns:
- the DGS filename that defines a graph to be displayed as background
-
getBackgroundImage
Give the background image- Returns:
- the background image
-
getBackgroundArea
public casa.util.geom.AreaCar getBackgroundArea()Give the background image or graph area- Returns:
- the background area
-
getTimeCorner
Give the location of the block that contains the time in the frame- Returns:
- the location of the block that contains the time in the frame
-
getTimeFont
Give the font of the time in the frame- Returns:
- the font of the time
-
getTimeFgColor
Give the foreground color of the time in the frame- Returns:
- foreground color of the time
-
getTimeBgColor
Give the background color of the time in the frame- Returns:
- background color of the time
-
getVideoImgDir
Give the directory where output images will be stored- Returns:
- the directory where output images will be stored
-
getVideoImgPrefix
Give the prefix of the output images filenames- Returns:
- the prefix of the output images filenames
-
getStackImages
public boolean getStackImages()Return true to avoid superposition of images if the background is transparent- Returns:
- true to avoid superposition of images
-
getResolution
Give the resolution of the output images- Returns:
- the resolution of the output images
-