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 Details

  • Constructor Details

    • OppNetProperties

      public OppNetProperties(String[] args)
      Initialize properties from command line arguments in the form key=value or conf=confFilename
      Parameters:
      args - the command line arguments
    • OppNetProperties

      public OppNetProperties(String[] args, String confFilename)
      Initialize properties from command line arguments in the form key=value or conf=confFilename
      Parameters:
      args - the command line arguments
      confFilename -
  • Method Details

    • getOppNodeProperties

      public OppNodeProperties 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

      protected Object getTypedValue(casa.util.conf.PropertyKey key)
      Specified by:
      getTypedValue in class casa.util.conf.ConfigurationProperties
    • getLogDirectory

      public File getLogDirectory()
    • getLeptonStartTime

      public long getLeptonStartTime()
      Give the time when LEPTON should start (absolute, in ms)
      Returns:
      the time when LEPTON should start
    • getNodesHist

      public String 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

      public BufferedReader 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

      public OppNetRules getOppNetRules()
      Give the class that extends OppNetRules and defines the network rules
      Returns:
      the class that extends casa.lepton.NetworkRules and defines the network rules
    • getEdgeDefaultStatus

      public String getEdgeDefaultStatus()
      Give the default status of a edge if no status is supplied when it is created
      Returns:
      the edge default status
    • getNodeDefaultStatus

      public String getNodeDefaultStatus()
      Give the default status of a node if no status is supplied when it is created
      Returns:
      the node default status
    • getDefaultConnectivityType

      public String getDefaultConnectivityType()
      Give the default status of a edge if no status is supplied when it is created
      Returns:
      the edge default status
    • getConnectivityProfiles

      public ConnectivityProfiles getConnectivityProfiles()
      Give the connectivity profiles and their characteristics
      Returns:
      the connectivity profiles and their characteristics
    • getHost

      public String getHost()
    • getHubAddress

      public String 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

      public OppNetAdapter 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

      public String 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 the OppNetGraphDGS 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

      public Map<String,Integer> 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 the OppNetGraphWalk 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 the OppNetGraphWalk class
      Returns:
      the duration of the simulation
    • getDgsWriter

      public PrintWriter 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

      public BufferedReader getStylesheetReader()
      Give the stylesheet that defines the appearance of the graph
      Returns:
      the stylesheet
    • getStylesheet

      public String getStylesheet()
      Give the stylesheet that defines the appearance of the graph
      Returns:
      the stylesheet
    • getHiddenEdges

      public Set<String> 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

      public String 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

      public File 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

      public Corner 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

      public Font getTimeFont()
      Give the font of the time in the frame
      Returns:
      the font of the time
    • getTimeFgColor

      public Color getTimeFgColor()
      Give the foreground color of the time in the frame
      Returns:
      foreground color of the time
    • getTimeBgColor

      public Color getTimeBgColor()
      Give the background color of the time in the frame
      Returns:
      background color of the time
    • getVideoImgDir

      public File getVideoImgDir()
      Give the directory where output images will be stored
      Returns:
      the directory where output images will be stored
    • getVideoImgPrefix

      public String 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

      public String getResolution()
      Give the resolution of the output images
      Returns:
      the resolution of the output images