Skip to content
Snippets Groups Projects
Commit 6ac5dbdc authored by Nikolai Reed's avatar Nikolai Reed
Browse files

Updated Main.xtend

parent 1224f274
Branches OmnetTrans
No related tags found
No related merge requests found
...@@ -45,6 +45,7 @@ import dnimm3.PerformanceNetworkInterface ...@@ -45,6 +45,7 @@ import dnimm3.PerformanceNetworkInterface
import dnimm3.DNIUnit import dnimm3.DNIUnit
import dnimm3.DataUnit import dnimm3.DataUnit
import dnimm3.FlowRoute import dnimm3.FlowRoute
import dnimm3.ConstantDoubleVariable
class Main { class Main {
val static NAME = "dni3toomnet" val static NAME = "dni3toomnet"
...@@ -241,8 +242,6 @@ class Main { ...@@ -241,8 +242,6 @@ class Main {
netIF.name = iF.name netIF.name = iF.name
netIF.type = "NetworkInterface" netIF.type = "NetworkInterface"
net.submodules.add(netIF) net.submodules.add(netIF)
//TODO:
//get native Switching Capacity and wrtie to ini
writeIniLine(inig, "General", iF.name + ".mtu", iF.performance.MTU.toString(), "") writeIniLine(inig, "General", iF.name + ".mtu", iF.performance.MTU.toString(), "")
writeIniLine(inig, "General", iF.name + ".isUp", iF.performance.isIsUp.toString(), "") writeIniLine(inig, "General", iF.name + ".isUp", iF.performance.isIsUp.toString(), "")
...@@ -252,6 +251,7 @@ class Main { ...@@ -252,6 +251,7 @@ class Main {
//TODO //TODO
// read values correctly and parse them correctly currently // read values correctly and parse them correctly currently
// toSTring will return like this dnimm3.impl.ConstantDoubleVariableImpl@80169cf (value: 1.0) // toSTring will return like this dnimm3.impl.ConstantDoubleVariableImpl@80169cf (value: 1.0)
//CAST TO CONSTANTDOUBLEVARIABLE SEE BELOW
// need to access value 1.0 directly and use DoubleParameter // need to access value 1.0 directly and use DoubleParameter
if (n.intermediate != null) if (n.intermediate != null)
{ {
...@@ -261,7 +261,7 @@ class Main { ...@@ -261,7 +261,7 @@ class Main {
n.intermediate.performance.switchingCapacityPPS.unit.toString()) n.intermediate.performance.switchingCapacityPPS.unit.toString())
writeIniLine(inig, "General", n.name + ".nativeForwardingLatency", writeIniLine(inig, "General", n.name + ".nativeForwardingLatency",
n.intermediate.performance.forwardingLatency.toString(), n.intermediate.performance.forwardingLatency.toString(),
n.intermediate.performance.forwardingLatency.unit.toString()) (n.intermediate.performance.forwardingLatency as ConstantDoubleVariable).value.toString)
writeIniLine(inig, "General", n.name + ".nativeForwardingBandwithBPS", writeIniLine(inig, "General", n.name + ".nativeForwardingBandwithBPS",
n.intermediate.performance.forwardingBandwidthBPS.toString(), n.intermediate.performance.forwardingBandwidthBPS.toString(),
n.intermediate.performance.forwardingBandwidthBPS.unit.toString()) n.intermediate.performance.forwardingBandwidthBPS.unit.toString())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment