cnet v4.0.4  

home topology files command‑line options the core API FAQ download and install

Attribute datatypes and their units

The specification of most attributes in the topology file must be followed by an additional unit to clarify or scale the units being used.

  • All times are stored internally using the data type CnetTime, and are measured in microseconds. In the topology file, times are specified using integer values followed by one of the suffixes - usec, msec or s.

  • All data sizes are stored internally as an integer number of bytes. In the topology file, data sizes are specified by an integer value followed by one of the suffixes - bytes, Kbytes, KB, or MB. The multiplier of KB means 1024 bytes. The multiplier of MB means (1024*1024) bytes.

  • Link bandwidths are stored internally as an integer number of bits-per-second. In the topology file, bandwidths are specified by an integer value followed by one of the suffixes - bps, Kbps, or Mbps. The multiplier of Kbps means 1000 bits-per-second. The multiplier of Mbps means (1000*1000) bits-per-second.

  • Link frequencies for LT_WLAN links are stored internally as a floating-point number of gigahertz. In the topology file, frequencies are specified with a floating-point value followed by one of the suffixes - MHz or GHz. The multiplier of MHz means (1000*1000) Hertz. The multiplier of GHz means (1000*1000*1000) Hertz.

  • All wireless power attributes are stored internally as a floating-point number of decibel-milliwatts. In the topology file, power attributes are specified with a floating-point value followed by one of the suffixes - dBm or mW, where mW stands for milliWatts which are related to decibel-milliwatts by the relationship: dBm = 10*log10(Watts / 0.001)

  • Boolean attributes may take on the values true, false, and toggle (to change any value from cnet's default).

  • Strings are enclosed within double quotation characters. A double quotation character may be included in a string by preceding it with a backslash character.

  • Probabilities specify a uniform distribution, with their value being the log-base-2 of the chance of failure (yes, this is ugly). In the topology file, a probability attribute may specify that an event occurs with a likelihood of (2 to the power P), where P is a small integer. For example, a probably of 3 specifies a probability of 1 in 8 (2 to the power 3). A probability of 0 (the default) means that the event will not occur.

cnet v4.0.4 - [email protected]